Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55710 - in trunk/libs/spirit/doc: . html html/spirit html/spirit/karma html/spirit/karma/performance_measurements html/spirit/karma/performance_measurements/numeric_performance html/spirit/karma/quick_reference html/spirit/karma/reference html/spirit/karma/reference/auxiliary html/spirit/karma/reference/char html/spirit/karma/reference/directive html/spirit/karma/reference/generator_concepts html/spirit/karma/reference/numeric html/spirit/karma/reference/operator html/spirit/karma/tutorials html/spirit/lex html/spirit/lex/abstracts html/spirit/lex/abstracts/lexer_primitives html/spirit/lex/reference html/spirit/lex/reference/concepts html/spirit/lex/tutorials html/spirit/qi/quick_reference html/spirit/qi/reference html/spirit/qi/reference/auxiliary html/spirit/qi/reference/directive html/spirit/qi/reference/parser_concepts html/spirit/qi/reference/string html/spirit/support qi
From: joel_at_[hidden]
Date: 2009-08-22 01:26:54


Author: djowel
Date: 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
New Revision: 55710
URL: http://svn.boost.org/trac/boost/changeset/55710

Log:
tweaks to chunking
Text files modified:
   trunk/libs/spirit/doc/Jamfile | 2
   trunk/libs/spirit/doc/html/index.html | 2
   trunk/libs/spirit/doc/html/spirit/acknowledgments.html | 2
   trunk/libs/spirit/doc/html/spirit/faq.html | 12
   trunk/libs/spirit/doc/html/spirit/karma.html | 6
   trunk/libs/spirit/doc/html/spirit/karma/performance_measurements.html | 6
   trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance.html | 802 +++++++++++
   trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/double_performance.html | 2
   trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/format_performance.html | 2
   trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html | 2
   trunk/libs/spirit/doc/html/spirit/karma/quick_reference/compound_attribute_rules.html | 20
   trunk/libs/spirit/doc/html/spirit/karma/quick_reference/predefined_primitive_generators.html | 190 +-
   trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary.html | 486 ++++++
   trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eol.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eps.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/lazy.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/char.html | 1070 +++++++++++++++
   trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_class.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_generator.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive.html | 2308 +++++++++++++++++++++++++++++++++
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive/alignment.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive/buffer.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive/delimit.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive/maxwidth.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive/omit.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive/repeat.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/directive/upperlower.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts.html | 870 ++++++++++++
   trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html | 12
   trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/generator.html | 10
   trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/narygenerator.html | 12
   trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html | 10
   trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html | 12
   trunk/libs/spirit/doc/html/spirit/karma/reference/karma_basics.html | 11
   trunk/libs/spirit/doc/html/spirit/karma/reference/numeric.html | 2734 +++++++++++++++++++++++++++++++++++++++
   trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/floating_point.html | 20
   trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html | 16
   trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html | 16
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator.html | 2095 ++++++++++++++++++++++++++++++
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/alternative.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/and_predicate.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/kleene.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/list.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/not_predicate.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/optional.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/plus.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/reference/operator/sequence.html | 14
   trunk/libs/spirit/doc/html/spirit/karma/tutorials/karma_attributes.html | 12
   trunk/libs/spirit/doc/html/spirit/karma/tutorials/quick_start.html | 2
   trunk/libs/spirit/doc/html/spirit/karma/tutorials/semantic_actions.html | 2
   trunk/libs/spirit/doc/html/spirit/karma/tutorials/warming_up.html | 10
   trunk/libs/spirit/doc/html/spirit/lex.html | 8
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives.html | 364 +++++
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_values.html | 6
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_semantic_actions.html | 10
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_states.html | 6
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_static_model.html | 4
   trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_tokenizing.html | 11
   trunk/libs/spirit/doc/html/spirit/lex/lexer_introduction.html | 6
   trunk/libs/spirit/doc/html/spirit/lex/reference/concepts.html | 395 +++++
   trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/lexer.html | 6
   trunk/libs/spirit/doc/html/spirit/lex/reference/lexer_class.html | 14
   trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart1.html | 10
   trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart2.html | 8
   trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart3.html | 10
   trunk/libs/spirit/doc/html/spirit/qi/quick_reference/compound_attribute_rules.html | 2
   trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers.html | 1282 +++++++++--------
   trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary.html | 267 +++
   trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary/attr.html | 14
   trunk/libs/spirit/doc/html/spirit/qi/reference/basics.html | 10
   trunk/libs/spirit/doc/html/spirit/qi/reference/directive.html | 267 +++
   trunk/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html | 14
   trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts.html | 765 +++++++++++
   trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/binaryparser.html | 12
   trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/naryparser.html | 12
   trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/parser.html | 10
   trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html | 10
   trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/unaryparser.html | 12
   trunk/libs/spirit/doc/html/spirit/qi/reference/string.html | 821 +++++++++++
   trunk/libs/spirit/doc/html/spirit/qi/reference/string/lit_string.html | 14
   trunk/libs/spirit/doc/html/spirit/qi/reference/string/symbols.html | 16
   trunk/libs/spirit/doc/html/spirit/support/multi_pass.html | 28
   trunk/libs/spirit/doc/html/spirit/what_s_new.html | 6
   trunk/libs/spirit/doc/qi/quick_reference.qbk | 40
   84 files changed, 14305 insertions(+), 1191 deletions(-)

Modified: trunk/libs/spirit/doc/Jamfile
==============================================================================
--- trunk/libs/spirit/doc/Jamfile (original)
+++ trunk/libs/spirit/doc/Jamfile 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -19,7 +19,7 @@
         <xsl:param>boost.root=../../../..
         <xsl:param>boost.libraries=../../../libraries.htm
         <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
- <xsl:param>chunk.section.depth=4
+ <xsl:param>chunk.section.depth=3
         <xsl:param>chunk.first.sections=1
         <xsl:param>toc.section.depth=3
         <xsl:param>toc.max.depth=3

Modified: trunk/libs/spirit/doc/html/index.html
==============================================================================
--- trunk/libs/spirit/doc/html/index.html (original)
+++ trunk/libs/spirit/doc/html/index.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -191,7 +191,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: August 22, 2009 at 05:06:06 GMT</small></p></td>
+<td align="left"><p><small>Last revised: August 22, 2009 at 05:23:16 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/spirit/doc/html/spirit/acknowledgments.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/acknowledgments.html (original)
+++ trunk/libs/spirit/doc/html/spirit/acknowledgments.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -50,7 +50,7 @@
       <span class="bold"><b>FIXME</b></span>: Add more people
     </p>
 <a name="spirit.acknowledgments.acknowledgements_from_the_spirit_v1__emphasis_classic__emphasis__documentation"></a><h3>
-<a name="id616101"></a>
+<a name="id616291"></a>
       <a href="acknowledgments.html#spirit.acknowledgments.acknowledgements_from_the_spirit_v1__emphasis_classic__emphasis__documentation">Acknowledgements
       from the Spirit V1 <span class="emphasis"><em>classic</em></span> Documentation</a>
     </h3>

Modified: trunk/libs/spirit/doc/html/spirit/faq.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/faq.html (original)
+++ trunk/libs/spirit/doc/html/spirit/faq.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
 <div></div>
 </div>
 <a name="spirit.faq.i_m_getting_multiple_symbol_definition_errors_while_using_visual_c____anything_i_could_do_about_that_"></a><h3>
-<a name="id613806"></a>
+<a name="id613986"></a>
       <a href="faq.html#spirit.faq.i_m_getting_multiple_symbol_definition_errors_while_using_visual_c____anything_i_could_do_about_that_">I'm
       getting multiple symbol definition errors while using Visual C++. Anything
       I could do about that?</a>
@@ -67,7 +67,7 @@
       static_assert.
     </p>
 <a name="spirit.faq.i_m_very_confused_about_the_header_hell_in_my_boost_spirit_directory__what_s_all_this_about_"></a><h3>
-<a name="id614070"></a>
+<a name="id614250"></a>
       <a href="faq.html#spirit.faq.i_m_very_confused_about_the_header_hell_in_my_boost_spirit_directory__what_s_all_this_about_">I'm
       very confused about the header hell in my boost/spirit directory. What's all
       this about?</a>
@@ -175,19 +175,19 @@
       are available.
     </p>
 <a name="spirit.faq.why_doesn_t_my_symbol_table_work_in_a__code__phrase_role__identifier__no_case__phrase___code__directive_"></a><h3>
-<a name="id614815"></a>
+<a name="id614999"></a>
       <a href="faq.html#spirit.faq.why_doesn_t_my_symbol_table_work_in_a__code__phrase_role__identifier__no_case__phrase___code__directive_">Why
       doesn't my symbol table work in a <tt class="computeroutput"><span class="identifier">no_case</span></tt>
       directive?</a>
     </h3>
 <p>
- In order to perform case-insensitive parsing (using no_case[a])
- with a symbol table (i.e. use a symbols<Ch, T> parser in a <tt class="computeroutput"><span class="identifier">no_case</span></tt>
+ In order to perform case-insensitive parsing (using no_case[a])
+ with a symbol table (i.e. use a symbols<Ch, T> parser in a <tt class="computeroutput"><span class="identifier">no_case</span></tt>
       directive), that symbol table needs to be filled with all-lowercase contents.
       Entries containing one or more uppercase characters will not match any input.
     </p>
 <a name="spirit.faq.i_m_getting_a_compilation_error_mentioning__code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__function__phrase___code__and_or___________code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__function4__phrase___code___what_does_this_mean_"></a><h3>
-<a name="id614967"></a>
+<a name="id615151"></a>
       <a href="faq.html#spirit.faq.i_m_getting_a_compilation_error_mentioning__code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__function__phrase___code__and_or___________code__phrase_role__identifier__boost__phrase__phrase_role__special______phrase__phrase_role__identifier__function4__phrase___code___what_does_this_mean_">I'm
       getting a compilation error mentioning <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span></tt>
       and/or <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function4</span></tt>. What does this mean?</a>

Modified: trunk/libs/spirit/doc/html/spirit/karma.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
 <link rel="home" href="../index.html" title="Spirit 2.1">
 <link rel="up" href="../index.html" title="Spirit 2.1">
-<link rel="previous" href="qi/reference/string/symbols.html" title="symbols">
+<link rel="previous" href="qi/reference/string.html" title="String">
 <link rel="next" href="karma/tutorials.html" title="Tutorials">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="qi/reference/string/symbols.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="karma/tutorials.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="qi/reference/string.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="karma/tutorials.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -82,7 +82,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="qi/reference/string/symbols.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="karma/tutorials.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="qi/reference/string.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.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="karma/tutorials.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/performance_measurements.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
 <link rel="home" href="../../index.html" title="Spirit 2.1">
 <link rel="up" href="../karma.html" title=" Karma - Writing Generators">
-<link rel="previous" href="reference/auxiliary/lazy.html" title="lazy">
+<link rel="previous" href="reference/auxiliary.html" title="Auxiliary">
 <link rel="next" href="performance_measurements/numeric_performance.html" title="
         Performance of Numeric Generators">
 </head>
@@ -21,7 +21,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="reference/auxiliary/lazy.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma.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="performance_measurements/numeric_performance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="reference/auxiliary.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma.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="performance_measurements/numeric_performance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -44,7 +44,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="reference/auxiliary/lazy.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma.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="performance_measurements/numeric_performance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="reference/auxiliary.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../karma.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="performance_measurements/numeric_performance.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -8,8 +8,7 @@
 <link rel="home" href="../../../index.html" title="Spirit 2.1">
 <link rel="up" href="../performance_measurements.html" title="Performance Measurements">
 <link rel="previous" href="../performance_measurements.html" title="Performance Measurements">
-<link rel="next" href="numeric_performance/int_performance.html" title="
- Comparing the performance of a single int_ generator">
+<link rel="next" href="../../lex.html" title=" Lex - Writing Lexical Analyzers">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -22,7 +21,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../performance_measurements.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../performance_measurements.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="numeric_performance/int_performance.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../performance_measurements.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../performance_measurements.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="../../lex.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -34,13 +33,802 @@
 <div></div>
 </div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="numeric_performance/int_performance.html">
+<dt><span class="section"><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.int_performance">
           Comparing the performance of a single int_ generator</a></span></dt>
-<dt><span class="section"><a href="numeric_performance/double_performance.html">
+<dt><span class="section"><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.double_performance">
           Comparing the performance of a single double_ generator</a></span></dt>
-<dt><span class="section"><a href="numeric_performance/format_performance.html">
+<dt><span class="section"><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.format_performance">
           Comparing the performance of a sequence of several generators</a></span></dt>
 </dl></div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.performance_measurements.numeric_performance.int_performance"></a><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.int_performance" title="
+ Comparing the performance of a single int_ generator">
+ Comparing the performance of a single int_ generator</a>
+</h5></div></div>
+<div></div>
+</div>
+<p>
+ This performance measurements are centered around default formatting
+ of a single <tt class="computeroutput"><span class="keyword">int</span></tt> integer
+ number using different libraries and methods. The overall execution times
+ for those examples are compared below. We compare using <tt class="computeroutput"><span class="identifier">sprintf</span></tt>, C++ iostreams, Boost.Format,
+ and <span class="emphasis"><em>Spirit.Karma</em></span>.
+ </p>
+<p>
+ For the full source code of the performance test please see here: int_generator.cpp).
+ All the measurements have been done by executing 10000000 iterations
+ for each formatting type (NUMITERATIONS is set to 10000000 in the code
+ shown below).
+ </p>
+<p>
+ Code used to measure the performance for <tt class="computeroutput"><span class="identifier">ltoa</span></tt>:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">buffer</span><span class="special">[</span><span class="number">65</span><span class="special">];</span> <span class="comment">// we don't expect more than 64 bytes to be generated here
+</span><span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">MAX_ITERATION</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">ltoa</span><span class="special">(</span><span class="identifier">v</span><span class="special">[</span><span class="identifier">i</span><span class="special">],</span> <span class="identifier">buffer</span><span class="special">,</span> <span class="number">10</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for standard C++ iostreams:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">stringstream</span> <span class="identifier">str</span><span class="special">;</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">MAX_ITERATION</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">str</span><span class="special">.</span><span class="identifier">str</span><span class="special">(</span><span class="string">""</span><span class="special">);</span>
+ <span class="identifier">str</span> <span class="special">&lt;&lt;</span> <span class="identifier">v</span><span class="special">[</span><span class="identifier">i</span><span class="special">];</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for Boost.Format:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><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="identifier">boost</span><span class="special">::</span><span class="identifier">format</span> <span class="identifier">int_format</span><span class="special">(</span><span class="string">"%d"</span><span class="special">);</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">MAX_ITERATION</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">str</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">str</span><span class="special">(</span><span class="identifier">int_format</span> <span class="special">%</span> <span class="identifier">v</span><span class="special">[</span><span class="identifier">i</span><span class="special">]);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for <span class="emphasis"><em>Spirit.Karma</em></span>
+ using a plain character buffer:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">buffer</span><span class="special">[</span><span class="number">65</span><span class="special">];</span> <span class="comment">// we don't expect more than 64 bytes to be generated here
+</span><span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">MAX_ITERATION</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">char</span> <span class="special">*</span><span class="identifier">ptr</span> <span class="special">=</span> <span class="identifier">buffer</span><span class="special">;</span>
+ <span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">ptr</span><span class="special">,</span> <span class="identifier">int_</span><span class="special">,</span> <span class="identifier">v</span><span class="special">[</span><span class="identifier">i</span><span class="special">]);</span>
+ <span class="special">*</span><span class="identifier">ptr</span> <span class="special">=</span> <span class="char">'\0'</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The following table shows the overall performance results collected while
+ using different compilers. All times are in seconds measured for 10000000
+ iterations (platform: Windows7, Intel Core Duo(tm) Processor, 2.8GHz,
+ 4GByte RAM). For a more readable comparison of the results see this
+ figure.
+ </p>
+<div class="table">
+<a name="id570938"></a><p class="title"><b>Table 15. Performance comparison for a single int (all
+ times in [s], 10000000 iterations)</b></p>
+<table class="table" summary="Performance comparison for a single int (all
+ times in [s], 10000000 iterations)">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Library
+ </p></th>
+<th><p>
+ gcc 4.4.0 (32 bit)
+ </p></th>
+<th><p>
+ VC++ 10 (32 bit)
+ </p></th>
+<th><p>
+ Intel 11.1 (32 bit)
+ </p></th>
+<th><p>
+ gcc 4.4.0 (64 bit)
+ </p></th>
+<th><p>
+ VC++ 10 (64 bit)
+ </p></th>
+<th><p>
+ Intel 11.1 (64 bit)
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ ltoa
+ </p></td>
+<td><p>
+ 1.542
+ </p></td>
+<td><p>
+ 0.895
+ </p></td>
+<td><p>
+ 0.884
+ </p></td>
+<td><p>
+ 1.163
+ </p></td>
+<td><p>
+ 1.099
+ </p></td>
+<td><p>
+ 0.906
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ iostreams
+ </p></td>
+<td><p>
+ 6.548
+ </p></td>
+<td><p>
+ 13.727
+ </p></td>
+<td><p>
+ 11.898
+ </p></td>
+<td><p>
+ 3.464
+ </p></td>
+<td><p>
+ 8.316
+ </p></td>
+<td><p>
+ 8.115
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ Boost.Format
+ </p></td>
+<td><p>
+ 16.998
+ </p></td>
+<td><p>
+ 21.813
+ </p></td>
+<td><p>
+ 20.477
+ </p></td>
+<td><p>
+ 17.464
+ </p></td>
+<td><p>
+ 14.662
+ </p></td>
+<td><p>
+ 13.646
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <span class="emphasis"><em>Spirit.Karma</em></span> int_
+ </p></td>
+<td><p>
+ 1.421
+ </p></td>
+<td><p>
+ 0.744
+ </p></td>
+<td><p>
+ 0.697
+ </p></td>
+<td><p>
+ 1.072
+ </p></td>
+<td><p>
+ 0.953
+ </p></td>
+<td><p>
+ 0.606
+ </p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<p>
+ </p>
+<div class="figure">
+<a name="spirit.karma.int_performance"></a><p class="title"><b>Figure 3. Performance comparison for a single int</b></p>
+<span class="inlinemediaobject"><img src="./images/int_performance.png" alt="Performance
+ comparison for a single int"></span>
+</div>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.performance_measurements.numeric_performance.double_performance"></a><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.double_performance" title="
+ Comparing the performance of a single double_ generator">
+ Comparing the performance of a single double_ generator</a>
+</h5></div></div>
+<div></div>
+</div>
+<p>
+ This performance measurements are centered around default formatting
+ of a single <tt class="computeroutput"><span class="keyword">double</span></tt> floating
+ point number using different libraries and methods. The overall execution
+ times for those examples are compared below. We compare using <tt class="computeroutput"><span class="identifier">sprintf</span></tt>, C++ iostreams, Boost.Format,
+ and <span class="emphasis"><em>Spirit.Karma</em></span>.
+ </p>
+<p>
+ For the full source code of the performance test please see here: double_performance.cpp).
+ All the measurements have been done by executing 1000000 iterations for
+ each formatting type (NUMITERATIONS is set to 1000000 in the code shown
+ below).
+ </p>
+<p>
+ Code used to measure the performance for <tt class="computeroutput"><span class="identifier">sprintf</span></tt>:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">buffer</span><span class="special">[</span><span class="number">256</span><span class="special">];</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">sprintf</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="string">"%f"</span><span class="special">,</span> <span class="number">12345.12345</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for standard C++ iostreams:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">stringstream</span> <span class="identifier">strm</span><span class="special">;</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">strm</span><span class="special">.</span><span class="identifier">str</span><span class="special">(</span><span class="string">""</span><span class="special">);</span>
+ <span class="identifier">strm</span> <span class="special">&lt;&lt;</span> <span class="number">12345.12345</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for Boost.Format:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">generated</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">format</span> <span class="identifier">double_format</span><span class="special">(</span><span class="string">"%f"</span><span class="special">);</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">generated</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">str</span><span class="special">(</span><span class="identifier">double_format</span> <span class="special">%</span> <span class="number">12345.12345</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The following code shows the common definitions used by all <span class="emphasis"><em>Spirit.Karma</em></span>
+ performance measurements as listed below:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for <span class="emphasis"><em>Spirit.Karma</em></span>
+ using a plain character buffer:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">buffer</span><span class="special">[</span><span class="number">256</span><span class="special">];</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">char</span> <span class="special">*</span><span class="identifier">p</span> <span class="special">=</span> <span class="identifier">buffer</span><span class="special">;</span>
+ <span class="identifier">generate</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span> <span class="identifier">double_</span><span class="special">,</span> <span class="number">12345.12345</span><span class="special">);</span>
+ <span class="special">*</span><span class="identifier">p</span> <span class="special">=</span> <span class="char">'\0'</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The following table shows the overall performance results collected while
+ using different compilers. All times are in seconds measured for 1000000
+ iterations (platform: Windows7, Intel Core Duo(tm) Processor, 2.8GHz,
+ 4GByte RAM). For a more readable comparison of the results see this
+ figure.
+ </p>
+<div class="table">
+<a name="id572317"></a><p class="title"><b>Table 16. Performance comparison for a single double (all
+ times in [s], 1000000 iterations)</b></p>
+<table class="table" summary="Performance comparison for a single double (all
+ times in [s], 1000000 iterations)">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Library
+ </p></th>
+<th><p>
+ gcc 4.4.0 (32 bit)
+ </p></th>
+<th><p>
+ VC++ 10 (32 bit)
+ </p></th>
+<th><p>
+ Intel 11.1 (32 bit)
+ </p></th>
+<th><p>
+ gcc 4.4.0 (64 bit)
+ </p></th>
+<th><p>
+ VC++ 10 (64 bit)
+ </p></th>
+<th><p>
+ Intel 11.1 (64 bit)
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ sprintf
+ </p></td>
+<td><p>
+ 0.755
+ </p></td>
+<td><p>
+ 0.965
+ </p></td>
+<td><p>
+ 0.880
+ </p></td>
+<td><p>
+ 0.713
+ </p></td>
+<td><p>
+ 0.807
+ </p></td>
+<td><p>
+ 0.694
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ iostreams
+ </p></td>
+<td><p>
+ 2.316
+ </p></td>
+<td><p>
+ 2.624
+ </p></td>
+<td><p>
+ 1.964
+ </p></td>
+<td><p>
+ 1.634
+ </p></td>
+<td><p>
+ 1.468
+ </p></td>
+<td><p>
+ 1.354
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ Boost.Format
+ </p></td>
+<td><p>
+ 3.188
+ </p></td>
+<td><p>
+ 3.737
+ </p></td>
+<td><p>
+ 2.878
+ </p></td>
+<td><p>
+ 3.217
+ </p></td>
+<td><p>
+ 2.672
+ </p></td>
+<td><p>
+ 2.011
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <span class="emphasis"><em>Spirit.Karma</em></span> double_
+ </p></td>
+<td><p>
+ 0.813
+ </p></td>
+<td><p>
+ 0.561
+ </p></td>
+<td><p>
+ 0.368
+ </p></td>
+<td><p>
+ 0.426
+ </p></td>
+<td><p>
+ 0.260
+ </p></td>
+<td><p>
+ 0.218
+ </p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<p>
+ </p>
+<div class="figure">
+<a name="spirit.karma.double_performance"></a><p class="title"><b>Figure 4. Performance comparison for a single double</b></p>
+<span class="inlinemediaobject"><img src="./images/double_performance.png" alt="Performance
+ comparison for a single double"></span>
+</div>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.performance_measurements.numeric_performance.format_performance"></a><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.format_performance" title="
+ Comparing the performance of a sequence of several generators">
+ Comparing the performance of a sequence of several generators</a>
+</h5></div></div>
+<div></div>
+</div>
+<p>
+ This performance measurements are centered around formatting of a sequence
+ of different items, including 2 <tt class="computeroutput"><span class="keyword">double</span></tt>
+ floating point numbers using different libraries and methods. The overall
+ execution times for those examples are compared below. We compare using
+ <tt class="computeroutput"><span class="identifier">sprintf</span></tt>, C++ iostreams,
+ Boost.Format,
+ and <span class="emphasis"><em>Spirit.Karma</em></span>.
+ </p>
+<p>
+ For the full source code of the performance test please see here: format_performance.cpp).
+ All the measurements have been done by doing 1000000 iterations for each
+ formatting type (NUMITERATIONS is set to 1000000).
+ </p>
+<p>
+ Code used to measure the performance for sprintf:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">buffer</span><span class="special">[</span><span class="number">256</span><span class="special">];</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">sprintf</span><span class="special">(</span><span class="identifier">buffer</span><span class="special">,</span> <span class="string">"[%-14.3f%-14.3f]"</span><span class="special">,</span> <span class="number">12345.12345</span><span class="special">,</span> <span class="number">12345.12345</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for standard iostreams:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">stringstream</span> <span class="identifier">strm</span><span class="special">;</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="identifier">strm</span><span class="special">.</span><span class="identifier">str</span><span class="special">(</span><span class="string">""</span><span class="special">);</span>
+ <span class="identifier">strm</span> <span class="special">&lt;&lt;</span> <span class="char">'['</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setiosflags</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">ios</span><span class="special">::</span><span class="identifier">fixed</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">left</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setprecision</span><span class="special">(</span><span class="number">3</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setw</span><span class="special">(</span><span class="number">14</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="number">12345.12345</span>
+ <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">setw</span><span class="special">(</span><span class="number">14</span><span class="special">)</span>
+ <span class="special">&lt;&lt;</span> <span class="number">12345.12345</span>
+ <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for Boost.Format:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">generated</span><span class="special">;</span>
+<span class="identifier">boost</span><span class="special">::</span><span class="identifier">format</span> <span class="identifier">outformat</span><span class="special">(</span><span class="string">"[%-14.3f%-14.3f]"</span><span class="special">);</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span>
+ <span class="identifier">generated</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">str</span><span class="special">(</span><span class="identifier">outformat</span> <span class="special">%</span> <span class="number">12345.12345</span> <span class="special">%</span> <span class="number">12345.12345</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The following code shows the common definitions used by all <span class="emphasis"><em>Spirit.Karma</em></span>
+ performance measurements as listed below:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">double3_policy</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">karma</span><span class="special">::</span><span class="identifier">real_policies</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span>
+<span class="special">{</span>
+ <span class="comment">// we want to generate up to 3 fractional digits
+</span> <span class="keyword">static</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <span class="identifier">precision</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="number">3</span><span class="special">;</span> <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">real_generator</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">double3_policy</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="special">&gt;</span>
+ <span class="identifier">double3_type</span><span class="special">;</span>
+<span class="identifier">double3_type</span> <span class="keyword">const</span> <span class="identifier">double3</span> <span class="special">=</span> <span class="identifier">double3_type</span><span class="special">();</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Code used to measure the performance for <span class="emphasis"><em>Spirit.Karma</em></span>
+ using a plain character buffer:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">char</span> <span class="identifier">buffer</span><span class="special">[</span><span class="number">256</span><span class="special">];</span>
+<span class="keyword">for</span> <span class="special">(</span><span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">NUMITERATIONS</span><span class="special">;</span> <span class="special">++</span><span class="identifier">i</span><span class="special">)</span> <span class="special">{</span>
+ <span class="keyword">char</span> <span class="special">*</span><span class="identifier">p</span> <span class="special">=</span> <span class="identifier">buffer</span><span class="special">;</span>
+ <span class="identifier">generate</span><span class="special">(</span><span class="identifier">p</span>
+ <span class="special">,</span> <span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="number">14</span><span class="special">)[</span><span class="identifier">double3</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="number">14</span><span class="special">)[</span><span class="identifier">double3</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span>
+ <span class="special">,</span> <span class="number">12345.12345</span><span class="special">,</span> <span class="number">12345.12345</span><span class="special">);</span>
+ <span class="special">*</span><span class="identifier">p</span> <span class="special">=</span> <span class="char">'\0'</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The following table shows the overall performance results collected while
+ using different compilers. All times are in seconds measured for 1000000
+ iterations (platform: Windows7, Intel Core Duo(tm) Processor, 2.8GHz,
+ 4GByte RAM). For a more readable comparison of the results see this
+ <a href="numeric_performance.html#spirit.karma.format_performance" title="Figure 5. Performance comparison for a sequence
+ of several items">figure</a>.
+ </p>
+<div class="table">
+<a name="id574309"></a><p class="title"><b>Table 17. Performance comparison for a sequence of several
+ items (all times in [s], 1000000 iterations)</b></p>
+<table class="table" summary="Performance comparison for a sequence of several
+ items (all times in [s], 1000000 iterations)">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Library
+ </p></th>
+<th><p>
+ gcc 4.4.0 (32 bit)
+ </p></th>
+<th><p>
+ VC++ 10 (32 bit)
+ </p></th>
+<th><p>
+ Intel 11.1 (32 bit)
+ </p></th>
+<th><p>
+ gcc 4.4.0 (64 bit)
+ </p></th>
+<th><p>
+ VC++ 10 (64 bit)
+ </p></th>
+<th><p>
+ Intel 11.1 (64 bit)
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ sprintf
+ </p></td>
+<td><p>
+ 1.725
+ </p></td>
+<td><p>
+ 1.892
+ </p></td>
+<td><p>
+ 1.903
+ </p></td>
+<td><p>
+ 1.469
+ </p></td>
+<td><p>
+ 1.608
+ </p></td>
+<td><p>
+ 1.493
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ iostreams
+ </p></td>
+<td><p>
+ 4.827
+ </p></td>
+<td><p>
+ 5.287
+ </p></td>
+<td><p>
+ 4.444
+ </p></td>
+<td><p>
+ 3.112
+ </p></td>
+<td><p>
+ 3.319
+ </p></td>
+<td><p>
+ 2.877
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ Boost.Format
+ </p></td>
+<td><p>
+ 5.881
+ </p></td>
+<td><p>
+ 7.089
+ </p></td>
+<td><p>
+ 5.801
+ </p></td>
+<td><p>
+ 5.455
+ </p></td>
+<td><p>
+ 5.254
+ </p></td>
+<td><p>
+ 4.164
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <span class="emphasis"><em>Spirit.Karma</em></span>
+ </p></td>
+<td><p>
+ 1.942
+ </p></td>
+<td><p>
+ 1.242
+ </p></td>
+<td><p>
+ 0.999
+ </p></td>
+<td><p>
+ 1.334
+ </p></td>
+<td><p>
+ 0.758
+ </p></td>
+<td><p>
+ 0.686
+ </p></td>
+</tr>
+</tbody>
+</table>
+</div>
+<p>
+ </p>
+<div class="figure">
+<a name="spirit.karma.format_performance"></a><p class="title"><b>Figure 5. Performance comparison for a sequence
+ of several items</b></p>
+<span class="inlinemediaobject"><img src="./images/format_performance.png" alt="Performance comparison
+ for a sequence of several items"></span>
+</div>
+<p>
+ </p>
+</div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
@@ -53,7 +841,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../performance_measurements.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../performance_measurements.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="numeric_performance/int_performance.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../performance_measurements.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../performance_measurements.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="../../lex.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/double_performance.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/double_performance.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/double_performance.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -143,7 +143,7 @@
             <a href="double_performance.html#spirit.karma.double_performance" title="Figure 4. Performance comparison for a single double">figure</a>.
           </p>
 <div class="table">
-<a name="id572008"></a><p class="title"><b>Table 24. Performance comparison for a single double (all
+<a name="id572317"></a><p class="title"><b>Table 16. Performance comparison for a single double (all
           times in [s], 1000000 iterations)</b></p>
 <table class="table" summary="Performance comparison for a single double (all
           times in [s], 1000000 iterations)">

Modified: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/format_performance.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/format_performance.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/format_performance.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -163,7 +163,7 @@
             of several items">figure</a>.
           </p>
 <div class="table">
-<a name="id573999"></a><p class="title"><b>Table 25. Performance comparison for a sequence of several
+<a name="id574309"></a><p class="title"><b>Table 17. Performance comparison for a sequence of several
           items (all times in [s], 1000000 iterations)</b></p>
 <table class="table" summary="Performance comparison for a sequence of several
           items (all times in [s], 1000000 iterations)">

Modified: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -133,7 +133,7 @@
             <a href="int_performance.html#spirit.karma.int_performance" title="Figure 3. Performance comparison for a single int">figure</a>.
           </p>
 <div class="table">
-<a name="id570634"></a><p class="title"><b>Table 23. Performance comparison for a single int (all
+<a name="id570938"></a><p class="title"><b>Table 15. Performance comparison for a single int (all
           times in [s], 10000000 iterations)</b></p>
 <table class="table" summary="Performance comparison for a single int (all
           times in [s], 10000000 iterations)">

Modified: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/compound_attribute_rules.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/quick_reference/compound_attribute_rules.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/compound_attribute_rules.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -47,7 +47,7 @@
           <span class="identifier">b</span></tt> will be <tt class="computeroutput"><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">&gt;</span></tt>.
         </p>
 <div class="table">
-<a name="id487486"></a><p class="title"><b>Table 22. Spirit.Karma compound generator attribute types</b></p>
+<a name="id487797"></a><p class="title"><b>Table 14. Spirit.Karma compound generator attribute types</b></p>
 <table class="table" summary="Spirit.Karma compound generator attribute types">
 <colgroup>
 <col>
@@ -64,7 +64,7 @@
 <tbody>
 <tr>
 <td><p>
- <a href="../reference/operator/sequence.html" title=" Sequences
+ <a href="../reference/operator.html#spirit.karma.reference.operator.sequence" title=" Sequences
           (operator&lt;&lt;())">sequence
                 (<tt class="computeroutput"><span class="special">&lt;&lt;</span></tt>)</a>
               </p></td>
@@ -87,7 +87,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/alternative.html" title=" Alternatives
+ <a href="../reference/operator.html#spirit.karma.reference.operator.alternative" title=" Alternatives
           (operator|())">alternative
                 (<tt class="computeroutput"><span class="special">|</span></tt>)</a>
               </p></td>
@@ -106,7 +106,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/kleene.html" title=" Kleene Star
+ <a href="../reference/operator.html#spirit.karma.reference.operator.kleene" title=" Kleene Star
           (unary operator*())">kleene (unary
                 <tt class="computeroutput"><span class="special">*</span></tt>)</a>
               </p></td>
@@ -122,7 +122,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/plus.html" title=" Plus (unary
+ <a href="../reference/operator.html#spirit.karma.reference.operator.plus" title=" Plus (unary
           operator+())">plus (unary
                 <tt class="computeroutput"><span class="special">+</span></tt>)</a>
               </p></td>
@@ -138,7 +138,7 @@
 </tr>
 <tr>
 <td><p>
- list (%)
+ list (%)
               </p></td>
 <td>
 <p>
@@ -152,7 +152,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/repeat.html" title=" Repetition
+ <a href="../reference/directive.html#spirit.karma.reference.directive.repeat" title=" Repetition
           Directive (repeat[])">repetition</a>
               </p></td>
 <td>
@@ -167,7 +167,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/optional.html" title=" Optional
+ <a href="../reference/operator.html#spirit.karma.reference.operator.optional" title=" Optional
           (unary operator-())">optional
                 (unary <tt class="computeroutput"><span class="special">-</span></tt>)</a>
               </p></td>
@@ -183,7 +183,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/and_predicate.html" title=" And
+ <a href="../reference/operator.html#spirit.karma.reference.operator.and_predicate" title=" And
           Predicate (unary operator&amp;())">and
                 predicate (unary <tt class="computeroutput"><span class="special">&amp;</span></tt>)</a>
               </p></td>
@@ -195,7 +195,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/not_predicate.html" title=" Not
+ <a href="../reference/operator.html#spirit.karma.reference.operator.not_predicate" title=" Not
           Predicate (unary operator!())">not
                 predicate (unary <tt class="computeroutput"><span class="special">!</span></tt>)</a>
               </p></td>

Modified: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/predefined_primitive_generators.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/quick_reference/predefined_primitive_generators.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/predefined_primitive_generators.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -39,7 +39,7 @@
           Generators</a>.
         </p>
 <div class="table">
-<a name="id478488"></a><p class="title"><b>Table 13. Predefined Character Generators</b></p>
+<a name="id478798"></a><p class="title"><b>Table 5. Predefined Character Generators</b></p>
 <table class="table" summary="Predefined Character Generators">
 <colgroup>
 <col>
@@ -60,7 +60,7 @@
 <tbody>
 <tr>
 <td><p>
- <a href="../reference/char/char_generator.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_generator" title=" Character
           Generators"><tt class="computeroutput"><span class="identifier">ch</span></tt></a>
               </p></td>
 <td><p>
@@ -72,7 +72,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_generator.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_generator" title=" Character
           Generators"><tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -84,7 +84,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_generator.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_generator" title=" Character
           Generators"><tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -97,7 +97,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_generator.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_generator" title=" Character
           Generators"><tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -110,7 +110,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_generator.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_generator" title=" Character
           Generators"><tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">,</span> <span class="identifier">ch2</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -125,7 +125,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_generator.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_generator" title=" Character
           Generators"><tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -139,7 +139,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">alnum</span></tt></a>
               </p></td>
 <td><p>
@@ -153,7 +153,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">alpha</span></tt></a>
               </p></td>
 <td><p>
@@ -167,7 +167,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">blank</span></tt></a>
               </p></td>
 <td><p>
@@ -181,7 +181,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">cntrl</span></tt></a>
               </p></td>
 <td><p>
@@ -195,7 +195,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">digit</span></tt></a>
               </p></td>
 <td><p>
@@ -209,7 +209,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">graph</span></tt></a>
               </p></td>
 <td><p>
@@ -223,7 +223,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">print</span></tt></a>
               </p></td>
 <td><p>
@@ -237,7 +237,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">punct</span></tt></a>
               </p></td>
 <td><p>
@@ -251,7 +251,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">space</span></tt></a>
               </p></td>
 <td><p>
@@ -265,7 +265,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">xdigit</span></tt></a>
               </p></td>
 <td><p>
@@ -279,7 +279,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">lower</span></tt></a>
               </p></td>
 <td><p>
@@ -293,7 +293,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/char/char_class.html" title=" Character
+ <a href="../reference/char.html#spirit.karma.reference.char.char_class" title=" Character
           Class Generators"><tt class="computeroutput"><span class="identifier">upper</span></tt></a>
               </p></td>
 <td><p>
@@ -312,7 +312,7 @@
           See here for more information about String Generators .
         </p>
 <div class="table">
-<a name="id480119"></a><p class="title"><b>Table 14. Predefined String Generators</b></p>
+<a name="id480430"></a><p class="title"><b>Table 6. Predefined String Generators</b></p>
 <table class="table" summary="Predefined String Generators">
 <colgroup>
 <col>
@@ -373,7 +373,7 @@
           Directives</a>.
         </p>
 <div class="table">
-<a name="id480386"></a><p class="title"><b>Table 15. Predefined Generator Directives</b></p>
+<a name="id480696"></a><p class="title"><b>Table 7. Predefined Generator Directives</b></p>
 <table class="table" summary="Predefined Generator Directives">
 <colgroup>
 <col>
@@ -394,7 +394,7 @@
 <tbody>
 <tr>
 <td><p>
- <a href="../reference/directive/upperlower.html" title=" Directives
+ <a href="../reference/directive.html#spirit.karma.reference.directive.upperlower" title=" Directives
           Controlling Case Sensitivity (upper[] and lower[])"><tt class="computeroutput"><span class="identifier">lower</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -407,7 +407,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/upperlower.html" title=" Directives
+ <a href="../reference/directive.html#spirit.karma.reference.directive.upperlower" title=" Directives
           Controlling Case Sensitivity (upper[] and lower[])"><tt class="computeroutput"><span class="identifier">upper</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -420,7 +420,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -433,7 +433,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -446,7 +446,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
                 <span class="identifier">g</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
@@ -462,7 +462,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -475,7 +475,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -488,7 +488,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
                 <span class="identifier">g</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
@@ -504,7 +504,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -517,7 +517,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -530,7 +530,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/alignment.html" title=" Alignment
+ <a href="../reference/directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
           Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
                 <span class="identifier">g</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
@@ -546,7 +546,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/maxwidth.html" title=" Controlling
+ <a href="../reference/directive.html#spirit.karma.reference.directive.maxwidth" title=" Controlling
           the Maximum Field Wield (maxwidth[])"><tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -559,7 +559,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/maxwidth.html" title=" Controlling
+ <a href="../reference/directive.html#spirit.karma.reference.directive.maxwidth" title=" Controlling
           the Maximum Field Wield (maxwidth[])"><tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -572,7 +572,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/repeat.html" title=" Repetition
+ <a href="../reference/directive.html#spirit.karma.reference.directive.repeat" title=" Repetition
           Directive (repeat[])"><tt class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -585,7 +585,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/repeat.html" title=" Repetition
+ <a href="../reference/directive.html#spirit.karma.reference.directive.repeat" title=" Repetition
           Directive (repeat[])"><tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -597,7 +597,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/repeat.html" title=" Repetition
+ <a href="../reference/directive.html#spirit.karma.reference.directive.repeat" title=" Repetition
           Directive (repeat[])"><tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num1</span><span class="special">,</span>
                 <span class="identifier">num2</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
@@ -611,7 +611,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/repeat.html" title=" Repetition
+ <a href="../reference/directive.html#spirit.karma.reference.directive.repeat" title=" Repetition
           Directive (repeat[])"><tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
                 <span class="identifier">inf</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
@@ -624,7 +624,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/delimit.html" title=" Directives
+ <a href="../reference/directive.html#spirit.karma.reference.directive.delimit" title=" Directives
           Controlling Automatic Delimiting (verbatim[] and delimit[])"><tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -636,7 +636,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/delimit.html" title=" Directives
+ <a href="../reference/directive.html#spirit.karma.reference.directive.delimit" title=" Directives
           Controlling Automatic Delimiting (verbatim[] and delimit[])"><tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -648,7 +648,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/delimit.html" title=" Directives
+ <a href="../reference/directive.html#spirit.karma.reference.directive.delimit" title=" Directives
           Controlling Automatic Delimiting (verbatim[] and delimit[])"><tt class="computeroutput"><span class="identifier">delimit</span><span class="special">(</span><span class="identifier">d</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -661,7 +661,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/omit.html" title=" Consume Attribute
+ <a href="../reference/directive.html#spirit.karma.reference.directive.omit" title=" Consume Attribute
           (omit[])"><tt class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -674,7 +674,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/directive/buffer.html" title=" Temporary
+ <a href="../reference/directive.html#spirit.karma.reference.directive.buffer" title=" Temporary
           Output Buffering (buffer[])"><tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
               </p></td>
 <td><p>
@@ -694,7 +694,7 @@
           Generators</a>.
         </p>
 <div class="table">
-<a name="id482640"></a><p class="title"><b>Table 16. Predefined Floating Point Number Generators</b></p>
+<a name="id482950"></a><p class="title"><b>Table 8. Predefined Floating Point Number Generators</b></p>
 <table class="table" summary="Predefined Floating Point Number Generators">
 <colgroup>
 <col>
@@ -726,7 +726,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators"><tt class="computeroutput"><span class="identifier">float_</span></tt></a>
               </p></td>
 <td><p>
@@ -738,7 +738,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators"><tt class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -752,7 +752,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators"><tt class="computeroutput"><span class="identifier">double_</span></tt></a>
               </p></td>
 <td><p>
@@ -764,7 +764,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators"><tt class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -778,7 +778,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators"><tt class="computeroutput"><span class="identifier">long_double</span></tt></a>
               </p></td>
 <td><p>
@@ -791,7 +791,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators"><tt class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -806,7 +806,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators">
 <pre class="programlisting"><span class="identifier">real_generator</span><span class="special">&lt;</span>
     <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
@@ -823,7 +823,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/floating_point.html" title=" Floating
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
           Point Number Generators">
 <pre class="programlisting"><span class="identifier">real_generator</span><span class="special">&lt;</span>
     <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
@@ -844,7 +844,7 @@
 </table>
 </div>
 <div class="table">
-<a name="id483479"></a><p class="title"><b>Table 17. Predefined Unsigned Integer Generators</b></p>
+<a name="id483789"></a><p class="title"><b>Table 9. Predefined Unsigned Integer Generators</b></p>
 <table class="table" summary="Predefined Unsigned Integer Generators">
 <colgroup>
 <col>
@@ -865,7 +865,7 @@
 <tbody>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">ushort_</span></tt></a>
               </p></td>
 <td><p>
@@ -877,7 +877,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">ushort_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -890,7 +890,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">uint_</span></tt></a>
               </p></td>
 <td><p>
@@ -902,7 +902,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">uint_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -915,7 +915,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">ulong_</span></tt></a>
               </p></td>
 <td><p>
@@ -927,7 +927,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">ulong_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -940,7 +940,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">ulong_long</span></tt></a>
               </p></td>
 <td><p>
@@ -953,7 +953,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -967,7 +967,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">bin</span></tt></a>
               </p></td>
 <td><p>
@@ -980,7 +980,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">oct</span></tt></a>
               </p></td>
 <td><p>
@@ -993,7 +993,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">hex</span></tt></a>
               </p></td>
 <td><p>
@@ -1006,7 +1006,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators">
 <pre class="programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
     <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
@@ -1022,7 +1022,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/unsigned_int.html" title=" Unsigned
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
           Integer Number Generators">
 <pre class="programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
     <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
@@ -1042,7 +1042,7 @@
 </table>
 </div>
 <div class="table">
-<a name="id484564"></a><p class="title"><b>Table 18. Predefined Integer Generators</b></p>
+<a name="id484875"></a><p class="title"><b>Table 10. Predefined Integer Generators</b></p>
 <table class="table" summary="Predefined Integer Generators">
 <colgroup>
 <col>
@@ -1063,7 +1063,7 @@
 <tbody>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">short_</span></tt></a>
               </p></td>
 <td><p>
@@ -1075,7 +1075,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -1088,7 +1088,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">int_</span></tt></a>
               </p></td>
 <td><p>
@@ -1100,7 +1100,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -1113,7 +1113,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">long_</span></tt></a>
               </p></td>
 <td><p>
@@ -1125,7 +1125,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -1138,7 +1138,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">long_long</span></tt></a>
               </p></td>
 <td><p>
@@ -1150,7 +1150,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators"><tt class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt></a>
               </p></td>
 <td><p>
@@ -1163,7 +1163,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators">
 <pre class="programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
     <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
@@ -1179,7 +1179,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/numeric/signed_int.html" title=" Signed
+ <a href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
           Integer Number Generators">
 <pre class="programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
     <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
@@ -1202,7 +1202,7 @@
           See here for more information about Binary Generators .
         </p>
 <div class="table">
-<a name="id485396"></a><p class="title"><b>Table 19. Predefined Binary Generators</b></p>
+<a name="id485707"></a><p class="title"><b>Table 11. Predefined Binary Generators</b></p>
 <table class="table" summary="Predefined Binary Generators">
 <colgroup>
 <col>
@@ -1339,7 +1339,7 @@
           Operators</a>.
         </p>
 <div class="table">
-<a name="id485830"></a><p class="title"><b>Table 20. Predefined Generator Operators</b></p>
+<a name="id486141"></a><p class="title"><b>Table 12. Predefined Generator Operators</b></p>
 <table class="table" summary="Predefined Generator Operators">
 <colgroup>
 <col>
@@ -1360,7 +1360,7 @@
 <tbody>
 <tr>
 <td><p>
- <a href="../reference/operator/not_predicate.html" title=" Not
+ <a href="../reference/operator.html#spirit.karma.reference.operator.not_predicate" title=" Not
           Predicate (unary operator!())"><tt class="computeroutput"><span class="special">!</span><span class="identifier">a</span></tt></a>
               </p></td>
 <td><p>
@@ -1373,7 +1373,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/not_predicate.html" title=" Not
+ <a href="../reference/operator.html#spirit.karma.reference.operator.not_predicate" title=" Not
           Predicate (unary operator!())"><tt class="computeroutput"><span class="special">&amp;</span><span class="identifier">a</span></tt></a>
               </p></td>
 <td><p>
@@ -1386,7 +1386,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/optional.html" title=" Optional
+ <a href="../reference/operator.html#spirit.karma.reference.operator.optional" title=" Optional
           (unary operator-())"><tt class="computeroutput"><span class="special">-</span><span class="identifier">a</span></tt></a>
               </p></td>
 <td><p>
@@ -1399,7 +1399,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/kleene.html" title=" Kleene Star
+ <a href="../reference/operator.html#spirit.karma.reference.operator.kleene" title=" Kleene Star
           (unary operator*())"><tt class="computeroutput"><span class="special">*</span><span class="identifier">a</span></tt></a>
               </p></td>
 <td><p>
@@ -1412,7 +1412,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/plus.html" title=" Plus (unary
+ <a href="../reference/operator.html#spirit.karma.reference.operator.plus" title=" Plus (unary
           operator+())"><tt class="computeroutput"><span class="special">+</span><span class="identifier">a</span></tt></a>
               </p></td>
 <td><p>
@@ -1425,7 +1425,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/alternative.html" title=" Alternatives
+ <a href="../reference/operator.html#spirit.karma.reference.operator.alternative" title=" Alternatives
           (operator|())"><tt class="computeroutput"><span class="identifier">a</span> <span class="special">|</span> <span class="identifier">b</span></tt></a>
               </p></td>
 <td><p>
@@ -1438,7 +1438,7 @@
 </tr>
 <tr>
 <td><p>
- <a href="../reference/operator/sequence.html" title=" Sequences
+ <a href="../reference/operator.html#spirit.karma.reference.operator.sequence" title=" Sequences
           (operator&lt;&lt;())"><tt class="computeroutput"><span class="identifier">a</span> <span class="special">&lt;&lt;</span>
                 <span class="identifier">b</span></tt></a>
               </p></td>
@@ -1452,7 +1452,7 @@
 </tr>
 <tr>
 <td><p>
- a % b
+ a % b
               </p></td>
 <td><p>
                 <tt class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></tt>
@@ -1483,7 +1483,7 @@
           Generators</a>.
         </p>
 <div class="table">
-<a name="id486654"></a><p class="title"><b>Table 21. Predefined Auxiliary Generators</b></p>
+<a name="id486964"></a><p class="title"><b>Table 13. Predefined Auxiliary Generators</b></p>
 <table class="table" summary="Predefined Auxiliary Generators">
 <colgroup>
 <col>
@@ -1504,7 +1504,7 @@
 <tbody>
 <tr>
 <td><p>
- eol
+ eol
               </p></td>
 <td><p>
                 <tt class="computeroutput"><span class="identifier">Unused</span></tt>
@@ -1515,7 +1515,7 @@
 </tr>
 <tr>
 <td><p>
- eps
+ eps
               </p></td>
 <td><p>
                 <tt class="computeroutput"><span class="identifier">Unused</span></tt>
@@ -1526,7 +1526,7 @@
 </tr>
 <tr>
 <td><p>
- eps(b)
+ eps(b)
               </p></td>
 <td><p>
                 <tt class="computeroutput"><span class="identifier">Unused</span></tt>
@@ -1538,7 +1538,7 @@
 </tr>
 <tr>
 <td><p>
- lazy(fg)
+ lazy(fg)
               </p></td>
 <td><p>
                 Attribute of <tt class="computeroutput"><span class="identifier">G</span></tt> where
@@ -1553,14 +1553,14 @@
 </tr>
 <tr>
 <td><p>
- fg
+ fg
               </p></td>
 <td><p>
- see lazy(fg)
+ see lazy(fg)
                 above
               </p></td>
 <td><p>
- Equivalent to lazy(fg)
+ Equivalent to lazy(fg)
               </p></td>
 </tr>
 <tr>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,9 +6,8 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
 <link rel="home" href="../../../index.html" title="Spirit 2.1">
 <link rel="up" href="../reference.html" title="Reference">
-<link rel="previous" href="operator/not_predicate.html" title=" Not
- Predicate (unary operator!())">
-<link rel="next" href="auxiliary/eol.html" title="eol">
+<link rel="previous" href="operator.html" title="Operator">
+<link rel="next" href="../performance_measurements.html" title="Performance Measurements">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -21,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="operator/not_predicate.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="auxiliary/eol.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="operator.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="../performance_measurements.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -31,9 +30,9 @@
 <div></div>
 </div>
 <div class="toc"><dl>
-<dt><span class="section">eol</span></dt>
-<dt><span class="section">eps</span></dt>
-<dt><span class="section">lazy</span></dt>
+<dt><span class="section">eol</span></dt>
+<dt><span class="section">eps</span></dt>
+<dt><span class="section">lazy</span></dt>
 </dl></div>
 <p>
           This module includes different auxiliary generators not fitting into any
@@ -41,12 +40,481 @@
           and <tt class="computeroutput"><span class="identifier">eps</span></tt>, <tt class="computeroutput"><span class="identifier">lazy</span></tt> generators.
         </p>
 <a name="spirit.karma.reference.auxiliary.module_header"></a><h5>
-<a name="id567076"></a>
+<a name="id567378"></a>
           <a href="auxiliary.html#spirit.karma.reference.auxiliary.module_header">Module Header</a>
         </h5>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/auxiliary.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">include</span><span class="special">/</span><span class="identifier">karma_auxiliary</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.auxiliary.eol"></a>eol
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.auxiliary.eol.description"></a><h6>
+<a name="id567495"></a>
+ Description
+ </h6>
+<p>
+ The <tt class="computeroutput"><span class="identifier">eol</span></tt> component generates
+ a single newline character. It is equivalent to <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="char">'\n'</span><span class="special">)</span></tt>
+ or simply '\n' (please see the <a href="char.html#spirit.karma.reference.char.char_generator" title=" Character
+ Generators"><tt class="computeroutput"><span class="identifier">char_</span></tt></a> generator module for more
+ details).
+ </p>
+<a name="spirit.karma.reference.auxiliary.eol.header"></a><h6>
+<a name="id567582"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/auxiliary/eol.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">include</span><span class="special">/</span><span class="identifier">karma_eol</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eol.model_of"></a><h6>
+<a name="id567696"></a>
+ Model of
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.auxiliary.eol.expression_semantics"></a><h6>
+<a name="id567749"></a>
+ <a href="auxiliary.html#spirit.karma.reference.auxiliary.eol.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eol</span></tt>
+ </p></td>
+<td><p>
+ Create a component generating a single end of line character
+ in the output
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.eol.attributes"></a><h6>
+<a name="id567865"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eol</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.eol.complexity"></a><h6>
+<a name="id567966"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(1)
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ The complexity is constant as a single character is generated in the
+ output.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eol.example"></a><h6>
+<a name="id568007"></a>
+ Example
+ </h6>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.auxiliary.eps"></a>eps
+</h5></div></div>
+<div></div>
+</div>
+<p>
+ The family of <tt class="computeroutput"><span class="identifier">eps</span></tt> components
+ allows to create pseudo generators generating an empty string. This feature
+ is sometimes useful either to force a generator to fail or to succeed
+ or to insert semantic actions into the generation process.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eps.description"></a><h6>
+<a name="id568071"></a>
+ Description
+ </h6>
+<p>
+ The <tt class="computeroutput"><span class="identifier">eps</span></tt> creates a component
+ generating an empty string while always succeeding. The <tt class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></tt>
+ component generates an empty string as well, but succeeds only if <tt class="computeroutput"><span class="identifier">b</span></tt> is <tt class="computeroutput"><span class="keyword">true</span></tt>
+ and fails otherwise. It's lazy variant <tt class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></tt> is equivalent to <tt class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></tt> except it evaluates the supplied function
+ <tt class="computeroutput"><span class="identifier">fb</span></tt> at generate time,
+ while using the return value as the criteria to succeed.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eps.header"></a><h6>
+<a name="id568230"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/auxiliary/eps.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">include</span><span class="special">/</span><span class="identifier">karma_eps</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eps.model_of"></a><h6>
+<a name="id568343"></a>
+ Model of
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">b</span></tt></span></dt>
+<dd><p>
+ A boolean value.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">fb</span></tt></span></dt>
+<dd><p>
+ A <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a boolean value.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.auxiliary.eps.expression_semantics"></a><h6>
+<a name="id568459"></a>
+ <a href="auxiliary.html#spirit.karma.reference.auxiliary.eps.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eps</span></tt>
+ </p></td>
+<td><p>
+ Creates a component generating an empty string. Succeeds always.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Creates a component generating an empty string. Succeeds if
+ <tt class="computeroutput"><span class="identifier">b</span></tt> is <tt class="computeroutput"><span class="keyword">true</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Creates a component generating an empty string. Succeeds if
+ <tt class="computeroutput"><span class="identifier">fb</span></tt> returns <tt class="computeroutput"><span class="keyword">true</span></tt> at generate time.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.eps.attributes"></a><h6>
+<a name="id568712"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eps</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.eps.complexity"></a><h6>
+<a name="id568921"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(1)
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ The complexity is constant as no output is generated.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eps.example"></a><h6>
+<a name="id568961"></a>
+ Example
+ </h6>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.auxiliary.lazy"></a>lazy
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.auxiliary.lazy.description"></a><h6>
+<a name="id569004"></a>
+ Description
+ </h6>
+<p>
+ The familiy of <tt class="computeroutput"><span class="identifier">lazy</span></tt> components
+ allows to use a dynamically returned generator component for output generation.
+ It calls the provided function or function object at generate time using
+ its return value as the actual generator to produce the output.
+ </p>
+<a name="spirit.karma.reference.auxiliary.lazy.header"></a><h6>
+<a name="id569051"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/auxiliary/lazy.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">include</span><span class="special">/</span><span class="identifier">karma_lazy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.auxiliary.lazy.model_of"></a><h6>
+<a name="id569164"></a>
+ <a href="auxiliary.html#spirit.karma.reference.auxiliary.lazy.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Generator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">fg</span></tt></span></dt>
+<dd><p>
+ A function or function object that evaluates to a generator object.
+ This function will be invoked at generate time.
+ </p></dd>
+</dl>
+</div>
+<p>
+ The signature of <tt class="computeroutput"><span class="identifier">fg</span></tt> is
+ expected to be
+ </p>
+<pre class="programlisting"><span class="identifier">G</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">Context</span><span class="special">)</span>
+</pre>
+<p>
+ where <tt class="computeroutput"><span class="identifier">G</span></tt>, the function's
+ return value, is the type of the generator to be invoked, and <tt class="computeroutput"><span class="identifier">Context</span></tt> is the generators's Context
+ type (The first argument is <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ to make the <tt class="computeroutput"><span class="identifier">Context</span></tt> the
+ second argument. This is done for uniformity with <a href="../tutorials/semantic_actions.html" title="Semantic Actions">Semantic
+ Actions</a>).
+ </p>
+<a name="spirit.karma.reference.auxiliary.lazy.expression_semantics"></a><h6>
+<a name="id569373"></a>
+ <a href="auxiliary.html#spirit.karma.reference.auxiliary.lazy.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in Generator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">fg</span></tt>
+ </p></td>
+<td><p>
+ The Boost.Phoenix
+ function object <tt class="computeroutput"><span class="identifier">fg</span></tt>
+ will be invoked at generate time. It is expected to return a
+ generator instance. This generator is then invoked in order to
+ generate the output.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ The function or function object will be invoked at generate time.
+ It is expected to return a generator instance (note this version
+ of <tt class="computeroutput"><span class="identifier">lazy</span></tt> does
+ not require <tt class="computeroutput"><span class="identifier">fg</span></tt>
+ to be a Boost.Phoenix
+ function object). This generator is then invoked in order to
+ generate the output.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.lazy.attributes"></a><h6>
+<a name="id569590"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">fg</span></tt>
+ </p></td>
+<td><p>
+ The attribute type <tt class="computeroutput"><span class="identifier">G</span></tt>
+ as exposed by the generator <tt class="computeroutput"><span class="identifier">g</span></tt>
+ returned from <tt class="computeroutput"><span class="identifier">fg</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ The attribute type <tt class="computeroutput"><span class="identifier">G</span></tt>
+ as exposed by the generator <tt class="computeroutput"><span class="identifier">g</span></tt>
+ returned from <tt class="computeroutput"><span class="identifier">fg</span></tt>.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.lazy.complexity"></a><h6>
+<a name="id569798"></a>
+ Complexity
+ </h6>
+<p>
+ The complexity of the <tt class="computeroutput"><span class="identifier">lazy</span></tt>
+ component is determined by the complexity of the generator returned from
+ <tt class="computeroutput"><span class="identifier">fg</span></tt>.
+ </p>
+<a name="spirit.karma.reference.auxiliary.lazy.example"></a><h6>
+<a name="id569852"></a>
+ Example
+ </h6>
+</div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
@@ -59,7 +527,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="operator/not_predicate.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="auxiliary/eol.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="operator.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="../performance_measurements.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eol.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eol.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eol.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.auxiliary.eol.description"></a><h6>
-<a name="id567192"></a>
+<a name="id567495"></a>
             <a href="eol.html#spirit.karma.reference.auxiliary.eol.description">Description</a>
           </h6>
 <p>
@@ -41,7 +41,7 @@
             details).
           </p>
 <a name="spirit.karma.reference.auxiliary.eol.header"></a><h6>
-<a name="id567280"></a>
+<a name="id567582"></a>
             <a href="eol.html#spirit.karma.reference.auxiliary.eol.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/auxiliary/eol.hpp&gt;
@@ -51,7 +51,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.auxiliary.eol.model_of"></a><h6>
-<a name="id567394"></a>
+<a name="id567696"></a>
             <a href="eol.html#spirit.karma.reference.auxiliary.eol.model_of">Model of</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -64,7 +64,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.auxiliary.eol.expression_semantics"></a><h6>
-<a name="id567446"></a>
+<a name="id567749"></a>
             <a href="eol.html#spirit.karma.reference.auxiliary.eol.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -96,7 +96,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.auxiliary.eol.attributes"></a><h6>
-<a name="id567563"></a>
+<a name="id567865"></a>
             <a href="eol.html#spirit.karma.reference.auxiliary.eol.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -122,7 +122,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.auxiliary.eol.complexity"></a><h6>
-<a name="id567664"></a>
+<a name="id567966"></a>
             <a href="eol.html#spirit.karma.reference.auxiliary.eol.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -139,7 +139,7 @@
             output.
           </p>
 <a name="spirit.karma.reference.auxiliary.eol.example"></a><h6>
-<a name="id567705"></a>
+<a name="id568007"></a>
             <a href="eol.html#spirit.karma.reference.auxiliary.eol.example">Example</a>
           </h6>
 </div>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eps.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eps.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eps.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -36,7 +36,7 @@
             or to insert semantic actions into the generation process.
           </p>
 <a name="spirit.karma.reference.auxiliary.eps.description"></a><h6>
-<a name="id567768"></a>
+<a name="id568071"></a>
             <a href="eps.html#spirit.karma.reference.auxiliary.eps.description">Description</a>
           </h6>
 <p>
@@ -48,7 +48,7 @@
             while using the return value as the criteria to succeed.
           </p>
 <a name="spirit.karma.reference.auxiliary.eps.header"></a><h6>
-<a name="id567927"></a>
+<a name="id568230"></a>
             <a href="eps.html#spirit.karma.reference.auxiliary.eps.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/auxiliary/eps.hpp&gt;
@@ -58,7 +58,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.auxiliary.eps.model_of"></a><h6>
-<a name="id568041"></a>
+<a name="id568343"></a>
             <a href="eps.html#spirit.karma.reference.auxiliary.eps.model_of">Model of</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -85,7 +85,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.auxiliary.eps.expression_semantics"></a><h6>
-<a name="id568157"></a>
+<a name="id568459"></a>
             <a href="eps.html#spirit.karma.reference.auxiliary.eps.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -136,7 +136,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.auxiliary.eps.attributes"></a><h6>
-<a name="id568410"></a>
+<a name="id568712"></a>
             <a href="eps.html#spirit.karma.reference.auxiliary.eps.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -180,7 +180,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.auxiliary.eps.complexity"></a><h6>
-<a name="id568618"></a>
+<a name="id568921"></a>
             <a href="eps.html#spirit.karma.reference.auxiliary.eps.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -196,7 +196,7 @@
             The complexity is constant as no output is generated.
           </p>
 <a name="spirit.karma.reference.auxiliary.eps.example"></a><h6>
-<a name="id568658"></a>
+<a name="id568961"></a>
             <a href="eps.html#spirit.karma.reference.auxiliary.eps.example">Example</a>
           </h6>
 </div>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/lazy.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/lazy.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/lazy.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.auxiliary.lazy.description"></a><h6>
-<a name="id568701"></a>
+<a name="id569004"></a>
             <a href="lazy.html#spirit.karma.reference.auxiliary.lazy.description">Description</a>
           </h6>
 <p>
@@ -40,7 +40,7 @@
             its return value as the actual generator to produce the output.
           </p>
 <a name="spirit.karma.reference.auxiliary.lazy.header"></a><h6>
-<a name="id568748"></a>
+<a name="id569051"></a>
             <a href="lazy.html#spirit.karma.reference.auxiliary.lazy.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/auxiliary/lazy.hpp&gt;
@@ -50,7 +50,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.auxiliary.lazy.model_of"></a><h6>
-<a name="id568861"></a>
+<a name="id569164"></a>
             <a href="lazy.html#spirit.karma.reference.auxiliary.lazy.model_of">Model
             of</a>
           </h6>
@@ -88,7 +88,7 @@
             Actions</a>).
           </p>
 <a name="spirit.karma.reference.auxiliary.lazy.expression_semantics"></a><h6>
-<a name="id569070"></a>
+<a name="id569373"></a>
             <a href="lazy.html#spirit.karma.reference.auxiliary.lazy.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -139,7 +139,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.auxiliary.lazy.attributes"></a><h6>
-<a name="id569287"></a>
+<a name="id569590"></a>
             <a href="lazy.html#spirit.karma.reference.auxiliary.lazy.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -179,7 +179,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.auxiliary.lazy.complexity"></a><h6>
-<a name="id569494"></a>
+<a name="id569798"></a>
             <a href="lazy.html#spirit.karma.reference.auxiliary.lazy.complexity">Complexity</a>
           </h6>
 <p>
@@ -188,7 +188,7 @@
             <tt class="computeroutput"><span class="identifier">fg</span></tt>.
           </p>
 <a name="spirit.karma.reference.auxiliary.lazy.example"></a><h6>
-<a name="id569549"></a>
+<a name="id569852"></a>
             <a href="lazy.html#spirit.karma.reference.auxiliary.lazy.example">Example</a>
           </h6>
 </div>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/char.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/char.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/char.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -7,8 +7,7 @@
 <link rel="home" href="../../../index.html" title="Spirit 2.1">
 <link rel="up" href="../reference.html" title="Reference">
 <link rel="previous" href="karma_basics.html" title=" Basics">
-<link rel="next" href="char/char_generator.html" title=" Character
- Generators">
+<link rel="next" href="numeric.html" title=" Numeric">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -21,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="karma_basics.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="char/char_generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="karma_basics.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="numeric.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -31,9 +30,9 @@
 <div></div>
 </div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="char/char_generator.html"> Character
+<dt><span class="section"><a href="char.html#spirit.karma.reference.char.char_generator"> Character
           Generators</a></span></dt>
-<dt><span class="section"><a href="char/char_class.html"> Character
+<dt><span class="section"><a href="char.html#spirit.karma.reference.char.char_class"> Character
           Class Generators</a></span></dt>
 </dl></div>
 <p>
@@ -42,12 +41,1069 @@
           generators.
         </p>
 <a name="spirit.karma.reference.char.module_header"></a><h5>
-<a name="id497674"></a>
+<a name="id497985"></a>
           <a href="char.html#spirit.karma.reference.char.module_header">Module Header</a>
         </h5>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/char.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">include</span><span class="special">/</span><span class="identifier">karma_char</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.char.char_generator"></a><a href="char.html#spirit.karma.reference.char.char_generator" title=" Character
+ Generators"> Character
+ Generators</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.char.char_generator.description"></a><h6>
+<a name="id498103"></a>
+ Description
+ </h6>
+<p>
+ The character generators described in this section are:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ </p></td>
+<td><p>
+ Generates <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generates <tt class="computeroutput"><span class="identifier">ch</span></tt>,
+ same as <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">lit</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></tt>
+ </p></td>
+<td><p>
+ Generates the mandatory attribute as a single character interpreted
+ in the character set define by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generates <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ as a character interpreted in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>, if an attribute is supplied
+ it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generates <tt class="computeroutput"><span class="identifier">c</span></tt> as
+ a character interpreted in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>, if an attribute is supplied
+ it must match, equivalent to <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="char">'c'</span><span class="special">)</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch1</span><span class="special">,</span>
+ <span class="identifier">ch2</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it belongs
+ to the character range interpreted in the character set defined
+ by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it belongs
+ to <tt class="computeroutput"><span class="identifier">charset</span></tt> interpreted
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ In the table above, <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ is a <a href="karma_basics.html#spirit.karma.reference.karma_basics.character_encoding_namespace">Character
+ Encoding Namespace</a> used by the corresponding character generator.
+ </p>
+<a name="spirit.karma.reference.char.char_generator.header"></a><h6>
+<a name="id498726"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/char/char.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">include</span><span class="special">/</span><span class="identifier">karma_char_</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.char.char_generator.model_of"></a><h6>
+<a name="id498840"></a>
+ <a href="char.html#spirit.karma.reference.char.char_generator.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">ch</span></tt>,
+ <tt class="computeroutput"><span class="identifier">ch1</span></tt>, <tt class="computeroutput"><span class="identifier">ch2</span></tt></span></dt>
+<dd><p>
+ Character-class specific character (See Character Class Types), or
+ a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a character-class specific character
+ value
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">charset</span></tt></span></dt>
+<dd><p>
+ Character-set specifier string (See Character Class Types), or a
+ <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a character-set specifier string,
+ or a pointer/reference to a null-terminated array of characters.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">ns</span></tt></span></dt>
+<dd><p>
+ A <a href="../../qi/reference/basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
+ Encoding Namespace</a>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.char.char_generator.expression_semantics"></a><h6>
+<a name="id499029"></a>
+ <a href="char.html#spirit.karma.reference.char.char_generator.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ </p></td>
+<td><p>
+ Generate the character literal <tt class="computeroutput"><span class="identifier">ch</span></tt>.
+ This generator never fails (except if the underlying output stream
+ reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the character literal <tt class="computeroutput"><span class="identifier">ch</span></tt>.
+ This generator never fails (except if the underlying output stream
+ reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></tt>
+ </p></td>
+<td><p>
+ Generate the character provided by a mandatory attribute interpreted
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>.
+ This generator never fails (except if the underlying output stream
+ reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the character <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ as provided by the immediate literal value the generator is initialized
+ from. If this generator has an associated attribute it succeeds
+ only as long as the attribute is equal to the immediate literal
+ (except if the underlying output stream reports an error). Otherwise
+ this generator fails and does not generate any output.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the character <tt class="computeroutput"><span class="identifier">c</span></tt>
+ as provided by the immediate literal value the generator is initialized
+ from. If this generator has an associated attribute it succeeds
+ only as long as the attribute is equal to the immediate literal
+ (except if the underlying output stream reports an error). Otherwise
+ this generator fails and does not generate any output.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch1</span><span class="special">,</span>
+ <span class="identifier">ch2</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the character provided by a mandatory attribute interpreted
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>.
+ The generator succeeds as long as the attribute belongs to the
+ character range <tt class="computeroutput"><span class="special">[</span><span class="identifier">ch1</span><span class="special">,</span>
+ <span class="identifier">ch2</span><span class="special">]</span></tt>
+ (except if the underlying output stream reports an error). Otherwise
+ this generator fails and does not generate any output.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the character provided by a mandatory attribute interpreted
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>.
+ The generator succeeds as long as the attribute belongs to the
+ character set <tt class="computeroutput"><span class="identifier">charset</span></tt>
+ (except if the underlying output stream reports an error). Otherwise
+ this generator fails and does not generate any output.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ A character <tt class="computeroutput"><span class="identifier">ch</span></tt> is assumed
+ to belong to the character range defined by <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch1</span><span class="special">,</span> <span class="identifier">ch2</span><span class="special">)</span></tt> if its character value (binary representation)
+ interpreted in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ is not smaller than the character value of <tt class="computeroutput"><span class="identifier">ch1</span></tt>
+ and not larger then the character value of <tt class="computeroutput"><span class="identifier">ch2</span></tt>
+ (i.e. <tt class="computeroutput"><span class="identifier">ch1</span> <span class="special">&lt;=</span>
+ <span class="identifier">ch</span> <span class="special">&lt;=</span>
+ <span class="identifier">ch2</span></tt>).
+ </p>
+<p>
+ The <tt class="computeroutput"><span class="identifier">charset</span></tt> parameter
+ passed to <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></tt>
+ must be a string containing more than one character. Every single character
+ in this string is assumed to belong to the character set defined by this
+ expression. An exception to this is the <tt class="computeroutput"><span class="char">'-'</span></tt>
+ character which has a special meaning if it is not specified as the first
+ and not the last character in <tt class="computeroutput"><span class="identifier">charset</span></tt>.
+ If the <tt class="computeroutput"><span class="char">'-'</span></tt> is used in between
+ to characters it is interpreted as spanning a character range. A character
+ <tt class="computeroutput"><span class="identifier">ch</span></tt> is considered to belong
+ to the defined character set <tt class="computeroutput"><span class="identifier">charset</span></tt>
+ if it matches one of the characters as specified by the string parameter
+ described above. For example
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Example
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"abc"</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ 'a', 'b', and 'c'
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-z"</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ all characters (and including) from 'a' to 'z'
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z"</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ all characters (and including) from 'a' to 'z' and 'A' and 'Z'
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"-1-9"</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ '-' and all characters (and including) from '1' to '9'
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.char.char_generator.attributes"></a><h6>
+<a name="id500073"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">ch</span></tt> and succeeds
+ only if both are equal, failing otherwise
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">c</span></tt> and succeeds
+ only if both are equal, failing otherwise
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch1</span><span class="special">,</span>
+ <span class="identifier">ch2</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>, attribute
+ is mandatory (otherwise compilation will fail), the generator
+ succeeds if the attribute belongs to the character range <tt class="computeroutput"><span class="special">[</span><span class="identifier">ch1</span><span class="special">,</span> <span class="identifier">ch2</span><span class="special">]</span></tt> interpreted in the character
+ set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>, attribute
+ is mandatory (otherwise compilation will fail), the generator
+ succeeds if the attribute belongs to the character set <tt class="computeroutput"><span class="identifier">charset</span></tt>, interpreted in the
+ character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.char.char_generator.complexity"></a><h6>
+<a name="id500651"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(1)
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ The complexity of <tt class="computeroutput"><span class="identifier">ch</span></tt>,
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>,
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></tt>, <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>, and <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></tt> is constant as all generators emit exactly
+ one character per invocation.
+ </p>
+<p>
+ The character range generator (<tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch1</span><span class="special">,</span> <span class="identifier">ch2</span><span class="special">)</span></tt>) additionally requires constant lookup
+ time for the verification whether the attribute belongs to the character
+ range.
+ </p>
+<p>
+ The character set generator (<tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></tt>) additionally requires O(log N) lookup
+ time for the verification whether the attribute belongs to the character
+ set, where N is the number of characters in the character set.
+ </p>
+<a name="spirit.karma.reference.char.char_generator.example"></a><h6>
+<a name="id500921"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use these common test functions:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">::</span><span class="identifier">char_</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of <tt class="computeroutput"><span class="identifier">char_</span></tt>
+ generators:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator</span><span class="special">(</span><span class="string">"A"</span><span class="special">,</span> <span class="char">'A'</span><span class="special">);</span>
+<span class="identifier">test_generator</span><span class="special">(</span><span class="string">"A"</span><span class="special">,</span> <span class="identifier">lit</span><span class="special">(</span><span class="char">'A'</span><span class="special">));</span>
+
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"a"</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span>
+<span class="identifier">test_generator</span><span class="special">(</span><span class="string">"A"</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">(</span><span class="char">'A'</span><span class="special">));</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"A"</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">(</span><span class="char">'A'</span><span class="special">),</span> <span class="char">'A'</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">(</span><span class="char">'A'</span><span class="special">),</span> <span class="char">'B'</span><span class="special">);</span> <span class="comment">// fails (as 'A' != 'B')
+</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"A"</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">(</span><span class="char">'A'</span><span class="special">,</span> <span class="char">'Z'</span><span class="special">),</span> <span class="char">'A'</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">(</span><span class="char">'A'</span><span class="special">,</span> <span class="char">'Z'</span><span class="special">),</span> <span class="char">'a'</span><span class="special">);</span> <span class="comment">// fails (as 'a' does not belong to 'A'...'Z')
+</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"k"</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">(</span><span class="string">"a-z0-9"</span><span class="special">),</span> <span class="char">'k'</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">char_</span><span class="special">(</span><span class="string">"a-z0-9"</span><span class="special">),</span> <span class="char">'A'</span><span class="special">);</span> <span class="comment">// fails (as 'A' does not belong to "a-z0-9")
+</span></pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.char.char_class"></a><a href="char.html#spirit.karma.reference.char.char_class" title=" Character
+ Class Generators"> Character
+ Class Generators</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.char.char_class.description"></a><h6>
+<a name="id502878"></a>
+ Description
+ </h6>
+<p>
+ The character class generators described in this section are:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alnum</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alpha</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ thh concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">blank</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">cntrl</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">digit</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">graph</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">print</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">punct</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">xdigit</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></tt>
+ in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">space</span></tt>
+ </p></td>
+<td><p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></tt>
+ in or a single space character the character set defined by
+ <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ In the table above, <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ is a <a href="karma_basics.html#spirit.karma.reference.karma_basics.character_encoding_namespace">Character
+ Encoding Namespace</a> used by the corresponding character class generator.
+ All listed generators have a mandatory attribute <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ and will not compile if no attribute is associated.
+ </p>
+<a name="spirit.karma.reference.char.char_class.header"></a><h6>
+<a name="id503874"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/char/char_class.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">include</span><span class="special">/</span><span class="identifier">karma_char_class</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.char.char_class.model_of"></a><h6>
+<a name="id503988"></a>
+ <a href="char.html#spirit.karma.reference.char.char_class.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">ns</span></tt></span></dt>
+<dd><p>
+ A <a href="../../qi/reference/basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
+ Encoding Namespace</a>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.char.char_class.expression_semantics"></a><h6>
+<a name="id504081"></a>
+ <a href="char.html#spirit.karma.reference.char.char_class.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alnum</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alpha</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">blank</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">cntrl</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">digit</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">graph</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">print</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">punct</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">xdigit</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span></tt>
+ </p></td>
+<td><p>
+ If the mandatory attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">space</span></tt>
+ </p></td>
+<td><p>
+ If the optional attribute satisfies the concept of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></tt> the generator succeeds
+ after emitting its attribute (except if the underlying output
+ stream reports an error). This generator fails otherwise while
+ not generating anything.If no attribute is supplied this generator
+ emits a single space character in the character set defined by
+ <tt class="computeroutput"><span class="identifier">ns</span></tt>.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Possible values for <tt class="computeroutput"><span class="identifier">ns</span></tt>
+ are described in the section <a href="karma_basics.html#spirit.karma.reference.karma_basics.character_encoding_namespace">Character
+ Encoding Namespace</a>.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top">
+<p>
+ The generators <tt class="computeroutput"><span class="identifier">alpha</span></tt>
+ and <tt class="computeroutput"><span class="identifier">alnum</span></tt> might seem
+ to behave unexpected if used inside a <tt class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></tt> or <tt class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></tt> directive. Both directives additionally
+ apply the semanitics of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></tt>
+ or <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></tt> to the respective character
+ class. Some examples:
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+<span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">lower</span><span class="special">[</span><span class="identifier">alpha</span><span class="special">],</span> <span class="char">'a'</span><span class="special">);</span> <span class="comment">// succeeds emitting 'a'
+</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">lower</span><span class="special">[</span><span class="identifier">alpha</span><span class="special">],</span> <span class="char">'A'</span><span class="special">);</span> <span class="comment">// fails
+</span></pre>
+<p>
+ The generator directive <tt class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></tt> behaves correspondingly.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.char.char_class.attributes"></a><h6>
+<a name="id505331"></a>
+ Attributes
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ All listed character class generators can take any attribute <tt class="computeroutput"><span class="identifier">Ch</span></tt>. All character class generators
+ (except <tt class="computeroutput"><span class="identifier">space</span></tt>) require
+ an attribute and will fail compiling otherwise.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.char.char_class.complexity"></a><h6>
+<a name="id505394"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(1)
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ The complexity is constant as the generators emit not more than one character
+ per invocation.
+ </p>
+<a name="spirit.karma.reference.char.char_class.example"></a><h6>
+<a name="id505437"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use these common test functions:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">alpha</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of an <tt class="computeroutput"><span class="identifier">alpha</span></tt>
+ generator:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"a"</span><span class="special">,</span> <span class="identifier">alpha</span><span class="special">,</span> <span class="char">'a'</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"A"</span><span class="special">,</span> <span class="identifier">alpha</span><span class="special">,</span> <span class="char">'A'</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">alpha</span><span class="special">,</span> <span class="char">'1'</span><span class="special">);</span> <span class="comment">// fails (as isalpha('1') is false)
+</span><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"A"</span><span class="special">,</span> <span class="identifier">upper</span><span class="special">[</span><span class="identifier">alpha</span><span class="special">],</span> <span class="char">'a'</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">upper</span><span class="special">[</span><span class="identifier">alpha</span><span class="special">],</span> <span class="char">'a'</span><span class="special">);</span> <span class="comment">// fails (as isupper('a') is false)
+</span></pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
@@ -60,7 +1116,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="karma_basics.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="char/char_generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="karma_basics.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="numeric.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_class.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_class.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_class.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.char.char_class.description"></a><h6>
-<a name="id502567"></a>
+<a name="id502878"></a>
             <a href="char_class.html#spirit.karma.reference.char.char_class.description">Description</a>
           </h6>
 <p>
@@ -185,7 +185,7 @@
             and will not compile if no attribute is associated.
           </p>
 <a name="spirit.karma.reference.char.char_class.header"></a><h6>
-<a name="id503563"></a>
+<a name="id503874"></a>
             <a href="char_class.html#spirit.karma.reference.char.char_class.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/char/char_class.hpp&gt;
@@ -195,7 +195,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.char.char_class.model_of"></a><h6>
-<a name="id503677"></a>
+<a name="id503988"></a>
             <a href="char_class.html#spirit.karma.reference.char.char_class.model_of">Model
             of</a>
           </h6>
@@ -219,7 +219,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.char.char_class.expression_semantics"></a><h6>
-<a name="id503770"></a>
+<a name="id504081"></a>
             <a href="char_class.html#spirit.karma.reference.char.char_class.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -407,7 +407,7 @@
 </td></tr>
 </table></div>
 <a name="spirit.karma.reference.char.char_class.attributes"></a><h6>
-<a name="id505020"></a>
+<a name="id505331"></a>
             <a href="char_class.html#spirit.karma.reference.char.char_class.attributes">Attributes</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -422,7 +422,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.char.char_class.complexity"></a><h6>
-<a name="id505083"></a>
+<a name="id505394"></a>
             <a href="char_class.html#spirit.karma.reference.char.char_class.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -439,7 +439,7 @@
             per invocation.
           </p>
 <a name="spirit.karma.reference.char.char_class.example"></a><h6>
-<a name="id505126"></a>
+<a name="id505437"></a>
             <a href="char_class.html#spirit.karma.reference.char.char_class.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_generator.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_generator.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_generator.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.char.char_generator.description"></a><h6>
-<a name="id497792"></a>
+<a name="id498103"></a>
             <a href="char_generator.html#spirit.karma.reference.char.char_generator.description">Description</a>
           </h6>
 <p>
@@ -129,7 +129,7 @@
             Encoding Namespace</a> used by the corresponding character generator.
           </p>
 <a name="spirit.karma.reference.char.char_generator.header"></a><h6>
-<a name="id498415"></a>
+<a name="id498726"></a>
             <a href="char_generator.html#spirit.karma.reference.char.char_generator.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/char/char.hpp&gt;
@@ -139,7 +139,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.char.char_generator.model_of"></a><h6>
-<a name="id498529"></a>
+<a name="id498840"></a>
             <a href="char_generator.html#spirit.karma.reference.char.char_generator.model_of">Model
             of</a>
           </h6>
@@ -178,7 +178,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.char.char_generator.expression_semantics"></a><h6>
-<a name="id498718"></a>
+<a name="id499029"></a>
             <a href="char_generator.html#spirit.karma.reference.char.char_generator.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -361,7 +361,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.char.char_generator.attributes"></a><h6>
-<a name="id499762"></a>
+<a name="id500073"></a>
             <a href="char_generator.html#spirit.karma.reference.char.char_generator.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -451,7 +451,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.char.char_generator.complexity"></a><h6>
-<a name="id500340"></a>
+<a name="id500651"></a>
             <a href="char_generator.html#spirit.karma.reference.char.char_generator.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -480,7 +480,7 @@
             set, where N is the number of characters in the character set.
           </p>
 <a name="spirit.karma.reference.char.char_generator.example"></a><h6>
-<a name="id500610"></a>
+<a name="id500921"></a>
             <a href="char_generator.html#spirit.karma.reference.char.char_generator.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,10 +6,8 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
 <link rel="home" href="../../../index.html" title="Spirit 2.1">
 <link rel="up" href="../reference.html" title="Reference">
-<link rel="previous" href="numeric/floating_point.html" title=" Floating
- Point Number Generators">
-<link rel="next" href="directive/alignment.html" title=" Alignment
- Directives (left_align[], center[], and right_align[])">
+<link rel="previous" href="numeric.html" title=" Numeric">
+<link rel="next" href="operator.html" title="Operator">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -22,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="numeric/floating_point.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="directive/alignment.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="numeric.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="operator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -32,19 +30,19 @@
 <div></div>
 </div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="directive/alignment.html"> Alignment
+<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.alignment"> Alignment
           Directives (<tt class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></tt>, <tt class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></tt>, and <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="directive/repeat.html"> Repetition
+<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.repeat"> Repetition
           Directive (<tt class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="directive/delimit.html"> Directives
+<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.delimit"> Directives
           Controlling Automatic Delimiting (<tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt> and <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="directive/upperlower.html"> Directives
+<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.upperlower"> Directives
           Controlling Case Sensitivity (<tt class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></tt> and <tt class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="directive/maxwidth.html"> Controlling
+<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.maxwidth"> Controlling
           the Maximum Field Wield (<tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="directive/buffer.html"> Temporary
+<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.buffer"> Temporary
           Output Buffering (<tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[]</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="directive/omit.html"> Consume Attribute
+<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.omit"> Consume Attribute
           (<tt class="computeroutput"><span class="identifier">omit</span><span class="special">[]</span></tt>)</a></span></dt>
 </dl></div>
 <p>
@@ -55,12 +53,2294 @@
           controlling case sensitivity (<tt class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></tt> and <tt class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></tt>), field width (<tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></tt>), buffering (<tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[]</span></tt>), and attribute handling (<tt class="computeroutput"><span class="identifier">omit</span><span class="special">[]</span></tt>).
         </p>
 <a name="spirit.karma.reference.directive.module_header"></a><h5>
-<a name="id527080"></a>
+<a name="id527376"></a>
           <a href="directive.html#spirit.karma.reference.directive.module_header">Module Header</a>
         </h5>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive.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">include</span><span class="special">/</span><span class="identifier">karma_directive</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.alignment"></a><a href="directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
+ Directives (left_align[], center[], and right_align[])"> Alignment
+ Directives (<tt class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></tt>, <tt class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></tt>, and <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.directive.alignment.description"></a><h6>
+<a name="id527544"></a>
+ Description
+ </h6>
+<p>
+ The alignment directives allow to left align, right align or center output
+ emitted by other generators into columns of a specified width while using
+ an arbitrary generator to create the padding.
+ </p>
+<a name="spirit.karma.reference.directive.alignment.header"></a><h6>
+<a name="id527576"></a>
+ Header
+ </h6>
+<p>
+ For the <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></tt>
+ directive:
+ </p>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/left_alignment.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">include</span><span class="special">/</span><span class="identifier">karma_left_alignment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ For the <tt class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></tt>
+ directive:
+ </p>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/center_alignment.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">include</span><span class="special">/</span><span class="identifier">karma_center_alignment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ For the <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></tt>
+ directive:
+ </p>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/right_alignment.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">include</span><span class="special">/</span><span class="identifier">karma_right_alignment</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.directive.alignment.model_of"></a><h6>
+<a name="id527910"></a>
+ <a href="directive.html#spirit.karma.reference.directive.alignment.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">a</span></tt></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">pad</span></tt></span></dt>
+<dd><p>
+ A generator object, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">A</span></tt>,
+ <tt class="computeroutput"><span class="identifier">Pad</span></tt></span></dt>
+<dd><p>
+ Attribute types of the generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">pad</span></tt>
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">width</span></tt></span></dt>
+<dd><p>
+ Numeric literal, any unsigned integer value, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to an unsigned integer value
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.alignment.expression_semantics"></a><h6>
+<a name="id528121"></a>
+ <a href="directive.html#spirit.karma.reference.directive.alignment.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in UnaryGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> left
+ aligned in a column of width as defined by the preprocessor constant
+ <tt class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></tt>
+ (default: 10), while using <tt class="computeroutput"><span class="identifier">space</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> left
+ aligned in a column of the given <tt class="computeroutput"><span class="identifier">width</span></tt>,
+ while using <tt class="computeroutput"><span class="identifier">space</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> left
+ aligned in a column of width as defined by the preprocessor constant
+ <tt class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></tt>
+ (default: 10), while using the generator <tt class="computeroutput"><span class="identifier">pad</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">pad</span></tt> do not
+ fail (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span>
+ <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> left
+ aligned in a column of the given <tt class="computeroutput"><span class="identifier">width</span></tt>,
+ while using the generator <tt class="computeroutput"><span class="identifier">pad</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">pad</span></tt> do not
+ fail (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> centered
+ in a column of width as defined by the preprocessor constant
+ <tt class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></tt>
+ (default: 10), while using <tt class="computeroutput"><span class="identifier">space</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> centered
+ in a column of the given <tt class="computeroutput"><span class="identifier">width</span></tt>,
+ while using <tt class="computeroutput"><span class="identifier">space</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> centered
+ in a column of width as defined by the preprocessor constant
+ <tt class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></tt>
+ (default: 10), while using the generator <tt class="computeroutput"><span class="identifier">pad</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">pad</span></tt> do not
+ fail (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span>
+ <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> centered
+ in a column of the given <tt class="computeroutput"><span class="identifier">width</span></tt>,
+ while using the generator <tt class="computeroutput"><span class="identifier">pad</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">pad</span></tt> do not
+ fail (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> right
+ aligned in a column of width as defined by the preprocessor constant
+ <tt class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></tt>
+ (default: 10), while using <tt class="computeroutput"><span class="identifier">space</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> right
+ aligned in a column of the given <tt class="computeroutput"><span class="identifier">width</span></tt>,
+ while using <tt class="computeroutput"><span class="identifier">space</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> right
+ aligned in a column of width as defined by the preprocessor constant
+ <tt class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></tt>
+ (default: 10), while using the generator <tt class="computeroutput"><span class="identifier">pad</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">pad</span></tt> do not
+ fail (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span>
+ <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> right
+ aligned in a column of the given <tt class="computeroutput"><span class="identifier">width</span></tt>,
+ while using the generator <tt class="computeroutput"><span class="identifier">pad</span></tt>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">pad</span></tt> do not
+ fail (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top">
+<p>
+ None of the generator directives listed above limit the emitted output
+ to the respective column width. If the emitted output is longer than
+ the specified (or implied) column width, the generated output overruns
+ the column to the right.
+ </p>
+<p>
+ If the output needs to be limitted to a specified column width, use
+ the <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></tt>
+ directive, for instance:
+</p>
+<pre class="programlisting"><span class="identifier">maxwidth</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="identifier">right_align</span><span class="special">(</span><span class="number">12</span><span class="special">)[</span><span class="string">"1234567890"</span><span class="special">]]</span>
+</pre>
+<p>
+ which will output: <tt class="computeroutput"><span class="string">" 123456"</span></tt>
+ (without the quotes).
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.alignment.attributes"></a><h6>
+<a name="id529664"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span>
+ <span class="identifier">width</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span> <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span> <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span>
+ <span class="identifier">width</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span> <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span> <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span>
+ <span class="identifier">width</span><span class="special">)[]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span> <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">pad</span><span class="special">:</span> <span class="identifier">Pad</span> <span class="special">--&gt;</span> <span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">,</span> <span class="identifier">width</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.alignment.complexity"></a><h6>
+<a name="id532034"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the alignment generator directives is defined
+ by the complexity of its embedded and padding generator. The complexity
+ of the left alignment directive generator itself is O(1). The complexity
+ of the center and right alignment directive generators itself is
+ O(N). where <tt class="computeroutput"><span class="identifier">N</span></tt> is
+ the number of characters emitted by the embedded and padding generators.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.directive.alignment.example"></a><h6>
+<a name="id532088"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use this common test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">left_align</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">center</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">right_align</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of the alignment generators:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">p</span> <span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">2.0</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"1.0 |2.0"</span><span class="special">,</span> <span class="identifier">left_align</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="identifier">double_</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">'|'</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span><span class="special">,</span> <span class="identifier">p</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">" 1.0 |2.0"</span><span class="special">,</span> <span class="identifier">center</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="identifier">double_</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">'|'</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span><span class="special">,</span> <span class="identifier">p</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">" 1.0|2.0"</span><span class="special">,</span> <span class="identifier">right_align</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="identifier">double_</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="char">'|'</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span><span class="special">,</span> <span class="identifier">p</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.repeat"></a><a href="directive.html#spirit.karma.reference.directive.repeat" title=" Repetition
+ Directive (repeat[])"> Repetition
+ Directive (<tt class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.directive.repeat.description"></a><h6>
+<a name="id533592"></a>
+ Description
+ </h6>
+<p>
+ The repetition directive allows to repeat an arbitrary generator expression
+ while optionally specifying the lower and upper repetition counts.
+ </p>
+<a name="spirit.karma.reference.directive.repeat.header"></a><h6>
+<a name="id533624"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/repeat.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">include</span><span class="special">/</span><span class="identifier">karma_repeat</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.directive.repeat.model_of"></a><h6>
+<a name="id533737"></a>
+ <a href="directive.html#spirit.karma.reference.directive.repeat.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">a</span></tt></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">num</span><span class="special">,</span> <span class="identifier">num1</span><span class="special">,</span> <span class="identifier">num2</span></tt></span></dt>
+<dd><p>
+ Numeric literals, any unsigned integer value, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to an unsigned integer value
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">inf</span></tt></span></dt>
+<dd><p>
+ Placeholder expression standing for 'no upper repeat limit'
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.repeat.expression_semantics"></a><h6>
+<a name="id533901"></a>
+ <a href="directive.html#spirit.karma.reference.directive.repeat.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in UnaryGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Repeat the generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ zero or more times. This generator succeeds as long as its embedded
+ generator <tt class="computeroutput"><span class="identifier">a</span></tt> does
+ not fail (except if the underlying output stream reports an error).
+ This variant of <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></tt> is semantically equivalent
+ to the <a href="operator.html#spirit.karma.reference.operator.kleene" title=" Kleene Star
+ (unary operator*())">Kleene
+ Star operator <tt class="computeroutput"><span class="special">*</span><span class="identifier">a</span></tt></a>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Repeat the generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ exactly <tt class="computeroutput"><span class="identifier">num</span></tt> times.
+ This generator succeeds as long as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt> does not fail and as long
+ as the associated attribute (container) contains at least <tt class="computeroutput"><span class="identifier">num</span></tt> elements (except if the
+ underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num1</span><span class="special">,</span>
+ <span class="identifier">num2</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Repeat the generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ at least <tt class="computeroutput"><span class="identifier">num1</span></tt>
+ times but not more than <tt class="computeroutput"><span class="identifier">num2</span></tt>
+ times. This generator succeeds as long as its embedded generator
+ <tt class="computeroutput"><span class="identifier">a</span></tt> does not fail
+ and as long as the associated attribute (container) contains
+ at least <tt class="computeroutput"><span class="identifier">num1</span></tt>
+ elements (except if the underlying output stream reports an error).
+ If the associated attribute (container) does contain more than
+ <tt class="computeroutput"><span class="identifier">num2</span></tt> elements,
+ this directive limits the repeat count to <tt class="computeroutput"><span class="identifier">num2</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
+ <span class="identifier">inf</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Repeat the generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ at least <tt class="computeroutput"><span class="identifier">num1</span></tt>
+ times. No upper limit for the repeat count is set. This generator
+ succeeds as long as its embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not fail and as long as the associated attribute (container)
+ contains at least <tt class="computeroutput"><span class="identifier">num</span></tt>
+ elements (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.repeat.attributes"></a><h6>
+<a name="id534479"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num1</span><span class="special">,</span>
+ <span class="identifier">num2</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num1</span><span class="special">,</span> <span class="identifier">num2</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num1</span><span class="special">,</span> <span class="identifier">num2</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
+ <span class="identifier">inf</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span> <span class="identifier">inf</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span> <span class="identifier">inf</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+</tbody>
+</table></div>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../../../images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top">
+<p>
+ The table above uses <tt class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></tt> as placeholders only.
+ </p>
+<p>
+ The notation of <tt class="computeroutput"><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">A</span><span class="special">&gt;</span></tt> stands for <span class="emphasis"><em>any STL container</em></span>
+ holding elements of type <tt class="computeroutput"><span class="identifier">A</span></tt>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.repeat.complexity"></a><h6>
+<a name="id535436"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the repetition generator is defined by
+ the complexity of its embedded generator. The complexity of the repeat
+ itself is O(N), where N is the number of repetitions to execute.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.directive.repeat.example"></a><h6>
+<a name="id535476"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use this common test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">repeat</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of <tt class="computeroutput"><span class="identifier">repeat</span></tt>
+ generator directive:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">v</span><span class="special">;</span>
+<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1.0</span><span class="special">);</span>
+<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2.0</span><span class="special">);</span>
+<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3.0</span><span class="special">);</span>
+
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"[1.0][2.0][3.0]"</span><span class="special">,</span> <span class="identifier">repeat</span><span class="special">[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="identifier">v</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"[1.0][2.0]"</span><span class="special">,</span> <span class="identifier">repeat</span><span class="special">(</span><span class="number">2</span><span class="special">)[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="identifier">v</span><span class="special">);</span>
+
+<span class="comment">// fails because of insufficient number of items
+</span><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">repeat</span><span class="special">(</span><span class="number">4</span><span class="special">)[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.delimit"></a><a href="directive.html#spirit.karma.reference.directive.delimit" title=" Directives
+ Controlling Automatic Delimiting (verbatim[] and delimit[])"> Directives
+ Controlling Automatic Delimiting (<tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt> and <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.directive.delimit.description"></a><h6>
+<a name="id536954"></a>
+ Description
+ </h6>
+<p>
+ The directives <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></tt> and <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt> can be used to control automatic delimiting.
+ The directive <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt> disabled any automatic delimiting,
+ while the directive <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></tt> (re-)enable automatic delimiting.
+ </p>
+<a name="spirit.karma.reference.directive.delimit.header"></a><h6>
+<a name="id537053"></a>
+ Header
+ </h6>
+<p>
+ For the <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt>
+ directive:
+ </p>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/verbatim.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">include</span><span class="special">/</span><span class="identifier">karma_verbatim</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ For the <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></tt>
+ directive:
+ </p>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/delimit.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">include</span><span class="special">/</span><span class="identifier">karma_delimit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.directive.delimit.model_of"></a><h6>
+<a name="id537285"></a>
+ <a href="directive.html#spirit.karma.reference.directive.delimit.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">a</span></tt></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">d</span></tt></span></dt>
+<dd><p>
+ A generator object, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">A</span></tt>,
+ <tt class="computeroutput"><span class="identifier">D</span></tt></span></dt>
+<dd><p>
+ Attribute types of the generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">d</span></tt>
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.delimit.expression_semantics"></a><h6>
+<a name="id537459"></a>
+ <a href="directive.html#spirit.karma.reference.directive.delimit.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in UnaryGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Enable automatic delimiting for the embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt> while using the <tt class="computeroutput"><span class="identifier">space</span></tt> generator as the delimiting
+ generator. If used inside a <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt> directive it re-enables the
+ delimiter generator as used outside of this <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt> instead. The directive succeeds
+ as long as the embedded generator succeeded (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">(</span><span class="identifier">d</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Enable automatic delimiting for the embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt> while using the generator
+ <tt class="computeroutput"><span class="identifier">d</span></tt> as the delimiting
+ generator. The directive succeeds as long as the embedded generator
+ succeeded (except if the underlying output stream reports an
+ error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Disable automatic delimiting for the embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>. The directive succeeds as
+ long as the embedded generator succeeded (except if the underlying
+ output stream reports an error). This directive it has no effect
+ if it is used when no delimiting is active.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.delimit.attributes"></a><h6>
+<a name="id537796"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">(</span><span class="identifier">d</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">d</span><span class="special">:</span> <span class="identifier">D</span> <span class="special">--&gt;</span> <span class="identifier">delimit</span><span class="special">(</span><span class="identifier">d</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">d</span><span class="special">:</span> <span class="identifier">D</span> <span class="special">--&gt;</span> <span class="identifier">delimit</span><span class="special">(</span><span class="identifier">d</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.delimit.complexity"></a><h6>
+<a name="id538380"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the generator directives <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></tt>
+ and <tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></tt>
+ is defined by the complexity of its embedded generators. The complexity
+ of the directives themselves is O(1).
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.directive.delimit.example"></a><h6>
+<a name="id538452"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use this common test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T1</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T2</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr1</span><span class="special">,</span>
+ <span class="identifier">T2</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr2</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr1</span><span class="special">,</span> <span class="identifier">attr2</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">verbatim</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of <tt class="computeroutput"><span class="identifier">delimit</span></tt>
+ generator directive:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"[ 2.0 , 4.3 ] "</span><span class="special">,</span>
+ <span class="identifier">delimit</span><span class="special">[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">','</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="number">2.0</span><span class="special">,</span> <span class="number">4.3</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"[*2.0*,*4.3*]*"</span><span class="special">,</span>
+ <span class="identifier">delimit</span><span class="special">(</span><span class="char">'*'</span><span class="special">)[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">','</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="number">2.0</span><span class="special">,</span> <span class="number">4.3</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"[2.0, 4.3 ] "</span><span class="special">,</span>
+ <span class="identifier">delimit</span><span class="special">[</span><span class="identifier">verbatim</span><span class="special">[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">','</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="number">2.0</span><span class="special">,</span> <span class="number">4.3</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.upperlower"></a><a href="directive.html#spirit.karma.reference.directive.upperlower" title=" Directives
+ Controlling Case Sensitivity (upper[] and lower[])"> Directives
+ Controlling Case Sensitivity (<tt class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></tt> and <tt class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.directive.upperlower.description"></a><h6>
+<a name="id539818"></a>
+ Description
+ </h6>
+<p>
+ The generator directives <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[]</span></tt> and <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[]</span></tt> force their embedded generators to
+ emit lower case or upper case only characters based on the interpretation
+ of the generated characters in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt> (see <a href="../../qi/reference/basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
+ Encoding Namespace</a>).
+ </p>
+<a name="spirit.karma.reference.directive.upperlower.header"></a><h6>
+<a name="id539924"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/upper_lower_case.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">include</span><span class="special">/</span><span class="identifier">karma_upper_lower_case</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.directive.upperlower.model_of"></a><h6>
+<a name="id540038"></a>
+ <a href="directive.html#spirit.karma.reference.directive.upperlower.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">a</span></tt></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">A</span></tt></span></dt>
+<dd><p>
+ Attribute type of the generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">ns</span></tt></span></dt>
+<dd><p>
+ A <a href="../../qi/reference/basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
+ Encoding Namespace</a>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.upperlower.expression_semantics"></a><h6>
+<a name="id540190"></a>
+ <a href="directive.html#spirit.karma.reference.directive.upperlower.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in UnaryGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> as
+ lower case, interpreted in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>. The directive succeeds
+ as long as the embedded generator succeeded (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">a</span></tt> as
+ upper case, interpreted in the character set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>. The directive succeeds
+ as long as the embedded generator succeeded (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top">
+<p>
+ If both directives are 'active' with regard to a generator, the innermost
+ of those directives takes precendence. For instance:
+</p>
+<pre class="programlisting"><span class="identifier">generate</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">ascii</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[</span><span class="char">'A'</span> <span class="special">&lt;&lt;</span> <span class="identifier">ascii</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[</span><span class="char">'b'</span><span class="special">]])</span>
+</pre>
+<p>
+ will generate <tt class="computeroutput"><span class="string">"aB"</span></tt>
+ (without the quotes).
+ </p>
+<p>
+ Further, the directives will have no effect on generators not emitting
+ characters having an upper case or lower case equivalent in the character
+ set defined by <tt class="computeroutput"><span class="identifier">ns</span></tt>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.upperlower.attributes"></a><h6>
+<a name="id540572"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">:</span><span class="identifier">lower</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">ns</span><span class="special">:</span><span class="identifier">lower</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">ns</span><span class="special">:</span><span class="identifier">lower</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">:</span><span class="identifier">upper</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">ns</span><span class="special">:</span><span class="identifier">upper</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">ns</span><span class="special">:</span><span class="identifier">upper</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.upperlower.complexity"></a><h6>
+<a name="id540991"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the generator directives <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[]</span></tt>
+ and <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[]</span></tt>
+ is defined by the complexity of its embedded generators. The directives
+ themselves are compile time only directives, having no impact on
+ runtime performance.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.directive.upperlower.example"></a><h6>
+<a name="id541082"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use this common test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">::</span><span class="identifier">upper</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">ascii</span><span class="special">::</span><span class="identifier">lower</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of the <tt class="computeroutput"><span class="identifier">upper</span></tt>
+ and <tt class="computeroutput"><span class="identifier">lower</span></tt> generator directives:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"abc:2.0e-06"</span><span class="special">,</span> <span class="identifier">lower</span><span class="special">[</span><span class="string">"ABC:"</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span><span class="special">],</span> <span class="number">2e-6</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"ABC:2.0E-06"</span><span class="special">,</span> <span class="identifier">upper</span><span class="special">[</span><span class="string">"abc:"</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span><span class="special">],</span> <span class="number">2e-6</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.maxwidth"></a><a href="directive.html#spirit.karma.reference.directive.maxwidth" title=" Controlling
+ the Maximum Field Wield (maxwidth[])"> Controlling
+ the Maximum Field Wield (<tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.directive.maxwidth.description"></a><h6>
+<a name="id542153"></a>
+ Description
+ </h6>
+<p>
+ The <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></tt>
+ directive allows to limit (truncate) the overall length of the output
+ generated by the embedded generator.
+ </p>
+<a name="spirit.karma.reference.directive.maxwidth.header"></a><h6>
+<a name="id542200"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/maxwidth.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">include</span><span class="special">/</span><span class="identifier">karma_maxwidth</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.directive.maxwidth.model_of"></a><h6>
+<a name="id542314"></a>
+ <a href="directive.html#spirit.karma.reference.directive.maxwidth.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">a</span></tt></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">A</span></tt></span></dt>
+<dd><p>
+ Attribute type of the generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">num</span></tt></span></dt>
+<dd><p>
+ Numeric literal, any unsigned integer value, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to an unsigned integer value
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.maxwidth.expression_semantics"></a><h6>
+<a name="id542466"></a>
+ <a href="directive.html#spirit.karma.reference.directive.maxwidth.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in UnaryGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Limit the overall length of the emitted output of the embedded
+ generator (including characters generated by automatic delimiting)
+ to the number of characters as defined by the preprocessor constant
+ <tt class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_MAXWIDTH</span></tt>.
+ Any additional output is truncated. The directive succeeds as
+ long as the embedded generator succeeded (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Limit the overall length of the emitted output of the embedded
+ generator (including characters generated by automatic delimiting)
+ to the number of characters as defined by <tt class="computeroutput"><span class="identifier">num</span></tt>.
+ Any additional output is truncated. The directive succeeds as
+ long as the embedded generator succeeded (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top">
+<p>
+ The <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></tt>
+ generator directive does not pads the generated output to fill the
+ specified column width. If the emitted output is shorter than the specified
+ (or implied) column width, the generated output will be more narrow
+ than the column width.
+ </p>
+<p>
+ If the output needs to always be equal to a specified column width,
+ use one of the alignment directives <tt class="computeroutput"><span class="identifier">left</span><span class="special">-</span><span class="identifier">align</span><span class="special">[]</span></tt>, <tt class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></tt>, or <tt class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></tt>, for instance:
+</p>
+<pre class="programlisting"><span class="identifier">maxwidth</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="identifier">left_align</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="string">"1234"</span><span class="special">]]</span>
+</pre>
+<p>
+ which will output: <tt class="computeroutput"><span class="string">"1234 "</span></tt>
+ (without the quotes).
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.maxwidth.attributes"></a><h6>
+<a name="id542855"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">maxwidth</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">maxwidth</span><span class="special">(</span><span class="identifier">num</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.maxwidth.complexity"></a><h6>
+<a name="id543244"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the generator directive <tt class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></tt> is defined by the complexity of
+ its embedded generator. The complexity of the directive itself is
+ O(N), where <tt class="computeroutput"><span class="identifier">N</span></tt> is
+ the number of characters generated by the maxwidth directive.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.directive.maxwidth.example"></a><h6>
+<a name="id543314"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use this common test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">maxwidth</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">left_align</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">right_align</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of <tt class="computeroutput"><span class="identifier">maxwidth</span></tt>
+ generator directive:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator</span><span class="special">(</span><span class="string">"01234"</span><span class="special">,</span> <span class="identifier">maxwidth</span><span class="special">(</span><span class="number">5</span><span class="special">)[</span><span class="string">"0123456789"</span><span class="special">]);</span>
+<span class="identifier">test_generator</span><span class="special">(</span><span class="string">" 012"</span><span class="special">,</span> <span class="identifier">maxwidth</span><span class="special">(</span><span class="number">5</span><span class="special">)[</span><span class="identifier">right_align</span><span class="special">(</span><span class="number">12</span><span class="special">)[</span><span class="string">"0123456789"</span><span class="special">]]);</span>
+<span class="identifier">test_generator</span><span class="special">(</span><span class="string">"0123 "</span><span class="special">,</span> <span class="identifier">maxwidth</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="identifier">left_align</span><span class="special">(</span><span class="number">8</span><span class="special">)[</span><span class="string">"0123"</span><span class="special">]]);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.buffer"></a><a href="directive.html#spirit.karma.reference.directive.buffer" title=" Temporary
+ Output Buffering (buffer[])"> Temporary
+ Output Buffering (<tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[]</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.directive.buffer.description"></a><h6>
+<a name="id544426"></a>
+ Description
+ </h6>
+<p>
+ All generator components (except the <a href="operator.html#spirit.karma.reference.operator.alternative" title=" Alternatives
+ (operator|())">alternative
+ (<tt class="computeroutput"><span class="special">|</span></tt>)</a> generator) pass
+ their generated output directly to the underlying output stream. If a
+ generator fails halfway through, the output generated so far is not 'rolled
+ back'. The buffering generator directive allows to avoid this unwanted
+ output to be generated. It temporarily redirects the output produced
+ by the embedded generator into a buffer. This buffer is flushed to the
+ underlying stream only after the embedded generator succeeded.
+ </p>
+<a name="spirit.karma.reference.directive.buffer.header"></a><h6>
+<a name="id544475"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/buffer.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">include</span><span class="special">/</span><span class="identifier">karma_buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.directive.buffer.model_of"></a><h6>
+<a name="id544589"></a>
+ <a href="directive.html#spirit.karma.reference.directive.buffer.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">a</span></tt></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">A</span></tt></span></dt>
+<dd><p>
+ Attribute type of generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.buffer.expression_semantics"></a><h6>
+<a name="id544706"></a>
+ <a href="directive.html#spirit.karma.reference.directive.buffer.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in UnaryGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ The embedded generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is invoked but its output is temporarily intercepted and stored
+ in an internal buffer. If <tt class="computeroutput"><span class="identifier">a</span></tt>
+ succeeds the buffer content is flushed to the underlying output
+ stream, otherwise the buffer content is discarded. The buffer
+ directive succeeds as long as the embedded generator succeeded
+ (except if the underlying output stream reports an error).
+ </p></td>
+</tr></tbody>
+</table></div>
+<div class="tip"><table border="0" summary="Tip">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../../../images/tip.png"></td>
+<th align="left">Tip</th>
+</tr>
+<tr><td colspan="2" align="left" valign="top"><p>
+ If you want to make the buffered generator succeed regardless of the
+ outcome of the embedded generator, simply wrap the <tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt> into an additional optional: <tt class="computeroutput"><span class="special">-</span><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt> (see <a href="operator.html#spirit.karma.reference.operator.optional" title=" Optional
+ (unary operator-())">optional
+ (unary <tt class="computeroutput"><span class="special">-</span></tt>)</a>).
+ </p></td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.buffer.attributes"></a><h6>
+<a name="id544957"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.buffer.complexity"></a><h6>
+<a name="id545169"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the buffering generator directive is defined
+ by the complexity of its embedded generator. The complexity of the
+ buffering directive generator itself is O(1).
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.directive.buffer.example"></a><h6>
+<a name="id545209"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use this common test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">buffer</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of a buffering generator directive. It shows how the partial
+ output generated in the first example does not show up in the generated
+ output as the plus generator fails (no data is available, see <a href="operator.html#spirit.karma.reference.operator.plus" title=" Plus (unary
+ operator+())">plus
+ (unary <tt class="computeroutput"><span class="special">+</span></tt>)</a>).
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">v</span><span class="special">;</span> <span class="comment">// empty container
+</span><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="special">-</span><span class="identifier">buffer</span><span class="special">[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="special">+</span><span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="identifier">v</span><span class="special">);</span>
+
+<span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1.0</span><span class="special">);</span> <span class="comment">// now, fill the container
+</span><span class="identifier">v</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2.0</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"[1.02.0]"</span><span class="special">,</span> <span class="identifier">buffer</span><span class="special">[</span><span class="char">'['</span> <span class="special">&lt;&lt;</span> <span class="special">+</span><span class="identifier">double_</span> <span class="special">&lt;&lt;</span> <span class="char">']'</span><span class="special">],</span> <span class="identifier">v</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.omit"></a><a href="directive.html#spirit.karma.reference.directive.omit" title=" Consume Attribute
+ (omit[])"> Consume Attribute
+ (<tt class="computeroutput"><span class="identifier">omit</span><span class="special">[]</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.directive.omit.description"></a><h6>
+<a name="id546572"></a>
+ Description
+ </h6>
+<p>
+ Consumes the attribute type of the embedded generator without generating
+ any output.
+ </p>
+<a name="spirit.karma.reference.directive.omit.header"></a><h6>
+<a name="id546602"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/omit.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">include</span><span class="special">/</span><span class="identifier">karma_omit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.directive.omit.model_of"></a><h6>
+<a name="id546717"></a>
+ <a href="directive.html#spirit.karma.reference.directive.omit.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">a</span></tt></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">A</span></tt></span></dt>
+<dd><p>
+ Attribute type of generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.omit.expression_semantics"></a><h6>
+<a name="id546834"></a>
+ <a href="directive.html#spirit.karma.reference.directive.omit.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in UnaryGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ The <tt class="computeroutput"><span class="identifier">omit</span></tt> directive
+ consumes the attribute type of the embedded generator <tt class="computeroutput"><span class="identifier">A</span></tt> without generating any output.
+ It succeeds always.
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.omit.attributes"></a><h6>
+<a name="id546990"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--&gt;</span> <span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--&gt;</span> <span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">Unused</span></pre>
+<p>
+ </p>
+</td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.directive.omit.complexity"></a><h6>
+<a name="id547201"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the <tt class="computeroutput"><span class="identifier">omit</span></tt>
+ generator directive is O(1) as it does not generate any output.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.directive.omit.example"></a><h6>
+<a name="id547251"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use this common test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">double_</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">buffer</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of a <tt class="computeroutput"><span class="identifier">omit</span></tt>
+ generator directive. It shows how it consumes the first element of the
+ provided attribute without generating anything, leaving the second element
+ of the attribute to the non-wrapped <tt class="computeroutput"><span class="identifier">double_</span></tt>
+ generator.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">p</span> <span class="special">(</span><span class="number">1.0</span><span class="special">,</span> <span class="number">2.0</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"2.0"</span><span class="special">,</span> <span class="identifier">omit</span><span class="special">[</span><span class="identifier">double_</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="identifier">double_</span><span class="special">,</span> <span class="identifier">p</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Generally, this directive is helpful in situations, where the attribute
+ type contains more information (elements) than need to be used to generate
+ the required output. Normally in such situations we would resolve to
+ use semantic actions to explicitly pass the correct parts of the overall
+ attribute to the generators. The <tt class="computeroutput"><span class="identifier">omit</span></tt>
+ directive helps achieving the same without having to use semantic actions.
+ </p>
+<p>
+ Consider the attribute type:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">fusion</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">int</span><span class="special">,</span> <span class="keyword">double</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;</span> <span class="identifier">attribute_type</span><span class="special">;</span>
+</pre>
+<p>
+ where we need to generate output only from the first and last element:
+ </p>
+<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert</span><span class="special">:</span><span class="identifier">iterator</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">iterator_type</span><span class="special">;</span>
+
+<span class="identifier">karma</span><span class="special">::</span><span class="identifier">rule</span><span class="special">&lt;</span><span class="identifier">iterator_type</span><span class="special">,</span> <span class="identifier">attribute_type</span><span class="special">()&gt;</span> <span class="identifier">r</span><span class="special">;</span>
+<span class="identifier">r</span> <span class="special">=</span> <span class="identifier">int_</span><span class="special">[</span><span class="identifier">_1</span> <span class="special">=</span> <span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">at_c</span><span class="special">&lt;</span><span class="number">0</span><span class="special">&gt;(</span><span class="identifier">_val</span><span class="special">)]</span> <span class="special">&lt;&lt;</span> <span class="identifier">string</span><span class="special">[</span><span class="identifier">_1</span> <span class="special">=</span> <span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">at_c</span><span class="special">&lt;</span><span class="number">2</span><span class="special">&gt;(</span><span class="identifier">_val</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="identifier">iterator_type</span> <span class="identifier">sink</span><span class="special">(</span><span class="identifier">str</span><span class="special">);</span>
+<span class="identifier">generate</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">r</span><span class="special">,</span> <span class="identifier">attribute_type</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">2.0</span><span class="special">,</span> <span class="string">"example"</span><span class="special">));</span> <span class="comment">// will generate: '1example'
+</span></pre>
+<p>
+ This is error prone and not really readable. The same can be achieved
+ by using the <tt class="computeroutput"><span class="identifier">omit</span></tt> directive:
+ </p>
+<pre class="programlisting"><span class="identifier">r</span> <span class="special">=</span> <span class="identifier">int_</span> <span class="special">&lt;&lt;</span> <span class="identifier">omit</span><span class="special">[</span><span class="identifier">double_</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="identifier">string</span><span class="special">;</span>
+</pre>
+<p>
+ which is at the same time more readable and more efficient as we don't
+ have to use semantic actions.
+ </p>
+</div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
@@ -73,7 +2353,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="numeric/floating_point.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="directive/alignment.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="numeric.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="operator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/alignment.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive/alignment.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/alignment.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.directive.alignment.description"></a><h6>
-<a name="id527248"></a>
+<a name="id527544"></a>
             <a href="alignment.html#spirit.karma.reference.directive.alignment.description">Description</a>
           </h6>
 <p>
@@ -43,7 +43,7 @@
             an arbitrary generator to create the padding.
           </p>
 <a name="spirit.karma.reference.directive.alignment.header"></a><h6>
-<a name="id527280"></a>
+<a name="id527576"></a>
             <a href="alignment.html#spirit.karma.reference.directive.alignment.header">Header</a>
           </h6>
 <p>
@@ -71,7 +71,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.directive.alignment.model_of"></a><h6>
-<a name="id527614"></a>
+<a name="id527910"></a>
             <a href="alignment.html#spirit.karma.reference.directive.alignment.model_of">Model
             of</a>
           </h6>
@@ -110,7 +110,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.directive.alignment.expression_semantics"></a><h6>
-<a name="id527825"></a>
+<a name="id528121"></a>
             <a href="alignment.html#spirit.karma.reference.directive.alignment.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -337,7 +337,7 @@
 </td></tr>
 </table></div>
 <a name="spirit.karma.reference.directive.alignment.attributes"></a><h6>
-<a name="id529369"></a>
+<a name="id529664"></a>
             <a href="alignment.html#spirit.karma.reference.directive.alignment.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -528,7 +528,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.alignment.complexity"></a><h6>
-<a name="id531738"></a>
+<a name="id532034"></a>
             <a href="alignment.html#spirit.karma.reference.directive.alignment.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -546,7 +546,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.directive.alignment.example"></a><h6>
-<a name="id531792"></a>
+<a name="id532088"></a>
             <a href="alignment.html#spirit.karma.reference.directive.alignment.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/buffer.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive/buffer.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/buffer.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.directive.buffer.description"></a><h6>
-<a name="id544125"></a>
+<a name="id544426"></a>
             <a href="buffer.html#spirit.karma.reference.directive.buffer.description">Description</a>
           </h6>
 <p>
@@ -50,7 +50,7 @@
             underlying stream only after the embedded generator succeeded.
           </p>
 <a name="spirit.karma.reference.directive.buffer.header"></a><h6>
-<a name="id544174"></a>
+<a name="id544475"></a>
             <a href="buffer.html#spirit.karma.reference.directive.buffer.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/buffer.hpp&gt;
@@ -60,7 +60,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.directive.buffer.model_of"></a><h6>
-<a name="id544289"></a>
+<a name="id544589"></a>
             <a href="buffer.html#spirit.karma.reference.directive.buffer.model_of">Model
             of</a>
           </h6>
@@ -87,7 +87,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.directive.buffer.expression_semantics"></a><h6>
-<a name="id544406"></a>
+<a name="id544706"></a>
             <a href="buffer.html#spirit.karma.reference.directive.buffer.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -136,7 +136,7 @@
             </p></td></tr>
 </table></div>
 <a name="spirit.karma.reference.directive.buffer.attributes"></a><h6>
-<a name="id544657"></a>
+<a name="id544957"></a>
             <a href="buffer.html#spirit.karma.reference.directive.buffer.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -168,7 +168,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.buffer.complexity"></a><h6>
-<a name="id544868"></a>
+<a name="id545169"></a>
             <a href="buffer.html#spirit.karma.reference.directive.buffer.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -183,7 +183,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.directive.buffer.example"></a><h6>
-<a name="id544909"></a>
+<a name="id545209"></a>
             <a href="buffer.html#spirit.karma.reference.directive.buffer.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/delimit.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive/delimit.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/delimit.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.directive.delimit.description"></a><h6>
-<a name="id536658"></a>
+<a name="id536954"></a>
             <a href="delimit.html#spirit.karma.reference.directive.delimit.description">Description</a>
           </h6>
 <p>
@@ -44,7 +44,7 @@
             while the directive <tt class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></tt> (re-)enable automatic delimiting.
           </p>
 <a name="spirit.karma.reference.directive.delimit.header"></a><h6>
-<a name="id536757"></a>
+<a name="id537053"></a>
             <a href="delimit.html#spirit.karma.reference.directive.delimit.header">Header</a>
           </h6>
 <p>
@@ -65,7 +65,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.directive.delimit.model_of"></a><h6>
-<a name="id536989"></a>
+<a name="id537285"></a>
             <a href="delimit.html#spirit.karma.reference.directive.delimit.model_of">Model
             of</a>
           </h6>
@@ -99,7 +99,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.directive.delimit.expression_semantics"></a><h6>
-<a name="id537163"></a>
+<a name="id537459"></a>
             <a href="delimit.html#spirit.karma.reference.directive.delimit.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -159,7 +159,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.delimit.attributes"></a><h6>
-<a name="id537496"></a>
+<a name="id537796"></a>
             <a href="delimit.html#spirit.karma.reference.directive.delimit.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -221,7 +221,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.delimit.complexity"></a><h6>
-<a name="id538079"></a>
+<a name="id538380"></a>
             <a href="delimit.html#spirit.karma.reference.directive.delimit.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -237,7 +237,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.directive.delimit.example"></a><h6>
-<a name="id538151"></a>
+<a name="id538452"></a>
             <a href="delimit.html#spirit.karma.reference.directive.delimit.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/maxwidth.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive/maxwidth.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/maxwidth.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.directive.maxwidth.description"></a><h6>
-<a name="id541852"></a>
+<a name="id542153"></a>
             <a href="maxwidth.html#spirit.karma.reference.directive.maxwidth.description">Description</a>
           </h6>
 <p>
@@ -44,7 +44,7 @@
             generated by the embedded generator.
           </p>
 <a name="spirit.karma.reference.directive.maxwidth.header"></a><h6>
-<a name="id541899"></a>
+<a name="id542200"></a>
             <a href="maxwidth.html#spirit.karma.reference.directive.maxwidth.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/maxwidth.hpp&gt;
@@ -54,7 +54,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.directive.maxwidth.model_of"></a><h6>
-<a name="id542014"></a>
+<a name="id542314"></a>
             <a href="maxwidth.html#spirit.karma.reference.directive.maxwidth.model_of">Model
             of</a>
           </h6>
@@ -86,7 +86,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.directive.maxwidth.expression_semantics"></a><h6>
-<a name="id542166"></a>
+<a name="id542466"></a>
             <a href="maxwidth.html#spirit.karma.reference.directive.maxwidth.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -163,7 +163,7 @@
 </td></tr>
 </table></div>
 <a name="spirit.karma.reference.directive.maxwidth.attributes"></a><h6>
-<a name="id542554"></a>
+<a name="id542855"></a>
             <a href="maxwidth.html#spirit.karma.reference.directive.maxwidth.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -211,7 +211,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.maxwidth.complexity"></a><h6>
-<a name="id542944"></a>
+<a name="id543244"></a>
             <a href="maxwidth.html#spirit.karma.reference.directive.maxwidth.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -227,7 +227,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.directive.maxwidth.example"></a><h6>
-<a name="id543013"></a>
+<a name="id543314"></a>
             <a href="maxwidth.html#spirit.karma.reference.directive.maxwidth.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/omit.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive/omit.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/omit.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.directive.omit.description"></a><h6>
-<a name="id546272"></a>
+<a name="id546572"></a>
             <a href="omit.html#spirit.karma.reference.directive.omit.description">Description</a>
           </h6>
 <p>
@@ -42,7 +42,7 @@
             any output.
           </p>
 <a name="spirit.karma.reference.directive.omit.header"></a><h6>
-<a name="id546302"></a>
+<a name="id546602"></a>
             <a href="omit.html#spirit.karma.reference.directive.omit.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/omit.hpp&gt;
@@ -52,7 +52,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.directive.omit.model_of"></a><h6>
-<a name="id546416"></a>
+<a name="id546717"></a>
             <a href="omit.html#spirit.karma.reference.directive.omit.model_of">Model
             of</a>
           </h6>
@@ -79,7 +79,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.directive.omit.expression_semantics"></a><h6>
-<a name="id546533"></a>
+<a name="id546834"></a>
             <a href="omit.html#spirit.karma.reference.directive.omit.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -112,7 +112,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.omit.attributes"></a><h6>
-<a name="id546690"></a>
+<a name="id546990"></a>
             <a href="omit.html#spirit.karma.reference.directive.omit.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -144,7 +144,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.omit.complexity"></a><h6>
-<a name="id546900"></a>
+<a name="id547201"></a>
             <a href="omit.html#spirit.karma.reference.directive.omit.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -158,7 +158,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.directive.omit.example"></a><h6>
-<a name="id546951"></a>
+<a name="id547251"></a>
             <a href="omit.html#spirit.karma.reference.directive.omit.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/repeat.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive/repeat.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/repeat.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.directive.repeat.description"></a><h6>
-<a name="id533296"></a>
+<a name="id533592"></a>
             <a href="repeat.html#spirit.karma.reference.directive.repeat.description">Description</a>
           </h6>
 <p>
@@ -43,7 +43,7 @@
             while optionally specifying the lower and upper repetition counts.
           </p>
 <a name="spirit.karma.reference.directive.repeat.header"></a><h6>
-<a name="id533328"></a>
+<a name="id533624"></a>
             <a href="repeat.html#spirit.karma.reference.directive.repeat.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/repeat.hpp&gt;
@@ -53,7 +53,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.directive.repeat.model_of"></a><h6>
-<a name="id533441"></a>
+<a name="id533737"></a>
             <a href="repeat.html#spirit.karma.reference.directive.repeat.model_of">Model
             of</a>
           </h6>
@@ -85,7 +85,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.directive.repeat.expression_semantics"></a><h6>
-<a name="id533606"></a>
+<a name="id533901"></a>
             <a href="repeat.html#spirit.karma.reference.directive.repeat.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -171,7 +171,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.repeat.attributes"></a><h6>
-<a name="id534183"></a>
+<a name="id534479"></a>
             <a href="repeat.html#spirit.karma.reference.directive.repeat.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -264,7 +264,7 @@
 </td></tr>
 </table></div>
 <a name="spirit.karma.reference.directive.repeat.complexity"></a><h6>
-<a name="id535140"></a>
+<a name="id535436"></a>
             <a href="repeat.html#spirit.karma.reference.directive.repeat.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -279,7 +279,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.directive.repeat.example"></a><h6>
-<a name="id535180"></a>
+<a name="id535476"></a>
             <a href="repeat.html#spirit.karma.reference.directive.repeat.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/upperlower.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/directive/upperlower.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/upperlower.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.directive.upperlower.description"></a><h6>
-<a name="id539518"></a>
+<a name="id539818"></a>
             <a href="upperlower.html#spirit.karma.reference.directive.upperlower.description">Description</a>
           </h6>
 <p>
@@ -45,7 +45,7 @@
             Encoding Namespace</a>).
           </p>
 <a name="spirit.karma.reference.directive.upperlower.header"></a><h6>
-<a name="id539623"></a>
+<a name="id539924"></a>
             <a href="upperlower.html#spirit.karma.reference.directive.upperlower.header">Header</a>
           </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/directive/upper_lower_case.hpp&gt;
@@ -55,7 +55,7 @@
             Also, see Include Structure.
           </p>
 <a name="spirit.karma.reference.directive.upperlower.model_of"></a><h6>
-<a name="id539737"></a>
+<a name="id540038"></a>
             <a href="upperlower.html#spirit.karma.reference.directive.upperlower.model_of">Model
             of</a>
           </h6>
@@ -87,7 +87,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.directive.upperlower.expression_semantics"></a><h6>
-<a name="id539889"></a>
+<a name="id540190"></a>
             <a href="upperlower.html#spirit.karma.reference.directive.upperlower.expression_semantics">Expression
             Semantics</a>
           </h6>
@@ -157,7 +157,7 @@
 </td></tr>
 </table></div>
 <a name="spirit.karma.reference.directive.upperlower.attributes"></a><h6>
-<a name="id540271"></a>
+<a name="id540572"></a>
             <a href="upperlower.html#spirit.karma.reference.directive.upperlower.attributes">Attributes</a>
           </h6>
 <div class="informaltable"><table class="table">
@@ -205,7 +205,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.directive.upperlower.complexity"></a><h6>
-<a name="id540690"></a>
+<a name="id540991"></a>
             <a href="upperlower.html#spirit.karma.reference.directive.upperlower.complexity">Complexity</a>
           </h6>
 <div class="blockquote"><blockquote class="blockquote">
@@ -222,7 +222,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.directive.upperlower.example"></a><h6>
-<a name="id540781"></a>
+<a name="id541082"></a>
             <a href="upperlower.html#spirit.karma.reference.directive.upperlower.example">Example</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -8,7 +8,7 @@
 <link rel="home" href="../../../index.html" title="Spirit 2.1">
 <link rel="up" href="../reference.html" title="Reference">
 <link rel="previous" href="../reference.html" title="Reference">
-<link rel="next" href="generator_concepts/generator.html" title="Generator">
+<link rel="next" href="karma_basics.html" title=" Basics">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -21,7 +21,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../reference.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="generator_concepts/generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../reference.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="karma_basics.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -33,11 +33,11 @@
 <div></div>
 </div>
 <div class="toc"><dl>
-<dt><span class="section">Generator</span></dt>
-<dt><span class="section">PrimitiveGenerator</span></dt>
-<dt><span class="section">UnaryGenerator</span></dt>
-<dt><span class="section">BinaryGenerator</span></dt>
-<dt><span class="section">NaryGenerator</span></dt>
+<dt><span class="section">Generator</span></dt>
+<dt><span class="section">PrimitiveGenerator</span></dt>
+<dt><span class="section">UnaryGenerator</span></dt>
+<dt><span class="section">BinaryGenerator</span></dt>
+<dt><span class="section">NaryGenerator</span></dt>
 </dl></div>
 <p>
           <span class="emphasis"><em>Spirit.Karma</em></span> generators fall into a couple of generalized
@@ -50,6 +50,860 @@
 <p>
           The following sections provide details on these concepts.
         </p>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.generator"></a>Generator
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.generator_concepts.generator.description"></a><h6>
+<a name="id492787"></a>
+ Description
+ </h6>
+<p>
+ The <span class="emphasis"><em>Generator</em></span> is the most fundamental concept. A
+ Generator has a member function, <tt class="computeroutput"><span class="identifier">generate</span></tt>,
+ that accepts an <tt class="computeroutput"><span class="identifier">OutputIterator</span></tt>
+ and returns bool as its result. The iterator receives the data being
+ generated. The Generator's <tt class="computeroutput"><span class="identifier">generate</span></tt>
+ member function returns <tt class="computeroutput"><span class="keyword">true</span></tt>
+ if the generator succeeds. Each Generator can represent a specific pattern
+ or algorithm, or it can be a more complex generator formed as a composition
+ of other Generator's.
+ </p>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">g</span></tt></span></dt>
+<dd><p>
+ A <tt class="computeroutput"><span class="identifier">Generator</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">G</span></tt></span></dt>
+<dd><p>
+ A <tt class="computeroutput"><span class="identifier">Generator</span></tt> type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">OutIter</span></tt></span></dt>
+<dd><p>
+ An <tt class="computeroutput"><span class="identifier">OutputIterator</span></tt>
+ type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">sink</span></tt></span></dt>
+<dd><p>
+ An <tt class="computeroutput"><span class="identifier">OutputIterator</span></tt>
+ instance.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">Context</span></tt></span></dt>
+<dd><p>
+ The generator's Context type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">context</span></tt></span></dt>
+<dd><p>
+ The generator's Context, or <tt class="computeroutput"><span class="identifier">unused</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">delimit</span></tt></span></dt>
+<dd><p>
+ A delimiter Generator, or <tt class="computeroutput"><span class="identifier">unused</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">attrib</span></tt></span></dt>
+<dd><p>
+ A Compatible Attributes, or <tt class="computeroutput"><span class="identifier">unused</span></tt>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.generator_concepts.generator.valid_expressions"></a><h6>
+<a name="id493155"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In the expressions below, the behavior of the generator, <tt class="computeroutput"><span class="identifier">g</span></tt>, as well as how <tt class="computeroutput"><span class="identifier">delimit</span></tt>
+ and <tt class="computeroutput"><span class="identifier">attrib</span></tt> are handled
+ by <tt class="computeroutput"><span class="identifier">g</span></tt>, are left unspecified
+ in the base <tt class="computeroutput"><span class="identifier">Generator</span></tt>
+ concept. These are specified in subsequent, more refined concepts and
+ by the actual models therof.
+ </p>
+<p>
+ For any Generator the following expressions must be valid:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+<th><p>
+ Return type
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">g</span><span class="special">.</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">context</span><span class="special">,</span> <span class="identifier">delimit</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the output sequence by inserting the generated characters/tokens
+ into <tt class="computeroutput"><span class="identifier">sink</span></tt>. Use
+ the <tt class="computeroutput"><span class="identifier">delimit</span></tt> generator
+ for delimiting. Return <tt class="computeroutput"><span class="keyword">true</span></tt>
+ if successful, otherwise return <tt class="computeroutput"><span class="keyword">false</span></tt>.
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">bool</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">what</span><span class="special">(</span><span class="identifier">context</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Get information about a Generator.
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">info</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.generator.type_expressions"></a><h6>
+<a name="id493523"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator.type_expressions">Type
+ Expressions</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">attribute</span><span class="special">&lt;</span><span class="identifier">Context</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>
+ </p></td>
+<td><p>
+ The Generator's attribute.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>
+ </p></td>
+<td><p>
+ Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+ if a certain type, <tt class="computeroutput"><span class="identifier">G</span></tt>
+ is a Generator, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
+ otherwise (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Boolean Constant</a>).
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">properties</span></tt>
+ </p></td>
+<td><p>
+ A <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span></tt> (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Integral Constant</a>) holding a value from the <tt class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generator_properties</span></tt> enumeration.
+ The default value is <tt class="computeroutput"><span class="identifier">generator_properties</span><span class="special">::</span><span class="identifier">no_properties</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.generator.postcondition"></a><h6>
+<a name="id493889"></a>
+ Postcondition
+ </h6>
+<p>
+ Upon return from <tt class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">generate</span></tt> the following post conditions
+ should hold:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ On successful generation, <tt class="computeroutput"><span class="identifier">sink</span></tt>
+ receives the generated characters/tokens sequence.
+ </li>
+<li>
+ No pre-delimits: <tt class="computeroutput"><span class="identifier">delimit</span></tt>
+ characters/tokens will not be emitted in front of any other output.
+ </li>
+<li>
+ The attribute <tt class="computeroutput"><span class="identifier">attrib</span></tt>
+ has not been modified.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.generator_concepts.generator.models"></a><h6>
+<a name="id493996"></a>
+ Models
+ </h6>
+<p>
+ All generators in <span class="emphasis"><em>Spirit.Karma</em></span> are models of the
+ <span class="emphasis"><em>Generator</em></span> concept.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator"></a>PrimitiveGenerator
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator.description"></a><h6>
+<a name="id494057"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>PrimitiveGenerator</em></span> is the most basic building block
+ that the client uses to build more complex generators.
+ </p>
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of"></a><h6>
+<a name="id494092"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Generator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit"></a><h6>
+<a name="id494149"></a>
+ Post-delimit
+ </h6>
+<p>
+ Before exiting the <tt class="computeroutput"><span class="identifier">generate</span></tt>
+ member function, a PrimitiveGenerator is required to do a post-delimit.
+ This will generate a single delimiting character/token sequence. Only
+ PrimitiveGenerator's are required to perform this post-delimit. This
+ is typically carried out through a call to <tt class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span></tt>:
+ </p>
+<pre class="programlisting"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">delimit</span><span class="special">);</span>
+</pre>
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions"></a><h6>
+<a name="id494267"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions">Type
+ Expressions</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_primitive_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>
+ </p></td>
+<td><p>
+ Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+ if a certain type, <tt class="computeroutput"><span class="identifier">G</span></tt>,
+ is a PrimitiveGenerator, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
+ otherwise (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Boolean Constant</a>).
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator.models"></a><h6>
+<a name="id494456"></a>
+ Models
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+eol ,
+ </li>
+<li>
+eps,
+ </li>
+<li>
+Numeric generators,
+ </li>
+<li>
+<a href="char.html#spirit.karma.reference.char.char_generator" title=" Character
+ Generators">Character
+ generators</a>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add more links to <span class="emphasis"><em>PrimitiveGenerator</em></span>
+ models here.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.unarygenerator"></a>UnaryGenerator
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.description"></a><h6>
+<a name="id494594"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>UnaryGenerator</em></span> is a composite generator that has
+ a single subject. The UnaryGenerator may change the behavior of its subject
+ following the Delegate Design Pattern.
+ </p>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.refinement_of"></a><h6>
+<a name="id494630"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Generator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">g</span></tt></span></dt>
+<dd><p>
+ A UnaryGenerator.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">G</span></tt></span></dt>
+<dd><p>
+ A UnaryGenerator type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.valid_expressions"></a><h6>
+<a name="id494739"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in Generator, for any UnaryGenerator
+ the following must be met:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+<th><p>
+ Return type
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">subject</span></tt>
+ </p></td>
+<td><p>
+ Subject generator.
+ </p></td>
+<td><p>
+ Generator
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.type_expressions"></a><h6>
+<a name="id494898"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator.type_expressions">Type
+ Expressions</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">subject_type</span></tt>
+ </p></td>
+<td><p>
+ The subject generator type.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_unary_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>
+ </p></td>
+<td><p>
+ Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+ if a certain type, <tt class="computeroutput"><span class="identifier">G</span></tt>
+ is a UnaryGenerator, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
+ otherwise (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Boolean Constant</a>).
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.invariants"></a><h6>
+<a name="id495124"></a>
+ Invariants
+ </h6>
+<p>
+ For any UnaryGenerator, <tt class="computeroutput"><span class="identifier">G</span></tt>,
+ the following invariant always holds:
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+<tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">subject_type</span><span class="special">&gt;::</span><span class="identifier">type</span></tt> evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+</li></ul></div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.models"></a><h6>
+<a name="id495247"></a>
+ Models
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<a href="operator.html#spirit.karma.reference.operator.kleene" title=" Kleene Star
+ (unary operator*())">Kleene Star
+ (unary <tt class="computeroutput"><span class="special">*</span></tt>)</a>,
+ </li>
+<li>
+<a href="operator.html#spirit.karma.reference.operator.plus" title=" Plus (unary
+ operator+())">plus (unary <tt class="computeroutput"><span class="special">+</span></tt>)</a> operator,
+ </li>
+<li>
+<a href="operator.html#spirit.karma.reference.operator.optional" title=" Optional
+ (unary operator-())">optional (unary
+ <tt class="computeroutput"><span class="special">-</span></tt>)</a> operator,
+ </li>
+<li>
+<a href="operator.html#spirit.karma.reference.operator.and_predicate" title=" And
+ Predicate (unary operator&amp;())">and predicate
+ (unary <tt class="computeroutput"><span class="special">&amp;</span></tt>)</a> and
+ <a href="operator.html#spirit.karma.reference.operator.not_predicate" title=" Not
+ Predicate (unary operator!())">not predicate
+ (unary <tt class="computeroutput"><span class="special">!</span></tt>)</a> operators,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
+ Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">left_align</span></tt></a>, <a href="directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
+ Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">center</span></tt></a>, and <a href="directive.html#spirit.karma.reference.directive.alignment" title=" Alignment
+ Directives (left_align[], center[], and right_align[])"><tt class="computeroutput"><span class="identifier">right_align</span></tt></a> directives,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.repeat" title=" Repetition
+ Directive (repeat[])"><tt class="computeroutput"><span class="identifier">repeat</span></tt></a> directive,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.delimit" title=" Directives
+ Controlling Automatic Delimiting (verbatim[] and delimit[])"><tt class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
+ directive,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.delimit" title=" Directives
+ Controlling Automatic Delimiting (verbatim[] and delimit[])"><tt class="computeroutput"><span class="identifier">delimit</span></tt></a> directive,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.upperlower" title=" Directives
+ Controlling Case Sensitivity (upper[] and lower[])"><tt class="computeroutput"><span class="identifier">lower</span></tt></a> and <a href="directive.html#spirit.karma.reference.directive.upperlower" title=" Directives
+ Controlling Case Sensitivity (upper[] and lower[])"><tt class="computeroutput"><span class="identifier">upper</span></tt></a> directives,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.maxwidth" title=" Controlling
+ the Maximum Field Wield (maxwidth[])"><tt class="computeroutput"><span class="identifier">maxwidth</span></tt></a> directive,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.buffer" title=" Temporary
+ Output Buffering (buffer[])"><tt class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
+ directive,
+ </li>
+<li>
+<a href="directive.html#spirit.karma.reference.directive.omit" title=" Consume Attribute
+ (omit[])"><tt class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt></a>
+ directive.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add more links to models of UnaryGenerator
+ concept
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.binarygenerator"></a>BinaryGenerator
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.description"></a><h6>
+<a name="id495702"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>BinaryGenerator</em></span> is a composite parser that has a
+ two subjects, <tt class="computeroutput"><span class="identifier">left</span></tt> and
+ <tt class="computeroutput"><span class="identifier">right</span></tt>. The BinaryGenerator
+ allows its subjects to be treated in the same way as a single instance
+ of a Generator following the Composite
+ Design Pattern.
+ </p>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.refinement_of"></a><h6>
+<a name="id495782"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Generator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">g</span></tt></span></dt>
+<dd><p>
+ A BinaryGenerator.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">G</span></tt></span></dt>
+<dd><p>
+ A BinaryGenerator type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.valid_expressions"></a><h6>
+<a name="id495892"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in Generator, for any BinaryGenerator
+ the following must be met:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+<th><p>
+ Return type
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">left</span></tt>
+ </p></td>
+<td><p>
+ Left generator.
+ </p></td>
+<td><p>
+ Generator
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">right</span></tt>
+ </p></td>
+<td><p>
+ Right generator.
+ </p></td>
+<td><p>
+ Generator
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.type_expressions"></a><h6>
+<a name="id496114"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator.type_expressions">Type
+ Expressions</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">left_type</span></tt>
+ </p></td>
+<td><p>
+ The left parser type.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">right_type</span></tt>
+ </p></td>
+<td><p>
+ The right parser type.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_binary_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>
+ </p></td>
+<td><p>
+ Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+ if a certain type, <tt class="computeroutput"><span class="identifier">G</span></tt>
+ is a BinaryGenerator, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
+ otherwise (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Boolean Constant</a>).
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.invariants"></a><h6>
+<a name="id496379"></a>
+ Invariants
+ </h6>
+<p>
+ For any BinaryGenerator, <tt class="computeroutput"><span class="identifier">G</span></tt>,
+ the following invariants always hold:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">left_type</span><span class="special">&gt;::</span><span class="identifier">type</span></tt> evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+</li>
+<li>
+<tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">right_type</span><span class="special">&gt;::</span><span class="identifier">type</span></tt> evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+</li>
+</ul></div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.models"></a><h6>
+<a name="id496580"></a>
+ Models
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+list (%).
+ </li></ul></div>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add more links to models of BinaryGenerator
+ concept
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.narygenerator"></a>NaryGenerator
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.description"></a><h6>
+<a name="id496668"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>NaryGenerator</em></span> is a composite generator that has
+ one or more subjects. The NaryGenerator allows its subjects to be treated
+ in the same way as a single instance of a Generator following the Composite
+ Design Pattern.
+ </p>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.refinement_of"></a><h6>
+<a name="id496723"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Generator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">g</span></tt></span></dt>
+<dd><p>
+ A NaryGenerator.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">G</span></tt></span></dt>
+<dd><p>
+ A NaryGenerator type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.valid_expressions"></a><h6>
+<a name="id496833"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in Generator, for any NaryGenerator
+ the following must be met:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+<th><p>
+ Return type
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">elements</span></tt>
+ </p></td>
+<td><p>
+ The tuple of elements.
+ </p></td>
+<td><p>
+ A Fusion
+ Sequence of Generator types.
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.type_expressions"></a><h6>
+<a name="id497001"></a>
+ <a href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator.type_expressions">Type
+ Expressions</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">elements_type</span></tt>
+ </p></td>
+<td><p>
+ Elements tuple type.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_nary_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">&gt;::</span><span class="identifier">type</span></tt>
+ </p></td>
+<td><p>
+ Metafunction that evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+ if a certain type, <tt class="computeroutput"><span class="identifier">G</span></tt>
+ is a NaryGenerator, <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>
+ otherwise (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Boolean Constant</a>).
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.invariants"></a><h6>
+<a name="id497227"></a>
+ Invariants
+ </h6>
+<p>
+ For each element, <tt class="computeroutput"><span class="identifier">E</span></tt>,
+ in any NaryGenerator, <tt class="computeroutput"><span class="identifier">G</span></tt>,
+ the following invariant always holds:
+ </p>
+<div class="itemizedlist"><ul type="disc"><li>
+<tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_generator</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">&gt;::</span><span class="identifier">type</span></tt> evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+</li></ul></div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.models"></a><h6>
+<a name="id497351"></a>
+ Models
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<a href="operator.html#spirit.karma.reference.operator.sequence" title=" Sequences
+ (operator&lt;&lt;())">sequence (<tt class="computeroutput"><span class="special">&lt;&lt;</span></tt>)</a>,
+ </li>
+<li>
+<a href="operator.html#spirit.karma.reference.operator.alternative" title=" Alternatives
+ (operator|())">alternative
+ (<tt class="computeroutput"><span class="special">|</span></tt>)</a>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add more links to models of NaryGenerator
+ concept
+ </p>
+</div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
 <td align="left"></td>
@@ -62,7 +916,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="../reference.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="generator_concepts/generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../reference.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="karma_basics.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -31,7 +31,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.generator_concepts.binarygenerator.description"></a><h6>
-<a name="id495391"></a>
+<a name="id495702"></a>
             <a href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.description">Description</a>
           </h6>
 <p>
@@ -43,7 +43,7 @@
             Design Pattern.
           </p>
 <a name="spirit.karma.reference.generator_concepts.binarygenerator.refinement_of"></a><h6>
-<a name="id495471"></a>
+<a name="id495782"></a>
             <a href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.refinement_of">Refinement
             of</a>
           </h6>
@@ -70,7 +70,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.generator_concepts.binarygenerator.valid_expressions"></a><h6>
-<a name="id495581"></a>
+<a name="id495892"></a>
             <a href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.valid_expressions">Valid
             Expressions</a>
           </h6>
@@ -121,7 +121,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.binarygenerator.type_expressions"></a><h6>
-<a name="id495803"></a>
+<a name="id496114"></a>
             <a href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.type_expressions">Type
             Expressions</a>
           </h6>
@@ -170,7 +170,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.binarygenerator.invariants"></a><h6>
-<a name="id496068"></a>
+<a name="id496379"></a>
             <a href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.invariants">Invariants</a>
           </h6>
 <p>
@@ -186,7 +186,7 @@
 </li>
 </ul></div>
 <a name="spirit.karma.reference.generator_concepts.binarygenerator.models"></a><h6>
-<a name="id496269"></a>
+<a name="id496580"></a>
             <a href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.models">Models</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/generator.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/generator.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/generator.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -32,7 +32,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.generator_concepts.generator.description"></a><h6>
-<a name="id492477"></a>
+<a name="id492787"></a>
             <a href="generator.html#spirit.karma.reference.generator_concepts.generator.description">Description</a>
           </h6>
 <p>
@@ -86,7 +86,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.generator_concepts.generator.valid_expressions"></a><h6>
-<a name="id492844"></a>
+<a name="id493155"></a>
             <a href="generator.html#spirit.karma.reference.generator_concepts.generator.valid_expressions">Valid
             Expressions</a>
           </h6>
@@ -153,7 +153,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.generator.type_expressions"></a><h6>
-<a name="id493212"></a>
+<a name="id493523"></a>
             <a href="generator.html#spirit.karma.reference.generator_concepts.generator.type_expressions">Type
             Expressions</a>
           </h6>
@@ -204,7 +204,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.generator.postcondition"></a><h6>
-<a name="id493579"></a>
+<a name="id493889"></a>
             <a href="generator.html#spirit.karma.reference.generator_concepts.generator.postcondition">Postcondition</a>
           </h6>
 <p>
@@ -226,7 +226,7 @@
             </li>
 </ul></div>
 <a name="spirit.karma.reference.generator_concepts.generator.models"></a><h6>
-<a name="id493685"></a>
+<a name="id493996"></a>
             <a href="generator.html#spirit.karma.reference.generator_concepts.generator.models">Models</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/narygenerator.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/narygenerator.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/narygenerator.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -31,7 +31,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.generator_concepts.narygenerator.description"></a><h6>
-<a name="id496358"></a>
+<a name="id496668"></a>
             <a href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.description">Description</a>
           </h6>
 <p>
@@ -41,7 +41,7 @@
             Design Pattern.
           </p>
 <a name="spirit.karma.reference.generator_concepts.narygenerator.refinement_of"></a><h6>
-<a name="id496412"></a>
+<a name="id496723"></a>
             <a href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.refinement_of">Refinement
             of</a>
           </h6>
@@ -68,7 +68,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.generator_concepts.narygenerator.valid_expressions"></a><h6>
-<a name="id496522"></a>
+<a name="id496833"></a>
             <a href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.valid_expressions">Valid
             Expressions</a>
           </h6>
@@ -107,7 +107,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.narygenerator.type_expressions"></a><h6>
-<a name="id496690"></a>
+<a name="id497001"></a>
             <a href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.type_expressions">Type
             Expressions</a>
           </h6>
@@ -148,7 +148,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.narygenerator.invariants"></a><h6>
-<a name="id496916"></a>
+<a name="id497227"></a>
             <a href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.invariants">Invariants</a>
           </h6>
 <p>
@@ -160,7 +160,7 @@
 <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_generator</span><span class="special">&lt;</span><span class="identifier">E</span><span class="special">&gt;::</span><span class="identifier">type</span></tt> evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
 </li></ul></div>
 <a name="spirit.karma.reference.generator_concepts.narygenerator.models"></a><h6>
-<a name="id497040"></a>
+<a name="id497351"></a>
             <a href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.models">Models</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -31,7 +31,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.generator_concepts.primitivegenerator.description"></a><h6>
-<a name="id493746"></a>
+<a name="id494057"></a>
             <a href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.description">Description</a>
           </h6>
 <p>
@@ -39,7 +39,7 @@
             that the client uses to build more complex generators.
           </p>
 <a name="spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of"></a><h6>
-<a name="id493782"></a>
+<a name="id494092"></a>
             <a href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of">Refinement
             of</a>
           </h6>
@@ -53,7 +53,7 @@
             </p>
 </blockquote></div>
 <a name="spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit"></a><h6>
-<a name="id493838"></a>
+<a name="id494149"></a>
             <a href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit">Post-delimit</a>
           </h6>
 <p>
@@ -66,7 +66,7 @@
 <pre class="programlisting"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">delimit</span><span class="special">);</span>
 </pre>
 <a name="spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions"></a><h6>
-<a name="id493957"></a>
+<a name="id494267"></a>
             <a href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.type_expressions">Type
             Expressions</a>
           </h6>
@@ -97,7 +97,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.primitivegenerator.models"></a><h6>
-<a name="id494145"></a>
+<a name="id494456"></a>
             <a href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.models">Models</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -31,7 +31,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.generator_concepts.unarygenerator.description"></a><h6>
-<a name="id494283"></a>
+<a name="id494594"></a>
             <a href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.description">Description</a>
           </h6>
 <p>
@@ -40,7 +40,7 @@
             following the Delegate Design Pattern.
           </p>
 <a name="spirit.karma.reference.generator_concepts.unarygenerator.refinement_of"></a><h6>
-<a name="id494320"></a>
+<a name="id494630"></a>
             <a href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.refinement_of">Refinement
             of</a>
           </h6>
@@ -67,7 +67,7 @@
 </dl>
 </div>
 <a name="spirit.karma.reference.generator_concepts.unarygenerator.valid_expressions"></a><h6>
-<a name="id494428"></a>
+<a name="id494739"></a>
             <a href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.valid_expressions">Valid
             Expressions</a>
           </h6>
@@ -105,7 +105,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.unarygenerator.type_expressions"></a><h6>
-<a name="id494587"></a>
+<a name="id494898"></a>
             <a href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.type_expressions">Type
             Expressions</a>
           </h6>
@@ -146,7 +146,7 @@
 </tbody>
 </table></div>
 <a name="spirit.karma.reference.generator_concepts.unarygenerator.invariants"></a><h6>
-<a name="id494813"></a>
+<a name="id495124"></a>
             <a href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.invariants">Invariants</a>
           </h6>
 <p>
@@ -157,7 +157,7 @@
 <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_generator</span><span class="special">&lt;</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">subject_type</span><span class="special">&gt;::</span><span class="identifier">type</span></tt> evaluates to <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
 </li></ul></div>
 <a name="spirit.karma.reference.generator_concepts.unarygenerator.models"></a><h6>
-<a name="id494936"></a>
+<a name="id495247"></a>
             <a href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.models">Models</a>
           </h6>
 <p>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/karma_basics.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/karma_basics.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/karma_basics.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,7 +6,8 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
 <link rel="home" href="../../../index.html" title="Spirit 2.1">
 <link rel="up" href="../reference.html" title="Reference">
-<link rel="previous" href="generator_concepts/narygenerator.html" title="NaryGenerator">
+<link rel="previous" href="generator_concepts.html" title="Generator
+ Concepts">
 <link rel="next" href="char.html" title=" Char">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,7 +21,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="generator_concepts/narygenerator.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="generator_concepts.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -30,7 +31,7 @@
 <div></div>
 </div>
 <a name="spirit.karma.reference.karma_basics.lazy_argument"></a><h5>
-<a name="id497152"></a>
+<a name="id497463"></a>
           <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
           Argument</a>
         </h5>
@@ -56,7 +57,7 @@
           Actions</a>).
         </p>
 <a name="spirit.karma.reference.karma_basics.character_encoding_namespace"></a><h5>
-<a name="id497373"></a>
+<a name="id497684"></a>
           <a href="karma_basics.html#spirit.karma.reference.karma_basics.character_encoding_namespace">Character
           Encoding Namespace</a>
         </h5>
@@ -128,7 +129,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="generator_concepts/narygenerator.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="generator_concepts.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/numeric.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,10 +6,8 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.65.1">
 <link rel="home" href="../../../index.html" title="Spirit 2.1">
 <link rel="up" href="../reference.html" title="Reference">
-<link rel="previous" href="char/char_class.html" title=" Character
- Class Generators">
-<link rel="next" href="numeric/signed_int.html" title=" Signed
- Integer Number Generators">
+<link rel="previous" href="char.html" title=" Char">
+<link rel="next" href="directive.html" title="Directive">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -22,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="char/char_class.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="numeric/signed_int.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="char.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="directive.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage">
@@ -32,11 +30,11 @@
 <div></div>
 </div>
 <div class="toc"><dl>
-<dt><span class="section"><a href="numeric/signed_int.html"> Signed
+<dt><span class="section"><a href="numeric.html#spirit.karma.reference.numeric.signed_int"> Signed
           Integer Number Generators</a></span></dt>
-<dt><span class="section"><a href="numeric/unsigned_int.html"> Unsigned
+<dt><span class="section"><a href="numeric.html#spirit.karma.reference.numeric.unsigned_int"> Unsigned
           Integer Number Generators</a></span></dt>
-<dt><span class="section"><a href="numeric/floating_point.html"> Floating
+<dt><span class="section"><a href="numeric.html#spirit.karma.reference.numeric.floating_point"> Floating
           Point Number Generators</a></span></dt>
 </dl></div>
 <p>
@@ -45,12 +43,2728 @@
           integer, and floating point number generators.
         </p>
 <a name="spirit.karma.reference.numeric.module_header"></a><h5>
-<a name="id506383"></a>
+<a name="id506694"></a>
           <a href="numeric.html#spirit.karma.reference.numeric.module_header">Module Header</a>
         </h5>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/numeric.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">include</span><span class="special">/</span><span class="identifier">karma_numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.numeric.signed_int"></a><a href="numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
+ Integer Number Generators"> Signed
+ Integer Number Generators</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.numeric.signed_int.description"></a><h6>
+<a name="id506811"></a>
+ Description
+ </h6>
+<p>
+ The signed integer number generators described in this section are:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
+<td><p>
+ Generates <tt class="computeroutput"><span class="identifier">num</span></tt>,
+ where <tt class="computeroutput"><span class="identifier">num</span></tt> can
+ be a <tt class="computeroutput"><span class="keyword">short</span></tt>, <tt class="computeroutput"><span class="keyword">int</span></tt>, <tt class="computeroutput"><span class="keyword">long</span></tt>,
+ or <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">short_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">short</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="keyword">short</span> <span class="keyword">int</span></tt> as given by the mandatory
+ attribute
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">short</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a <tt class="computeroutput"><span class="keyword">short</span> <span class="keyword">int</span></tt>,
+ if an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">int_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate an <tt class="computeroutput"><span class="keyword">int</span></tt>
+ as given by the mandatory attribute
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as an <tt class="computeroutput"><span class="keyword">int</span></tt>, if an
+ attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">int</span></tt> as given by the mandatory
+ attribute
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">int</span></tt>,
+ if an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_long</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt> as given by the mandatory
+ attribute
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as an <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt>,
+ if an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a <tt class="computeroutput"><span class="identifier">Num</span></tt>, if
+ an attribute is supplied it must match
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ These can be used to flexibly format any integer number of any compatible
+ type (for more information about the requirements, see below).
+ </p>
+<p>
+ The interger number generators are very fast. For measurement results
+ comparing the <span class="emphasis"><em>Spirit.Karma</em></span> integer number generators
+ with equivalent constructs provided by other libraries see the section
+ <a href="../performance_measurements/numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.int_performance" title="
+ Comparing the performance of a single int_ generator">Performance
+ of Numeric Generators</a>
+ </p>
+<a name="spirit.karma.reference.numeric.signed_int.header"></a><h6>
+<a name="id507913"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/numeric/int.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">include</span><span class="special">/</span><span class="identifier">karma_int</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.numeric.signed_int.model_of"></a><h6>
+<a name="id508027"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.signed_int.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">num</span></tt></span></dt>
+<dd><p>
+ Numeric literal, any signed integer value, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a signed integer value of type
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">Num</span></tt></span></dt>
+<dd><p>
+ Type of <tt class="computeroutput"><span class="identifier">num</span></tt>: any
+ signed integer type
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.numeric.signed_int.expression_semantics"></a><h6>
+<a name="id508167"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.signed_int.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the integer literal <tt class="computeroutput"><span class="identifier">num</span></tt>
+ using the default formatting (radix is 10, sign is only printed
+ for negative literals). This generator never fails (except if
+ the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">short_</span>
+<span class="identifier">int_</span>
+<span class="identifier">long_</span>
+<span class="identifier">long_long</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the integer provided by a mandatory attribute using
+ the default formatting (radix is 10, sign is only printed for
+ negative literals). This generator never fails (except if the
+ underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the integer provided by the immediate literal value
+ the generator is initialized from using the default formatting
+ (radix is 10, sign is only printed for negative literals). If
+ this generator has an associated attribute it succeeds only as
+ long as the attribute is equal to the immediate literal (except
+ if the underlying output stream reports an error). Otherwise
+ this generator fails and does not generate any output.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ All generators listed in the table above (except <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>) are predefined specializations of the
+ <tt class="computeroutput"><span class="identifier">int_generator</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span><span class="special">&gt;</span></tt>
+ basic integer number generator type described below. It is possible to
+ directly use this type to create integer generators using a wide range
+ of formatting options.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the integer of type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ provided by a mandatory attribute using the specified <tt class="computeroutput"><span class="identifier">Radix</span></tt> (possible values are
+ <tt class="computeroutput"><span class="number">2</span></tt>, <tt class="computeroutput"><span class="number">8</span></tt>, <tt class="computeroutput"><span class="number">10</span></tt>,
+ and <tt class="computeroutput"><span class="number">16</span></tt>, the default
+ value is <tt class="computeroutput"><span class="number">10</span></tt>). If
+ <tt class="computeroutput"><span class="identifier">force_sign</span></tt> is
+ <tt class="computeroutput"><span class="keyword">false</span></tt> (the default),
+ a sign is only printed for negative literals. If <tt class="computeroutput"><span class="identifier">force_sign</span></tt> is <tt class="computeroutput"><span class="keyword">true</span></tt>, all numbers will be printed
+ using a sign, i.e. <tt class="computeroutput"><span class="char">'-'</span></tt>
+ for negative numbers, <tt class="computeroutput"><span class="char">'+'</span></tt>
+ for positive numbers, and <tt class="computeroutput"><span class="char">' '</span></tt>
+ for zeros. This generator never fails (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the integer of type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ provided by the immediate literal value the generator is initialized
+ from, using the specified <tt class="computeroutput"><span class="identifier">Radix</span></tt>
+ (possible values are <tt class="computeroutput"><span class="number">2</span></tt>,
+ <tt class="computeroutput"><span class="number">8</span></tt>, <tt class="computeroutput"><span class="number">10</span></tt>, and <tt class="computeroutput"><span class="number">16</span></tt>,
+ the default value is <tt class="computeroutput"><span class="number">10</span></tt>).
+ If <tt class="computeroutput"><span class="identifier">force_sign</span></tt>
+ is <tt class="computeroutput"><span class="keyword">false</span></tt> (the default),
+ a sign is only printed for negative literals. If <tt class="computeroutput"><span class="identifier">force_sign</span></tt> is <tt class="computeroutput"><span class="keyword">true</span></tt>, all numbers will be printed
+ using a sign, i.e. <tt class="computeroutput"><span class="char">'-'</span></tt>
+ for negative numbers, <tt class="computeroutput"><span class="char">'+'</span></tt>
+ for positive numbers, and <tt class="computeroutput"><span class="char">' '</span></tt>
+ for zeros. If this generator has an associated attribute it succeeds
+ only as long as the attribute is equal to the immediate literal
+ (except if the underlying output stream reports an error). Otherwise
+ this generator fails and does not generate any output.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.numeric.signed_int.additional_requirements"></a><h6>
+<a name="id509099"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.signed_int.additional_requirements">Additional
+ Requirements</a>
+ </h6>
+<p>
+ The following lists enumerate the requirements which must be met in order
+ to use a certain type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ to instantiate and use a <tt class="computeroutput"><span class="identifier">int_generator</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span><span class="special">&gt;</span></tt>.
+ </p>
+<p>
+ If <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">&gt;::</span><span class="identifier">value</span></tt> is <tt class="computeroutput"><span class="keyword">true</span></tt>
+ the type <tt class="computeroutput"><span class="identifier">Num</span></tt> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ comparison operators for: <tt class="computeroutput"><span class="special">&lt;</span></tt>,
+ <tt class="computeroutput"><span class="special">&lt;=</span></tt>, <tt class="computeroutput"><span class="special">==</span></tt>,
+ <tt class="computeroutput"><span class="special">!=</span></tt>, <tt class="computeroutput"><span class="special">&gt;</span></tt>,
+ and <tt class="computeroutput"><span class="special">&gt;=</span></tt>
+</li>
+<li>
+ numeric operators for: <tt class="computeroutput"><span class="special">+</span></tt>,
+ <tt class="computeroutput"><span class="special">-</span></tt>, <tt class="computeroutput"><span class="special">/</span></tt>,
+ <tt class="computeroutput"><span class="special">*</span></tt>, <tt class="computeroutput"><span class="special">%</span></tt>,
+ and unary <tt class="computeroutput"><span class="special">-</span></tt>
+</li>
+</ul></div>
+<p>
+ If <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">&gt;::</span><span class="identifier">value</span></tt> is <tt class="computeroutput"><span class="keyword">false</span></tt>
+ the type <tt class="computeroutput"><span class="identifier">Num</span></tt> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ comparison operators for: <tt class="computeroutput"><span class="special">&lt;</span></tt>,
+ <tt class="computeroutput"><span class="special">&lt;=</span></tt>, <tt class="computeroutput"><span class="special">==</span></tt>,
+ <tt class="computeroutput"><span class="special">!=</span></tt>, <tt class="computeroutput"><span class="special">&gt;</span></tt>,
+ and <tt class="computeroutput"><span class="special">&gt;=</span></tt>
+</li>
+<li>
+ numeric operators for: <tt class="computeroutput"><span class="special">+</span></tt>,
+ <tt class="computeroutput"><span class="special">-</span></tt>, <tt class="computeroutput"><span class="special">/</span></tt>,
+ <tt class="computeroutput"><span class="special">*</span></tt>, <tt class="computeroutput"><span class="special">%</span></tt>,
+ and unary <tt class="computeroutput"><span class="special">-</span></tt>
+</li>
+<li>
+ helper functions implementing the interface and the semantics of:
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fabs</span></tt>,
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></tt>,
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></tt>,
+ and <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></tt>.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.numeric.signed_int.attributes"></a><h6>
+<a name="id509787"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">short_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">short</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">short</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">int_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">int</span></tt>, attribute is
+ mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">int</span></tt>, attribute is
+ optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_long</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <tt class="computeroutput"><span class="identifier">num</span></tt>
+ and succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">int_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">,</span> <span class="identifier">force_sign</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.numeric.signed_int.complexity"></a><h6>
+<a name="id510546"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(N), where <tt class="computeroutput"><span class="identifier">N</span></tt> is
+ the number of digits needed to represent the generated integer number
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.numeric.signed_int.example"></a><h6>
+<a name="id510595"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use these common test functions:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">int_</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of an <tt class="computeroutput"><span class="identifier">int_</span></tt>
+ generator:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator</span><span class="special">(</span><span class="string">"-2"</span><span class="special">,</span> <span class="identifier">lit</span><span class="special">(-</span><span class="number">2</span><span class="special">));</span>
+<span class="identifier">test_generator</span><span class="special">(</span><span class="string">"-2"</span><span class="special">,</span> <span class="identifier">int_</span><span class="special">(-</span><span class="number">2</span><span class="special">));</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"-2"</span><span class="special">,</span> <span class="identifier">int_</span><span class="special">(-</span><span class="number">2</span><span class="special">),</span> <span class="special">-</span><span class="number">2</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">int_</span><span class="special">(-</span><span class="number">2</span><span class="special">),</span> <span class="number">3</span><span class="special">);</span> <span class="comment">// fails (as -2 != 3)!
+</span><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"-2"</span><span class="special">,</span> <span class="identifier">int_</span><span class="special">,</span> <span class="special">-</span><span class="number">2</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.numeric.unsigned_int"></a><a href="numeric.html#spirit.karma.reference.numeric.unsigned_int" title=" Unsigned
+ Integer Number Generators"> Unsigned
+ Integer Number Generators</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.numeric.unsigned_int.description"></a><h6>
+<a name="id512280"></a>
+ Description
+ </h6>
+<p>
+ The signed integer number generators described in this section are:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+<td><p>
+ Generates <tt class="computeroutput"><span class="identifier">num</span></tt>,
+ where <tt class="computeroutput"><span class="identifier">num</span></tt> can
+ be a <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></tt>,
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>,
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></tt>,
+ or <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ushort</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></tt>
+ </p></td>
+<td><p>
+ Generate a short integer
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ushort</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a short integer, if an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">uint</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate an int
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">uint</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as an int, if an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate a long integer
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as long integer, if an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong_long</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate a long long
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as an long long, if an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+<td><p>
+ Generate an unsigned <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+<td><p>
+ Generate an unsigned <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a <tt class="computeroutput"><span class="identifier">Num</span></tt>, if
+ an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">bin</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate an unsigned integer in binary (base 2) representation
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">bin</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as an unsigned integer in binary (base 2) representation, if
+ an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">oct</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate an unsigned integer in octal (base 8) representation
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">oct</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as an unsigned integer in octal (base 8) representation, if an
+ attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">hex</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate an unsigned integer in hexadecimal (base 16) representation
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">hex</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as an unsigned integer in hexadecimal (base 16) representation,
+ if an attribute is supplied it must match
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ These can be used to flexibly format any unsigned integer number of any
+ compatible type (for more information about the requirements, see below).
+ </p>
+<p>
+ The interger number generators are very fast. For measurement results
+ comparing the <span class="emphasis"><em>Spirit.Karma</em></span> integer number generators
+ with equivalent constructs provided by other libraries see the section
+ <a href="../performance_measurements/numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.int_performance" title="
+ Comparing the performance of a single int_ generator">Performance
+ of Numeric Generators</a>
+ </p>
+<a name="spirit.karma.reference.numeric.unsigned_int.header"></a><h6>
+<a name="id513705"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/numeric/uint.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">include</span><span class="special">/</span><span class="identifier">karma_uint</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.numeric.unsigned_int.model_of"></a><h6>
+<a name="id513820"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.unsigned_int.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">num</span></tt></span></dt>
+<dd><p>
+ Numeric literal, any unsigned integer value, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to an unsigned integer value of type
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">Num</span></tt></span></dt>
+<dd><p>
+ Type of <tt class="computeroutput"><span class="identifier">num</span></tt>: any
+ unsigned integer type
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.numeric.unsigned_int.expression_semantics"></a><h6>
+<a name="id513962"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.unsigned_int.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the integer literal <tt class="computeroutput"><span class="identifier">num</span></tt>
+ using the default formatting (radix is 10, sign is only printed
+ for negative literals). This generator never fails (except if
+ the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">ushort</span>
+<span class="identifier">uint</span>
+<span class="identifier">ulong</span>
+<span class="identifier">ulong_long</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the unsigned integer provided by a mandatory attribute
+ using the default formatting (radix is 10). This generator never
+ fails (except if the underlying output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">ushort</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">uint</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">ulong</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the unsigned integer provided by the immediate literal
+ value the generator is initialized from using the default formatting
+ (radix is 10). If this generator has an associated attribute
+ it succeeds only as long as the attribute is equal to the immediate
+ literal (except if the underlying output stream reports an error).
+ Otherwise this generator fails and does not generate any output.
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">bin</span>
+<span class="identifier">oct</span>
+<span class="identifier">hex</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the unsigned integer provided by a mandatory attribute
+ using the default formatting and the corresponding radix (<tt class="computeroutput"><span class="identifier">bin</span></tt>: radix is 2, <tt class="computeroutput"><span class="identifier">oct</span></tt>: radix is 8, <tt class="computeroutput"><span class="identifier">hex</span></tt>: radix is 16). This generator
+ never fails (except if the underlying output stream reports an
+ error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">bin</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">oct</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">hex</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the unsigned integer provided by the immediate literal
+ value the generator is initialized from using the default formatting
+ and the corresponding radix (<tt class="computeroutput"><span class="identifier">bin</span></tt>:
+ radix is 2, <tt class="computeroutput"><span class="identifier">oct</span></tt>:
+ radix is 8, <tt class="computeroutput"><span class="identifier">hex</span></tt>:
+ radix is 16). If this generator has an associated attribute it
+ succeeds only as long as the attribute is equal to the immediate
+ literal (except if the underlying output stream reports an error).
+ Otherwise this generator fails and does not generate any output.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ All generators listed in the table above (except <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>) are predefined specializations of the
+ <tt class="computeroutput"><span class="identifier">uint_generator</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">&gt;</span></tt>
+ basic unsigned integer number generator type described below. It is possible
+ to directly use this type to create unsigned integer generators using
+ a wide range of formatting options.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the unsigned integer of type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ provided by a mandatory attribute using the specified <tt class="computeroutput"><span class="identifier">Radix</span></tt> (possible values are
+ <tt class="computeroutput"><span class="number">2</span></tt>, <tt class="computeroutput"><span class="number">8</span></tt>, <tt class="computeroutput"><span class="number">10</span></tt>,
+ and <tt class="computeroutput"><span class="number">16</span></tt>, the default
+ value is <tt class="computeroutput"><span class="number">10</span></tt>).This
+ generator never fails (except if the underlying output stream
+ reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the unsigned integer of type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ provided by the immediate literal value the generator is initialized
+ from, using the specified <tt class="computeroutput"><span class="identifier">Radix</span></tt>
+ (possible values are <tt class="computeroutput"><span class="number">2</span></tt>,
+ <tt class="computeroutput"><span class="number">8</span></tt>, <tt class="computeroutput"><span class="number">10</span></tt>, and <tt class="computeroutput"><span class="number">16</span></tt>,
+ the default value is <tt class="computeroutput"><span class="number">10</span></tt>).
+ If this generator has an associated attribute it succeeds only
+ as long as the attribute is equal to the immediate literal (except
+ if the underlying output stream reports an error). Otherwise
+ this generator fails and does not generate any output.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.numeric.unsigned_int.additional_requirements"></a><h6>
+<a name="id514892"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.unsigned_int.additional_requirements">Additional
+ Requirements</a>
+ </h6>
+<p>
+ The following lists enumerate the requirements which must be met in order
+ to use a certain type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ to instantiate and use a <tt class="computeroutput"><span class="identifier">uint_generator</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">&gt;</span></tt>.
+ </p>
+<p>
+ If <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">&gt;::</span><span class="identifier">value</span></tt> is <tt class="computeroutput"><span class="keyword">true</span></tt>
+ the type <tt class="computeroutput"><span class="identifier">Num</span></tt> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ comparison operators for: <tt class="computeroutput"><span class="special">&lt;</span></tt>,
+ <tt class="computeroutput"><span class="special">&lt;=</span></tt>, <tt class="computeroutput"><span class="special">==</span></tt>,
+ <tt class="computeroutput"><span class="special">!=</span></tt>, <tt class="computeroutput"><span class="special">&gt;</span></tt>,
+ and <tt class="computeroutput"><span class="special">&gt;=</span></tt>
+</li>
+<li>
+ numeric operators for: <tt class="computeroutput"><span class="special">+</span></tt>,
+ <tt class="computeroutput"><span class="special">-</span></tt>, <tt class="computeroutput"><span class="special">/</span></tt>,
+ <tt class="computeroutput"><span class="special">*</span></tt>, and <tt class="computeroutput"><span class="special">%</span></tt>
+</li>
+</ul></div>
+<p>
+ If <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">is_integral</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">&gt;::</span><span class="identifier">value</span></tt> is <tt class="computeroutput"><span class="keyword">false</span></tt>
+ the type <tt class="computeroutput"><span class="identifier">Num</span></tt> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ comparison operators for: <tt class="computeroutput"><span class="special">&lt;</span></tt>,
+ <tt class="computeroutput"><span class="special">&lt;=</span></tt>, <tt class="computeroutput"><span class="special">==</span></tt>,
+ <tt class="computeroutput"><span class="special">!=</span></tt>, <tt class="computeroutput"><span class="special">&gt;</span></tt>,
+ and <tt class="computeroutput"><span class="special">&gt;=</span></tt>
+</li>
+<li>
+ numeric operators for: <tt class="computeroutput"><span class="special">+</span></tt>,
+ <tt class="computeroutput"><span class="special">-</span></tt>, <tt class="computeroutput"><span class="special">/</span></tt>,
+ <tt class="computeroutput"><span class="special">*</span></tt>, and <tt class="computeroutput"><span class="special">%</span></tt>
+</li>
+<li>
+ helper functions implementing the interface and the semantics of:
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></tt>,
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></tt>,
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></tt>, and <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></tt>.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.numeric.unsigned_int.attributes"></a><h6>
+<a name="id515523"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ushort</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></tt>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ushort</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></tt>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <tt class="computeroutput"><span class="identifier">num</span></tt>
+ and succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">uint</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">uint</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <tt class="computeroutput"><span class="identifier">num</span></tt>
+ and succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></tt>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></tt>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <tt class="computeroutput"><span class="identifier">num</span></tt>
+ and succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong_long</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></tt>, attribute is mandatory
+ (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></tt>, attribute is optional,
+ if it is supplied, the generator compares the attribute with
+ <tt class="computeroutput"><span class="identifier">num</span></tt> and succeeds
+ only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">bin</span>
+<span class="identifier">oct</span>
+<span class="identifier">hex</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">bin</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">oct</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">hex</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <tt class="computeroutput"><span class="identifier">num</span></tt>
+ and succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">uint_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.numeric.unsigned_int.complexity"></a><h6>
+<a name="id516486"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(N), where <tt class="computeroutput"><span class="identifier">N</span></tt> is
+ the number of digits needed to represent the generated integer number
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.numeric.unsigned_int.example"></a><h6>
+<a name="id516534"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">fusion</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">std_pair</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">string</span><span class="special">&gt;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ All code snippets below use these common test functions:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">void</span> <span class="identifier">test_generator_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">expected</span><span class="special">,</span> <span class="identifier">G</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">attr</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">s</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_insert_iterator</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">out</span><span class="special">(</span><span class="identifier">s</span><span class="special">);</span>
+ <span class="keyword">if</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">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">str</span> <span class="special">==</span> <span class="identifier">expected</span><span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"ok"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"fail"</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Some using declarations:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generate</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">karma</span><span class="special">::</span><span class="identifier">uint</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of an <tt class="computeroutput"><span class="identifier">uint</span></tt>
+ generator:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator</span><span class="special">(</span><span class="string">"2"</span><span class="special">,</span> <span class="identifier">lit</span><span class="special">(</span><span class="number">2U</span><span class="special">));</span>
+<span class="identifier">test_generator</span><span class="special">(</span><span class="string">"2"</span><span class="special">,</span> <span class="identifier">uint</span><span class="special">(</span><span class="number">2</span><span class="special">));</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"2"</span><span class="special">,</span> <span class="identifier">uint</span><span class="special">(</span><span class="number">2</span><span class="special">),</span> <span class="number">2</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">uint</span><span class="special">(</span><span class="number">2</span><span class="special">),</span> <span class="number">3</span><span class="special">);</span> <span class="comment">// fails (as 2 != 3)!
+</span><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"2"</span><span class="special">,</span> <span class="identifier">uint</span><span class="special">,</span> <span class="number">2</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.numeric.floating_point"></a><a href="numeric.html#spirit.karma.reference.numeric.floating_point" title=" Floating
+ Point Number Generators"> Floating
+ Point Number Generators</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.numeric.floating_point.description"></a><h6>
+<a name="id518209"></a>
+ Description
+ </h6>
+<p>
+ The floating point number generators described in this section are:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
+<td><p>
+ Generates <tt class="computeroutput"><span class="identifier">num</span></tt>,
+ where <tt class="computeroutput"><span class="identifier">num</span></tt> can
+ be a <tt class="computeroutput"><span class="keyword">float</span></tt>, <tt class="computeroutput"><span class="keyword">double</span></tt>, or <tt class="computeroutput"><span class="keyword">long</span>
+ <span class="keyword">double</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">float_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">float</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="keyword">float</span></tt>
+ as given by the mandatory attribute
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">float</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a <tt class="computeroutput"><span class="keyword">float</span></tt>, if an
+ attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">double_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">double</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="keyword">double</span></tt>
+ as given by the mandatory attribute
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">double</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a <tt class="computeroutput"><span class="keyword">double</span></tt>, if
+ an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_double</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="keyword">double</span></tt>
+ as given by the mandatory attribute
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a <tt class="computeroutput"><span class="keyword">double</span></tt>, if
+ an attribute is supplied it must match
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">real_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+<td><p>
+ Generate a <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ using the provided policies <tt class="computeroutput"><span class="identifier">Policies</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">real_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></td>
+<td><p>
+ Generate <tt class="computeroutput"><span class="identifier">num</span></tt>
+ as a <tt class="computeroutput"><span class="identifier">Num</span></tt> using
+ the provided policies <tt class="computeroutput"><span class="identifier">Policies</span></tt>,
+ if an attribute is supplied it must match
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ These can be used to flexibly format any floating point number of any
+ compatible type (for more information about the requirements, see below).
+ </p>
+<p>
+ The floating point number generators are very fast. For measurement results
+ comparing the <span class="emphasis"><em>Spirit.Karma</em></span> floating point number
+ generators with equivalent constructs provided by other libraries see
+ the section <a href="../performance_measurements/numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.double_performance" title="
+ Comparing the performance of a single double_ generator">Performance
+ of Floating Point Numeric Generators</a>
+ </p>
+<a name="spirit.karma.reference.numeric.floating_point.header"></a><h6>
+<a name="id519124"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/home/karma/numeric/real.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">include</span><span class="special">/</span><span class="identifier">karma_real</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.numeric.floating_point.model_of"></a><h6>
+<a name="id519238"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.floating_point.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">num</span></tt></span></dt>
+<dd><p>
+ Numeric literal, any floating point value, or a <a href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a floating point value of type
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">Num</span></tt></span></dt>
+<dd><p>
+ Type of <tt class="computeroutput"><span class="identifier">num</span></tt>: any
+ floating point type
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.numeric.floating_point.expression_semantics"></a><h6>
+<a name="id519379"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.floating_point.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveGenerator.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate the floating point literal <tt class="computeroutput"><span class="identifier">num</span></tt>
+ using the default formatting (no trailing zeros, <tt class="computeroutput"><span class="identifier">fixed</span></tt> representation for numbers
+ <tt class="computeroutput"><span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span>
+ <span class="special">&lt;=</span> <span class="number">1e5</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span> <span class="special">&gt;</span>
+ <span class="number">1e-3</span></tt>, scientific representation
+ otherwise, 3 fractional digits, sign is only printed for negative
+ literals). This generator never fails (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">float_</span>
+<span class="identifier">double_</span>
+<span class="identifier">long_double</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the floating point number provided by a mandatory attribute
+ using the default formatting (no trailing zeros, <tt class="computeroutput"><span class="identifier">fixed</span></tt> representation for numbers
+ <tt class="computeroutput"><span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span>
+ <span class="special">&lt;=</span> <span class="number">1e5</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span> <span class="special">&gt;</span>
+ <span class="number">1e-3</span></tt>, scientific representation
+ otherwise, 3 fractional digits, sign is only printed for negative
+ literals). This generator never fails (except if the underlying
+ output stream reports an error).
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span>
+<span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the floating point number provided by the immediate
+ literal value the generator is initialized from using the default
+ formatting (no trailing zeros, <tt class="computeroutput"><span class="identifier">fixed</span></tt>
+ representation for numbers <tt class="computeroutput"><span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span> <span class="special">&lt;=</span>
+ <span class="number">1e5</span> <span class="special">&amp;&amp;</span>
+ <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span>
+ <span class="special">&gt;</span> <span class="number">1e-3</span></tt>,
+ scientific representation otherwise, 3 fractional digits, sign
+ is only printed for negative literals). If this generator has
+ an associated attribute it succeeds only as long as the attribute
+ is equal to the immediate literal (except if the underlying output
+ stream reports an error). Otherwise this generator fails and
+ does not generate any output.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ All generators listed in the table above (except <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>) are predefined specializations of the
+ <tt class="computeroutput"><span class="identifier">real_generator</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span><span class="special">&gt;</span></tt>
+ basic floating point number generator type described below. It is possible
+ to directly use this type to create floating point generators using a
+ wide range of formatting options.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Semantics
+ </p></th>
+</tr></thead>
+<tbody><tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">real_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Generate the floating point number of type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ provided by a mandatory attribute using the specified <tt class="computeroutput"><span class="identifier">Policies</span></tt>. This generator never
+ fails (except if the underlying output stream reports an error).
+ </p></td>
+</tr></tbody>
+</table></div>
+<p>
+ For more information about the type <tt class="computeroutput"><span class="identifier">Policies</span></tt>
+ see below).
+ </p>
+<a name="spirit.karma.reference.numeric.floating_point.additional_requirements"></a><h6>
+<a name="id520170"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.floating_point.additional_requirements">Additional
+ Requirements</a>
+ </h6>
+<p>
+ The following list enumerate the requirements which must be met in order
+ to use a certain type <tt class="computeroutput"><span class="identifier">Num</span></tt>
+ to instantiate a <tt class="computeroutput"><span class="identifier">real_generator</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span><span class="special">&gt;</span></tt>.
+ </p>
+<p>
+ In order to be usable as the first template parameter for <tt class="computeroutput"><span class="identifier">real_generator</span><span class="special">&lt;&gt;</span></tt>
+ the type <tt class="computeroutput"><span class="identifier">Num</span></tt> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ comparison operators for: <tt class="computeroutput"><span class="special">&lt;</span></tt>,
+ <tt class="computeroutput"><span class="special">&lt;=</span></tt>, <tt class="computeroutput"><span class="special">==</span></tt>,
+ <tt class="computeroutput"><span class="special">!=</span></tt>, <tt class="computeroutput"><span class="special">&gt;</span></tt>,
+ and <tt class="computeroutput"><span class="special">&gt;=</span></tt>
+</li>
+<li>
+ numeric operators for: <tt class="computeroutput"><span class="special">+</span></tt>,
+ <tt class="computeroutput"><span class="special">-</span></tt>, <tt class="computeroutput"><span class="special">/</span></tt>,
+ <tt class="computeroutput"><span class="special">*</span></tt>, and <tt class="computeroutput"><span class="special">%</span></tt>
+</li>
+<li>
+ functions implementing the interface and the semantics of: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></tt>,
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">log10</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></tt>,
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></tt>, <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">modf</span></tt>,
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></tt>, and <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></tt>
+</li>
+<li>
+ a valid specialization of the type <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">&gt;</span></tt> allowing for numeric property inspection.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.numeric.floating_point.attributes"></a><h6>
+<a name="id520641"></a>
+ Attributes
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Attribute
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">float_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">float</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">float_</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">double_</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">double</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">double</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_double</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></tt>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></tt>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <tt class="computeroutput"><span class="identifier">num</span></tt>
+ and succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">real_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
+<span class="special">&gt;()</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p></td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">real_generator</span><span class="special">&lt;</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
+<span class="special">&gt;()(</span><span class="identifier">num</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Num</span></tt>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <tt class="computeroutput"><span class="identifier">num</span></tt> and
+ succeeds only if both are equal, failing otherwise.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.numeric.floating_point.floating_point_formatting_policies"></a><h6>
+<a name="id521268"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.floating_point.floating_point_formatting_policies">Floating
+ Point Formatting Policies</a>
+ </h6>
+<p>
+ If special formatting of a floating point number is needed, just overload
+ the policy class <tt class="computeroutput"><span class="identifier">real_policies</span><span class="special">&lt;</span><span class="identifier">Num</span><span class="special">&gt;</span></tt> and use it as a template parameter
+ to the <tt class="computeroutput"><span class="identifier">real_generator</span><span class="special">&lt;&gt;</span></tt> floating point generator. For
+ instance:
+ </p>
+<pre class="programlisting"><span class="comment">// define a new floating point formatting policy
+</span><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
+<span class="keyword">struct</span> <span class="identifier">scientific_policy</span> <span class="special">:</span> <span class="identifier">real_policies</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;</span>
+<span class="special">{</span>
+ <span class="comment">// we want the numbers always to be in scientific format
+</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="identifier">floatfield</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">n</span><span class="special">)</span> <span class="special">{</span> <span class="keyword">return</span> <span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">scientific</span><span class="special">;</span> <span class="special">}</span>
+<span class="special">};</span>
+
+<span class="comment">// define a new generator type based on the new policy
+</span><span class="keyword">typedef</span> <span class="identifier">real_generator</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">scientific_policy</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">science_type</span><span class="special">;</span>
+<span class="identifier">science_type</span> <span class="keyword">const</span> <span class="identifier">scientific</span> <span class="special">=</span> <span class="identifier">science_type</span><span class="special">();</span>
+
+<span class="comment">// use the new generator
+</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">science_type</span><span class="special">(),</span> <span class="number">1.0</span><span class="special">);</span> <span class="comment">// will output: 1.0e00
+</span><span class="identifier">generate</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">scientific</span><span class="special">,</span> <span class="number">0.1</span><span class="special">);</span> <span class="comment">// will output: 1.0e-01
+</span></pre>
+<p>
+ The template parameter <tt class="computeroutput"><span class="identifier">T</span></tt>
+ should be the type to be formatted using the overloaded policy type.
+ At the same time <tt class="computeroutput"><span class="identifier">T</span></tt> will
+ be used as the attribute type of the created floating point generator.
+ </p>
+<a name="spirit.karma.reference.numeric.floating_point.floating_point_formatting_policy_expression_semantics"></a><h6>
+<a name="id521772"></a>
+ <a href="numeric.html#spirit.karma.reference.numeric.floating_point.floating_point_formatting_policy_expression_semantics">Floating
+ Point Formatting Policy Expression Semantics</a>
+ </h6>
+<p>
+ A floating point formatting policy should expose the following variables
+ and functions:
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Inserter</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">OutputIterator</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Policies</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">call</span> <span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&amp;</span> <span class="identifier">sink</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">n</span>
+ <span class="special">,</span> <span class="identifier">Policies</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ This is the main function used to generate the output for a floating
+ point number. It is called by the real generator in order to
+ perform the conversion. In theory all of the work can be implemented
+ here, but it is the easiest to use existing functionality provided
+ by the type specified by the template parameter <tt class="computeroutput"><span class="identifier">Inserter</span></tt>. The default implementation
+ of this functions is:
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">Inserter</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">OutputIterator</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Policies</span><span class="special">&gt;</span>
+<span class="keyword">static</span> <span class="keyword">bool</span>
+<span class="identifier">call</span> <span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&amp;</span> <span class="identifier">sink</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">Policies</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">p</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">Inserter</span><span class="special">::</span><span class="identifier">call_n</span><span class="special">(</span><span class="identifier">sink</span><span class="special">,</span> <span class="identifier">n</span><span class="special">,</span> <span class="identifier">p</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+<p>
+ <tt class="computeroutput"><span class="identifier">sink</span></tt>: is the
+ output iterator to use for generation
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">n</span></tt>: is the floating
+ point number to convert
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">p</span></tt>: the instance
+ of the policy type used to instantiate this floating point generator.
+ </p>
+</td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">bool</span> <span class="identifier">force_sign</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">n</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ The default behavior is to not to require generating a sign.
+ If the function <tt class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></tt> returns true, then all generated
+ numbers will have a sign (<tt class="computeroutput"><span class="char">'+'</span></tt>
+ or <tt class="computeroutput"><span class="char">'-'</span></tt>, zeros will
+ have a space instead of a sign).
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">n</span></tt> is the floating
+ point number to output. This can be used to adjust the required
+ behavior depending on the value of this number.
+ </p>
+</td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">bool</span> <span class="identifier">trailing_zeros</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">n</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ Return whether trailing zero digits have to be emitted in the
+ fractional part of the output. If set, this flag instructs the
+ floating point generator to emit trailing zeros up to the required
+ precision digits (as returned by the <tt class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></tt> function).
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">n</span></tt> is the floating
+ point number to output. This can be used to adjust the required
+ behavior depending on the value of this number.
+ </p>
+</td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">int</span> <span class="identifier">floatfield</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">n</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ Decide, which representation type to use in the generated output.
+ </p>
+<p>
+ By default all numbers having an absolute value of zero or in
+ between <tt class="computeroutput"><span class="number">0.001</span></tt> and
+ <tt class="computeroutput"><span class="number">100000</span></tt> will be generated
+ using the fixed format, all others will be generated using the
+ scientific representation.
+ </p>
+<p>
+ The <tt class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></tt> can be used to force the output
+ of trailing zeros in the fractional part up to the number of
+ digits returned by the <tt class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></tt> member function. The default
+ is not to generate the trailing zeros.
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">n</span></tt>: is the floating
+ point number to output. This can be used to adjust the formatting
+ flags depending on the value of this number.
+ </p>
+<p>
+ The return value has to be either <tt class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">scientific</span></tt>
+ (generate floating point values in scientific notation) or <tt class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">fixed</span></tt> (generate floating point
+ values in fixed-point notation).
+ </p>
+</td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">unsigned</span> <span class="identifier">precision</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">n</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ Return the maximum number of decimal digits to generate in the
+ fractional part of the output.
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">n</span></tt>: is the floating
+ point number to output. This can be used to adjust the required
+ precision depending on the value of this number. If the trailing
+ zeros flag is specified the fractional part of the output will
+ be 'filled' with zeros, if appropriate.
+ </p>
+<p>
+ <span class="bold"><b>Note:</b></span> If the trailing_zeros
+ flag is not in effect additional semantics apply. See the description
+ for the <tt class="computeroutput"><span class="identifier">fraction_part</span><span class="special">()</span></tt> function below. Moreover, this
+ precision will be limited to the value of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">numeric_limits</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">&gt;::</span><span class="identifier">digits10</span>
+ <span class="special">+</span> <span class="number">1</span></tt>.
+ </p>
+</td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">bool</span> <span class="identifier">ForceSign</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">integer_part</span><span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&amp;</span> <span class="identifier">sink</span>
+ <span class="special">,</span> <span class="identifier">T</span> <span class="identifier">n</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">sign</span><span class="special">,</span> <span class="keyword">bool</span> <span class="identifier">force_sign</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ This function is called to generate the integer part of the floating
+ point number.
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">sink</span></tt>: is the
+ output iterator to use for generation
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">n</span></tt>: is the absolute
+ value of the integer part of the floating point number to convert
+ (always non-negative)
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">sign</span></tt>: is the
+ sign of the overall floating point number to convert.
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">force_sign</span></tt>: is
+ a flag whether a sign has to be generated even for non- negative
+ numbers (this is the same as has been returned from the function
+ <tt class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></tt>
+ described above)
+ </p>
+<p>
+ The return value defines the outcome of the whole generator.
+ If it is <tt class="computeroutput"><span class="keyword">false</span></tt>,
+ no further output is generated, imediatly returning <tt class="computeroutput"><span class="keyword">false</span></tt> from the calling <tt class="computeroutput"><span class="identifier">real_generator</span></tt> as well. If
+ it is <tt class="computeroutput"><span class="keyword">true</span></tt>, normal
+ output generation continues.
+ </p>
+</td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">dot</span><span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&amp;</span> <span class="identifier">sink</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">n</span><span class="special">,</span>
+ <span class="keyword">unsigned</span> <span class="identifier">precision</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ This function is called to generate the decimal point.
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">sink</span></tt>: is the
+ output iterator to use for generation
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">n</span></tt>: The fractional
+ part of the floating point number to convert. Note that this
+ number is scaled such, that it represents the number of units
+ which correspond to the value returned from the <tt class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></tt>
+ function earlier. I.e. a fractional part of <tt class="computeroutput"><span class="number">0.01234</span></tt>
+ is represented as <tt class="computeroutput"><span class="number">1234</span></tt>
+ when the function <tt class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></tt> returned <tt class="computeroutput"><span class="number">5</span></tt>.
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">precision</span></tt>: The
+ number of digits to emit as returned by the function <tt class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></tt>
+ described above
+ </p>
+<p>
+ This is given to allow to decide, whether a decimal point has
+ to be generated at all.
+ </p>
+<p>
+ <span class="bold"><b>Note:</b></span> If the <tt class="computeroutput"><span class="identifier">trailing_zeros</span></tt>
+ flag is not in effect additional comments apply. See the description
+ for the <tt class="computeroutput"><span class="identifier">fraction_part</span><span class="special">()</span></tt> function below.
+ </p>
+<p>
+ The return value defines the outcome of the whole generator.
+ If it is <tt class="computeroutput"><span class="keyword">false</span></tt>,
+ no further output is generated, imediatly returning <tt class="computeroutput"><span class="keyword">false</span></tt> from the calling <tt class="computeroutput"><span class="identifier">real_generator</span></tt> as well. If
+ it is <tt class="computeroutput"><span class="keyword">true</span></tt>, normal
+ output generation continues.
+ </p>
+</td>
+</tr>
+<tr>
+<td>
+<p>
+
+</p>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">&gt;</span>
+<span class="keyword">bool</span> <span class="identifier">fraction_part</span><span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&amp;</span> <span class="identifier">sink</span><span class="special">,</span> <span class="identifier">T</span> <span class="identifier">n</span>
+ <span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">adjprec</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="identifier">precision</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ This function is called to generate the fractional p