|
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"><</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"><</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"><<</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"><</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"><</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"><</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"><</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"><<</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"><</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"><</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"><</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"><</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"><<</span> <span class="char">'['</span>
+ <span class="special"><<</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"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">left</span>
+ <span class="special"><<</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"><<</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"><<</span> <span class="number">12345.12345</span>
+ <span class="special"><<</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"><<</span> <span class="number">12345.12345</span>
+ <span class="special"><<</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"><</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"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></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"><</span><span class="identifier">T</span><span class="special">></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"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">double3_policy</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="special">></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"><</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"><<</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"><<</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"><<</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"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></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<<())">sequence
(<tt class="computeroutput"><span class="special"><<</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&())">and
predicate (unary <tt class="computeroutput"><span class="special">&</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"><</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"><</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"><</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"><</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"><</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"><</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">&</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<<())"><tt class="computeroutput"><span class="identifier">a</span> <span class="special"><<</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"><</span><span class="identifier">A</span><span class="special">></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 <boost/spirit/home/karma/auxiliary.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_auxiliary</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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 <boost/spirit/home/karma/auxiliary/eol.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_eol</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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 <boost/spirit/home/karma/auxiliary/eps.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_eps</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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 <boost/spirit/home/karma/auxiliary/lazy.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_lazy</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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 <boost/spirit/home/karma/auxiliary/eol.hpp>
@@ -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 <boost/spirit/home/karma/auxiliary/eps.hpp>
@@ -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 <boost/spirit/home/karma/auxiliary/lazy.hpp>
@@ -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 <boost/spirit/home/karma/char.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_char</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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 <boost/spirit/home/karma/char/char.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_char_</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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"><=</span>
+ <span class="identifier">ch</span> <span class="special"><=</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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">></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">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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 <boost/spirit/home/karma/char/char_class.hpp>
+</span><span class="preprocessor">#include</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">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">></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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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 <boost/spirit/home/karma/char/char_class.hpp>
@@ -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 <boost/spirit/home/karma/char/char.hpp>
@@ -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 <boost/spirit/home/karma/directive.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_directive</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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 <boost/spirit/home/karma/directive/left_alignment.hpp>
+</span><span class="preprocessor">#include</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">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">></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 <boost/spirit/home/karma/directive/center_alignment.hpp>
+</span><span class="preprocessor">#include</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">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">></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 <boost/spirit/home/karma/directive/right_alignment.hpp>
+</span><span class="preprocessor">#include</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">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">></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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">--></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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></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"><<</span> <span class="char">'|'</span> <span class="special"><<</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"><<</span> <span class="char">'|'</span> <span class="special"><<</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"><<</span> <span class="char">'|'</span> <span class="special"><<</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 <boost/spirit/home/karma/directive/repeat.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_repeat</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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">--></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"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></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">--></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"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></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">--></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"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></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">--></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"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></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"><</span><span class="identifier">A</span><span class="special">></span></tt> as placeholders only.
+ </p>
+<p>
+ The notation of <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</span><span class="keyword">double</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="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"><<</span> <span class="identifier">double_</span> <span class="special"><<</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"><<</span> <span class="identifier">double_</span> <span class="special"><<</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"><<</span> <span class="identifier">double_</span> <span class="special"><<</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 <boost/spirit/home/karma/directive/verbatim.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_verbatim</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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 <boost/spirit/home/karma/directive/delimit.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_delimit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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">--></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">--></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">--></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">--></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">--></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">--></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"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T1</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">attr1</span><span class="special">,</span>
+ <span class="identifier">T2</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><<</span> <span class="identifier">double_</span> <span class="special"><<</span> <span class="char">','</span> <span class="special"><<</span> <span class="identifier">double_</span> <span class="special"><<</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"><<</span> <span class="identifier">double_</span> <span class="special"><<</span> <span class="char">','</span> <span class="special"><<</span> <span class="identifier">double_</span> <span class="special"><<</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"><<</span> <span class="identifier">double_</span> <span class="special"><<</span> <span class="char">','</span><span class="special">]</span> <span class="special"><<</span> <span class="identifier">double_</span> <span class="special"><<</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 <boost/spirit/home/karma/directive/upper_lower_case.hpp>
+</span><span class="preprocessor">#include</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">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">></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"><<</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">--></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">--></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">--></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">--></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"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><<</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"><<</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 <boost/spirit/home/karma/directive/maxwidth.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_maxwidth</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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">--></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">--></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">--></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">--></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"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">></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">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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 <boost/spirit/home/karma/directive/buffer.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_buffer</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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">--></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">--></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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</span><span class="keyword">double</span><span class="special">></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"><<</span> <span class="special">+</span><span class="identifier">double_</span> <span class="special"><<</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"><<</span> <span class="special">+</span><span class="identifier">double_</span> <span class="special"><<</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 <boost/spirit/home/karma/directive/omit.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_omit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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">--></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">--></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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</span><span class="keyword">double</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></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"><<</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"><</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">></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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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"><</span><span class="identifier">iterator_type</span><span class="special">,</span> <span class="identifier">attribute_type</span><span class="special">()></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"><</span><span class="number">0</span><span class="special">>(</span><span class="identifier">_val</span><span class="special">)]</span> <span class="special"><<</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"><</span><span class="number">2</span><span class="special">>(</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"><<</span> <span class="identifier">omit</span><span class="special">[</span><span class="identifier">double_</span><span class="special">]</span> <span class="special"><<</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 <boost/spirit/home/karma/directive/buffer.hpp>
@@ -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 <boost/spirit/home/karma/directive/maxwidth.hpp>
@@ -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 <boost/spirit/home/karma/directive/omit.hpp>
@@ -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 <boost/spirit/home/karma/directive/repeat.hpp>
@@ -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 <boost/spirit/home/karma/directive/upper_lower_case.hpp>
@@ -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"><</span><span class="identifier">Context</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">subject_type</span><span class="special">>::</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&())">and predicate
+ (unary <tt class="computeroutput"><span class="special">&</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"><</span><span class="identifier">G</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">left_type</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">right_type</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">>::</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"><</span><span class="identifier">E</span><span class="special">>::</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<<())">sequence (<tt class="computeroutput"><span class="special"><<</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"><</span><span class="identifier">E</span><span class="special">>::</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"><</span><span class="identifier">G</span><span class="special">::</span><span class="identifier">subject_type</span><span class="special">>::</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 <boost/spirit/home/karma/numeric.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_numeric</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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"><</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">>()</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"><</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">>()(</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 <boost/spirit/home/karma/numeric/int.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_int</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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"><</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">></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"><</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">>()</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"><</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">>()(</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"><</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">></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"><</span><span class="identifier">Num</span><span class="special">>::</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"><</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 <tt class="computeroutput"><span class="special">>=</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"><</span><span class="identifier">Num</span><span class="special">>::</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"><</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 <tt class="computeroutput"><span class="special">>=</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"><</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">>()</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"><</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">>()(</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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">></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">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</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>
+ </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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</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="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 <boost/spirit/home/karma/numeric/uint.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_uint</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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"><</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">></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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</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 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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">>()(</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"><</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span><span class="special">></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"><</span><span class="identifier">Num</span><span class="special">>::</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"><</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 <tt class="computeroutput"><span class="special">>=</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"><</span><span class="identifier">Num</span><span class="special">>::</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"><</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 <tt class="computeroutput"><span class="special">>=</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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</span>
+<span class="special">>()</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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Radix</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="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"><</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">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">></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">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</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 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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</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="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 <boost/spirit/home/karma/numeric/real.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_real</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></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"><=</span> <span class="number">1e5</span>
+ <span class="special">&&</span> <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span> <span class="special">></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"><=</span> <span class="number">1e5</span>
+ <span class="special">&&</span> <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span> <span class="special">></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"><=</span>
+ <span class="number">1e5</span> <span class="special">&&</span>
+ <span class="identifier">fabs</span><span class="special">(</span><span class="identifier">n</span><span class="special">)</span>
+ <span class="special">></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"><</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span><span class="special">></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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
+<span class="special">>()</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"><</span><span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span><span class="special">></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"><></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"><</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 <tt class="computeroutput"><span class="special">>=</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"><</span><span class="identifier">Num</span><span class="special">></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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</span>
+<span class="special">>()</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"><</span>
+ <span class="identifier">Num</span><span class="special">,</span> <span class="identifier">Policies</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="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"><</span><span class="identifier">Num</span><span class="special">></span></tt> and use it as a template parameter
+ to the <tt class="computeroutput"><span class="identifier">real_generator</span><span class="special"><></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"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></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"><</span><span class="identifier">T</span><span class="special">></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"><</span><span class="keyword">double</span><span class="special">,</span> <span class="identifier">scientific_policy</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="special">></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"><</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">></span>
+<span class="keyword">bool</span> <span class="identifier">call</span> <span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&</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">&</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"><</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">></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">&</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">&</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"><</span><span class="identifier">T</span><span class="special">>::</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"><</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">></span>
+<span class="keyword">bool</span> <span class="identifier">integer_part</span><span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&</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"><</span><span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">></span>
+<span class="keyword">bool</span> <span class="identifier">dot</span><span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&</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"><</span><span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">></span>
+<span class="keyword">bool</span> <span class="identifier">fraction_part</span><span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&</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 part of the
+ 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>: 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">adjprec</span></tt>: The
+ corrected number of digits to emit (see note below)
+ </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>
+ <span class="bold"><b>Note:</b></span> If <tt class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></tt> returns <tt class="computeroutput"><span class="keyword">false</span></tt>
+ the <tt class="computeroutput"><span class="identifier">adjprec</span></tt> parameter
+ will have been corrected from the value the <tt class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></tt> function returned earlier (defining
+ the maximal number of fractional digits) in the sense, that it
+ takes into account trailing zeros. I.e. a floating point number
+ <tt class="computeroutput"><span class="number">0.0123</span></tt> and a value
+ of <tt class="computeroutput"><span class="number">5</span></tt> returned from
+ <tt class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></tt>
+ will result in:
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></tt> returned <tt class="computeroutput"><span class="keyword">false</span></tt>:
+ <tt class="computeroutput"><span class="identifier">n</span></tt> will be <tt class="computeroutput"><span class="number">123</span></tt>, and <tt class="computeroutput"><span class="identifier">adjprec</span></tt>
+ will be <tt class="computeroutput"><span class="number">4</span></tt> (as we
+ need to print <tt class="computeroutput"><span class="number">0123</span></tt>)
+ </p>
+<p>
+ <tt class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></tt> returned <tt class="computeroutput"><span class="keyword">true</span></tt>:
+ <tt class="computeroutput"><span class="identifier">n</span></tt> will be <tt class="computeroutput"><span class="number">1230</span></tt>, and <tt class="computeroutput"><span class="identifier">adjprec</span></tt>
+ will be <tt class="computeroutput"><span class="number">5</span></tt> (as we
+ need to print <tt class="computeroutput"><span class="number">01230</span></tt>)
+ </p>
+<p>
+ The missing preceding zeros in the fractional part have to be
+ supplied by the implementation of this policy function.
+ </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"><</span><span class="keyword">typename</span> <span class="identifier">CharEncoding</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Tag</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">></span>
+<span class="keyword">bool</span> <span class="identifier">exponent</span><span class="special">(</span>
+ <span class="identifier">OutputIterator</span><span class="special">&</span> <span class="identifier">sink</span><span class="special">,</span> <span class="keyword">long</span> <span class="identifier">n</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ This function is called to generate the exponential part of the
+ number (this is called only if the <tt class="computeroutput"><span class="identifier">floatfield</span><span class="special">()</span></tt> function returned the <tt class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">scientific</span></tt> flag).
+ </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 (signed)
+ exponential part of the floating point number to convert.
+ </p>
+<p>
+ The template parameters <tt class="computeroutput"><span class="identifier">CharEncoding</span></tt>
+ and <tt class="computeroutput"><span class="identifier">Tag</span></tt> are either
+ of the type <tt class="computeroutput"><span class="identifier">unused_type</span></tt>
+ or describe the character class and conversion to be applied
+ to any output possibly influenced by either the <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>
+ directives.
+ </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"><</span><span class="keyword">typename</span> <span class="identifier">CharEncoding</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Tag</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">></span>
+<span class="keyword">bool</span> <span class="identifier">nan</span> <span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&</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">force_sign</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ This function is called whenever the number to print is a non-normal
+ floats of type NaN.
+ </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 (signed)
+ 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 template parameters <tt class="computeroutput"><span class="identifier">CharEncoding</span></tt>
+ and <tt class="computeroutput"><span class="identifier">Tag</span></tt> are either
+ of the type <tt class="computeroutput"><span class="identifier">unused_type</span></tt>
+ or describe the character class and conversion to be applied
+ to any output possibly influenced by either the <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>
+ directives.
+ </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"><</span><span class="keyword">typename</span> <span class="identifier">CharEncoding</span>
+ <span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Tag</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">OutputIterator</span><span class="special">></span>
+<span class="keyword">bool</span> <span class="identifier">inf</span> <span class="special">(</span><span class="identifier">OutputIterator</span><span class="special">&</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">force_sign</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+</td>
+<td>
+<p>
+ This function is called whenever the number to print is a non-normal
+ floats of type Inf.
+ </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 (signed)
+ 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 template parameters <tt class="computeroutput"><span class="identifier">CharEncoding</span></tt>
+ and <tt class="computeroutput"><span class="identifier">Tag</span></tt> are either
+ of the type <tt class="computeroutput"><span class="identifier">unused_type</span></tt>
+ or describe the character class and conversion to be applied
+ to any output possibly influenced by either the <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>
+ directives.
+ </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>
+</tbody>
+</table></div>
+<p>
+ The easiest way to implement a proper floating point formatting policy
+ is to derive a new type from the the type <tt class="computeroutput"><span class="identifier">real_policies</span><span class="special"><></span></tt> while overriding the aspects
+ of the formatting which need to be changed.
+ </p>
+<a name="spirit.karma.reference.numeric.floating_point.complexity"></a><h6>
+<a name="id525365"></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 floating point
+ number.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.numeric.floating_point.example"></a><h6>
+<a name="id525416"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">></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">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of an <tt class="computeroutput"><span class="identifier">double_</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.0"</span><span class="special">,</span> <span class="identifier">lit</span><span class="special">(</span><span class="number">2.0</span><span class="special">));</span>
+<span class="identifier">test_generator</span><span class="special">(</span><span class="string">"2.0"</span><span class="special">,</span> <span class="identifier">double_</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.0"</span><span class="special">,</span> <span class="identifier">double_</span><span class="special">(</span><span class="number">2.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">""</span><span class="special">,</span> <span class="identifier">double_</span><span class="special">(</span><span class="number">2.0</span><span class="special">),</span> <span class="number">3.0</span><span class="special">);</span> <span class="comment">// fails (as 2.0 != 3.0)!
+</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">double_</span><span class="special">,</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.234e05"</span><span class="special">,</span> <span class="identifier">double_</span><span class="special">,</span> <span class="number">1234.0e2</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"1.234e-06"</span><span class="special">,</span> <span class="identifier">double_</span><span class="special">,</span> <span class="number">0.000001234</span><span class="special">);</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>
@@ -63,7 +2777,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>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/floating_point.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/floating_point.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/floating_point.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.numeric.floating_point.description"></a><h6>
-<a name="id517914"></a>
+<a name="id518209"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.description">Description</a>
</h6>
<p>
@@ -202,7 +202,7 @@
of Floating Point Numeric Generators</a>
</p>
<a name="spirit.karma.reference.numeric.floating_point.header"></a><h6>
-<a name="id518828"></a>
+<a name="id519124"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/numeric/real.hpp>
@@ -212,7 +212,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.numeric.floating_point.model_of"></a><h6>
-<a name="id518942"></a>
+<a name="id519238"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.model_of">Model
of</a>
</h6>
@@ -242,7 +242,7 @@
</dl>
</div>
<a name="spirit.karma.reference.numeric.floating_point.expression_semantics"></a><h6>
-<a name="id519083"></a>
+<a name="id519379"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.expression_semantics">Expression
Semantics</a>
</h6>
@@ -375,7 +375,7 @@
see below).
</p>
<a name="spirit.karma.reference.numeric.floating_point.additional_requirements"></a><h6>
-<a name="id519874"></a>
+<a name="id520170"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.additional_requirements">Additional
Requirements</a>
</h6>
@@ -412,7 +412,7 @@
</li>
</ul></div>
<a name="spirit.karma.reference.numeric.floating_point.attributes"></a><h6>
-<a name="id520344"></a>
+<a name="id520641"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -534,7 +534,7 @@
</tbody>
</table></div>
<a name="spirit.karma.reference.numeric.floating_point.floating_point_formatting_policies"></a><h6>
-<a name="id520972"></a>
+<a name="id521268"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.floating_point_formatting_policies">Floating
Point Formatting Policies</a>
</h6>
@@ -567,7 +567,7 @@
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="id521475"></a>
+<a name="id521772"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.floating_point_formatting_policy_expression_semantics">Floating
Point Formatting Policy Expression Semantics</a>
</h6>
@@ -1081,7 +1081,7 @@
of the formatting which need to be changed.
</p>
<a name="spirit.karma.reference.numeric.floating_point.complexity"></a><h6>
-<a name="id525069"></a>
+<a name="id525365"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -1096,7 +1096,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.numeric.floating_point.example"></a><h6>
-<a name="id525120"></a>
+<a name="id525416"></a>
<a href="floating_point.html#spirit.karma.reference.numeric.floating_point.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.numeric.signed_int.description"></a><h6>
-<a name="id506500"></a>
+<a name="id506811"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.description">Description</a>
</h6>
<p>
@@ -225,7 +225,7 @@
of Numeric Generators</a>
</p>
<a name="spirit.karma.reference.numeric.signed_int.header"></a><h6>
-<a name="id507602"></a>
+<a name="id507913"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/numeric/int.hpp>
@@ -235,7 +235,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.numeric.signed_int.model_of"></a><h6>
-<a name="id507717"></a>
+<a name="id508027"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.model_of">Model
of</a>
</h6>
@@ -265,7 +265,7 @@
</dl>
</div>
<a name="spirit.karma.reference.numeric.signed_int.expression_semantics"></a><h6>
-<a name="id507857"></a>
+<a name="id508167"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.expression_semantics">Expression
Semantics</a>
</h6>
@@ -422,7 +422,7 @@
</tbody>
</table></div>
<a name="spirit.karma.reference.numeric.signed_int.additional_requirements"></a><h6>
-<a name="id508799"></a>
+<a name="id509099"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.additional_requirements">Additional
Requirements</a>
</h6>
@@ -477,7 +477,7 @@
</li>
</ul></div>
<a name="spirit.karma.reference.numeric.signed_int.attributes"></a><h6>
-<a name="id509487"></a>
+<a name="id509787"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -619,7 +619,7 @@
</tbody>
</table></div>
<a name="spirit.karma.reference.numeric.signed_int.complexity"></a><h6>
-<a name="id510245"></a>
+<a name="id510546"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -633,7 +633,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.numeric.signed_int.example"></a><h6>
-<a name="id510294"></a>
+<a name="id510595"></a>
<a href="signed_int.html#spirit.karma.reference.numeric.signed_int.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.numeric.unsigned_int.description"></a><h6>
-<a name="id511980"></a>
+<a name="id512280"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.description">Description</a>
</h6>
<p>
@@ -295,7 +295,7 @@
of Numeric Generators</a>
</p>
<a name="spirit.karma.reference.numeric.unsigned_int.header"></a><h6>
-<a name="id513405"></a>
+<a name="id513705"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/numeric/uint.hpp>
@@ -305,7 +305,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.numeric.unsigned_int.model_of"></a><h6>
-<a name="id513520"></a>
+<a name="id513820"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.model_of">Model
of</a>
</h6>
@@ -335,7 +335,7 @@
</dl>
</div>
<a name="spirit.karma.reference.numeric.unsigned_int.expression_semantics"></a><h6>
-<a name="id513663"></a>
+<a name="id513962"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.expression_semantics">Expression
Semantics</a>
</h6>
@@ -519,7 +519,7 @@
</tbody>
</table></div>
<a name="spirit.karma.reference.numeric.unsigned_int.additional_requirements"></a><h6>
-<a name="id514596"></a>
+<a name="id514892"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.additional_requirements">Additional
Requirements</a>
</h6>
@@ -571,7 +571,7 @@
</li>
</ul></div>
<a name="spirit.karma.reference.numeric.unsigned_int.attributes"></a><h6>
-<a name="id515227"></a>
+<a name="id515523"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -749,7 +749,7 @@
</tbody>
</table></div>
<a name="spirit.karma.reference.numeric.unsigned_int.complexity"></a><h6>
-<a name="id516190"></a>
+<a name="id516486"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -763,7 +763,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.numeric.unsigned_int.example"></a><h6>
-<a name="id516238"></a>
+<a name="id516534"></a>
<a href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator.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="directive/omit.html" title=" Consume Attribute
- (omit[])">
-<link rel="next" href="operator/sequence.html" title=" Sequences
- (operator<<())">
+<link rel="previous" href="directive.html" title="Directive">
+<link rel="next" href="auxiliary.html" title="Auxiliary">
</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="directive/omit.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/sequence.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directive.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.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -32,20 +30,20 @@
<div></div>
</div>
<div class="toc"><dl>
-<dt><span class="section"><a href="operator/sequence.html"> Sequences
+<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.sequence"> Sequences
(<tt class="computeroutput"><span class="keyword">operator</span><span class="special"><<()</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="operator/alternative.html"> Alternatives
+<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.alternative"> Alternatives
(<tt class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="operator/kleene.html"> Kleene Star
+<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.kleene"> Kleene Star
(unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">*()</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="operator/plus.html"> Plus (unary
+<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.plus"> Plus (unary
<tt class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span></tt>)</a></span></dt>
-<dt><span class="section"> Lists (operator%())</span></dt>
-<dt><span class="section"><a href="operator/optional.html"> Optional
+<dt><span class="section"> Lists (operator%())</span></dt>
+<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.optional"> Optional
(unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">-()</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="operator/and_predicate.html"> And
+<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.and_predicate"> And
Predicate (unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">&()</span></tt>)</a></span></dt>
-<dt><span class="section"><a href="operator/not_predicate.html"> Not
+<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.not_predicate"> Not
Predicate (unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">!()</span></tt>)</a></span></dt>
</dl></div>
<p>
@@ -59,12 +57,2079 @@
and the <span class="emphasis"><em>not</em></span> predicate (unary <tt class="computeroutput"><span class="special">!</span></tt>).
</p>
<a name="spirit.karma.reference.operator.module_header"></a><h5>
-<a name="id548894"></a>
+<a name="id549195"></a>
<a href="operator.html#spirit.karma.reference.operator.module_header">Module Header</a>
</h5>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.sequence"></a><a href="operator.html#spirit.karma.reference.operator.sequence" title=" Sequences
+ (operator<<())"> Sequences
+ (<tt class="computeroutput"><span class="keyword">operator</span><span class="special"><<()</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.sequence.description"></a><h6>
+<a name="id549331"></a>
+ Description
+ </h6>
+<p>
+ Generator sequences are used to consecutively combine different, more
+ primitive generators. All generators in a sequence are invoked from left
+ to right as long as they succeed.
+ </p>
+<a name="spirit.karma.reference.operator.sequence.header"></a><h6>
+<a name="id549363"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/sequence.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_sequence</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.sequence.model_of"></a><h6>
+<a name="id549476"></a>
+ <a href="operator.html#spirit.karma.reference.operator.sequence.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ NaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.sequence.expression_semantics"></a><h6>
+<a name="id549529"></a>
+ <a href="operator.html#spirit.karma.reference.operator.sequence.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in NaryGenerator.
+ </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">a</span> <span class="special"><<</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
+<td><p>
+ The generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">b</span></tt> are executed
+ sequentially from left to right and as long as they succeed.
+ A failed generator stops the execution of the entire sequence
+ and makes the sequence fail as well.
+ </p></td>
+</tr></tbody>
+</table></div>
+<p>
+ It is important to note, that sequences don't perform any buffering of
+ the output generated by its elements. That means that any failing sequence
+ might have already generated some output, which is <span class="emphasis"><em>not</em></span>
+ rolled back.
+ </p>
+<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>
+ The simplest way to force a sequence to behave as if it did buffering
+ is to wrap it into a buffering directive (see <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>):
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span> <span class="special"><<</span> <span class="identifier">c</span><span class="special">]</span></pre>
+<p>
+ </p>
+<p>
+ which will <span class="emphasis"><em>not</em></span> generate any output in case of
+ a failing sequence.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.sequence.attributes"></a><h6>
+<a name="id549803"></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>
+ sequence (<tt class="computeroutput"><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">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">B</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">Unused</span>
+
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">>,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">>,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special"><<</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></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">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt> and <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt> as placeholders only.
+ </p>
+<p>
+ The notation <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt> stands for <span class="emphasis"><em>any fusion
+ sequence of two elements</em></span>, where <tt class="computeroutput"><span class="identifier">A</span></tt>
+ is the type of its first element and <tt class="computeroutput"><span class="identifier">B</span></tt>
+ is the type of its second element.
+ </p>
+<p>
+ The notation of <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></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>
+<p>
+ The attribute composition and propagation rules as shown in the table
+ above make sequences somewhat special as - if all elements have the same
+ attribute type - they can operate in two modes: consuming fusion sequences
+ and consuming STL containers. The selected mode depends on the type of
+ the attribute supplied
+ </p>
+<a name="spirit.karma.reference.operator.sequence.complexity"></a><h6>
+<a name="id550879"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the sequence generator is defined by the
+ sum of the complexities of its elements. The complexity of the sequence
+ itself is O(N), where N is the number of elements in the sequence.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.sequence.example"></a><h6>
+<a name="id550918"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of a sequence:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><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">double_</span> <span class="special"><<</span> <span class="char">','</span> <span class="special"><<</span> <span class="identifier">double_</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</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>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.alternative"></a><a href="operator.html#spirit.karma.reference.operator.alternative" title=" Alternatives
+ (operator|())"> Alternatives
+ (<tt class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.alternative.description"></a><h6>
+<a name="id552025"></a>
+ Description
+ </h6>
+<p>
+ Generator alternatives are used to combine different, more primitive
+ generators into alternatives. All generators in an alternative are invoked
+ from left to right until one of them succeeds.
+ </p>
+<a name="spirit.karma.reference.operator.alternative.header"></a><h6>
+<a name="id552057"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/alternative.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_alternative</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.alternative.model_of"></a><h6>
+<a name="id552172"></a>
+ <a href="operator.html#spirit.karma.reference.operator.alternative.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ NaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.alternative.expression_semantics"></a><h6>
+<a name="id552226"></a>
+ <a href="operator.html#spirit.karma.reference.operator.alternative.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in NaryGenerator.
+ </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">a</span> <span class="special">|</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
+<td><p>
+ The generators <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">b</span></tt> are executed
+ sequentially from left to right and until one of them succeeds.
+ A failed generator forces the alternative generator to try the
+ next one. The alternative fails as a whole only if all elements
+ of the alternative fail. Each element of the alternative gets
+ passed the whole attribute of the alternative.
+ </p></td>
+</tr></tbody>
+</table></div>
+<p>
+ Alternatives intercept and buffer the output of the currently executed
+ element. This allows to avoid partial outputs from failing elements as
+ the buffered content will be forwarded to the actual output only after
+ an element succeeded.
+ </p>
+<a name="spirit.karma.reference.operator.alternative.attributes"></a><h6>
+<a name="id552394"></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>
+ alternative (<tt class="computeroutput"><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">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special">|</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">variant</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special">|</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">A</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special">|</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">B</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special">|</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">Unused</span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">A</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special">|</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">A</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">variant</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt> as a placeholder only. The notation
+ <tt class="computeroutput"><span class="identifier">variant</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt>
+ stands for the type <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variant</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt>.
+ </p></td></tr>
+</table></div>
+<p>
+ Alternatives are special in terms of attribute handling as their behavior
+ is not completely compile time defined. First of all the selected alternative
+ element depends on the actual type of the attribute supplied to the alternative
+ generator (i.e. what is stored in the variant). The attribute type supplied
+ at <span class="emphasis"><em>runtime</em></span> narrows the set of considered alternatives
+ to those being compatible attribute wise. The remaining alternatives
+ are tried sequentially until the first of them succeeds. See below for
+ an example of this behavior.
+ </p>
+<a name="spirit.karma.reference.operator.alternative.complexity"></a><h6>
+<a name="id553065"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the alternative generator is defined by
+ the sum of the complexities of its elements. The complexity of the
+ alternative itself is O(N), where N is the number of elements in
+ the alternative.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.alternative.example"></a><h6>
+<a name="id553105"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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">ascii</span><span class="special">::</span><span class="identifier">string</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of an alternative. While being only the second alternative,
+ the <tt class="computeroutput"><span class="identifier">double_</span></tt> generator
+ is chosen for output formatting because the supplied attribute type is
+ not compatible (i.e. not convertible) to the attribute type of the <tt class="computeroutput"><span class="identifier">string</span></tt> alternative.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variant</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">v1</span><span class="special">(</span><span class="number">1.0</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"1.0"</span><span class="special">,</span> <span class="identifier">string</span> <span class="special">|</span> <span class="identifier">double_</span><span class="special">,</span> <span class="identifier">v1</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">string</span> <span class="special">|</span> <span class="identifier">double_</span><span class="special">,</span> <span class="number">2.0</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ The same formatting rules may be used to output a string. This time we
+ supply the string <tt class="computeroutput"><span class="string">"example"</span></tt>,
+ resulting in the first alternative to be chosen for the generated output.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variant</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">double</span><span class="special">></span> <span class="identifier">v2</span><span class="special">(</span><span class="string">"example"</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"example"</span><span class="special">,</span> <span class="identifier">string</span> <span class="special">|</span> <span class="identifier">double_</span><span class="special">,</span> <span class="identifier">v2</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"example"</span><span class="special">,</span> <span class="identifier">string</span> <span class="special">|</span> <span class="identifier">double_</span><span class="special">,</span> <span class="string">"example"</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.operator.kleene"></a><a href="operator.html#spirit.karma.reference.operator.kleene" title=" Kleene Star
+ (unary operator*())"> Kleene Star
+ (unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">*()</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.kleene.description"></a><h6>
+<a name="id554601"></a>
+ Description
+ </h6>
+<p>
+ Kleene star generators are used to repeat the execution of an embedded
+ generator zero or more times. Regardless of the success of the embedded
+ generator, the Kleene star generator always succeeds.
+ </p>
+<a name="spirit.karma.reference.operator.kleene.header"></a><h6>
+<a name="id554634"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/kleene.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_kleene</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.kleene.model_of"></a><h6>
+<a name="id554748"></a>
+ <a href="operator.html#spirit.karma.reference.operator.kleene.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.kleene.expression_semantics"></a><h6>
+<a name="id554799"></a>
+ <a href="operator.html#spirit.karma.reference.operator.kleene.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="special">*</span><span class="identifier">a</span></tt>
+ </p></td>
+<td><p>
+ The generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is executed zero or more times depending on the availability
+ of an attribute. The execution of <tt class="computeroutput"><span class="identifier">a</span></tt>
+ stops after the attribute values passed to the Kleene star generator
+ are exhausted. The Kleene star always succeeds (except if the
+ underlying output stream reports an error).
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.operator.kleene.attributes"></a><h6>
+<a name="id554948"></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>
+ kleene (unary <tt class="computeroutput"><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="special">*</span><span class="identifier">a</span><span class="special">:</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></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"><</span><span class="identifier">A</span><span class="special">></span></tt> as a placeholder only. The notation
+ of <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></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>
+<p>
+ The Kleene star generator will execute its embedded generator once for
+ each element in the provided container attribute and as long as the embedded
+ generator succeeds. On each iteration it will pass the next consecutive
+ element from the container attribute to the embedded generator. Therefor
+ the number of iterations will not be larger than the number of elements
+ in the container passed as its attribute. An empty container will make
+ the Kleene star to not generate any output at all.
+ </p>
+<p>
+ It is important to note, that the Kleene star does not perform any buffering
+ of the output generated by its embedded elements. That means that any
+ failing element generator might have already generated some output, which
+ is <span class="emphasis"><em>not</em></span> rolled back.
+ </p>
+<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>
+ The simplest way to force a Kleene star to behave as if it did buffering
+ is to wrap it into a buffering directive (see <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>):
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">buffer</span><span class="special">[*</span><span class="identifier">a</span><span class="special">]</span></pre>
+<p>
+ </p>
+<p>
+ which will <span class="emphasis"><em>not</em></span> generate any output in case of
+ a failing generator <tt class="computeroutput"><span class="identifier">a</span></tt>.
+ The expression:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="special">*(</span><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">])</span></pre>
+<p>
+ </p>
+<p>
+ will not generate any partial output from a generator <tt class="computeroutput"><span class="identifier">a</span></tt> if it fails generating in the middle
+ of its output. The overall expression will still generate the output
+ as produced by all succeeded invocations of the generator <tt class="computeroutput"><span class="identifier">a</span></tt>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.kleene.complexity"></a><h6>
+<a name="id555415"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the Kleene star generator is defined by
+ the complexity of its embedded generator multiplied by the number
+ of executed iterations. The complexity of the Kleene star itself
+ is O(N), where N is the number of elements in the container passed
+ as its attribute.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.kleene.example"></a><h6>
+<a name="id555457"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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">space</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of a Kleene star generator:
+ </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"><</span><span class="keyword">double</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="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="special">*</span><span class="identifier">double_</span><span class="special">,</span> <span class="identifier">space</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.operator.plus"></a><a href="operator.html#spirit.karma.reference.operator.plus" title=" Plus (unary
+ operator+())"> Plus (unary
+ <tt class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.plus.description"></a><h6>
+<a name="id556706"></a>
+ Description
+ </h6>
+<p>
+ The plus generator is used to repeat the execution of an embedded generator
+ one or more times. It succeeds if the embedded generator has been successfully
+ executed at least once.
+ </p>
+<a name="spirit.karma.reference.operator.plus.header"></a><h6>
+<a name="id556739"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/plus.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_plus</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.plus.model_of"></a><h6>
+<a name="id556853"></a>
+ Model of
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.plus.expression_semantics"></a><h6>
+<a name="id556904"></a>
+ <a href="operator.html#spirit.karma.reference.operator.plus.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="special">+</span><span class="identifier">a</span></tt>
+ </p></td>
+<td><p>
+ The generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is executed one or more times depending on the availability of
+ an attribute. The execution of <tt class="computeroutput"><span class="identifier">a</span></tt>
+ stops after the attribute values passed to the plus generator
+ are exhausted. The plus generator succeeds as long as its embedded
+ generator has been successfully executed at least once (except
+ if the underlying output stream reports an error).
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.operator.plus.attributes"></a><h6>
+<a name="id557048"></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>
+ plus (unary <tt class="computeroutput"><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="special">+</span><span class="identifier">a</span><span class="special">:</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></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"><</span><span class="identifier">A</span><span class="special">></span></tt> as a placeholder only. The notation
+ of <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></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>
+<p>
+ The plus generator will execute its embedded generator once for each
+ element in the provided container attribute and as long as the embedded
+ generator succeeds. On each iteration it will pass the next consecutive
+ element from the container attribute to the embedded generator. Therefor
+ the number of iterations will not be larger than the number of elements
+ in the container passed as its attribute. An empty container will make
+ the plus generator fail.
+ </p>
+<p>
+ It is important to note, that the plus generator does not perform any
+ buffering of the output generated by its embedded elements. That means
+ that any failing element generator might have already generated some
+ output, which is <span class="emphasis"><em>not</em></span> rolled back.
+ </p>
+<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>
+ The simplest way to force a plus generator to behave as if it did buffering
+ is to wrap it into a buffering directive (see <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>):
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">buffer</span><span class="special">[+</span><span class="identifier">a</span><span class="special">]</span></pre>
+<p>
+ </p>
+<p>
+ which will <span class="emphasis"><em>not</em></span> generate any output in case of
+ a failing generator <tt class="computeroutput"><span class="identifier">a</span></tt>.
+ The expression:
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="special">+(</span><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">])</span></pre>
+<p>
+ </p>
+<p>
+ will not generate any partial output from a generator <tt class="computeroutput"><span class="identifier">a</span></tt> if it fails generating in the middle
+ of its output. The overall expression will still generate the output
+ as produced by all succeeded invocations of the generator <tt class="computeroutput"><span class="identifier">a</span></tt>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.plus.complexity"></a><h6>
+<a name="id557516"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the plus generator is defined by the complexity
+ of its embedded generator multiplied by the number of executed iterations.
+ The complexity of the plus generator itself is O(N), where N is the
+ number of elements in the container passed as its attribute.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.plus.example"></a><h6>
+<a name="id557557"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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">space</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of a plus generator:
+ </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"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">v1</span><span class="special">;</span>
+<span class="identifier">v1</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">v1</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">v1</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="special">+</span><span class="identifier">double_</span><span class="special">,</span> <span class="identifier">space</span><span class="special">,</span> <span class="identifier">v1</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ A more sophisticated use case showing how to leverage the fact that plus
+ is failing for empty containers passed as its attribute:
+ </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"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">v2</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">"empty"</span><span class="special">,</span> <span class="special">+</span><span class="identifier">double_</span> <span class="special">|</span> <span class="string">"empty"</span><span class="special">,</span> <span class="identifier">v2</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.operator.list"></a> Lists (operator%())
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.list.description"></a><h6>
+<a name="id558935"></a>
+ Description
+ </h6>
+<p>
+ The list generator is used to repeat the execution of an embedded generator
+ and interspace it with the output of anyother generator one or more times.
+ It succeeds if the embedded generator has been successfully executed
+ at least once.
+ </p>
+<a name="spirit.karma.reference.operator.list.header"></a><h6>
+<a name="id558968"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/list.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_list</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.list.model_of"></a><h6>
+<a name="id559082"></a>
+ Model of
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ BinaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.list.expression_semantics"></a><h6>
+<a name="id559134"></a>
+ <a href="operator.html#spirit.karma.reference.operator.list.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in BinaryGenerator.
+ </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">a</span> <span class="special">%</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
+<td><p>
+ The generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is executed one or more times depending on the availability of
+ an attribute. The output generated by <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is interspaced with the output generated by <tt class="computeroutput"><span class="identifier">b</span></tt>.
+ The list generator succeeds as long as both its first embedded
+ generator has been successfully executed at least once (except
+ if the underlying output stream reports an error).
+ </p></td>
+</tr></tbody>
+</table></div>
+<p>
+ The list expression <tt class="computeroutput"><span class="identifier">a</span> <span class="special">%</span> <span class="identifier">b</span></tt>
+ is a shortcut for <tt class="computeroutput"><span class="identifier">a</span> <span class="special"><<</span> <span class="special">*(</span><span class="identifier">b</span> <span class="special"><<</span>
+ <span class="identifier">a</span><span class="special">)</span></tt>.
+ It is almost semantically equivalent, except for the attribute of <tt class="computeroutput"><span class="identifier">b</span></tt>, which gets ignored in the case of
+ the list generator.
+ </p>
+<a name="spirit.karma.reference.operator.list.attributes"></a><h6>
+<a name="id559392"></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>
+ list (<tt class="computeroutput"><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">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special">%</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="special">(</span><span class="identifier">a</span> <span class="special">%</span> <span class="identifier">b</span><span class="special">):</span> <span class="identifier">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"><</span><span class="identifier">A</span><span class="special">></span></tt> as a placeholder only. The notation
+ of <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></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>
+<p>
+ The list generator will execute its embedded generator once for each
+ element in the provided container attribute and as long as the embedded
+ generator succeeds. The output generated by its first generator will
+ be interspaced by the output generated by the second generator. On each
+ iteration it will pass the next consecutive element from the container
+ attribute to the first embedded generator. The second embedded generator
+ does not get passed any attributes (it gets invoked using an <tt class="computeroutput"><span class="identifier">unused_type</span></tt> as its attribute). Therefor
+ the number of iterations will not be larger than the number of elements
+ in the container passed as its attribute. An empty container will make
+ the list generator fail.
+ </p>
+<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 use the list generator and still allow for an empty
+ attribute, you can use the optional operator (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>
+<p>
+
+</p>
+<pre class="programlisting"><span class="special">-(</span><span class="identifier">a</span> <span class="special">%</span> <span class="identifier">b</span><span class="special">)</span></pre>
+<p>
+ </p>
+<p>
+ which will succeed even if the provided container attribute does not
+ contain any elements.
+ </p>
+</td></tr>
+</table></div>
+<p>
+ It is important to note, that the list generator does not perform any
+ buffering of the output generated by its embedded elements. That means
+ that any failing element generator might have already generated some
+ output, which is <span class="emphasis"><em>not</em></span> rolled back.
+ </p>
+<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>
+ The simplest way to force a list generator to behave as if it did buffering
+ is to wrap it into a buffering directive (see <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>):
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span> <span class="special">%</span> <span class="identifier">b</span><span class="special">]</span></pre>
+<p>
+ </p>
+<p>
+ which will <span class="emphasis"><em>not</em></span> generate any output in case of
+ a failing generator <tt class="computeroutput"><span class="identifier">a</span></tt>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.list.complexity"></a><h6>
+<a name="id559962"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the list generator is defined by the complexity
+ of its embedded generators multiplied by the number of executed iterations.
+ The complexity of the list generator itself is O(N), where N is the
+ number of elements in the container passed as its attribute.
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.list.example"></a><h6>
+<a name="id560003"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of a list generator:
+ </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"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">v1</span><span class="special">;</span>
+<span class="identifier">v1</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">test_generator_attr</span><span class="special">(</span><span class="string">"1.0"</span><span class="special">,</span> <span class="identifier">double_</span> <span class="special">%</span> <span class="char">','</span><span class="special">,</span> <span class="identifier">v1</span><span class="special">);</span>
+
+<span class="identifier">v1</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.0,2.0"</span><span class="special">,</span> <span class="identifier">double_</span> <span class="special">%</span> <span class="char">','</span><span class="special">,</span> <span class="identifier">v1</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.operator.optional"></a><a href="operator.html#spirit.karma.reference.operator.optional" title=" Optional
+ (unary operator-())"> Optional
+ (unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">-()</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.optional.description"></a><h6>
+<a name="id561226"></a>
+ Description
+ </h6>
+<p>
+ The optional generator is used to conditionally execute an embedded generator.
+ It succeeds always.
+ </p>
+<a name="spirit.karma.reference.operator.optional.header"></a><h6>
+<a name="id561257"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/optional.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_optional</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.optional.model_of"></a><h6>
+<a name="id561371"></a>
+ <a href="operator.html#spirit.karma.reference.operator.optional.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.optional.expression_semantics"></a><h6>
+<a name="id561424"></a>
+ <a href="operator.html#spirit.karma.reference.operator.optional.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="special">-</span><span class="identifier">a</span></tt>
+ </p></td>
+<td><p>
+ The generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is executed depending on the availability of an attribute. The
+ optional generator succeeds as long as its embedded generator
+ succeeds (except if the underlying output stream reports an error).
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.operator.optional.attributes"></a><h6>
+<a name="id561561"></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>
+ optional (unary <tt class="computeroutput"><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="special">-</span><span class="identifier">a</span><span class="special">:</span> <span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span>
+<span class="identifier">a</span><span class="special">:</span> <span class="identifier">Unused</span> <span class="special">--></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">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt> as a placeholder only. The notation
+ of <tt class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ stands for the data type <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>.
+ </p></td></tr>
+</table></div>
+<p>
+ The optional generator will execute its embedded generator once if the
+ provided attribute holds a valid value. It forwards the value held in
+ its attribute to the embedded generator.
+ </p>
+<p>
+ It is important to note, that the optional generator does not perform
+ any buffering of the output generated by its embedded elements. That
+ means that any failing element might have already generated some output,
+ which is <span class="emphasis"><em>not</em></span> rolled back.
+ </p>
+<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>
+ The simplest way to force a optional generator to behave as if it did
+ buffering is to wrap it into a buffering directive (see <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>):
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">buffer</span><span class="special">[-</span><span class="identifier">a</span><span class="special">]</span></pre>
+<p>
+ </p>
+<p>
+ which will <span class="emphasis"><em>not</em></span> generate any output in case of
+ a failing generator <tt class="computeroutput"><span class="identifier">a</span></tt>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.optional.complexity"></a><h6>
+<a name="id561977"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the optional generator is defined by the
+ complexity of its embedded generator. The complexity of the optional
+ generator itself is O(1).
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.optional.example"></a><h6>
+<a name="id562016"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of an optional generator:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">val</span><span class="special">(</span><span class="number">1.0</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"1.0"</span><span class="special">,</span> <span class="special">-</span><span class="identifier">double_</span><span class="special">,</span> <span class="identifier">val</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="special">-</span><span class="identifier">double_</span><span class="special">,</span> <span class="number">2.0</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Usage and result of an empty optional generator:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special"><</span><span class="keyword">double</span><span class="special">></span> <span class="identifier">val</span><span class="special">;</span> <span class="comment">// empty optional
+</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">double_</span><span class="special">,</span> <span class="identifier">val</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.operator.and_predicate"></a><a href="operator.html#spirit.karma.reference.operator.and_predicate" title=" And
+ Predicate (unary operator&())"> And
+ Predicate (unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">&()</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.and_predicate.description"></a><h6>
+<a name="id563286"></a>
+ Description
+ </h6>
+<p>
+ The and predicate generator is used to test, whether the embedded generator
+ succeeds without generating any output. It succeeds if the embedded generator
+ succeeds.
+ </p>
+<a name="spirit.karma.reference.operator.and_predicate.header"></a><h6>
+<a name="id563319"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/and_predicate.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_and_predicate</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.and_predicate.model_of"></a><h6>
+<a name="id563435"></a>
+ <a href="operator.html#spirit.karma.reference.operator.and_predicate.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.and_predicate.expression_semantics"></a><h6>
+<a name="id563490"></a>
+ <a href="operator.html#spirit.karma.reference.operator.and_predicate.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="special">&</span><span class="identifier">a</span></tt>
+ </p></td>
+<td><p>
+ The generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is executed for the sole purpose of testing whether it succeeds.
+ The and predicate generator succeeds as long as its embedded
+ generator succeeds (except if the underlying output stream reports
+ an error). The and predicate never produces any output.
+ </p></td>
+</tr></tbody>
+</table></div>
+<p>
+ The and generator is implemented by redirecting all output produced by
+ its embedded generator into a discarding device.
+ </p>
+<a name="spirit.karma.reference.operator.and_predicate.attributes"></a><h6>
+<a name="id563634"></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>
+ and predicate (unary <tt class="computeroutput"><span class="special">&</span></tt>)
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">a</span><span class="special">:</span>
+ <span class="identifier">A</span> <span class="special">--></span>
+ <span class="special">&</span><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span></tt>
+ </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 attribute of the and predicate is not always <tt class="computeroutput"><span class="identifier">Unused</span></tt>,
+ which is different from Qi's and predicate. This is necessary as the
+ generator the and predicate is attached to most of the time needs an
+ attribute.
+ </p></td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.and_predicate.complexity"></a><h6>
+<a name="id563799"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the and predicate generator is defined
+ by the complexity of its embedded generator. The complexity of the
+ and predicate generator itself is O(1).
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.and_predicate.example"></a><h6>
+<a name="id563839"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">G</span><span class="special">></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">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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">ascii</span><span class="special">::</span><span class="identifier">char_</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">ascii</span><span class="special">::</span><span class="identifier">string</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">ref</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of an and predicate generator:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"b"</span><span class="special">,</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="special"><<</span> <span class="char">'b'</span> <span class="special">|</span> <span class="char">'c'</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">"c"</span><span class="special">,</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="special"><<</span> <span class="char">'b'</span> <span class="special">|</span> <span class="char">'c'</span><span class="special">,</span> <span class="char">'x'</span><span class="special">);</span>
+
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"abc"</span><span class="special">,</span> <span class="special">&</span><span class="identifier">string</span><span class="special">(</span><span class="string">"123"</span><span class="special">)</span> <span class="special"><<</span> <span class="string">"abc"</span> <span class="special">|</span> <span class="string">"def"</span><span class="special">,</span> <span class="string">"123"</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"def"</span><span class="special">,</span> <span class="special">&</span><span class="identifier">string</span><span class="special">(</span><span class="string">"123"</span><span class="special">)</span> <span class="special"><<</span> <span class="string">"abc"</span> <span class="special">|</span> <span class="string">"def"</span><span class="special">,</span> <span class="string">"456"</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.operator.not_predicate"></a><a href="operator.html#spirit.karma.reference.operator.not_predicate" title=" Not
+ Predicate (unary operator!())"> Not
+ Predicate (unary <tt class="computeroutput"><span class="keyword">operator</span><span class="special">!()</span></tt>)</a>
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.karma.reference.operator.not_predicate.description"></a><h6>
+<a name="id565292"></a>
+ Description
+ </h6>
+<p>
+ The not predicate generator is used to test, whether the embedded generator
+ fails, without generating any output. It succeeds if the embedded generator
+ fails.
+ </p>
+<a name="spirit.karma.reference.operator.not_predicate.header"></a><h6>
+<a name="id565324"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/not_predicate.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma_not_predicate</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.karma.reference.operator.not_predicate.model_of"></a><h6>
+<a name="id565438"></a>
+ <a href="operator.html#spirit.karma.reference.operator.not_predicate.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ UnaryGenerator
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.not_predicate.expression_semantics"></a><h6>
+<a name="id565493"></a>
+ <a href="operator.html#spirit.karma.reference.operator.not_predicate.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="special">!</span><span class="identifier">a</span></tt>
+ </p></td>
+<td><p>
+ The generator <tt class="computeroutput"><span class="identifier">a</span></tt>
+ is executed for the sole purpose of testing whether it succeeds.
+ The not predicate generator succeeds as long as its embedded
+ generator fails (except if the underlying output stream reports
+ an error). The not predicate never produces any output.
+ </p></td>
+</tr></tbody>
+</table></div>
+<p>
+ The not generator is implemented by redirecting all output produced by
+ its embedded generator into a discarding device.
+ </p>
+<a name="spirit.karma.reference.operator.not_predicate.attributes"></a><h6>
+<a name="id565638"></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>
+ not predicate (unary <tt class="computeroutput"><span class="special">!</span></tt>)
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">a</span><span class="special">:</span>
+ <span class="identifier">A</span> <span class="special">--></span>
+ <span class="special">!</span><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span></tt>
+ </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 attribute of the and predicate is not always <tt class="computeroutput"><span class="identifier">Unused</span></tt>,
+ which is different from Qi's and predicate. This is necessary as the
+ generator the and predicate is attached to most of the time needs an
+ attribute.
+ </p></td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.not_predicate.complexity"></a><h6>
+<a name="id565803"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the not predicate generator is defined
+ by the complexity of its embedded generator. The complexity of the
+ not predicate generator itself is O(1).
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.not_predicate.example"></a><h6>
+<a name="id565843"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">karma</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</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">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</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">></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">&</span> <span class="identifier">g</span><span class="special">,</span> <span class="identifier">T</span> <span class="keyword">const</span><span class="special">&</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"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></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">&&</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"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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">ascii</span><span class="special">::</span><span class="identifier">char_</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">ascii</span><span class="special">::</span><span class="identifier">string</span><span class="special">;</span>
+<span class="keyword">using</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">::</span><span class="identifier">ref</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic usage of a not predicate generator:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"c"</span><span class="special">,</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="special"><<</span> <span class="char">'b'</span> <span class="special">|</span> <span class="char">'c'</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">"b"</span><span class="special">,</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="special"><<</span> <span class="char">'b'</span> <span class="special">|</span> <span class="char">'c'</span><span class="special">,</span> <span class="char">'x'</span><span class="special">);</span>
+
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"def"</span><span class="special">,</span> <span class="special">!</span><span class="identifier">string</span><span class="special">(</span><span class="string">"123"</span><span class="special">)</span> <span class="special"><<</span> <span class="string">"abc"</span> <span class="special">|</span> <span class="string">"def"</span><span class="special">,</span> <span class="string">"123"</span><span class="special">);</span>
+<span class="identifier">test_generator_attr</span><span class="special">(</span><span class="string">"abc"</span><span class="special">,</span> <span class="special">!</span><span class="identifier">string</span><span class="special">(</span><span class="string">"123"</span><span class="special">)</span> <span class="special"><<</span> <span class="string">"abc"</span> <span class="special">|</span> <span class="string">"def"</span><span class="special">,</span> <span class="string">"456"</span><span class="special">);</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>
@@ -77,7 +2142,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="directive/omit.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/sequence.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directive.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.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/alternative.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/alternative.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/alternative.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.alternative.description"></a><h6>
-<a name="id551724"></a>
+<a name="id552025"></a>
<a href="alternative.html#spirit.karma.reference.operator.alternative.description">Description</a>
</h6>
<p>
@@ -44,7 +44,7 @@
from left to right until one of them succeeds.
</p>
<a name="spirit.karma.reference.operator.alternative.header"></a><h6>
-<a name="id551756"></a>
+<a name="id552057"></a>
<a href="alternative.html#spirit.karma.reference.operator.alternative.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/alternative.hpp>
@@ -54,7 +54,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.alternative.model_of"></a><h6>
-<a name="id551871"></a>
+<a name="id552172"></a>
<a href="alternative.html#spirit.karma.reference.operator.alternative.model_of">Model
of</a>
</h6>
@@ -68,7 +68,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.alternative.expression_semantics"></a><h6>
-<a name="id551925"></a>
+<a name="id552226"></a>
<a href="alternative.html#spirit.karma.reference.operator.alternative.expression_semantics">Expression
Semantics</a>
</h6>
@@ -112,7 +112,7 @@
an element succeeded.
</p>
<a name="spirit.karma.reference.operator.alternative.attributes"></a><h6>
-<a name="id552092"></a>
+<a name="id552394"></a>
<a href="alternative.html#spirit.karma.reference.operator.alternative.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -168,7 +168,7 @@
an example of this behavior.
</p>
<a name="spirit.karma.reference.operator.alternative.complexity"></a><h6>
-<a name="id552763"></a>
+<a name="id553065"></a>
<a href="alternative.html#spirit.karma.reference.operator.alternative.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -184,7 +184,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.alternative.example"></a><h6>
-<a name="id552803"></a>
+<a name="id553105"></a>
<a href="alternative.html#spirit.karma.reference.operator.alternative.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/and_predicate.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/and_predicate.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/and_predicate.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.and_predicate.description"></a><h6>
-<a name="id562984"></a>
+<a name="id563286"></a>
<a href="and_predicate.html#spirit.karma.reference.operator.and_predicate.description">Description</a>
</h6>
<p>
@@ -44,7 +44,7 @@
succeeds.
</p>
<a name="spirit.karma.reference.operator.and_predicate.header"></a><h6>
-<a name="id563017"></a>
+<a name="id563319"></a>
<a href="and_predicate.html#spirit.karma.reference.operator.and_predicate.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/and_predicate.hpp>
@@ -54,7 +54,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.and_predicate.model_of"></a><h6>
-<a name="id563133"></a>
+<a name="id563435"></a>
<a href="and_predicate.html#spirit.karma.reference.operator.and_predicate.model_of">Model
of</a>
</h6>
@@ -68,7 +68,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.and_predicate.expression_semantics"></a><h6>
-<a name="id563188"></a>
+<a name="id563490"></a>
<a href="and_predicate.html#spirit.karma.reference.operator.and_predicate.expression_semantics">Expression
Semantics</a>
</h6>
@@ -107,7 +107,7 @@
its embedded generator into a discarding device.
</p>
<a name="spirit.karma.reference.operator.and_predicate.attributes"></a><h6>
-<a name="id563332"></a>
+<a name="id563634"></a>
<a href="and_predicate.html#spirit.karma.reference.operator.and_predicate.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -147,7 +147,7 @@
</p></td></tr>
</table></div>
<a name="spirit.karma.reference.operator.and_predicate.complexity"></a><h6>
-<a name="id563498"></a>
+<a name="id563799"></a>
<a href="and_predicate.html#spirit.karma.reference.operator.and_predicate.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -162,7 +162,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.and_predicate.example"></a><h6>
-<a name="id563538"></a>
+<a name="id563839"></a>
<a href="and_predicate.html#spirit.karma.reference.operator.and_predicate.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/kleene.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/kleene.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/kleene.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.kleene.description"></a><h6>
-<a name="id554299"></a>
+<a name="id554601"></a>
<a href="kleene.html#spirit.karma.reference.operator.kleene.description">Description</a>
</h6>
<p>
@@ -44,7 +44,7 @@
generator, the Kleene star generator always succeeds.
</p>
<a name="spirit.karma.reference.operator.kleene.header"></a><h6>
-<a name="id554332"></a>
+<a name="id554634"></a>
<a href="kleene.html#spirit.karma.reference.operator.kleene.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/kleene.hpp>
@@ -54,7 +54,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.kleene.model_of"></a><h6>
-<a name="id554446"></a>
+<a name="id554748"></a>
<a href="kleene.html#spirit.karma.reference.operator.kleene.model_of">Model
of</a>
</h6>
@@ -68,7 +68,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.kleene.expression_semantics"></a><h6>
-<a name="id554497"></a>
+<a name="id554799"></a>
<a href="kleene.html#spirit.karma.reference.operator.kleene.expression_semantics">Expression
Semantics</a>
</h6>
@@ -104,7 +104,7 @@
</tr></tbody>
</table></div>
<a name="spirit.karma.reference.operator.kleene.attributes"></a><h6>
-<a name="id554646"></a>
+<a name="id554948"></a>
<a href="kleene.html#spirit.karma.reference.operator.kleene.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -198,7 +198,7 @@
</td></tr>
</table></div>
<a name="spirit.karma.reference.operator.kleene.complexity"></a><h6>
-<a name="id555113"></a>
+<a name="id555415"></a>
<a href="kleene.html#spirit.karma.reference.operator.kleene.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -215,7 +215,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.kleene.example"></a><h6>
-<a name="id555156"></a>
+<a name="id555457"></a>
<a href="kleene.html#spirit.karma.reference.operator.kleene.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/list.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/list.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/list.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -32,7 +32,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.list.description"></a><h6>
-<a name="id558633"></a>
+<a name="id558935"></a>
<a href="list.html#spirit.karma.reference.operator.list.description">Description</a>
</h6>
<p>
@@ -42,7 +42,7 @@
at least once.
</p>
<a name="spirit.karma.reference.operator.list.header"></a><h6>
-<a name="id558667"></a>
+<a name="id558968"></a>
<a href="list.html#spirit.karma.reference.operator.list.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/list.hpp>
@@ -52,7 +52,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.list.model_of"></a><h6>
-<a name="id558781"></a>
+<a name="id559082"></a>
<a href="list.html#spirit.karma.reference.operator.list.model_of">Model of</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -65,7 +65,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.list.expression_semantics"></a><h6>
-<a name="id558834"></a>
+<a name="id559134"></a>
<a href="list.html#spirit.karma.reference.operator.list.expression_semantics">Expression
Semantics</a>
</h6>
@@ -110,7 +110,7 @@
the list generator.
</p>
<a name="spirit.karma.reference.operator.list.attributes"></a><h6>
-<a name="id559090"></a>
+<a name="id559392"></a>
<a href="list.html#spirit.karma.reference.operator.list.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -219,7 +219,7 @@
</td></tr>
</table></div>
<a name="spirit.karma.reference.operator.list.complexity"></a><h6>
-<a name="id559660"></a>
+<a name="id559962"></a>
<a href="list.html#spirit.karma.reference.operator.list.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -235,7 +235,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.list.example"></a><h6>
-<a name="id559702"></a>
+<a name="id560003"></a>
<a href="list.html#spirit.karma.reference.operator.list.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/not_predicate.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/not_predicate.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/not_predicate.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.not_predicate.description"></a><h6>
-<a name="id564990"></a>
+<a name="id565292"></a>
<a href="not_predicate.html#spirit.karma.reference.operator.not_predicate.description">Description</a>
</h6>
<p>
@@ -43,7 +43,7 @@
fails.
</p>
<a name="spirit.karma.reference.operator.not_predicate.header"></a><h6>
-<a name="id565022"></a>
+<a name="id565324"></a>
<a href="not_predicate.html#spirit.karma.reference.operator.not_predicate.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/not_predicate.hpp>
@@ -53,7 +53,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.not_predicate.model_of"></a><h6>
-<a name="id565137"></a>
+<a name="id565438"></a>
<a href="not_predicate.html#spirit.karma.reference.operator.not_predicate.model_of">Model
of</a>
</h6>
@@ -67,7 +67,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.not_predicate.expression_semantics"></a><h6>
-<a name="id565192"></a>
+<a name="id565493"></a>
<a href="not_predicate.html#spirit.karma.reference.operator.not_predicate.expression_semantics">Expression
Semantics</a>
</h6>
@@ -106,7 +106,7 @@
its embedded generator into a discarding device.
</p>
<a name="spirit.karma.reference.operator.not_predicate.attributes"></a><h6>
-<a name="id565336"></a>
+<a name="id565638"></a>
<a href="not_predicate.html#spirit.karma.reference.operator.not_predicate.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -146,7 +146,7 @@
</p></td></tr>
</table></div>
<a name="spirit.karma.reference.operator.not_predicate.complexity"></a><h6>
-<a name="id565501"></a>
+<a name="id565803"></a>
<a href="not_predicate.html#spirit.karma.reference.operator.not_predicate.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -161,7 +161,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.not_predicate.example"></a><h6>
-<a name="id565542"></a>
+<a name="id565843"></a>
<a href="not_predicate.html#spirit.karma.reference.operator.not_predicate.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/optional.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/optional.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/optional.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.optional.description"></a><h6>
-<a name="id560925"></a>
+<a name="id561226"></a>
<a href="optional.html#spirit.karma.reference.operator.optional.description">Description</a>
</h6>
<p>
@@ -42,7 +42,7 @@
It succeeds always.
</p>
<a name="spirit.karma.reference.operator.optional.header"></a><h6>
-<a name="id560956"></a>
+<a name="id561257"></a>
<a href="optional.html#spirit.karma.reference.operator.optional.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/optional.hpp>
@@ -52,7 +52,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.optional.model_of"></a><h6>
-<a name="id561069"></a>
+<a name="id561371"></a>
<a href="optional.html#spirit.karma.reference.operator.optional.model_of">Model
of</a>
</h6>
@@ -66,7 +66,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.optional.expression_semantics"></a><h6>
-<a name="id561123"></a>
+<a name="id561424"></a>
<a href="optional.html#spirit.karma.reference.operator.optional.expression_semantics">Expression
Semantics</a>
</h6>
@@ -100,7 +100,7 @@
</tr></tbody>
</table></div>
<a name="spirit.karma.reference.operator.optional.attributes"></a><h6>
-<a name="id561259"></a>
+<a name="id561561"></a>
<a href="optional.html#spirit.karma.reference.operator.optional.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -177,7 +177,7 @@
</td></tr>
</table></div>
<a name="spirit.karma.reference.operator.optional.complexity"></a><h6>
-<a name="id561676"></a>
+<a name="id561977"></a>
<a href="optional.html#spirit.karma.reference.operator.optional.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -192,7 +192,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.optional.example"></a><h6>
-<a name="id561714"></a>
+<a name="id562016"></a>
<a href="optional.html#spirit.karma.reference.operator.optional.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/plus.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/plus.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/plus.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.plus.description"></a><h6>
-<a name="id556404"></a>
+<a name="id556706"></a>
<a href="plus.html#spirit.karma.reference.operator.plus.description">Description</a>
</h6>
<p>
@@ -43,7 +43,7 @@
executed at least once.
</p>
<a name="spirit.karma.reference.operator.plus.header"></a><h6>
-<a name="id556437"></a>
+<a name="id556739"></a>
<a href="plus.html#spirit.karma.reference.operator.plus.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/plus.hpp>
@@ -53,7 +53,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.plus.model_of"></a><h6>
-<a name="id556551"></a>
+<a name="id556853"></a>
<a href="plus.html#spirit.karma.reference.operator.plus.model_of">Model of</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -66,7 +66,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.plus.expression_semantics"></a><h6>
-<a name="id556602"></a>
+<a name="id556904"></a>
<a href="plus.html#spirit.karma.reference.operator.plus.expression_semantics">Expression
Semantics</a>
</h6>
@@ -103,7 +103,7 @@
</tr></tbody>
</table></div>
<a name="spirit.karma.reference.operator.plus.attributes"></a><h6>
-<a name="id556747"></a>
+<a name="id557048"></a>
<a href="plus.html#spirit.karma.reference.operator.plus.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -197,7 +197,7 @@
</td></tr>
</table></div>
<a name="spirit.karma.reference.operator.plus.complexity"></a><h6>
-<a name="id557214"></a>
+<a name="id557516"></a>
<a href="plus.html#spirit.karma.reference.operator.plus.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -213,7 +213,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.plus.example"></a><h6>
-<a name="id557255"></a>
+<a name="id557557"></a>
<a href="plus.html#spirit.karma.reference.operator.plus.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/sequence.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/operator/sequence.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/sequence.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
<div></div>
</div>
<a name="spirit.karma.reference.operator.sequence.description"></a><h6>
-<a name="id549030"></a>
+<a name="id549331"></a>
<a href="sequence.html#spirit.karma.reference.operator.sequence.description">Description</a>
</h6>
<p>
@@ -43,7 +43,7 @@
to right as long as they succeed.
</p>
<a name="spirit.karma.reference.operator.sequence.header"></a><h6>
-<a name="id549062"></a>
+<a name="id549363"></a>
<a href="sequence.html#spirit.karma.reference.operator.sequence.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/karma/operator/sequence.hpp>
@@ -53,7 +53,7 @@
Also, see Include Structure.
</p>
<a name="spirit.karma.reference.operator.sequence.model_of"></a><h6>
-<a name="id549175"></a>
+<a name="id549476"></a>
<a href="sequence.html#spirit.karma.reference.operator.sequence.model_of">Model
of</a>
</h6>
@@ -67,7 +67,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.sequence.expression_semantics"></a><h6>
-<a name="id549228"></a>
+<a name="id549529"></a>
<a href="sequence.html#spirit.karma.reference.operator.sequence.expression_semantics">Expression
Semantics</a>
</h6>
@@ -132,7 +132,7 @@
</td></tr>
</table></div>
<a name="spirit.karma.reference.operator.sequence.attributes"></a><h6>
-<a name="id549502"></a>
+<a name="id549803"></a>
<a href="sequence.html#spirit.karma.reference.operator.sequence.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -199,7 +199,7 @@
the attribute supplied
</p>
<a name="spirit.karma.reference.operator.sequence.complexity"></a><h6>
-<a name="id550577"></a>
+<a name="id550879"></a>
<a href="sequence.html#spirit.karma.reference.operator.sequence.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -214,7 +214,7 @@
</p>
</blockquote></div>
<a name="spirit.karma.reference.operator.sequence.example"></a><h6>
-<a name="id550617"></a>
+<a name="id550918"></a>
<a href="sequence.html#spirit.karma.reference.operator.sequence.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/tutorials/karma_attributes.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/tutorials/karma_attributes.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/tutorials/karma_attributes.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -35,7 +35,7 @@
<div></div>
</div>
<a name="spirit.karma.tutorials.karma_attributes.attributes_of_primitive_generators"></a><h5>
-<a name="id474636"></a>
+<a name="id474928"></a>
<a href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.attributes_of_primitive_generators">Attributes
of Primitive Generators</a>
</h5>
@@ -67,7 +67,7 @@
<span class="identifier">generate</span><span class="special">(</span><span class="identifier">out</span><span class="special">,</span> <span class="identifier">double_</span><span class="special">,</span> <span class="number">1</span><span class="special">);</span>
</pre>
<a name="spirit.karma.tutorials.karma_attributes.attributes_of_compound_generators"></a><h5>
-<a name="id474932"></a>
+<a name="id475243"></a>
<a href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.attributes_of_compound_generators">Attributes
of Compound Generators</a>
</h5>
@@ -127,7 +127,7 @@
Attribute Rules</a>.
</p>
<a name="spirit.karma.tutorials.karma_attributes.the_attribute_of_sequence_generators"></a><h5>
-<a name="id475436"></a>
+<a name="id475747"></a>
<a href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.the_attribute_of_sequence_generators">The
Attribute of Sequence Generators</a>
</h5>
@@ -194,7 +194,7 @@
</td></tr>
</table></div>
<a name="spirit.karma.tutorials.karma_attributes.the_attribute_of_alternative_generators"></a><h5>
-<a name="id476051"></a>
+<a name="id476362"></a>
<a href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.the_attribute_of_alternative_generators">The
Attribute of Alternative Generators</a>
</h5>
@@ -223,7 +223,7 @@
well. We will apply this rule later for our complex number generators.
</p>
<a name="spirit.karma.tutorials.karma_attributes.more_about_attributes_of_compound_generators"></a><h5>
-<a name="id476340"></a>
+<a name="id476650"></a>
<a href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.more_about_attributes_of_compound_generators">More
About Attributes of Compound Generators</a>
</h5>
@@ -330,7 +330,7 @@
again, allowing to simplify the overall attribute type of an expression.
</p>
<a name="spirit.karma.tutorials.karma_attributes.attributes_of_rules_and_grammars"></a><h5>
-<a name="id477414"></a>
+<a name="id477725"></a>
<a href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.attributes_of_rules_and_grammars">Attributes
of Rules and Grammars</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/karma/tutorials/quick_start.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/tutorials/quick_start.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/tutorials/quick_start.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.karma.tutorials.quick_start.spirit_karma___what_s_that_"></a><h5>
-<a name="id469822"></a>
+<a name="id470105"></a>
<a href="quick_start.html#spirit.karma.tutorials.quick_start.spirit_karma___what_s_that_">Spirit.Karma
- what's that?</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/karma/tutorials/semantic_actions.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/tutorials/semantic_actions.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/tutorials/semantic_actions.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -273,7 +273,7 @@
The examples above can be found here: actions.cpp
</p>
<a name="spirit.karma.tutorials.semantic_actions.phoenix"></a><h5>
-<a name="id473334"></a>
+<a name="id473626"></a>
<a href="semantic_actions.html#spirit.karma.tutorials.semantic_actions.phoenix">Phoenix</a>
</h5>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/karma/tutorials/warming_up.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/tutorials/warming_up.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/tutorials/warming_up.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
We will start from trivial examples, ramping up as we go.
</p>
<a name="spirit.karma.tutorials.warming_up.trivial_example__1_generating_a_number"></a><h5>
-<a name="id470027"></a>
+<a name="id470321"></a>
<a href="warming_up.html#spirit.karma.tutorials.warming_up.trivial_example__1_generating_a_number">Trivial
Example #1 Generating a number</a>
</h5>
@@ -54,7 +54,7 @@
to a floating point generator or parser: <tt class="computeroutput"><span class="identifier">double_</span></tt>.
</p>
<a name="spirit.karma.tutorials.warming_up.trivial_example__2_generating_two_numbers"></a><h5>
-<a name="id470113"></a>
+<a name="id470392"></a>
<a href="warming_up.html#spirit.karma.tutorials.warming_up.trivial_example__2_generating_two_numbers">Trivial
Example #2 Generating two numbers</a>
</h5>
@@ -92,7 +92,7 @@
</p></td></tr>
</table></div>
<a name="spirit.karma.tutorials.warming_up.trivial_example__3_generating_one_or_more_numbers"></a><h5>
-<a name="id470260"></a>
+<a name="id470539"></a>
<a href="warming_up.html#spirit.karma.tutorials.warming_up.trivial_example__3_generating_one_or_more_numbers">Trivial
Example #3 Generating one or more numbers</a>
</h5>
@@ -117,7 +117,7 @@
numbers, if needed.
</p>
<a name="spirit.karma.tutorials.warming_up.trivial_example__4_generating_a_comma_delimited_list_of_numbers"></a><h5>
-<a name="id470342"></a>
+<a name="id470634"></a>
<a href="warming_up.html#spirit.karma.tutorials.warming_up.trivial_example__4_generating_a_comma_delimited_list_of_numbers">Trivial
Example #4 Generating a comma-delimited list of numbers</a>
</h5>
@@ -140,7 +140,7 @@
in the generated output zero or more times.
</p>
<a name="spirit.karma.tutorials.warming_up.let_s_generate_"></a><h5>
-<a name="id470541"></a>
+<a name="id470833"></a>
<a href="warming_up.html#spirit.karma.tutorials.warming_up.let_s_generate_">Let's
Generate!</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/lex.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,8 +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="../index.html" title="Spirit 2.1">
-<link rel="previous" href="karma/performance_measurements/numeric_performance/format_performance.html" title="
- Comparing the performance of a sequence of several generators">
+<link rel="previous" href="karma/performance_measurements/numeric_performance.html" title="
+ Performance of Numeric Generators">
<link rel="next" href="lex/lexer_introduction.html" title=" Introduction to Spirit.Lex">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -21,7 +21,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="karma/performance_measurements/numeric_performance/format_performance.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="lex/lexer_introduction.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="karma/performance_measurements/numeric_performance.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="lex/lexer_introduction.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -79,7 +79,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="karma/performance_measurements/numeric_performance/format_performance.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="lex/lexer_introduction.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="karma/performance_measurements/numeric_performance.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="lex/lexer_introduction.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -7,8 +7,8 @@
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../abstracts.html" title=" Abstracts">
<link rel="previous" href="../abstracts.html" title=" Abstracts">
-<link rel="next" href="lexer_primitives/lexer_primitives.html" title="
- Lexer Primitives">
+<link rel="next" href="lexer_tokenizing.html" title=" Tokenizing
+ Input Data">
</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="../abstracts.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_primitives/lexer_primitives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../abstracts.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_tokenizing.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -31,13 +31,363 @@
<div></div>
</div>
<div class="toc"><dl>
-<dt><span class="section"><a href="lexer_primitives/lexer_primitives.html">
+<dt><span class="section"><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_primitives">
Lexer Primitives</a></span></dt>
-<dt><span class="section"><a href="lexer_primitives/lexer_token_values.html">
+<dt><span class="section"><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values">
About Tokens and Token Values</a></span></dt>
-<dt><span class="section"><a href="lexer_primitives/lexer_token_definition.html">
+<dt><span class="section"><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_definition">
Ways to define Tokens</a></span></dt>
</dl></div>
+<div class="section" lang="en"><div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_primitives"></a><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_primitives" title="
+ Lexer Primitives">
+ Lexer Primitives</a>
+</h5></div></div>
+<div></div>
+</div></div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values"></a><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values" title="
+ About Tokens and Token Values">
+ About Tokens and Token Values</a>
+</h5></div></div>
+<div></div>
+</div>
+<p>
+ As already discussed, lexical scanning is the process of analyzing the
+ stream of input characters and separating it into strings called tokens,
+ most of the time separated by whitespace. The different token types recognized
+ by a lexical analyzer often get assigned unique integer token identifiers
+ (token ids). These token ids arenormally used by the parser to identifiy
+ the current token without having to look at the matched string again.
+ The <span class="emphasis"><em>Spirit.Lex</em></span> library is not different with respect
+ to this, as it uses the token ids as the main means of identification
+ of the different token types defined for a particular lexical analyzer.
+ However, it is different from commonly used lexical analyzers in the
+ sense that it returns (references to) instances of a (user defined) token
+ class to the user. The only real limitation posed on this token class
+ is consequently, that it has to carry at least the token id of the token
+ it represents. For more information about the interface a user defined
+ token type has to expose please look at the <a href="../reference/concepts.html#spirit.lex.reference.concepts.token" title="Token">Token
+ Reference</a> reference. The library provides a default token type
+ based on the Lexertl
+ library which should be sufficient in most use cases: the lexertl_token<>
+ type. This section focusses on the description of general features a
+ token class may implement and how this integrates with the other parts
+ of the <span class="emphasis"><em>Spirit.Lex</em></span> library.
+ </p>
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_anatomy_of_a_token"></a><h6>
+<a name="id586760"></a>
+ <a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_anatomy_of_a_token">The
+ Anatomy of a Token</a>
+ </h6>
+<p>
+ It is very important to understand the difference between a token definition
+ (represented by the token_def<>
+ template) and a token itself (for instance represented by the lexertl_token<>
+ template).
+ </p>
+<p>
+ The token definition is used to describe the main features of a particular
+ token type, especially:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ to simplify the definition of a token type using a regular expression
+ pattern applied while matching this token type,
+ </li>
+<li>
+ to associate a token type with a particular lexer state,
+ </li>
+<li>
+ to optionally assign a token id to a token type,
+ </li>
+<li>
+ to optionally associate some code to execute whenever an instance of
+ this token type has been matched,
+ </li>
+<li>
+ and to optionally specify the attribute type of the token value.
+ </li>
+</ul></div>
+<p>
+ The token itself is a data structure returned by the lexer iterators.
+ Dereferencing a lexer iterator returns a reference to the last matched
+ token instance. It encapsulates the part of the underlying input sequence
+ matched by the regular expression used during the definiton of this token
+ type. Incrementing the lexer iterator invokes the lexical analyzer to
+ match the next token by advancing the underlying input stream. The token
+ data structure contains at least the token id of the matched token type,
+ allowing to identify the matched character sequence. Optionally, the
+ token instance may contain a token value and/or the lexer state this
+ token instance was matched in. The following figure
+ shows the schematic structure of a token.
+ </p>
+<p>
+ </p>
+<div class="figure">
+<a name="spirit.lex.tokenstructure"></a><p class="title"><b>Figure 8. The structure of a token</b></p>
+<span class="inlinemediaobject"><img src="./images/tokenstructure.png" alt="The
+ structure of a token"></span>
+</div>
+<p>
+ </p>
+<p>
+ The token value and the lexer state the token has been recogniyed in
+ may be omitted for optimization reasons, avoiding the token to carry
+ more data than actually required. This configuration can be achieved
+ by supplying appropriate template parameters for the lexertl_token<>
+ template while defining the token type.
+ </p>
+<p>
+ The lexer iterator returns the same token type for each of the different
+ matched token definitions. To accomodate for the possibly different token
+ <span class="emphasis"><em>value</em></span> types exposed by the various token types (token
+ definitions), the general type of the token value is a Boost.Variant.
+ As a minimum (for the default configuration) this token value variant
+ will be configured to always hold a boost::iterator_range<>
+ containing the pair of iterators pointing to the matched input sequence
+ for this token instance.
+ </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>
+ If the lexical analyzer is used in conjunction with a <span class="emphasis"><em>Spirit.Qi</em></span>
+ parser, the stored boost::iterator_range<>
+ token value will be converted to the requested token type (parser attribute)
+ exactly once. This happens at the time of the first access to the token
+ value requiring the corresponding type conversion. The converted token
+ value will be stored in the Boost.Variant
+ replacing the initially stored iterator range. This avoids to convert
+ the input sequence to the token value more than once, thus optimizing
+ the integration of the lexer with <span class="emphasis"><em>Spirit.Qi</em></span>, even
+ during parser backtracking.
+ </p></td></tr>
+</table></div>
+<p>
+ Here is the template prototype of the lexertl_token<>
+ template:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span>
+ <span class="keyword">typename</span> <span class="identifier">Iterator</span> <span class="special">=</span> <span class="keyword">char</span> <span class="keyword">const</span><span class="special">*,</span>
+ <span class="keyword">typename</span> <span class="identifier">AttributeTypes</span> <span class="special">=</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector0</span><span class="special"><>,</span>
+ <span class="keyword">typename</span> <span class="identifier">HasState</span> <span class="special">=</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span>
+<span class="special">></span>
+<span class="keyword">struct</span> <span class="identifier">lexertl_token</span><span class="special">;</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b>where:</b></p>
+<dl>
+<dt><span class="term">Iterator</span></dt>
+<dd><p>
+ This is the type of the iterator used to access the underlying input
+ stream. It defaults to a plain <tt class="computeroutput"><span class="keyword">char</span>
+ <span class="keyword">const</span><span class="special">*</span></tt>.
+ </p></dd>
+<dt><span class="term">AttributeTypes</span></dt>
+<dd><p>
+ This is either a mpl sequence containing all attribute types used
+ for the token definitions or the type <tt class="computeroutput"><span class="identifier">omitted</span></tt>.
+ If the mpl sequence is empty (which is the default), all token instances
+ will store a <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">></span></tt> pointing to the start and the
+ end of the matched section in the input stream. If the type is <tt class="computeroutput"><span class="identifier">omitted</span></tt>, the generated tokens will
+ contain no token value (attribute) at all.
+ </p></dd>
+<dt><span class="term">HasState</span></dt>
+<dd><p>
+ This is either <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></tt>
+ or <tt class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></tt>, allowing to control whether
+ the generated token instances will contain the lexer state they were
+ generated in. The default is mpl::true_, so all token instances will
+ contain the lexer state.
+ </p></dd>
+</dl>
+</div>
+<p>
+ Normally, during its construction, a token instance always holds the
+ boost::iterator_range<>
+ as its token value (except, if it has been defined using the <tt class="computeroutput"><span class="identifier">omitted</span></tt> token value type). This iterator
+ range then is converted in place to the requested token value type (attribute)
+ when it is requested for the first time.
+ </p>
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_physiognomy_of_a_token_definition"></a><h6>
+<a name="id587528"></a>
+ <a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_physiognomy_of_a_token_definition">The
+ Physiognomy of a Token Definition</a>
+ </h6>
+<p>
+ The token definitions (represented by the token_def<>
+ template) are normally used as part of the definition of the lexical
+ analyzer. At the same time a token definition instance may be used as
+ a parser component in <span class="emphasis"><em>Spirit.Qi</em></span>.
+ </p>
+<p>
+ The template prototype of this class is shown here:
+ </p>
+<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span>
+ <span class="keyword">typename</span> <span class="identifier">Attribute</span> <span class="special">=</span> <span class="identifier">unused_type</span><span class="special">,</span>
+ <span class="keyword">typename</span> <span class="identifier">Char</span> <span class="special">=</span> <span class="keyword">char</span>
+<span class="special">></span>
+<span class="keyword">class</span> <span class="identifier">token_def</span><span class="special">;</span>
+</pre>
+<div class="variablelist">
+<p class="title"><b>where:</b></p>
+<dl>
+<dt><span class="term">Attribute</span></dt>
+<dd><p>
+ This is the type of the token value (attribute) supported by token
+ instances representing this token type. This attribute type is exposed
+ to the <span class="emphasis"><em>Spirit.Qi</em></span> library, whenever this token
+ definition is used as a parser component. The default attribute type
+ is <tt class="computeroutput"><span class="identifier">unused_type</span></tt>, which
+ means the token instance holds a boost::iterator_range<>
+ pointing to the start and the end of the matched section in the input
+ stream. If the attribute is <tt class="computeroutput"><span class="identifier">omitted</span></tt>
+ the token instance will expose no token type at all. Any other type
+ will be used directly as the token value type.
+ </p></dd>
+<dt><span class="term">Char</span></dt>
+<dd><p>
+ This is the value type of the iterator for the underlying input sequence.
+ It defaults to <tt class="computeroutput"><span class="keyword">char</span></tt>.
+ </p></dd>
+</dl>
+</div>
+<p>
+ The semantics of the template parameters for the token type and the token
+ definition type are very similar and interdependent. As a rule of thumb
+ you can think of the token definition type as the means of specifying
+ everything related to a single specific token type (such as <tt class="computeroutput"><span class="identifier">identifier</span></tt> or <tt class="computeroutput"><span class="identifier">integer</span></tt>).
+ On the other hand the token type is used to define the general proerties
+ of all token instances generated by the <span class="emphasis"><em>Spirit.Lex</em></span>
+ library.
+ </p>
+<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>
+ If you don't list any token value types in the token type definition
+ declaration (resulting in the usage of the default boost::iterator_range<>
+ token type) everything will compile and work just fine, just a bit
+ less efficient. This is because the token value will be converted from
+ the matched input sequence every time it is requested.
+ </p>
+<p>
+ But as soon as you specify at least one token value type while defining
+ the token type you'll have to list all value types used for token_def<>
+ declarations in the token definition class, otherwise compilation errors
+ will occur.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values.examples_of_using__link_linkend__spirit_lex_reference_token_class___code__phrase_role__identifier__lexertl_token__phrase__phrase_role__special___lt__gt___phrase___code___link_"></a><h6>
+<a name="id587938"></a>
+ <a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values.examples_of_using__link_linkend__spirit_lex_reference_token_class___code__phrase_role__identifier__lexertl_token__phrase__phrase_role__special___lt__gt___phrase___code___link_">Examples
+ of using lexertl_token<></a>
+ </h6>
+<p>
+ Let's start with some examples. We refer to one of the <span class="emphasis"><em>Spirit.Lex</em></span>
+ examples (for the full source code of this example please see example4.cpp).
+ </p>
+<p>
+ The first code snippet shows an excerpt of the token definition class,
+ the definition of a couple of token types. Some of the token types do
+ not expose a special token value (<tt class="computeroutput"><span class="identifier">if_</span></tt>,
+ <tt class="computeroutput"><span class="identifier">else_</span></tt>, and <tt class="computeroutput"><span class="identifier">while_</span></tt>). Their token value will always
+ hold the iterator range of the matched input sequence only. The token
+ definitions for the <tt class="computeroutput"><span class="identifier">identifier</span></tt>
+ and the integer <tt class="computeroutput"><span class="identifier">constant</span></tt>
+ are specialized to expose an explicit token type each: <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt> and <tt class="computeroutput"><span class="keyword">unsigned</span>
+ <span class="keyword">int</span></tt>.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="comment">// these tokens expose the iterator_range of the matched input sequence
+</span><span class="identifier">token_def</span><span class="special"><></span> <span class="identifier">if_</span><span class="special">,</span> <span class="identifier">else_</span><span class="special">,</span> <span class="identifier">while_</span><span class="special">;</span>
+
+<span class="comment">// The following two tokens have an associated attribute type, 'identifier'
+</span><span class="comment">// carries a string (the identifier name) and 'constant' carries the
+</span><span class="comment">// matched integer value.
+</span><span class="comment">//
+</span><span class="comment">// Note: any token attribute type explicitly specified in a token_def<>
+</span><span class="comment">// declaration needs to be listed during token type definition as
+</span><span class="comment">// well (see the typedef for the token_type below).
+</span><span class="comment">//
+</span><span class="comment">// The conversion of the matched input to an instance of this type occurs
+</span><span class="comment">// once (on first access), which makes token attributes as efficient as
+</span><span class="comment">// possible. Moreover, token instances are constructed once by the lexer
+</span><span class="comment">// library. From this point on tokens are passed by reference only,
+</span><span class="comment">// avoiding them being copied around.
+</span><span class="identifier">token_def</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">identifier</span><span class="special">;</span>
+<span class="identifier">token_def</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">constant</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ As the parsers generated by <span class="emphasis"><em>Spirit.Qi</em></span> are fully
+ attributed, any <span class="emphasis"><em>Spirit.Qi</em></span> parser component needs
+ to expose a certain type as its parser attribute. Naturally, the token_def<> exposes the token value
+ type as its parser attribute, enabling a smooth integration with <span class="emphasis"><em>Spirit.Qi</em></span>.
+ </p>
+<p>
+ The next code snippet demonstrates how the required token value types
+ are specified while defining the token type to use. All of the token
+ value types used for at least one of the token definitions have to be
+ re-iterated for the token definition as well.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="comment">// This is the lexer token type to use. The second template parameter lists
+</span><span class="comment">// all attribute types used for token_def's during token definition (see
+</span><span class="comment">// calculator_tokens<> above). Here we use the predefined lexertl token
+</span><span class="comment">// type, but any compatible token type may be used instead.
+</span><span class="comment">//
+</span><span class="comment">// If you don't list any token attribute types in the following declaration
+</span><span class="comment">// (or just use the default token type: lexertl_token<base_iterator_type>)
+</span><span class="comment">// it will compile and work just fine, just a bit less efficient. This is
+</span><span class="comment">// because the token attribute will be generated from the matched input
+</span><span class="comment">// sequence every time it is requested. But as soon as you specify at
+</span><span class="comment">// least one token attribute type you'll have to list all attribute types
+</span><span class="comment">// used for token_def<> declarations in the token definition class above,
+</span><span class="comment">// otherwise compilation errors will occur.
+</span><span class="keyword">typedef</span> <span class="identifier">lexertl</span><span class="special">::</span><span class="identifier">token</span><span class="special"><</span>
+ <span class="identifier">base_iterator_type</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span>
+<span class="special">></span> <span class="identifier">token_type</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ To avoid the token to have a token value at all, the special tag <tt class="computeroutput"><span class="identifier">omitted</span></tt> can be used: <tt class="computeroutput"><span class="identifier">token_def</span><span class="special"><</span><span class="identifier">omitted</span><span class="special">></span></tt>
+ and <tt class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><</span><span class="identifier">base_iterator_type</span><span class="special">,</span>
+ <span class="identifier">omitted</span><span class="special">></span></tt>.
+ </p>
+</div>
+<div class="section" lang="en"><div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_definition"></a><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_definition" title="
+ Ways to define Tokens">
+ Ways to define Tokens</a>
+</h5></div></div>
+<div></div>
+</div></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -50,7 +400,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../abstracts.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_primitives/lexer_primitives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../abstracts.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_tokenizing.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_values.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_values.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_values.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -58,7 +58,7 @@
of the <span class="emphasis"><em>Spirit.Lex</em></span> library.
</p>
<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_anatomy_of_a_token"></a><h6>
-<a name="id586586"></a>
+<a name="id586760"></a>
<a href="lexer_token_values.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_anatomy_of_a_token">The
Anatomy of a Token</a>
</h6>
@@ -195,7 +195,7 @@
when it is requested for the first time.
</p>
<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_physiognomy_of_a_token_definition"></a><h6>
-<a name="id587348"></a>
+<a name="id587528"></a>
<a href="lexer_token_values.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values.the_physiognomy_of_a_token_definition">The
Physiognomy of a Token Definition</a>
</h6>
@@ -268,7 +268,7 @@
</td></tr>
</table></div>
<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values.examples_of_using__link_linkend__spirit_lex_reference_token_class___code__phrase_role__identifier__lexertl_token__phrase__phrase_role__special___lt__gt___phrase___code___link_"></a><h6>
-<a name="id587760"></a>
+<a name="id587938"></a>
<a href="lexer_token_values.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values.examples_of_using__link_linkend__spirit_lex_reference_token_class___code__phrase_role__identifier__lexertl_token__phrase__phrase_role__special___lt__gt___phrase___code___link_">Examples
of using lexertl_token<></a>
</h6>
Modified: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_semantic_actions.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_semantic_actions.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_semantic_actions.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -112,7 +112,7 @@
<span class="keyword">void</span> <span class="identifier">f</span> <span class="special">();</span>
</pre>
<a name="spirit.lex.abstracts.lexer_semantic_actions.the_context_of_a_lexer_semantic_action"></a><h5>
-<a name="id592477"></a>
+<a name="id592656"></a>
<a href="lexer_semantic_actions.html#spirit.lex.abstracts.lexer_semantic_actions.the_context_of_a_lexer_semantic_action">The
context of a lexer semantic action</a>
</h5>
@@ -127,7 +127,7 @@
of the available functionality.
</p>
<div class="table">
-<a name="id592521"></a><p class="title"><b>Table 26. Functions exposed by any context passed to a lexer
+<a name="id592700"></a><p class="title"><b>Table 18. Functions exposed by any context passed to a lexer
semantic action</b></p>
<table class="table" summary="Functions exposed by any context passed to a lexer
semantic action">
@@ -220,7 +220,7 @@
</table>
</div>
<a name="spirit.lex.abstracts.lexer_semantic_actions.lexer_semantic_actions_using_phoenix"></a><h5>
-<a name="id593245"></a>
+<a name="id593424"></a>
<a href="lexer_semantic_actions.html#spirit.lex.abstracts.lexer_semantic_actions.lexer_semantic_actions_using_phoenix">Lexer
Semantic Actions Using Phoenix</a>
</h5>
@@ -232,7 +232,7 @@
predefined Spirit placeholders:
</p>
<div class="table">
-<a name="id593287"></a><p class="title"><b>Table 27. Predefined Phoenix placeholders for lexer semantic
+<a name="id593466"></a><p class="title"><b>Table 19. Predefined Phoenix placeholders for lexer semantic
actions</b></p>
<table class="table" summary="Predefined Phoenix placeholders for lexer semantic
actions">
@@ -331,7 +331,7 @@
table lists the available support functions and describes their functionality:
</p>
<div class="table">
-<a name="id593667"></a><p class="title"><b>Table 28. Support functions usable from Phoenix expressions
+<a name="id593846"></a><p class="title"><b>Table 20. Support functions usable from Phoenix expressions
inside lexer semantic actions</b></p>
<table class="table" summary="Support functions usable from Phoenix expressions
inside lexer semantic actions">
Modified: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_states.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_states.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_states.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,17 +30,17 @@
<div></div>
</div>
<a name="spirit.lex.abstracts.lexer_states.controlling_the_lexer_state_from_lexer_semantic_actions"></a><h5>
-<a name="id597570"></a>
+<a name="id602017"></a>
<a href="lexer_states.html#spirit.lex.abstracts.lexer_states.controlling_the_lexer_state_from_lexer_semantic_actions">Controlling
the Lexer State from Lexer Semantic Actions</a>
</h5>
<a name="spirit.lex.abstracts.lexer_states.controlling_the_lexer_state_from_parser_semantic_actions"></a><h5>
-<a name="id597598"></a>
+<a name="id602045"></a>
<a href="lexer_states.html#spirit.lex.abstracts.lexer_states.controlling_the_lexer_state_from_parser_semantic_actions">Controlling
the Lexer State from Parser Semantic Actions</a>
</h5>
<a name="spirit.lex.abstracts.lexer_states.using_a_lexer_state_for_the_skip_parser"></a><h5>
-<a name="id597627"></a>
+<a name="id602073"></a>
<a href="lexer_states.html#spirit.lex.abstracts.lexer_states.using_a_lexer_state_for_the_skip_parser">Using
a Lexer State for the Skip Parser</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_static_model.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_static_model.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_static_model.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -183,7 +183,7 @@
<p>
</p>
<a name="spirit.lex.abstracts.lexer_static_model.generating_the_static_analyzer"></a><h5>
-<a name="id595710"></a>
+<a name="id595889"></a>
<a href="lexer_static_model.html#spirit.lex.abstracts.lexer_static_model.generating_the_static_analyzer">Generating
the Static Analyzer</a>
</h5>
@@ -232,7 +232,7 @@
the next topic (the full generated code can be viewed here).
</p>
<a name="spirit.lex.abstracts.lexer_static_model.modifying_the_dynamic_analyzer"></a><h5>
-<a name="id596174"></a>
+<a name="id596353"></a>
<a href="lexer_static_model.html#spirit.lex.abstracts.lexer_static_model.modifying_the_dynamic_analyzer">Modifying
the Dynamic Analyzer</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_tokenizing.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_tokenizing.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_tokenizing.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -7,8 +7,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="../abstracts.html" title=" Abstracts">
-<link rel="previous" href="lexer_primitives/lexer_token_definition.html" title="
- Ways to define Tokens">
+<link rel="previous" href="lexer_primitives.html" title="Lexer Primitives">
<link rel="next" href="lexer_semantic_actions.html" title=" Lexer
Semantic Actions">
</head>
@@ -23,7 +22,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="lexer_primitives/lexer_token_definition.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_semantic_actions.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="lexer_primitives.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_semantic_actions.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -35,7 +34,7 @@
<div></div>
</div>
<a name="spirit.lex.abstracts.lexer_tokenizing.the_tokenize_function"></a><h5>
-<a name="id588567"></a>
+<a name="id588746"></a>
<a href="lexer_tokenizing.html#spirit.lex.abstracts.lexer_tokenizing.the_tokenize_function">The
tokenize function</a>
</h5>
@@ -237,7 +236,7 @@
</dl>
</div>
<a name="spirit.lex.abstracts.lexer_tokenizing.the_generate_static_function"></a><h5>
-<a name="id591572"></a>
+<a name="id591751"></a>
<a href="lexer_tokenizing.html#spirit.lex.abstracts.lexer_tokenizing.the_generate_static_function">The
generate_static function</a>
</h5>
@@ -253,7 +252,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="lexer_primitives/lexer_token_definition.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_semantic_actions.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="lexer_primitives.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../abstracts.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="lexer_semantic_actions.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/lex/lexer_introduction.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/lexer_introduction.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/lexer_introduction.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -60,7 +60,7 @@
</li>
</ul></div>
<a name="spirit.lex.lexer_introduction.why_use_a_separate_lexer_"></a><h4>
-<a name="id574440"></a>
+<a name="id574757"></a>
<a href="lexer_introduction.html#spirit.lex.lexer_introduction.why_use_a_separate_lexer_">Why
Use a Separate Lexer?</a>
</h4>
@@ -159,7 +159,7 @@
grammar recognizers.
</p>
<a name="spirit.lex.lexer_introduction.advantages_of_using__emphasis_spirit_lex__emphasis_"></a><h4>
-<a name="id574818"></a>
+<a name="id575108"></a>
<a href="lexer_introduction.html#spirit.lex.lexer_introduction.advantages_of_using__emphasis_spirit_lex__emphasis_">Advantages
of using <span class="emphasis"><em>Spirit.Lex</em></span></a>
</h4>
@@ -208,7 +208,7 @@
application.
</p>
<a name="spirit.lex.lexer_introduction.the_library_structure_of__emphasis_spirit_lex__emphasis_"></a><h4>
-<a name="id574989"></a>
+<a name="id575280"></a>
<a href="lexer_introduction.html#spirit.lex.lexer_introduction.the_library_structure_of__emphasis_spirit_lex__emphasis_">The
Library Structure of <span class="emphasis"><em>Spirit.Lex</em></span></a>
</h4>
Modified: trunk/libs/spirit/doc/html/spirit/lex/reference/concepts.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/reference/concepts.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/reference/concepts.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -7,7 +7,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="concepts/lexer.html" title="Lexer">
+<link rel="next" href="lexer_class.html" title="Lexer Class">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,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="concepts/lexer.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="lexer_class.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -30,10 +30,393 @@
<div></div>
</div>
<div class="toc"><dl>
-<dt><span class="section">Lexer</span></dt>
-<dt><span class="section">Token</span></dt>
-<dt><span class="section">TokenDef</span></dt>
+<dt><span class="section">Lexer</span></dt>
+<dt><span class="section">Token</span></dt>
+<dt><span class="section">TokenDef</span></dt>
</dl></div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.lex.reference.concepts.lexer"></a>Lexer
+</h5></div></div>
+<div></div>
+</div>
+<div class="table">
+<a name="id602169"></a><p class="title"><b>Table 21. Regular expressions support</b></p>
+<table class="table" summary="Regular expressions support">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Expression
+ </p></th>
+<th><p>
+ Meaning
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">x</span></tt>
+ </p></td>
+<td><p>
+ Match any character <tt class="computeroutput"><span class="identifier">x</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">.</span></tt>
+ </p></td>
+<td><p>
+ Match any except newline (or optionally <span class="bold"><b>any</b></span>
+ character)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">[</span><span class="identifier">xyz</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ A character class; in this case matches <tt class="computeroutput"><span class="identifier">x</span></tt>,
+ <tt class="computeroutput"><span class="identifier">y</span></tt> or <tt class="computeroutput"><span class="identifier">z</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">[</span><span class="identifier">abj</span><span class="special">-</span><span class="identifier">oZ</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ A character class with a range in it; matches <tt class="computeroutput"><span class="identifier">a</span></tt>,
+ <tt class="computeroutput"><span class="identifier">b</span></tt> any letter from
+ <tt class="computeroutput"><span class="identifier">j</span></tt> through <tt class="computeroutput"><span class="identifier">o</span></tt> or a <tt class="computeroutput"><span class="identifier">Z</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">[^</span><span class="identifier">A</span><span class="special">-</span><span class="identifier">Z</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ A negated character class i.e. any character but those in the class.
+ In this case, any character except an uppercase letter
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">*</span></tt>
+ </p></td>
+<td><p>
+ Zero or more r's (greedy), where r is any regular expression
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">*?</span></tt>
+ </p></td>
+<td><p>
+ Zero or more r's (abstemious), where r is any regular expression
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">+</span></tt>
+ </p></td>
+<td><p>
+ One or more r's (greedy)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">+?</span></tt>
+ </p></td>
+<td><p>
+ One or more r's (abstemious)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">?</span></tt>
+ </p></td>
+<td><p>
+ Zero or one r's (greedy), i.e. optional
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">??</span></tt>
+ </p></td>
+<td><p>
+ Zero or one r's (abstemious), i.e. optional
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,</span><span class="number">5</span><span class="special">}</span></tt>
+ </p></td>
+<td><p>
+ Anywhere between two and five r's (greedy)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,</span><span class="number">5</span><span class="special">}?</span></tt>
+ </p></td>
+<td><p>
+ Anywhere between two and five r's (abstemious)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,}</span></tt>
+ </p></td>
+<td><p>
+ Two or more r's (greedy)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,}?</span></tt>
+ </p></td>
+<td><p>
+ Two or more r's (abstemious)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">4</span><span class="special">}</span></tt>
+ </p></td>
+<td><p>
+ Exactly four r's
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">{</span><span class="identifier">NAME</span><span class="special">}</span></tt>
+ </p></td>
+<td><p>
+ The macro <tt class="computeroutput"><span class="identifier">NAME</span></tt>
+ (see below)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="string">"[xyz]\"foo"</span></tt>
+ </p></td>
+<td><p>
+ The literal string <tt class="computeroutput"><span class="special">[</span><span class="identifier">xyz</span><span class="special">]\</span><span class="error">"</span><span class="identifier">foo</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">X</span></tt>
+ </p></td>
+<td><p>
+ If X is <tt class="computeroutput"><span class="identifier">a</span></tt>, <tt class="computeroutput"><span class="identifier">b</span></tt>, <tt class="computeroutput"><span class="identifier">e</span></tt>,
+ <tt class="computeroutput"><span class="identifier">n</span></tt>, <tt class="computeroutput"><span class="identifier">r</span></tt>, <tt class="computeroutput"><span class="identifier">f</span></tt>,
+ <tt class="computeroutput"><span class="identifier">t</span></tt>, <tt class="computeroutput"><span class="identifier">v</span></tt> then the ANSI-C interpretation
+ of <tt class="computeroutput"><span class="special">\</span><span class="identifier">x</span></tt>.
+ Otherwise a literal <tt class="computeroutput"><span class="identifier">X</span></tt>
+ (used to escape operators such as <tt class="computeroutput"><span class="special">*</span></tt>)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="number">0</span></tt>
+ </p></td>
+<td><p>
+ A NUL character (ASCII code 0)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="number">123</span></tt>
+ </p></td>
+<td><p>
+ The character with octal value 123
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">x2a</span></tt>
+ </p></td>
+<td><p>
+ The character with hexadecimal value 2a
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">cX</span></tt>
+ </p></td>
+<td><p>
+ A named control character <tt class="computeroutput"><span class="identifier">X</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">d</span></tt>
+ </p></td>
+<td><p>
+ A shortcut for <tt class="computeroutput"><span class="special">[</span><span class="number">0</span><span class="special">-</span><span class="number">9</span><span class="special">]</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">D</span></tt>
+ </p></td>
+<td><p>
+ A shortcut for <tt class="computeroutput"><span class="special">[^</span><span class="number">0</span><span class="special">-</span><span class="number">9</span><span class="special">]</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">s</span></tt>
+ </p></td>
+<td><p>
+ A shortcut for <tt class="computeroutput"><span class="special">[\</span><span class="identifier">x20</span><span class="special">\</span><span class="identifier">t</span><span class="special">\</span><span class="identifier">n</span><span class="special">\</span><span class="identifier">r</span><span class="special">\</span><span class="identifier">f</span><span class="special">\</span><span class="identifier">v</span><span class="special">]</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">S</span></tt>
+ </p></td>
+<td><p>
+ A shortcut for <tt class="computeroutput"><span class="special">[^\</span><span class="identifier">x20</span><span class="special">\</span><span class="identifier">t</span><span class="special">\</span><span class="identifier">n</span><span class="special">\</span><span class="identifier">r</span><span class="special">\</span><span class="identifier">f</span><span class="special">\</span><span class="identifier">v</span><span class="special">]</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">w</span></tt>
+ </p></td>
+<td><p>
+ A shortcut for <tt class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">zA</span><span class="special">-</span><span class="identifier">Z0</span><span class="special">-</span><span class="number">9</span><span class="identifier">_</span><span class="special">]</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">\</span><span class="identifier">W</span></tt>
+ </p></td>
+<td><p>
+ A shortcut for <tt class="computeroutput"><span class="special">[^</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">zA</span><span class="special">-</span><span class="identifier">Z0</span><span class="special">-</span><span class="number">9</span><span class="identifier">_</span><span class="special">]</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">(</span><span class="identifier">r</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Match an <tt class="computeroutput"><span class="identifier">r</span></tt>; parenthesis
+ are used to override precedence (see below)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">(?</span><span class="identifier">r</span><span class="special">-</span><span class="identifier">s</span><span class="special">:</span><span class="identifier">pattern</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ apply option 'r' and omit option 's' while interpreting pattern.
+ Options may be zero or more of the characters 'i' or 's'. 'i' means
+ case-insensitive. '-i' means case-sensitive. 's' alters the meaning
+ of the '.' syntax to match any single character whatsoever. '-s'
+ alters the meaning of '.' to match any character except '<tt class="computeroutput"><span class="special">\</span><span class="identifier">n</span></tt>'.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">rs</span></tt>
+ </p></td>
+<td><p>
+ The regular expression <tt class="computeroutput"><span class="identifier">r</span></tt>
+ followed by the regular expression <tt class="computeroutput"><span class="identifier">s</span></tt>
+ (a sequence)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span><span class="special">|</span><span class="identifier">s</span></tt>
+ </p></td>
+<td><p>
+ Either an <tt class="computeroutput"><span class="identifier">r</span></tt> or
+ and <tt class="computeroutput"><span class="identifier">s</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="special">^</span><span class="identifier">r</span></tt>
+ </p></td>
+<td><p>
+ An <tt class="computeroutput"><span class="identifier">r</span></tt> but only at
+ the beginning of a line (i.e. when just starting to scan, or right
+ after a newline has been scanned)
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">r</span></tt>$
+ </p></td>
+<td><p>
+ An <tt class="computeroutput"><span class="identifier">r</span></tt> but only at
+ the end of a line (i.e. just before a newline)
+ </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>
+ POSIX character classes are not currently supported, due to performance
+ issues when creating them in wide character mode.
+ </p></td></tr>
+</table></div>
+<a name="spirit.lex.reference.concepts.lexer.regular_expression_precedence"></a><h6>
+<a name="id604258"></a>
+ <a href="concepts.html#spirit.lex.reference.concepts.lexer.regular_expression_precedence">Regular
+ Expression Precedence</a>
+ </h6>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<tt class="computeroutput"><span class="identifier">rs</span></tt> has highest precedence
+ </li>
+<li>
+<tt class="computeroutput"><span class="identifier">r</span><span class="special">*</span></tt>
+ has next highest (<tt class="computeroutput"><span class="special">+</span></tt>,
+ <tt class="computeroutput"><span class="special">?</span></tt>, <tt class="computeroutput"><span class="special">{</span><span class="identifier">n</span><span class="special">,</span><span class="identifier">m</span><span class="special">}</span></tt>
+ have the same precedence as <tt class="computeroutput"><span class="special">*</span></tt>)
+ </li>
+<li>
+<tt class="computeroutput"><span class="identifier">r</span><span class="special">|</span><span class="identifier">s</span></tt> has the lowest precedence
+ </li>
+</ul></div>
+<a name="spirit.lex.reference.concepts.lexer.macros"></a><h6>
+<a name="id604415"></a>
+ Macros
+ </h6>
+<p>
+ Regular expressions can be given a name and referred to in rules using
+ the syntax <tt class="computeroutput"><span class="special">{</span><span class="identifier">NAME</span><span class="special">}</span></tt> where <tt class="computeroutput"><span class="identifier">NAME</span></tt>
+ is the name you have given to the macro. A macro name can be at most
+ 30 characters long and must start with a <tt class="computeroutput"><span class="identifier">_</span></tt>
+ or a letter. Subsequent characters can be <tt class="computeroutput"><span class="identifier">_</span></tt>,
+ <tt class="computeroutput"><span class="special">-</span></tt>, a letter or a decimal
+ digit. Use the <tt class="computeroutput"><span class="identifier">rules</span><span class="special">::</span><span class="identifier">add_macro</span><span class="special">()</span></tt> method to define a macro.
+ </p>
+</div>
+<div class="section" lang="en"><div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.lex.reference.concepts.token"></a>Token
+</h5></div></div>
+<div></div>
+</div></div>
+<div class="section" lang="en"><div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.lex.reference.concepts.tokendef"></a>TokenDef
+</h5></div></div>
+<div></div>
+</div></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -46,7 +429,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="concepts/lexer.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="lexer_class.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/lexer.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/lexer.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/lexer.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<div class="table">
-<a name="id597723"></a><p class="title"><b>Table 29. Regular expressions support</b></p>
+<a name="id602169"></a><p class="title"><b>Table 21. Regular expressions support</b></p>
<table class="table" summary="Regular expressions support">
<colgroup>
<col>
@@ -361,7 +361,7 @@
</p></td></tr>
</table></div>
<a name="spirit.lex.reference.concepts.lexer.regular_expression_precedence"></a><h6>
-<a name="id604080"></a>
+<a name="id604258"></a>
<a href="lexer.html#spirit.lex.reference.concepts.lexer.regular_expression_precedence">Regular
Expression Precedence</a>
</h6>
@@ -380,7 +380,7 @@
</li>
</ul></div>
<a name="spirit.lex.reference.concepts.lexer.macros"></a><h6>
-<a name="id604236"></a>
+<a name="id604415"></a>
<a href="lexer.html#spirit.lex.reference.concepts.lexer.macros">Macros</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/lex/reference/lexer_class.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/reference/lexer_class.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/reference/lexer_class.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="../reference.html" title=" Reference">
-<link rel="previous" href="concepts/tokendef.html" title="TokenDef">
+<link rel="previous" href="concepts.html" title=" Concepts">
<link rel="next" href="token_class.html" title="Token Class">
</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="concepts/tokendef.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="token_class.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="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="token_class.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -30,22 +30,22 @@
<div></div>
</div>
<a name="spirit.lex.reference.lexer_class.the_lexertl_lexer_class_implementing_the_dynamic_model"></a><h5>
-<a name="id604426"></a>
+<a name="id604605"></a>
<a href="lexer_class.html#spirit.lex.reference.lexer_class.the_lexertl_lexer_class_implementing_the_dynamic_model">The
lexertl_lexer Class Implementing the Dynamic Model</a>
</h5>
<a name="spirit.lex.reference.lexer_class.the_lexertl_actor_lexer_class_implementing_the_dynamic_model"></a><h5>
-<a name="id604453"></a>
+<a name="id604632"></a>
<a href="lexer_class.html#spirit.lex.reference.lexer_class.the_lexertl_actor_lexer_class_implementing_the_dynamic_model">The
lexertl_actor_lexer Class Implementing the Dynamic Model</a>
</h5>
<a name="spirit.lex.reference.lexer_class.the_lexertl_static_lexer_class_implementing_the_static_model"></a><h5>
-<a name="id604481"></a>
+<a name="id604660"></a>
<a href="lexer_class.html#spirit.lex.reference.lexer_class.the_lexertl_static_lexer_class_implementing_the_static_model">The
lexertl_static_lexer Class Implementing the Static Model</a>
</h5>
<a name="spirit.lex.reference.lexer_class.the_lexertl_static_actor_lexer_class_implementing_the_static_model"></a><h5>
-<a name="id604510"></a>
+<a name="id604689"></a>
<a href="lexer_class.html#spirit.lex.reference.lexer_class.the_lexertl_static_actor_lexer_class_implementing_the_static_model">The
lexertl_static_actor_lexer Class Implementing the Static Model</a>
</h5>
@@ -61,7 +61,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="concepts/tokendef.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="token_class.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="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="token_class.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart1.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart1.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart1.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -47,7 +47,7 @@
(for the full example code see here: word_count_functor.cpp).
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.prerequisites"></a><h5>
-<a name="id353166"></a>
+<a name="id575736"></a>
<a href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.prerequisites">Prerequisites</a>
</h5>
<p>
@@ -86,7 +86,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.defining_tokens"></a><h5>
-<a name="id575905"></a>
+<a name="id576084"></a>
<a href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.defining_tokens">Defining
Tokens</a>
</h5>
@@ -141,7 +141,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.doing_the_useful_work"></a><h5>
-<a name="id576354"></a>
+<a name="id576533"></a>
<a href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.doing_the_useful_work">Doing
the Useful Work</a>
</h5>
@@ -206,7 +206,7 @@
as well.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.pulling_everything_together"></a><h5>
-<a name="id577058"></a>
+<a name="id577231"></a>
<a href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.pulling_everything_together">Pulling
Everything Together</a>
</h5>
@@ -259,7 +259,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.comparing__emphasis_spirit_lex__emphasis__with__ulink_url__http___flex_sourceforge_net___flex__ulink_"></a><h5>
-<a name="id578189"></a>
+<a name="id578362"></a>
<a href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.comparing__emphasis_spirit_lex__emphasis__with__ulink_url__http___flex_sourceforge_net___flex__ulink_">Comparing
<span class="emphasis"><em>Spirit.Lex</em></span> with Flex</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart2.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart2.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart2.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -49,7 +49,7 @@
options along the lines (for the full example code see here: word_count_lexer.cpp).
</p>
<a name="spirit.lex.tutorials.lexer_quickstart2.prerequisites"></a><h5>
-<a name="id579247"></a>
+<a name="id579419"></a>
<a href="lexer_quickstart2.html#spirit.lex.tutorials.lexer_quickstart2.prerequisites">Prerequisites</a>
</h5>
<p>
@@ -123,7 +123,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart2.semantic_actions_in__emphasis_spirit_lex__emphasis_"></a><h5>
-<a name="id580136"></a>
+<a name="id580309"></a>
<a href="lexer_quickstart2.html#spirit.lex.tutorials.lexer_quickstart2.semantic_actions_in__emphasis_spirit_lex__emphasis_">Semantic
Actions in <span class="emphasis"><em>Spirit.Lex</em></span></a>
</h5>
@@ -183,7 +183,7 @@
Semantic Actions</a>.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart2.associating_token_definitions_with_the_lexer"></a><h5>
-<a name="id580992"></a>
+<a name="id581165"></a>
<a href="lexer_quickstart2.html#spirit.lex.tutorials.lexer_quickstart2.associating_token_definitions_with_the_lexer">Associating
Token Definitions with the Lexer</a>
</h5>
@@ -220,7 +220,7 @@
with the constant defined by <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">lex</span><span class="special">::</span><span class="identifier">min_token_id</span></tt>.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart2.pulling_everything_together"></a><h5>
-<a name="id581418"></a>
+<a name="id581591"></a>
<a href="lexer_quickstart2.html#spirit.lex.tutorials.lexer_quickstart2.pulling_everything_together">Pulling
everything together</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart3.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart3.html (original)
+++ trunk/libs/spirit/doc/html/spirit/lex/tutorials/lexer_quickstart3.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -74,7 +74,7 @@
code see here: word_count.cpp).
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.prerequisites"></a><h5>
-<a name="id582845"></a>
+<a name="id583018"></a>
<a href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.prerequisites">Prerequisites</a>
</h5>
<p>
@@ -124,7 +124,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.defining_tokens"></a><h5>
-<a name="id583450"></a>
+<a name="id583623"></a>
<a href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.defining_tokens">Defining
Tokens</a>
</h5>
@@ -179,7 +179,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.using_token_definition_instances_as_parsers"></a><h5>
-<a name="id583925"></a>
+<a name="id584098"></a>
<a href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.using_token_definition_instances_as_parsers">Using
Token Definition Instances as Parsers</a>
</h5>
@@ -304,7 +304,7 @@
do support the this attribute model as well. The most natural way of implementing
this was to use the token values as the attributes exposed by the parser
component corresponding to the token definition (you can read more about
- this topic here: <a href="../abstracts/lexer_primitives/lexer_token_values.html" title="
+ this topic here: <a href="../abstracts/lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values" title="
About Tokens and Token Values">About
Tokens and Token Values</a>). The example above takes advantage of the
full integration of the token values as the <tt class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></tt>'s parser attributes: the <tt class="computeroutput"><span class="identifier">word</span></tt> token definition is declared as
@@ -318,7 +318,7 @@
<span class="identifier">size</span><span class="special">(</span><span class="identifier">_1</span><span class="special">)</span></tt>.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.pulling_everything_together"></a><h5>
-<a name="id585133"></a>
+<a name="id585307"></a>
<a href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.pulling_everything_together">Pulling
Everything Together</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/compound_attribute_rules.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/quick_reference/compound_attribute_rules.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/compound_attribute_rules.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -46,7 +46,7 @@
<span class="identifier">b</span></tt> will be <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt>.
</p>
<div class="table">
-<a name="id446134"></a><p class="title"><b>Table 12. compound parser attribute types</b></p>
+<a name="id446281"></a><p class="title"><b>Table 4. compound parser attribute types</b></p>
<table class="table" summary="compound parser attribute types">
<colgroup>
<col>
Modified: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,9 +30,24 @@
</h4></div></div>
<div></div>
</div>
-<div class="table">
-<a name="id439751"></a><p class="title"><b>Table 4. char</b></p>
-<table class="table" summary="char">
+<div class="toc"><dl>
+<dt><span class="section">char</span></dt>
+<dt><span class="section">numeric</span></dt>
+<dt><span class="section">string</span></dt>
+<dt><span class="section">auxiliary</span></dt>
+<dt><span class="section">binary</span></dt>
+<dt><span class="section">directive</span></dt>
+<dt><span class="section">operator</span></dt>
+<dt><span class="section">action</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.char"></a>char
+</h5></div></div>
+<div></div>
+</div>
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -40,222 +55,228 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">char_</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">char_</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches any character
- </p></td>
+ Matches any character
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></tt>
- </p></td>
+ <tt class="computeroutput"><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>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches <tt class="computeroutput"><span class="identifier">ch</span></tt>
- </p></td>
+ Matches <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></tt>
- </p></td>
+ <tt class="computeroutput"><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>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a single char string literal, <tt class="computeroutput"><span class="identifier">c</span></tt>
- </p></td>
+ Matches a single char string literal, <tt class="computeroutput"><span class="identifier">c</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <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>
- </p></td>
+ <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>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a range of chars from <tt class="computeroutput"><span class="identifier">ch</span></tt>
- to <tt class="computeroutput"><span class="identifier">ch2</span></tt> (inclusive)
- </p></td>
+ Matches a range of chars from <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ to <tt class="computeroutput"><span class="identifier">ch2</span></tt> (inclusive)
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></tt>
- </p></td>
+ <tt class="computeroutput"><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>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character set <tt class="computeroutput"><span class="identifier">charset</span></tt>
- </p></td>
+ Matches a character set <tt class="computeroutput"><span class="identifier">charset</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">alnum</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">alnum</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">alpha</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">alpha</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">blank</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">blank</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">cntrl</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">cntrl</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">digit</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">digit</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">graph</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">graph</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">print</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">print</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">punct</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">punct</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">space</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">space</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">xdigit</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">xdigit</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">lower</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">lower</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></tt> in the current character
+ set
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">upper</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">upper</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Ch</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt>
+ </p></td>
<td><p>
- Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></tt>
- in the current character set
- </p></td>
+ Matches a character based on the equivalent of <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></tt> in the current character
+ set
+ </p></td>
</tr>
</tbody>
-</table>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.numeric"></a>numeric
+</h5></div></div>
+<div></div>
</div>
-<div class="table">
-<a name="id440989"></a><p class="title"><b>Table 5. numeric</b></p>
-<table class="table" summary="numeric">
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -263,178 +284,183 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">float_</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">float_</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">float</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">float</span></tt>
+ </p></td>
<td><p>
- Parse a floating point number into a <tt class="computeroutput"><span class="keyword">float</span></tt>
- </p></td>
+ Parse a floating point number into a <tt class="computeroutput"><span class="keyword">float</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">double_</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">double_</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">double</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">double</span></tt>
+ </p></td>
<td><p>
- Parse a floating point number into a <tt class="computeroutput"><span class="keyword">double</span></tt>
- </p></td>
+ Parse a floating point number into a <tt class="computeroutput"><span class="keyword">double</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">long_double</span></tt>
- </p></td>
+ <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>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></tt>
+ </p></td>
<td><p>
- Parse a floating point number into a <tt class="computeroutput"><span class="keyword">long</span>
- <span class="keyword">double</span></tt>
- </p></td>
+ Parse a floating point number into a <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">bin</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">bin</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
+ </p></td>
<td><p>
- Parse a binary integer into an <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
- </p></td>
+ Parse a binary integer into an <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">oct</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">oct</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
+ </p></td>
<td><p>
- Parse an octal integer into an <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
- </p></td>
+ Parse an octal integer into an <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">hex</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">hex</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
+ </p></td>
<td><p>
- Parse a hexadecimal integer into an <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
- </p></td>
+ Parse a hexadecimal integer into an <tt class="computeroutput"><span class="keyword">unsigned</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">ushort_</span></tt>
- </p></td>
+ <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>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></tt>
+ </p></td>
<td><p>
- Parse an unsigned short integer
- </p></td>
+ Parse an unsigned short integer
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">ulong_</span></tt>
- </p></td>
+ <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>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></tt>
+ </p></td>
<td><p>
- Parse an unsigned long integer
- </p></td>
+ Parse an unsigned long integer
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">uint_</span></tt>
- </p></td>
+ <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>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></tt>
+ </p></td>
<td><p>
- Parse an unsigned int
- </p></td>
+ Parse an unsigned int
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">ulong_long</span></tt>
- </p></td>
+ <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>
+ <tt class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></tt>
+ </p></td>
<td><p>
- Parse an unsigned long long
- </p></td>
+ Parse an unsigned long long
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">short_</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">short_</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">short</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">short</span></tt>
+ </p></td>
<td><p>
- Parse a short integer
- </p></td>
+ Parse a short integer
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">long_</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">long_</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">long</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">long</span></tt>
+ </p></td>
<td><p>
- Parse a long integer
- </p></td>
+ Parse a long integer
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">int_</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">int_</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="keyword">int</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="keyword">int</span></tt>
+ </p></td>
<td><p>
- Parse an int
- </p></td>
+ Parse an int
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">long_long</span></tt>
- </p></td>
+ <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>
+ <tt class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></tt>
+ </p></td>
<td><p>
- Parse a long long
- </p></td>
+ Parse a long long
+ </p></td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<div class="table">
-<a name="id441811"></a><p class="title"><b>Table 6. string</b></p>
-<table class="table" summary="string">
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.string"></a>string
+</h5></div></div>
+<div></div>
+</div>
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -442,126 +468,132 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody>
<tr>
<td><p>
- ch
- </p></td>
+ ch
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Matches <tt class="computeroutput"><span class="identifier">ch</span></tt>
- </p></td>
+ Matches <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- str
- </p></td>
+ str
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Matches <tt class="computeroutput"><span class="identifier">str</span></tt>
- </p></td>
+ Matches <tt class="computeroutput"><span class="identifier">str</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- lit(ch)
- </p></td>
+ lit(ch)
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Matches <tt class="computeroutput"><span class="identifier">ch</span></tt>
- </p></td>
+ Matches <tt class="computeroutput"><span class="identifier">ch</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- lit(str)
- </p></td>
+ lit(str)
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Matches <tt class="computeroutput"><span class="identifier">str</span></tt>
- </p></td>
+ Matches <tt class="computeroutput"><span class="identifier">str</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- string(str)
- </p></td>
+ string(str)
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Str</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Str</span></tt>
+ </p></td>
<td><p>
- Matches <tt class="computeroutput"><span class="identifier">str</span></tt>
- </p></td>
+ Matches <tt class="computeroutput"><span class="identifier">str</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- symbols<Ch, T>
- </p></td>
+ <a href="../reference/string.html#spirit.qi.reference.string.symbols" title="symbols"><tt class="computeroutput"><span class="identifier">symbols</span><span class="special"><</span><span class="identifier">Ch</span><span class="special">,</span>
+ <span class="identifier">T</span><span class="special">></span></tt></a>
+ </p></td>
<td><p>
- N/A
- </p></td>
+ N/A
+ </p></td>
<td><p>
- Declare a symbol table, <tt class="computeroutput"><span class="identifier">sym</span></tt>.
- <tt class="computeroutput"><span class="identifier">Ch</span></tt> is the underlying
- char type of the symbol table keys. <tt class="computeroutput"><span class="identifier">T</span></tt>
- is the data type associated with each key.
- </p></td>
+ Declare a symbol table, <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ <tt class="computeroutput"><span class="identifier">Ch</span></tt> is the underlying
+ char type of the symbol table keys. <tt class="computeroutput"><span class="identifier">T</span></tt>
+ is the data type associated with each key.
+ </p></td>
</tr>
<tr>
<td>
<p>
-
+
</p>
-<pre class="programlisting"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">add</span>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">add</span>
<span class="special">(</span><span class="identifier">str1</span><span class="special">,</span> <span class="identifier">val1</span><span class="special">)</span>
<span class="special">(</span><span class="identifier">str2</span><span class="special">,</span> <span class="identifier">val2</span><span class="special">)</span>
<span class="comment">/*...more...*/</span>
<span class="special">;</span>
</pre>
<p>
- </p>
+ </p>
</td>
<td><p>
- N/A
- </p></td>
+ N/A
+ </p></td>
<td><p>
- Add symbols into a symbol table, <tt class="computeroutput"><span class="identifier">sym</span></tt>.
- val1 and val2 are optional data of type <tt class="computeroutput"><span class="identifier">T</span></tt>,
- the data type associated with each key.
- </p></td>
+ Add symbols into a symbol table, <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ val1 and val2 are optional data of type <tt class="computeroutput"><span class="identifier">T</span></tt>,
+ the data type associated with each key.
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">sym</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">sym</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">T</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">T</span></tt>
+ </p></td>
<td><p>
- Matches entries in the symbol table, <tt class="computeroutput"><span class="identifier">sym</span></tt>.
- If successful, returns the data associated with the key
- </p></td>
+ Matches entries in the symbol table, <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ If successful, returns the data associated with the key
+ </p></td>
</tr>
</tbody>
-</table>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.auxiliary"></a>auxiliary
+</h5></div></div>
+<div></div>
</div>
-<div class="table">
-<a name="id442524"></a><p class="title"><b>Table 7. auxiliary</b></p>
-<table class="table" summary="auxiliary">
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -569,105 +601,110 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">eol</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">eol</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Matches the end of line (<tt class="computeroutput"><span class="special">\</span><span class="identifier">r</span></tt> or <tt class="computeroutput"><span class="special">\</span><span class="identifier">n</span></tt> or <tt class="computeroutput"><span class="special">\</span><span class="identifier">r</span><span class="special">\</span><span class="identifier">n</span></tt>)
- </p></td>
+ Matches the end of line (<tt class="computeroutput"><span class="special">\</span><span class="identifier">r</span></tt> or <tt class="computeroutput"><span class="special">\</span><span class="identifier">n</span></tt> or <tt class="computeroutput"><span class="special">\</span><span class="identifier">r</span><span class="special">\</span><span class="identifier">n</span></tt>)
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">eoi</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">eoi</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Matches the end of input (first == last)
- </p></td>
+ Matches the end of input (first == last)
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">eps</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">eps</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Match an empty string
- </p></td>
+ Match an empty string
+ </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>
+ <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>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- If <tt class="computeroutput"><span class="identifier">b</span></tt> is true, match
- an empty string
- </p></td>
+ If <tt class="computeroutput"><span class="identifier">b</span></tt> is true,
+ match an empty string
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></tt>
+ </p></td>
<td><p>
- Attribute of <tt class="computeroutput"><span class="identifier">P</span></tt> where
- <tt class="computeroutput"><span class="identifier">P</span></tt> is the return type
- of <tt class="computeroutput"><span class="identifier">fp</span></tt>
- </p></td>
+ Attribute of <tt class="computeroutput"><span class="identifier">P</span></tt>
+ where <tt class="computeroutput"><span class="identifier">P</span></tt> is the
+ return type of <tt class="computeroutput"><span class="identifier">fp</span></tt>
+ </p></td>
<td><p>
- Invoke <tt class="computeroutput"><span class="identifier">fp</span></tt> at parse
- time, returning a parser <tt class="computeroutput"><span class="identifier">p</span></tt>
- which is then called to parse.
- </p></td>
+ Invoke <tt class="computeroutput"><span class="identifier">fp</span></tt> at
+ parse time, returning a parser <tt class="computeroutput"><span class="identifier">p</span></tt>
+ which is then called to parse.
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">fp</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">fp</span></tt>
+ </p></td>
<td><p>
- see <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></tt>
- above
- </p></td>
+ see <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></tt>
+ above
+ </p></td>
<td><p>
- Equivalent to <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">[</span><span class="identifier">fp</span><span class="special">]</span></tt>
- </p></td>
+ Equivalent to <tt class="computeroutput"><span class="identifier">lazy</span><span class="special">[</span><span class="identifier">fp</span><span class="special">]</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- attr(attrib)
- </p></td>
+ attr(attrib)
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Attrib</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Attrib</span></tt>
+ </p></td>
<td><p>
- Doesn't consume/parse any input, but exposes the argument <tt class="computeroutput"><span class="identifier">attrib</span></tt> as its attribute.
- </p></td>
+ Doesn't consume/parse any input, but exposes the argument <tt class="computeroutput"><span class="identifier">attrib</span></tt> as its attribute.
+ </p></td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<div class="table">
-<a name="id443123"></a><p class="title"><b>Table 8. binary</b></p>
-<table class="table" summary="binary">
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.binary"></a>binary
+</h5></div></div>
+<div></div>
+</div>
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -675,132 +712,137 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">byte_</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">byte_</span></tt>
+ </p></td>
<td><p>
- 8 bits native endian
- </p></td>
+ 8 bits native endian
+ </p></td>
<td><p>
- Matches an 8 bit binary
- </p></td>
+ Matches an 8 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">word</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">word</span></tt>
+ </p></td>
<td><p>
- 16 bits native endian
- </p></td>
+ 16 bits native endian
+ </p></td>
<td><p>
- Matches a 16 bit binary
- </p></td>
+ Matches a 16 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">big_word</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">big_word</span></tt>
+ </p></td>
<td><p>
- 16 bits big endian
- </p></td>
+ 16 bits big endian
+ </p></td>
<td><p>
- Matches a 16 bit binary
- </p></td>
+ Matches a 16 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">little_word</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">little_word</span></tt>
+ </p></td>
<td><p>
- 16 bits little endian
- </p></td>
+ 16 bits little endian
+ </p></td>
<td><p>
- Matches a 16 bit binary
- </p></td>
+ Matches a 16 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">dword</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">dword</span></tt>
+ </p></td>
<td><p>
- 32 bits native endian
- </p></td>
+ 32 bits native endian
+ </p></td>
<td><p>
- Matches a 32 bit binary
- </p></td>
+ Matches a 32 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">big_dword</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">big_dword</span></tt>
+ </p></td>
<td><p>
- 32 bits big endian
- </p></td>
+ 32 bits big endian
+ </p></td>
<td><p>
- Matches a 32 bit binary
- </p></td>
+ Matches a 32 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">little_dword</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">little_dword</span></tt>
+ </p></td>
<td><p>
- 32 bits little endian
- </p></td>
+ 32 bits little endian
+ </p></td>
<td><p>
- Matches a 32 bit binary
- </p></td>
+ Matches a 32 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">qword</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">qword</span></tt>
+ </p></td>
<td><p>
- 64 bits native endian
- </p></td>
+ 64 bits native endian
+ </p></td>
<td><p>
- Matches a 64 bit binary
- </p></td>
+ Matches a 64 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">big_qword</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">big_qword</span></tt>
+ </p></td>
<td><p>
- 64 bits big endian
- </p></td>
+ 64 bits big endian
+ </p></td>
<td><p>
- Matches a 64 bit binary
- </p></td>
+ Matches a 64 bit binary
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">little_qword</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">little_qword</span></tt>
+ </p></td>
<td><p>
- 64 bits little endian
- </p></td>
+ 64 bits little endian
+ </p></td>
<td><p>
- Matches a 64 bit binary
- </p></td>
+ Matches a 64 bit binary
+ </p></td>
</tr>
</tbody>
-</table>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.directive"></a>directive
+</h5></div></div>
+<div></div>
</div>
-<div class="table">
-<a name="id443536"></a><p class="title"><b>Table 9. directive</b></p>
-<table class="table" summary="directive">
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -808,136 +850,143 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">lexeme</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">lexeme</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">A</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">A</span></tt>
+ </p></td>
<td><p>
- Disable skip parsing for <tt class="computeroutput"><span class="identifier">a</span></tt>
- </p></td>
+ Disable skip parsing for <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- no_case[a]
- </p></td>
+ no_case[a]
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">A</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">A</span></tt>
+ </p></td>
<td><p>
- Inhibits case-sensitivity for <tt class="computeroutput"><span class="identifier">a</span></tt>
- </p></td>
+ Inhibits case-sensitivity for <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></td>
</tr>
<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>
+ <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>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Ignores the attribute type of <tt class="computeroutput"><span class="identifier">a</span></tt>
- </p></td>
+ Ignores the attribute type of <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">raw</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">raw</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span><span class="special"><</span><span class="identifier">I</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">iterator_range</span><span class="special"><</span><span class="identifier">I</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Presents the transduction of <tt class="computeroutput"><span class="identifier">a</span></tt>
- as an iterator range
- </p></td>
+ Presents the transduction of <tt class="computeroutput"><span class="identifier">a</span></tt>
+ as an iterator range
+ </p></td>
</tr>
<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>
+ <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>
- <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> zero or
- more times
- </p></td>
+ Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> zero
+ or more times
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> <tt class="computeroutput"><span class="identifier">N</span></tt> times
- </p></td>
+ Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> <tt class="computeroutput"><span class="identifier">N</span></tt> times
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</span><span class="special">,</span> <span class="identifier">M</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</span><span class="special">,</span>
+ <span class="identifier">M</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> <tt class="computeroutput"><span class="identifier">N</span></tt> to <tt class="computeroutput"><span class="identifier">M</span></tt>
- times
- </p></td>
+ Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> <tt class="computeroutput"><span class="identifier">N</span></tt> to <tt class="computeroutput"><span class="identifier">M</span></tt>
+ times
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</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>
+ <tt class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">N</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>
- <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> <tt class="computeroutput"><span class="identifier">N</span></tt> or more times
- </p></td>
+ Repeat <tt class="computeroutput"><span class="identifier">a</span></tt> <tt class="computeroutput"><span class="identifier">N</span></tt> or more times
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">skip</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">skip</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">A</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">A</span></tt>
+ </p></td>
<td><p>
- Reestablish the skipper that got inhibited by lexeme
- </p></td>
+ Reestablish the skipper that got inhibited by lexeme
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">skip</span><span class="special">(</span><span class="identifier">p</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">skip</span><span class="special">(</span><span class="identifier">p</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">A</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">A</span></tt>
+ </p></td>
<td><p>
- Use <tt class="computeroutput"><span class="identifier">p</span></tt> as a skipper
- for parsing <tt class="computeroutput"><span class="identifier">a</span></tt>
- </p></td>
+ Use <tt class="computeroutput"><span class="identifier">p</span></tt> as a skipper
+ for parsing <tt class="computeroutput"><span class="identifier">a</span></tt>
+ </p></td>
</tr>
</tbody>
-</table>
+</table></div>
</div>
-<div class="table">
-<a name="id444512"></a><p class="title"><b>Table 10. operator</b></p>
-<table class="table" summary="operator">
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.operator"></a>operator
+</h5></div></div>
+<div></div>
+</div>
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -945,176 +994,191 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody>
<tr>
<td><p>
- <tt class="computeroutput"><span class="special">!</span><span class="identifier">a</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="special">!</span><span class="identifier">a</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- Not predicate. Ensure that <tt class="computeroutput"><span class="identifier">a</span></tt>
- does not match but don't move the iterator position
- </p></td>
+ Not predicate. Ensure that <tt class="computeroutput"><span class="identifier">a</span></tt>
+ does not match but don't move the iterator position
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="special">&</span><span class="identifier">a</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="special">&</span><span class="identifier">a</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">Unused</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">Unused</span></tt>
+ </p></td>
<td><p>
- And predicate. Ensure that <tt class="computeroutput"><span class="identifier">a</span></tt>
- matches but don't move the iterator position
- </p></td>
+ And predicate. Ensure that <tt class="computeroutput"><span class="identifier">a</span></tt>
+ matches but don't move the iterator position
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="special">-</span><span class="identifier">a</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="special">-</span><span class="identifier">a</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Optional. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
- zero or one time
- </p></td>
+ Optional. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ zero or one time
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="special">*</span><span class="identifier">a</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="special">*</span><span class="identifier">a</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Kleene. Parse <tt class="computeroutput"><span class="identifier">a</span></tt> zero
- or more times
- </p></td>
+ Kleene. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ zero or more times
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="special">+</span><span class="identifier">a</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="special">+</span><span class="identifier">a</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Plus. Parse <tt class="computeroutput"><span class="identifier">a</span></tt> one
- or more times
- </p></td>
+ Plus. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ one or more times
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
- <span class="identifier">b</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">variant</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">variant</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span>
+ <span class="identifier">B</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Alternative. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
- or <tt class="computeroutput"><span class="identifier">b</span></tt>
- </p></td>
+ Alternative. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ or <tt class="computeroutput"><span class="identifier">b</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">a</span> <span class="special">>></span>
- <span class="identifier">b</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">a</span> <span class="special">>></span>
+ <span class="identifier">b</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span>
+ <span class="identifier">B</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Sequence. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
- followed by <tt class="computeroutput"><span class="identifier">b</span></tt>
- </p></td>
+ Sequence. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ followed by <tt class="computeroutput"><span class="identifier">b</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">a</span> <span class="special">></span>
- <span class="identifier">b</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">a</span> <span class="special">></span>
+ <span class="identifier">b</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span>
+ <span class="identifier">B</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Expect. Parse <tt class="computeroutput"><span class="identifier">a</span></tt> followed
- by <tt class="computeroutput"><span class="identifier">b</span></tt>. <tt class="computeroutput"><span class="identifier">b</span></tt> is expected to match when <tt class="computeroutput"><span class="identifier">a</span></tt> matches, otherwise, an <tt class="computeroutput"><span class="identifier">expectation_failure</span></tt> is thrown.
- </p></td>
+ Expect. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ followed by <tt class="computeroutput"><span class="identifier">b</span></tt>.
+ <tt class="computeroutput"><span class="identifier">b</span></tt> is expected
+ to match when <tt class="computeroutput"><span class="identifier">a</span></tt>
+ matches, otherwise, an <tt class="computeroutput"><span class="identifier">expectation_failure</span></tt>
+ is thrown.
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">a</span> <span class="special">-</span>
- <span class="identifier">b</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">a</span> <span class="special">-</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">A</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">A</span></tt>
+ </p></td>
<td><p>
- Difference. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
- but not <tt class="computeroutput"><span class="identifier">b</span></tt>
- </p></td>
+ Difference. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ but not <tt class="computeroutput"><span class="identifier">b</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">a</span> <span class="special">||</span>
- <span class="identifier">b</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">a</span> <span class="special">||</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span> <span class="identifier">B</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span><span class="identifier">A</span><span class="special">,</span>
+ <span class="identifier">B</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- Sequential Or. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
- or <tt class="computeroutput"><span class="identifier">b</span></tt> or <tt class="computeroutput"><span class="identifier">a</span></tt> followed by <tt class="computeroutput"><span class="identifier">b</span></tt>
- </p></td>
+ Sequential Or. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ or <tt class="computeroutput"><span class="identifier">b</span></tt> or <tt class="computeroutput"><span class="identifier">a</span></tt> followed by <tt class="computeroutput"><span class="identifier">b</span></tt>
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
- <span class="identifier">b</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></tt>
+ </p></td>
<td><p>
- List. Parse <tt class="computeroutput"><span class="identifier">a</span></tt> delimited
- <tt class="computeroutput"><span class="identifier">b</span></tt> one or more times
- </p></td>
+ List. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ delimited <tt class="computeroutput"><span class="identifier">b</span></tt> one
+ or more times
+ </p></td>
</tr>
<tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">a</span> <span class="special">^</span>
- <span class="identifier">b</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">a</span> <span class="special">^</span>
+ <span class="identifier">b</span></tt>
+ </p></td>
<td><p>
- <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span></tt>
- <tt class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">>,</span></tt>
- <tt class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">B</span><span class="special">></span>
- <span class="special">></span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span></tt>
+ <tt class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">>,</span></tt>
+ <tt class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">B</span><span class="special">></span>
+ <span class="special">></span></tt>
+ </p></td>
<td><p>
- Permutation. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
- and <tt class="computeroutput"><span class="identifier">b</span></tt> in any order
- </p></td>
+ Permutation. Parse <tt class="computeroutput"><span class="identifier">a</span></tt>
+ and <tt class="computeroutput"><span class="identifier">b</span></tt> in any
+ order
+ </p></td>
</tr>
</tbody>
-</table>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.action"></a>action
+</h5></div></div>
+<div></div>
</div>
-<div class="table">
-<a name="id445738"></a><p class="title"><b>Table 11. action</b></p>
-<table class="table" summary="action">
+<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
@@ -1122,28 +1186,28 @@
</colgroup>
<thead><tr>
<th><p>
- Expression
- </p></th>
+ Expression
+ </p></th>
<th><p>
- Attribute
- </p></th>
+ Attribute
+ </p></th>
<th><p>
- Description
- </p></th>
+ Description
+ </p></th>
</tr></thead>
<tbody><tr>
<td><p>
- <tt class="computeroutput"><span class="identifier">p</span><span class="special">[</span><span class="identifier">fa</span><span class="special">]</span></tt>
- </p></td>
+ <tt class="computeroutput"><span class="identifier">p</span><span class="special">[</span><span class="identifier">fa</span><span class="special">]</span></tt>
+ </p></td>
<td><p>
- Attribute of <tt class="computeroutput"><span class="identifier">p</span></tt>
- </p></td>
+ Attribute of <tt class="computeroutput"><span class="identifier">p</span></tt>
+ </p></td>
<td><p>
- Call semantic action, <tt class="computeroutput"><span class="identifier">fa</span></tt>
- if p succeeds.
- </p></td>
+ Call semantic action, <tt class="computeroutput"><span class="identifier">fa</span></tt>
+ if p succeeds.
+ </p></td>
</tr></tbody>
-</table>
+</table></div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -7,7 +7,7 @@
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
<link rel="previous" href="basics.html" title="Basics">
-<link rel="next" href="auxiliary/attr.html" title="attr">
+<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>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="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="auxiliary/attr.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="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="directive.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -29,7 +29,7 @@
</h4></div></div>
<div></div>
</div>
-<div class="toc"><dl><dt><span class="section">attr</span></dt></dl></div>
+<div class="toc"><dl><dt><span class="section">attr</span></dt></dl></div>
<p>
This module includes different auxiliary parsers not fitting into any of
the other categories. This module includes the <tt class="computeroutput"><span class="identifier">attr</span></tt>,
@@ -37,12 +37,269 @@
<tt class="computeroutput"><span class="identifier">eps</span></tt>, and <tt class="computeroutput"><span class="identifier">lazy</span></tt> parsers.
</p>
<a name="spirit.qi.reference.auxiliary.module_header"></a><h5>
-<a name="id457653"></a>
+<a name="id457799"></a>
<a href="auxiliary.html#spirit.qi.reference.auxiliary.module_header">Module Header</a>
</h5>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/auxiliary.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi_auxiliary</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.auxiliary.attr"></a>attr
+</h5></div></div>
+<div></div>
+</div>
+<div class="itemizedlist"><ul type="disc"><li>
+<tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">attr</span></tt>: generates a pseudo parser not
+ consuming any input
+ </li></ul></div>
+<a name="spirit.qi.reference.auxiliary.attr.description"></a><h6>
+<a name="id457956"></a>
+ Description
+ </h6>
+<p>
+ The <tt class="computeroutput"><span class="identifier">attr</span></tt> parser does
+ not consume any input, for this reason it always matches an empty string.
+ The parser generated by <tt class="computeroutput"><span class="identifier">attr</span></tt>
+ always succeeds. It's purpose is to expose its specified parameter as
+ an attribute to the parsing process.
+ </p>
+<a name="spirit.qi.reference.auxiliary.attr.header"></a><h6>
+<a name="id458011"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/auxiliary/attr.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi_attr</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.qi.reference.auxiliary.attr.model_of"></a><h6>
+<a name="id458124"></a>
+ Model of
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Parser
+ </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">attrib</span></tt></span></dt>
+<dd><p>
+ A arbitrary typed constant value, e.g. 0.0, "Hello", or
+ a variable of arbitrary type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">fattrib</span></tt></span></dt>
+<dd><p>
+ A Lazy Argument
+ that evaluates to an arbitrary type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.auxiliary.attr.expression_semantics"></a><h6>
+<a name="id458242"></a>
+ <a href="auxiliary.html#spirit.qi.reference.auxiliary.attr.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an <tt class="computeroutput"><span class="identifier">attr</span><span class="special">()</span></tt> expression are fully defined by the
+ Parser concept.
+ </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">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate a pseudo parser exposing the current value of <tt class="computeroutput"><span class="identifier">attrib</span></tt> as its attribute value
+ while not consuming any input at parse time.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">fattrib</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate a pseudo parser exposing as its attribute the value
+ returned by invoking <tt class="computeroutput"><span class="identifier">fattrib</span></tt>
+ at parse time, while not consuming any input. See <a href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
+ Argument</a>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.auxiliary.attr.attributes"></a><h6>
+<a name="id458469"></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">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Attrib</span></tt>, which
+ is the type of <tt class="computeroutput"><span class="identifier">attrib</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">fattrib</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Attrib</span></tt>, which
+ is the return type of <tt class="computeroutput"><span class="identifier">fattrib</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.auxiliary.attr.complexity"></a><h6>
+<a name="id458665"></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 input is consumed and no matching is
+ done.
+ </p>
+<a name="spirit.qi.reference.auxiliary.attr.example"></a><h6>
+<a name="id458705"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">P</span><span class="special">></span>
+<span class="keyword">void</span> <span class="identifier">test_parser</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">input</span><span class="special">,</span> <span class="identifier">P</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">p</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">input</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
+ <span class="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">qi</span><span class="special">::</span><span class="identifier">parse</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">p</span><span class="special">))</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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 declaration:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">phx</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</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">qi</span><span class="special">::</span><span class="identifier">attr</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Using <tt class="computeroutput"><span class="identifier">attr</span></tt> with literals:
+ </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">test_parser_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">(</span><span class="string">"boost"</span><span class="special">),</span> <span class="identifier">str</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">str</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// will print 'boost'
+</span>
+<span class="keyword">double</span> <span class="identifier">d</span><span class="special">;</span>
+<span class="identifier">test_parser_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">(</span><span class="number">1.0</span><span class="special">),</span> <span class="identifier">d</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">d</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// will print '1.0'
+</span></pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Using <tt class="computeroutput"><span class="identifier">attr</span></tt> with Phoenix function objects:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">double</span> <span class="identifier">d</span> <span class="special">=</span> <span class="number">0.0</span><span class="special">,</span> <span class="identifier">d1</span> <span class="special">=</span> <span class="number">1.2</span><span class="special">;</span>
+<span class="identifier">test_parser_attr</span><span class="special">(</span><span class="string">""</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">(</span><span class="identifier">phx</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span><span class="identifier">d1</span><span class="special">)),</span> <span class="identifier">d</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">d</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">// will print '1.2'
+</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>
@@ -55,7 +312,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="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="auxiliary/attr.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="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="directive.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary/attr.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary/attr.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary/attr.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
consuming any input
</li></ul></div>
<a name="spirit.qi.reference.auxiliary.attr.description"></a><h6>
-<a name="id457810"></a>
+<a name="id457956"></a>
<a href="attr.html#spirit.qi.reference.auxiliary.attr.description">Description</a>
</h6>
<p>
@@ -45,7 +45,7 @@
an attribute to the parsing process.
</p>
<a name="spirit.qi.reference.auxiliary.attr.header"></a><h6>
-<a name="id457865"></a>
+<a name="id458011"></a>
<a href="attr.html#spirit.qi.reference.auxiliary.attr.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/auxiliary/attr.hpp>
@@ -55,7 +55,7 @@
Also, see Include Structure.
</p>
<a name="spirit.qi.reference.auxiliary.attr.model_of"></a><h6>
-<a name="id457978"></a>
+<a name="id458124"></a>
<a href="attr.html#spirit.qi.reference.auxiliary.attr.model_of">Model of</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -83,7 +83,7 @@
</dl>
</div>
<a name="spirit.qi.reference.auxiliary.attr.expression_semantics"></a><h6>
-<a name="id458096"></a>
+<a name="id458242"></a>
<a href="attr.html#spirit.qi.reference.auxiliary.attr.expression_semantics">Expression
Semantics</a>
</h6>
@@ -128,7 +128,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.auxiliary.attr.attributes"></a><h6>
-<a name="id458323"></a>
+<a name="id458469"></a>
<a href="attr.html#spirit.qi.reference.auxiliary.attr.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -166,7 +166,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.auxiliary.attr.complexity"></a><h6>
-<a name="id458519"></a>
+<a name="id458665"></a>
<a href="attr.html#spirit.qi.reference.auxiliary.attr.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -183,7 +183,7 @@
done.
</p>
<a name="spirit.qi.reference.auxiliary.attr.example"></a><h6>
-<a name="id458559"></a>
+<a name="id458705"></a>
<a href="attr.html#spirit.qi.reference.auxiliary.attr.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/basics.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/basics.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/basics.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="../reference.html" title="Reference">
-<link rel="previous" href="parser_concepts/naryparser.html" title="NaryParser">
+<link rel="previous" href="parser_concepts.html" title="Parser Concepts">
<link rel="next" href="auxiliary.html" title="Auxiliary">
</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="parser_concepts/naryparser.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.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="parser_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="auxiliary.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.qi.reference.basics.lazy_argument"></a><h5>
-<a name="id457085"></a>
+<a name="id457231"></a>
<a href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy Argument</a>
</h5>
<p>
@@ -54,7 +54,7 @@
second argument. This is done for uniformity with Semantic Actions).
</p>
<a name="spirit.qi.reference.basics.character_encoding_namespace"></a><h5>
-<a name="id457293"></a>
+<a name="id457439"></a>
<a href="basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
Encoding Namespace</a>
</h5>
@@ -126,7 +126,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="parser_concepts/naryparser.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.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="parser_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="auxiliary.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/directive.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/directive.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/directive.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,8 +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="auxiliary/attr.html" title="attr">
-<link rel="next" href="directive/no_case.html" title=" no_case">
+<link rel="previous" href="auxiliary.html" title="Auxiliary">
+<link rel="next" href="string.html" title="String">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="auxiliary/attr.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/no_case.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="auxiliary.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="string.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -29,7 +29,7 @@
</h4></div></div>
<div></div>
</div>
-<div class="toc"><dl><dt><span class="section"> no_case</span></dt></dl></div>
+<div class="toc"><dl><dt><span class="section"> no_case</span></dt></dl></div>
<p>
This module includes different directives usable to augment and parametrize
other parsers. It includes the <tt class="computeroutput"><span class="identifier">no_case</span></tt>,
@@ -37,12 +37,267 @@
<tt class="computeroutput"><span class="identifier">raw</span></tt>, and <tt class="computeroutput"><span class="identifier">skip</span></tt> directives.
</p>
<a name="spirit.qi.reference.directive.module_header"></a><h5>
-<a name="id459994"></a>
+<a name="id460140"></a>
<a href="directive.html#spirit.qi.reference.directive.module_header">Module Header</a>
</h5>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/directive.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi_directive</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.directive.no_case"></a> no_case
+</h5></div></div>
+<div></div>
+</div>
+<div class="itemizedlist"><ul type="disc"><li>
+<tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">no_case</span></tt>: generates a parser directive
+ forcing all embedded parsers to do case in-sensitive matching.
+ </li></ul></div>
+<a name="spirit.qi.reference.directive.no_case.description"></a><h6>
+<a name="id460299"></a>
+ Description
+ </h6>
+<p>
+ The <tt class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></tt>
+ directive does not consume any input on it's own. The actual matching
+ is done by the embedded parsers. It's purpose is to force all matching
+ of all embedded parsers to be case in-sensitive.
+ </p>
+<a name="spirit.qi.reference.directive.no_case.header"></a><h6>
+<a name="id460348"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/directive/no_case.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi_no_case</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.qi.reference.directive.no_case.model_of"></a><h6>
+<a name="id460461"></a>
+ <a href="directive.html#spirit.qi.reference.directive.no_case.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ This directive is special as it does not conform to any parser concept.
+ It is a pure modifier directive.
+ </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">p</span></tt></span></dt>
+<dd><p>
+ A arbitrary complex parser expression embedded inside the <tt class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></tt>
+ directive.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.directive.no_case.expression_semantics"></a><h6>
+<a name="id460545"></a>
+ <a href="directive.html#spirit.qi.reference.directive.no_case.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ The <tt class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></tt>
+ directive has no special parser semantics. It is a pure modifier directive.
+ It indirectly influences the way all embedded parsers do their matching.
+ It adds information (the <tt class="computeroutput"><span class="identifier">tag</span><span class="special">::</span><span class="identifier">no_case</span></tt>)
+ to the <tt class="computeroutput"><span class="identifier">Modifier</span></tt> template
+ parameter used while tranforming the <tt class="computeroutput"><span class="identifier">proto</span><span class="special">::</span><span class="identifier">expr</span></tt>
+ into the corresponding parser expression. This is achieved by the following
+ specialization:
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">spirit</span>
+<span class="special">{</span>
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">CharEncoding</span><span class="special">></span>
+ <span class="keyword">struct</span> <span class="identifier">is_modifier_directive</span><span class="special"><</span>
+ <span class="identifier">qi</span><span class="special">::</span><span class="identifier">domain</span>
+ <span class="special">,</span> <span class="identifier">tag</span><span class="special">::</span><span class="identifier">char_code</span><span class="special"><</span><span class="identifier">tag</span><span class="special">::</span><span class="identifier">no_case</span><span class="special">,</span> <span class="identifier">CharEncoding</span><span class="special">></span> <span class="special">></span>
+ <span class="special">:</span> <span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span>
+ <span class="special">{};</span>
+<span class="special">}}</span>
+</pre>
+<p>
+ (for more details see the section describing the compilation process
+ of the Boost.Proto
+ expression into the corresponding parser expressions).
+ </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">no_case</span><span class="special">[</span><span class="identifier">p</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ Force <tt class="computeroutput"><span class="identifier">p</span></tt> to match
+ its input case in-sensitive.
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.qi.reference.directive.no_case.attributes"></a><h6>
+<a name="id460968"></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">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">A</span></tt>, the no_case
+ directive exposes the attribute of its embedded parser.
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.qi.reference.directive.no_case.complexity"></a><h6>
+<a name="id461085"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The complexity is defined by the complexity of the embedded parser
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.qi.reference.directive.no_case.example"></a><h6>
+<a name="id461122"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">P</span><span class="special">></span>
+<span class="keyword">void</span> <span class="identifier">test_parser</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">input</span><span class="special">,</span> <span class="identifier">P</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">p</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">input</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
+ <span class="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">qi</span><span class="special">::</span><span class="identifier">parse</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">p</span><span class="special">))</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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 declaration:
+ </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">qi</span><span class="special">::</span><span class="identifier">parse</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">qi</span><span class="special">::</span><span class="identifier">symbols</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">no_case</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Simple usage of <tt class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></tt>:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"X"</span><span class="special">,</span> <span class="identifier">no_case</span><span class="special">[</span><span class="identifier">char_</span><span class="special">(</span><span class="char">'x'</span><span class="special">)]);</span>
+<span class="identifier">test_parser</span><span class="special">(</span><span class="string">"6"</span><span class="special">,</span> <span class="identifier">no_case</span><span class="special">[</span><span class="identifier">alnum</span><span class="special">]);</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ A more sophisticated use case of <tt class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></tt> in conjunction with a symbol table
+ (see symbols<Ch, T>
+ for more details):
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">symbols</span><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">sym</span><span class="special">;</span>
+
+<span class="identifier">sym</span><span class="special">.</span><span class="identifier">add</span>
+ <span class="special">(</span><span class="string">"apple"</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span> <span class="comment">// symbol strings are added in lowercase...
+</span> <span class="special">(</span><span class="string">"banana"</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span>
+ <span class="special">(</span><span class="string">"orange"</span><span class="special">,</span> <span class="number">3</span><span class="special">)</span>
+<span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
+<span class="comment">// ...because sym is used for case-insensitive parsing
+</span><span class="identifier">test_parser_attr</span><span class="special">(</span><span class="string">"Apple"</span><span class="special">,</span> <span class="identifier">no_case</span><span class="special">[</span> <span class="identifier">sym</span> <span class="special">],</span> <span class="identifier">i</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">i</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="identifier">test_parser_attr</span><span class="special">(</span><span class="string">"ORANGE"</span><span class="special">,</span> <span class="identifier">no_case</span><span class="special">[</span> <span class="identifier">sym</span> <span class="special">],</span> <span class="identifier">i</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">i</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</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>
@@ -55,7 +310,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="auxiliary/attr.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/no_case.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="auxiliary.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="string.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -34,7 +34,7 @@
forcing all embedded parsers to do case in-sensitive matching.
</li></ul></div>
<a name="spirit.qi.reference.directive.no_case.description"></a><h6>
-<a name="id460152"></a>
+<a name="id460299"></a>
<a href="no_case.html#spirit.qi.reference.directive.no_case.description">Description</a>
</h6>
<p>
@@ -44,7 +44,7 @@
of all embedded parsers to be case in-sensitive.
</p>
<a name="spirit.qi.reference.directive.no_case.header"></a><h6>
-<a name="id460202"></a>
+<a name="id460348"></a>
<a href="no_case.html#spirit.qi.reference.directive.no_case.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/directive/no_case.hpp>
@@ -54,7 +54,7 @@
Also, see Include Structure.
</p>
<a name="spirit.qi.reference.directive.no_case.model_of"></a><h6>
-<a name="id460314"></a>
+<a name="id460461"></a>
<a href="no_case.html#spirit.qi.reference.directive.no_case.model_of">Model
of</a>
</h6>
@@ -79,7 +79,7 @@
</dl>
</div>
<a name="spirit.qi.reference.directive.no_case.expression_semantics"></a><h6>
-<a name="id460399"></a>
+<a name="id460545"></a>
<a href="no_case.html#spirit.qi.reference.directive.no_case.expression_semantics">Expression
Semantics</a>
</h6>
@@ -132,7 +132,7 @@
</tr></tbody>
</table></div>
<a name="spirit.qi.reference.directive.no_case.attributes"></a><h6>
-<a name="id460822"></a>
+<a name="id460968"></a>
<a href="no_case.html#spirit.qi.reference.directive.no_case.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -159,7 +159,7 @@
</tr></tbody>
</table></div>
<a name="spirit.qi.reference.directive.no_case.complexity"></a><h6>
-<a name="id460940"></a>
+<a name="id461085"></a>
<a href="no_case.html#spirit.qi.reference.directive.no_case.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -172,7 +172,7 @@
</p>
</blockquote></div>
<a name="spirit.qi.reference.directive.no_case.example"></a><h6>
-<a name="id460977"></a>
+<a name="id461122"></a>
<a href="no_case.html#spirit.qi.reference.directive.no_case.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -7,7 +7,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="parser_concepts/parser.html" title="Parser">
+<link rel="next" href="basics.html" title="Basics">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,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="parser_concepts/parser.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="basics.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -30,11 +30,11 @@
<div></div>
</div>
<div class="toc"><dl>
-<dt><span class="section">Parser</span></dt>
-<dt><span class="section">PrimitiveParser</span></dt>
-<dt><span class="section">UnaryParser</span></dt>
-<dt><span class="section">BinaryParser</span></dt>
-<dt><span class="section">NaryParser</span></dt>
+<dt><span class="section">Parser</span></dt>
+<dt><span class="section">PrimitiveParser</span></dt>
+<dt><span class="section">UnaryParser</span></dt>
+<dt><span class="section">BinaryParser</span></dt>
+<dt><span class="section">NaryParser</span></dt>
</dl></div>
<p>
Spirit.Qi parsers fall into a couple of generalized concepts. The <span class="emphasis"><em>Parser</em></span>
@@ -47,6 +47,755 @@
<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.qi.reference.parser_concepts.parser"></a>Parser
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.qi.reference.parser_concepts.parser.description"></a><h6>
+<a name="id453137"></a>
+ Description
+ </h6>
+<p>
+ The <span class="emphasis"><em>Parser</em></span> is the most fundamental concept. A Parser
+ has a member function, <tt class="computeroutput"><span class="identifier">parse</span></tt>,
+ that accepts a first-last <tt class="computeroutput"><span class="identifier">ForwardIterator</span></tt>
+ pair and returns bool as its result. The iterators delimit the data being
+ parsed. The Parser's <tt class="computeroutput"><span class="identifier">parse</span></tt>
+ member function returns <tt class="computeroutput"><span class="keyword">true</span></tt>
+ if the parse succeeds, in which case the first iterator is advanced accordingly.
+ Each Parser can represent a specific pattern or algorithm, or it can
+ be a more complex parser formed as a composition of other Parsers.
+ </p>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">p</span></tt></span></dt>
+<dd><p>
+ A <tt class="computeroutput"><span class="identifier">Parser</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">P</span></tt></span></dt>
+<dd><p>
+ A <tt class="computeroutput"><span class="identifier">Parser</span></tt> type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">Iter</span></tt></span></dt>
+<dd><p>
+ a <tt class="computeroutput"><span class="identifier">ForwardIterator</span></tt>
+ type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">f</span></tt>,
+ <tt class="computeroutput"><span class="identifier">l</span></tt></span></dt>
+<dd><p>
+ <tt class="computeroutput"><span class="identifier">ForwardIterator</span></tt>.
+ first/last iterator pair.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">Context</span></tt></span></dt>
+<dd><p>
+ The parser's Context type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">context</span></tt></span></dt>
+<dd><p>
+ The parser's Context, or <tt class="computeroutput"><span class="identifier">unused</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">skip</span></tt></span></dt>
+<dd><p>
+ A skip Parser, 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 Attribute, or <tt class="computeroutput"><span class="identifier">unused</span></tt>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.parser_concepts.parser.valid_expressions"></a><h6>
+<a name="id453511"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In the expressions below, the behavior of the parser, <tt class="computeroutput"><span class="identifier">p</span></tt>,
+ how <tt class="computeroutput"><span class="identifier">skip</span></tt> and <tt class="computeroutput"><span class="identifier">attrib</span></tt> are handled by <tt class="computeroutput"><span class="identifier">p</span></tt>, are left unspecified in the base
+ <tt class="computeroutput"><span class="identifier">Parser</span></tt> concept. These
+ are specified in subsequent, more refined concepts and by the actual
+ models therof.
+ </p>
+<p>
+ For any Parser 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">p</span><span class="special">.</span><span class="identifier">parse</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">context</span><span class="special">,</span> <span class="identifier">skip</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">)</span></pre>
+<p>
+ </p>
+</td>
+<td><p>
+ Match the input sequence starting from <tt class="computeroutput"><span class="identifier">f</span></tt>.
+ 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">p</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 Parser.
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">info</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.parser.type_expressions"></a><h6>
+<a name="id453874"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser.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">P</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">attribute</span><span class="special"><</span><span class="identifier">Context</span><span class="special">,</span> <span class="identifier">Iter</span><span class="special">>::</span><span class="identifier">type</span></tt>
+ </p></td>
+<td><p>
+ The Parser's expected attribute.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</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">P</span></tt>
+ is a Parser, <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.qi.reference.parser_concepts.parser.postcondition"></a><h6>
+<a name="id454139"></a>
+ Postcondition
+ </h6>
+<p>
+ Upon return from <tt class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">parse</span></tt> the following post conditions
+ should hold:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ On a successful match, <tt class="computeroutput"><span class="identifier">f</span></tt>
+ is positioned one past the first non-matching character/token.
+ </li>
+<li>
+ On a failed match, if a <tt class="computeroutput"><span class="identifier">skip</span></tt>
+ parser is <tt class="computeroutput"><span class="identifier">unused</span></tt>,
+ <tt class="computeroutput"><span class="identifier">f</span></tt> is restored to its
+ original position prior to entry.
+ </li>
+<li>
+ On a failed match, if a <tt class="computeroutput"><span class="identifier">skip</span></tt>
+ parser is not <tt class="computeroutput"><span class="identifier">unused</span></tt>,
+ <tt class="computeroutput"><span class="identifier">f</span></tt> is positioned one
+ past the first character/token not matching <tt class="computeroutput"><span class="identifier">skip</span></tt>.
+ </li>
+<li>
+ On a failed match, <tt class="computeroutput"><span class="identifier">attrib</span></tt>
+ is left untouched.
+ </li>
+<li>
+ No post-skips: trailing <tt class="computeroutput"><span class="identifier">skip</span></tt>
+ characters/tokens will not be skipped.
+ </li>
+</ul></div>
+<a name="spirit.qi.reference.parser_concepts.parser.models"></a><h6>
+<a name="id454341"></a>
+ Models
+ </h6>
+<p>
+ All parsers in Spirit.Qi are models of the <span class="emphasis"><em>Parser</em></span>
+ concept.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.primitiveparser"></a>PrimitiveParser
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.qi.reference.parser_concepts.primitiveparser.description"></a><h6>
+<a name="id454395"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>PrimitiveParser</em></span> is the most basic building block
+ that the client uses to build more complex parsers.
+ </p>
+<a name="spirit.qi.reference.parser_concepts.primitiveparser.refinement_of"></a><h6>
+<a name="id454431"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Parser
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.qi.reference.parser_concepts.primitiveparser.pre_skip"></a><h6>
+<a name="id454486"></a>
+ Pre-skip
+ </h6>
+<p>
+ Upon entry to the <tt class="computeroutput"><span class="identifier">parse</span></tt>
+ member function, a PrimitiveParser is required to do a pre-skip. Leading
+ <tt class="computeroutput"><span class="identifier">skip</span></tt> characters/tokens
+ will be skipped prior to parsing. Only PrimitiveParsers are required
+ to perform this pre-skip. This is typically carried out through a call
+ to <tt class="computeroutput"><span class="identifier">qi</span><span class="special">::</span><span class="identifier">skip_over</span></tt>:
+ </p>
+<pre class="programlisting"><span class="identifier">qi</span><span class="special">::</span><span class="identifier">skip_over</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">skip</span><span class="special">);</span>
+</pre>
+<a name="spirit.qi.reference.parser_concepts.primitiveparser.type_expressions"></a><h6>
+<a name="id454625"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser.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_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</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">P</span></tt>,
+ is a PrimitiveParser, <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.qi.reference.parser_concepts.primitiveparser.models"></a><h6>
+<a name="id454812"></a>
+ Models
+ </h6>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add links to <span class="emphasis"><em>PrimitiveParser</em></span>
+ models here.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.unaryparser"></a>UnaryParser
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.qi.reference.parser_concepts.unaryparser.description"></a><h6>
+<a name="id454871"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>UnaryParser</em></span> is a composite parser that has a single
+ subject. The UnaryParser may change the behavior of its subject following
+ the Delegate Design Pattern.
+ </p>
+<a name="spirit.qi.reference.parser_concepts.unaryparser.refinement_of"></a><h6>
+<a name="id454906"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Parser
+ </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">p</span></tt></span></dt>
+<dd><p>
+ A UnaryParser.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">P</span></tt></span></dt>
+<dd><p>
+ A UnaryParser type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.parser_concepts.unaryparser.valid_expressions"></a><h6>
+<a name="id455014"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in Parser, for any UnaryParser
+ 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">p</span><span class="special">.</span><span class="identifier">subject</span></tt>
+ </p></td>
+<td><p>
+ Subject parser.
+ </p></td>
+<td><p>
+ Parser
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.unaryparser.type_expressions"></a><h6>
+<a name="id455170"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser.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">P</span><span class="special">::</span><span class="identifier">subject_type</span></tt>
+ </p></td>
+<td><p>
+ The subject parser type.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_unary_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</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">P</span></tt>
+ is a UnaryParser, <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.qi.reference.parser_concepts.unaryparser.invariants"></a><h6>
+<a name="id455394"></a>
+ Invariants
+ </h6>
+<p>
+ For any UnaryParser, <tt class="computeroutput"><span class="identifier">P</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_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">::</span><span class="identifier">subject_type</span><span class="special">>::</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.qi.reference.parser_concepts.unaryparser.models"></a><h6>
+<a name="id455517"></a>
+ Models
+ </h6>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add links to models of UnaryParser
+ concept
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.binaryparser"></a>BinaryParser
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.description"></a><h6>
+<a name="id455573"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>BinaryParser</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 BinaryParser allows its
+ subjects to be treated in the same way as a single instance of a Parser
+ following the Composite Design Pattern.
+ </p>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.refinement_of"></a><h6>
+<a name="id455652"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Parser
+ </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">p</span></tt></span></dt>
+<dd><p>
+ A BinaryParser.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">P</span></tt></span></dt>
+<dd><p>
+ A BinaryParser type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.valid_expressions"></a><h6>
+<a name="id455760"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in Parser, for any BinaryParser
+ 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">p</span><span class="special">.</span><span class="identifier">left</span></tt>
+ </p></td>
+<td><p>
+ Left parser.
+ </p></td>
+<td><p>
+ Parser
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">right</span></tt>
+ </p></td>
+<td><p>
+ Right parser.
+ </p></td>
+<td><p>
+ Parser
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.type_expressions"></a><h6>
+<a name="id455979"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser.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">P</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">P</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_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</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">P</span></tt>
+ is a BinaryParser, <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.qi.reference.parser_concepts.binaryparser.invariants"></a><h6>
+<a name="id456245"></a>
+ Invariants
+ </h6>
+<p>
+ For any BinaryParser, <tt class="computeroutput"><span class="identifier">P</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_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">::</span><span class="identifier">left_type</span><span class="special">>::</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_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">::</span><span class="identifier">right_type</span><span class="special">>::</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.qi.reference.parser_concepts.binaryparser.models"></a><h6>
+<a name="id456445"></a>
+ Models
+ </h6>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add links to models of BinaryParser
+ concept
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.naryparser"></a>NaryParser
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.qi.reference.parser_concepts.naryparser.description"></a><h6>
+<a name="id456499"></a>
+ Description
+ </h6>
+<p>
+ <span class="emphasis"><em>NaryParser</em></span> is a composite parser that has one or
+ more subjects. The NaryParser allows its subjects to be treated in the
+ same way as a single instance of a Parser following the Composite
+ Design Pattern.
+ </p>
+<a name="spirit.qi.reference.parser_concepts.naryparser.refinement_of"></a><h6>
+<a name="id456554"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ Parser
+ </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">p</span></tt></span></dt>
+<dd><p>
+ A NaryParser.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">P</span></tt></span></dt>
+<dd><p>
+ A NaryParser type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.parser_concepts.naryparser.valid_expressions"></a><h6>
+<a name="id456661"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in Parser, for any NaryParser 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">p</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 Parser types.
+ </p></td>
+</tr></tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.naryparser.type_expressions"></a><h6>
+<a name="id456825"></a>
+ <a href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser.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">p</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_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">>::</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">P</span></tt>
+ is a NaryParser, <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.qi.reference.parser_concepts.naryparser.invariants"></a><h6>
+<a name="id457051"></a>
+ Invariants
+ </h6>
+<p>
+ For each element, <tt class="computeroutput"><span class="identifier">E</span></tt>,
+ in any NaryParser, <tt class="computeroutput"><span class="identifier">P</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_parser</span><span class="special"><</span><span class="identifier">E</span><span class="special">>::</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.qi.reference.parser_concepts.naryparser.models"></a><h6>
+<a name="id457176"></a>
+ Models
+ </h6>
+<p>
+ <span class="bold"><b>FIXME</b></span> Add links to models of NaryParser
+ concept
+ </p>
+</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -59,7 +808,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="parser_concepts/parser.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="basics.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/binaryparser.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/binaryparser.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/binaryparser.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.qi.reference.parser_concepts.binaryparser.description"></a><h6>
-<a name="id455426"></a>
+<a name="id455573"></a>
<a href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.description">Description</a>
</h6>
<p>
@@ -40,7 +40,7 @@
following the Composite Design Pattern.
</p>
<a name="spirit.qi.reference.parser_concepts.binaryparser.refinement_of"></a><h6>
-<a name="id455505"></a>
+<a name="id455652"></a>
<a href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.refinement_of">Refinement
of</a>
</h6>
@@ -67,7 +67,7 @@
</dl>
</div>
<a name="spirit.qi.reference.parser_concepts.binaryparser.valid_expressions"></a><h6>
-<a name="id455613"></a>
+<a name="id455760"></a>
<a href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.valid_expressions">Valid
Expressions</a>
</h6>
@@ -118,7 +118,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.binaryparser.type_expressions"></a><h6>
-<a name="id455833"></a>
+<a name="id455979"></a>
<a href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.type_expressions">Type
Expressions</a>
</h6>
@@ -167,7 +167,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.binaryparser.invariants"></a><h6>
-<a name="id456099"></a>
+<a name="id456245"></a>
<a href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.invariants">Invariants</a>
</h6>
<p>
@@ -183,7 +183,7 @@
</li>
</ul></div>
<a name="spirit.qi.reference.parser_concepts.binaryparser.models"></a><h6>
-<a name="id456299"></a>
+<a name="id456445"></a>
<a href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.models">Models</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/naryparser.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/naryparser.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/naryparser.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.qi.reference.parser_concepts.naryparser.description"></a><h6>
-<a name="id456353"></a>
+<a name="id456499"></a>
<a href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.description">Description</a>
</h6>
<p>
@@ -40,7 +40,7 @@
Design Pattern.
</p>
<a name="spirit.qi.reference.parser_concepts.naryparser.refinement_of"></a><h6>
-<a name="id456407"></a>
+<a name="id456554"></a>
<a href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.refinement_of">Refinement
of</a>
</h6>
@@ -67,7 +67,7 @@
</dl>
</div>
<a name="spirit.qi.reference.parser_concepts.naryparser.valid_expressions"></a><h6>
-<a name="id456514"></a>
+<a name="id456661"></a>
<a href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.valid_expressions">Valid
Expressions</a>
</h6>
@@ -106,7 +106,7 @@
</tr></tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.naryparser.type_expressions"></a><h6>
-<a name="id456679"></a>
+<a name="id456825"></a>
<a href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.type_expressions">Type
Expressions</a>
</h6>
@@ -147,7 +147,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.naryparser.invariants"></a><h6>
-<a name="id456905"></a>
+<a name="id457051"></a>
<a href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.invariants">Invariants</a>
</h6>
<p>
@@ -159,7 +159,7 @@
<tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_parser</span><span class="special"><</span><span class="identifier">E</span><span class="special">>::</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.qi.reference.parser_concepts.naryparser.models"></a><h6>
-<a name="id457030"></a>
+<a name="id457176"></a>
<a href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.models">Models</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/parser.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/parser.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/parser.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.qi.reference.parser_concepts.parser.description"></a><h6>
-<a name="id452990"></a>
+<a name="id453137"></a>
<a href="parser.html#spirit.qi.reference.parser_concepts.parser.description">Description</a>
</h6>
<p>
@@ -85,7 +85,7 @@
</dl>
</div>
<a name="spirit.qi.reference.parser_concepts.parser.valid_expressions"></a><h6>
-<a name="id453364"></a>
+<a name="id453511"></a>
<a href="parser.html#spirit.qi.reference.parser_concepts.parser.valid_expressions">Valid
Expressions</a>
</h6>
@@ -149,7 +149,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.parser.type_expressions"></a><h6>
-<a name="id453728"></a>
+<a name="id453874"></a>
<a href="parser.html#spirit.qi.reference.parser_concepts.parser.type_expressions">Type
Expressions</a>
</h6>
@@ -190,7 +190,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.parser.postcondition"></a><h6>
-<a name="id453993"></a>
+<a name="id454139"></a>
<a href="parser.html#spirit.qi.reference.parser_concepts.parser.postcondition">Postcondition</a>
</h6>
<p>
@@ -224,7 +224,7 @@
</li>
</ul></div>
<a name="spirit.qi.reference.parser_concepts.parser.models"></a><h6>
-<a name="id454195"></a>
+<a name="id454341"></a>
<a href="parser.html#spirit.qi.reference.parser_concepts.parser.models">Models</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.qi.reference.parser_concepts.primitiveparser.description"></a><h6>
-<a name="id454249"></a>
+<a name="id454395"></a>
<a href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.description">Description</a>
</h6>
<p>
@@ -38,7 +38,7 @@
that the client uses to build more complex parsers.
</p>
<a name="spirit.qi.reference.parser_concepts.primitiveparser.refinement_of"></a><h6>
-<a name="id454285"></a>
+<a name="id454431"></a>
<a href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.refinement_of">Refinement
of</a>
</h6>
@@ -52,7 +52,7 @@
</p>
</blockquote></div>
<a name="spirit.qi.reference.parser_concepts.primitiveparser.pre_skip"></a><h6>
-<a name="id454340"></a>
+<a name="id454486"></a>
<a href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.pre_skip">Pre-skip</a>
</h6>
<p>
@@ -66,7 +66,7 @@
<pre class="programlisting"><span class="identifier">qi</span><span class="special">::</span><span class="identifier">skip_over</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">l</span><span class="special">,</span> <span class="identifier">skip</span><span class="special">);</span>
</pre>
<a name="spirit.qi.reference.parser_concepts.primitiveparser.type_expressions"></a><h6>
-<a name="id454478"></a>
+<a name="id454625"></a>
<a href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.type_expressions">Type
Expressions</a>
</h6>
@@ -97,7 +97,7 @@
</tr></tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.primitiveparser.models"></a><h6>
-<a name="id454665"></a>
+<a name="id454812"></a>
<a href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.models">Models</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/unaryparser.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/unaryparser.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/unaryparser.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.qi.reference.parser_concepts.unaryparser.description"></a><h6>
-<a name="id454724"></a>
+<a name="id454871"></a>
<a href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.description">Description</a>
</h6>
<p>
@@ -39,7 +39,7 @@
the Delegate Design Pattern.
</p>
<a name="spirit.qi.reference.parser_concepts.unaryparser.refinement_of"></a><h6>
-<a name="id454760"></a>
+<a name="id454906"></a>
<a href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.refinement_of">Refinement
of</a>
</h6>
@@ -66,7 +66,7 @@
</dl>
</div>
<a name="spirit.qi.reference.parser_concepts.unaryparser.valid_expressions"></a><h6>
-<a name="id454868"></a>
+<a name="id455014"></a>
<a href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.valid_expressions">Valid
Expressions</a>
</h6>
@@ -104,7 +104,7 @@
</tr></tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.unaryparser.type_expressions"></a><h6>
-<a name="id455023"></a>
+<a name="id455170"></a>
<a href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.type_expressions">Type
Expressions</a>
</h6>
@@ -145,7 +145,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.parser_concepts.unaryparser.invariants"></a><h6>
-<a name="id455247"></a>
+<a name="id455394"></a>
<a href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.invariants">Invariants</a>
</h6>
<p>
@@ -156,7 +156,7 @@
<tt class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">is_parser</span><span class="special"><</span><span class="identifier">P</span><span class="special">::</span><span class="identifier">subject_type</span><span class="special">>::</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.qi.reference.parser_concepts.unaryparser.models"></a><h6>
-<a name="id455370"></a>
+<a name="id455517"></a>
<a href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.models">Models</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/string.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/string.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/string.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -6,8 +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="directive/no_case.html" title=" no_case">
-<link rel="next" href="string/lit_string.html" title="lit/string">
+<link rel="previous" href="directive.html" title=" Directive">
+<link rel="next" href="../../karma.html" title=" Karma - Writing Generators">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="directive/no_case.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="string/lit_string.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directive.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.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage">
@@ -30,20 +30,827 @@
<div></div>
</div>
<div class="toc"><dl>
-<dt><span class="section">lit/string</span></dt>
-<dt><span class="section">symbols</span></dt>
+<dt><span class="section">lit/string</span></dt>
+<dt><span class="section">symbols</span></dt>
</dl></div>
<p>
This module includes parsers for strings. Currently, this module includes
the literal and string parsers and the symbol table.
</p>
<a name="spirit.qi.reference.string.module_header"></a><h5>
-<a name="id462485"></a>
+<a name="id462631"></a>
<a href="string.html#spirit.qi.reference.string.module_header">Module Header</a>
</h5>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/string.hpp>
</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi_string</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
</pre>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.string.lit_string"></a>lit/string
+</h5></div></div>
+<div></div>
+</div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">lit</span></tt>: generates a string parser (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">qi</span><span class="special">::</span><span class="identifier">lit</span></tt>)
+ </li>
+<li>
+<tt class="computeroutput"><span class="identifier">NS</span><span class="special">::</span><span class="identifier">string</span></tt>: generates a string parser
+ for the character encoding. <tt class="computeroutput"><span class="identifier">NS</span></tt>
+ is a <a href="basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
+ Encoding Namespace</a>.
+ </li>
+</ul></div>
+<a name="spirit.qi.reference.string.lit_string.description"></a><h6>
+<a name="id462876"></a>
+ Description
+ </h6>
+<p>
+ The lit/string parser matches a string of characters. The lit/string
+ parser is an implicit lexeme: the <tt class="computeroutput"><span class="identifier">skip</span></tt>
+ parser is not applied in between characters of the string.
+ </p>
+<a name="spirit.qi.reference.string.lit_string.header"></a><h6>
+<a name="id462920"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/string/lit.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi_lit</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.qi.reference.string.lit_string.model_of"></a><h6>
+<a name="id463033"></a>
+ <a href="string.html#spirit.qi.reference.string.lit_string.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveParser
+ </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">s</span></tt></span></dt>
+<dd><p>
+ A literal string, e.g. "Hello", or a pointer/reference
+ to a null-terminated array of characters or a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">fs</span></tt></span></dt>
+<dd><p>
+ A Lazy Argument
+ that evaluates to a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>
+ 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="basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
+ Encoding Namespace</a>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.string.lit_string.expression_semantics"></a><h6>
+<a name="id463226"></a>
+ <a href="string.html#spirit.qi.reference.string.lit_string.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveParser.
+ </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">s</span></tt>
+ </p></td>
+<td><p>
+ Generate a string parser from a string, <tt class="computeroutput"><span class="identifier">s</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate a string parser from a string, <tt class="computeroutput"><span class="identifier">s</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate a string parser from a string, <tt class="computeroutput"><span class="identifier">s</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">fs</span></tt>
+ </p></td>
+<td><p>
+ Generate a string parser from a string, <tt class="computeroutput"><span class="identifier">s</span></tt>,
+ returned by invoking <tt class="computeroutput"><span class="identifier">fs</span></tt>
+ at parse time. See <a href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
+ Argument</a>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate a string parser from a string, <tt class="computeroutput"><span class="identifier">s</span></tt>,
+ returned by invoking <tt class="computeroutput"><span class="identifier">fs</span></tt>
+ at parse time. See <a href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
+ Argument</a>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Generate a string parser from a string, <tt class="computeroutput"><span class="identifier">s</span></tt>,
+ returned by invoking <tt class="computeroutput"><span class="identifier">fs</span></tt>
+ at parse time. See <a href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
+ Argument</a>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.string.lit_string.attributes"></a><h6>
+<a name="id463702"></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">s</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">s</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">string</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt>
+ where <tt class="computeroutput"><span class="identifier">T</span></tt> is the
+ underlying character type of <tt class="computeroutput"><span class="identifier">s</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">fs</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt>
+ where <tt class="computeroutput"><span class="identifier">T</span></tt> is the
+ underlying character type of <tt class="computeroutput"><span class="identifier">s</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt>
+ where <tt class="computeroutput"><span class="identifier">T</span></tt> is the
+ underlying character type of <tt class="computeroutput"><span class="identifier">s</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">string</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span></tt>
+ where <tt class="computeroutput"><span class="identifier">T</span></tt> is the
+ underlying character type of <tt class="computeroutput"><span class="identifier">s</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.string.lit_string.complexity"></a><h6>
+<a name="id464277"></a>
+ Complexity
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(N)
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ where <tt class="computeroutput"><span class="identifier">N</span></tt> is the number
+ of characters in the string to be parsed.
+ </p>
+<a name="spirit.qi.reference.string.lit_string.example"></a><h6>
+<a name="id464330"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></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"><</span><span class="keyword">typename</span> <span class="identifier">P</span><span class="special">></span>
+<span class="keyword">void</span> <span class="identifier">test_parser</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">input</span><span class="special">,</span> <span class="identifier">P</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">p</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">input</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
+ <span class="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">qi</span><span class="special">::</span><span class="identifier">parse</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">p</span><span class="special">))</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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">qi</span><span class="special">::</span><span class="identifier">parse</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">qi</span><span class="special">::</span><span class="identifier">lit</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">string</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Basic literals:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="string">"boost"</span><span class="special">);</span> <span class="comment">// plain literal
+</span><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">lit</span><span class="special">(</span><span class="string">"boost"</span><span class="special">));</span> <span class="comment">// explicit literal
+</span><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">string</span><span class="special">(</span><span class="string">"boost"</span><span class="special">));</span> <span class="comment">// ascii::string
+</span></pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ From a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></tt>
+ </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">s</span><span class="special">(</span><span class="string">"boost"</span><span class="special">);</span>
+<span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">s</span><span class="special">);</span> <span class="comment">// direct
+</span><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">lit</span><span class="special">(</span><span class="identifier">s</span><span class="special">));</span> <span class="comment">// explicit
+</span><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">string</span><span class="special">(</span><span class="identifier">s</span><span class="special">));</span> <span class="comment">// ascii::string
+</span></pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Lazy strings using Phoenix
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">phx</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">phoenix</span><span class="special">;</span>
+<span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">phx</span><span class="special">::</span><span class="identifier">val</span><span class="special">(</span><span class="string">"boost"</span><span class="special">));</span> <span class="comment">// direct
+</span><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">lit</span><span class="special">(</span><span class="identifier">phx</span><span class="special">::</span><span class="identifier">val</span><span class="special">(</span><span class="string">"boost"</span><span class="special">)));</span> <span class="comment">// explicit
+</span><span class="identifier">test_parser</span><span class="special">(</span><span class="string">"boost"</span><span class="special">,</span> <span class="identifier">string</span><span class="special">(</span><span class="identifier">phx</span><span class="special">::</span><span class="identifier">val</span><span class="special">(</span><span class="string">"boost"</span><span class="special">)));</span> <span class="comment">// ascii::string
+</span></pre>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage">
+<div><div><h5 class="title">
+<a name="spirit.qi.reference.string.symbols"></a>symbols
+</h5></div></div>
+<div></div>
+</div>
+<a name="spirit.qi.reference.string.symbols.description"></a><h6>
+<a name="id465836"></a>
+ Description
+ </h6>
+<p>
+ This class <tt class="computeroutput"><span class="identifier">symbols</span></tt> implements
+ a symbol table: an associative container (or map) of key-value pairs
+ where the keys are strings. The <tt class="computeroutput"><span class="identifier">symbols</span></tt>
+ class can work efficiently with 8, 16, 32 and even 64 bit characters.
+ </p>
+<p>
+ Traditionally, symbol table management is maintained seperately outside
+ the grammar through semantic actions. Contrary to standard practice,
+ the Spirit symbol table class symbols is-a parser. An instance of which
+ may be used anywhere in the grammar specification. It is an example of
+ a dynamic parser. A dynamic parser is characterized by its ability to
+ modify its behavior at run time. Initially, an empty symbols object matches
+ nothing. At any time, symbols may be added, thus, dynamically altering
+ its behavior.
+ </p>
+<a name="spirit.qi.reference.string.symbols.header"></a><h6>
+<a name="id466179"></a>
+ Header
+ </h6>
+<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/string/symbols.hpp>
+</span><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi_symbols</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+</pre>
+<p>
+ Also, see Include Structure.
+ </p>
+<a name="spirit.qi.reference.string.symbols.synopsis"></a><h6>
+<a name="id353129"></a>
+ Synopsis
+ </h6>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Char</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<span class="keyword">struct</span> <span class="identifier">symbols</span><span class="special">;</span>
+</pre>
+<a name="spirit.qi.reference.string.symbols.template_parameters"></a><h6>
+<a name="id353223"></a>
+ <a href="string.html#spirit.qi.reference.string.symbols.template_parameters">Template
+ parameters</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th><p>
+ Parameter
+ </p></th>
+<th><p>
+ Description
+ </p></th>
+<th><p>
+ Default
+ </p></th>
+</tr></thead>
+<tbody>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Char</span></tt>
+ </p></td>
+<td><p>
+ The character type of the symbol strings.
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="keyword">char</span></tt>
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">T</span></tt>
+ </p></td>
+<td><p>
+ The data type associated with each symbol.
+ </p></td>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">unused_type</span></tt>
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.string.symbols.model_of"></a><h6>
+<a name="id466414"></a>
+ Model of
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ PrimitiveParser
+ </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">Sym</span></tt></span></dt>
+<dd><p>
+ A <tt class="computeroutput"><span class="identifier">symbols</span></tt> type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">Char</span></tt></span></dt>
+<dd><p>
+ A character type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">T</span></tt></span></dt>
+<dd><p>
+ A data type.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">sym</span></tt></span></dt>
+<dd><p>
+ A <tt class="computeroutput"><span class="identifier">symbols</span></tt> object.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">sym2</span></tt></span></dt>
+<dd><p>
+ Another <tt class="computeroutput"><span class="identifier">symbols</span></tt> object.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">sseq</span></tt></span></dt>
+<dd><p>
+ An STL container
+ of strings.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">dseq</span></tt></span></dt>
+<dd><p>
+ An STL container
+ of data with <tt class="computeroutput"><span class="identifier">value_type</span></tt>
+ <tt class="computeroutput"><span class="identifier">T</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">s1</span></tt>...<tt class="computeroutput"><span class="identifier">sN</span></tt></span></dt>
+<dd><p>
+ A literal string, e.g. "Hello", or a pointer/reference
+ to a null-terminated array of characters or a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">d1</span></tt>...<tt class="computeroutput"><span class="identifier">dN</span></tt></span></dt>
+<dd><p>
+ Objects of type <tt class="computeroutput"><span class="identifier">T</span></tt>.
+ </p></dd>
+<dt><span class="term"><tt class="computeroutput"><span class="identifier">f</span></tt></span></dt>
+<dd><p>
+ A callable function or function object.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.string.symbols.expression_semantics"></a><h6>
+<a name="id466836"></a>
+ <a href="string.html#spirit.qi.reference.string.symbols.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an expression is defined only where it differs from, or
+ is not defined in PrimitiveParser.
+ </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">Sym</span><span class="special">()</span></tt>
+ </p></td>
+<td><p>
+ Construct an empty symbols.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sym</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Copy construct a symbols from <tt class="computeroutput"><span class="identifier">sym2</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sseq</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Construct symbols from <tt class="computeroutput"><span class="identifier">sseq</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sseq</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Construct symbols from <tt class="computeroutput"><span class="identifier">sseq</span></tt>
+ and <tt class="computeroutput"><span class="identifier">dseq</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span> <span class="special">=</span>
+ <span class="identifier">sym</span></tt>
+ </p></td>
+<td><p>
+ Assign <tt class="computeroutput"><span class="identifier">sym2</span></tt> to
+ <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span> <span class="special">=</span>
+ <span class="identifier">s1</span><span class="special">,</span>
+ <span class="identifier">s2</span><span class="special">,...</span>
+ <span class="identifier">sN</span></tt>
+ </p></td>
+<td><p>
+ Assigns one or more symbols (<tt class="computeroutput"><span class="identifier">s1</span></tt>...<tt class="computeroutput"><span class="identifier">sN</span></tt>) to <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span> <span class="special">+=</span>
+ <span class="identifier">s1</span><span class="special">,</span>
+ <span class="identifier">s2</span><span class="special">,...</span>
+ <span class="identifier">sN</span></tt>
+ </p></td>
+<td><p>
+ Adds one or more symbols (<tt class="computeroutput"><span class="identifier">s1</span></tt>...<tt class="computeroutput"><span class="identifier">sN</span></tt>) to <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">add</span><span class="special">(</span><span class="identifier">s1</span><span class="special">)(</span><span class="identifier">s2</span><span class="special">)...(</span><span class="identifier">sN</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Adds one or more symbols (<tt class="computeroutput"><span class="identifier">s1</span></tt>...<tt class="computeroutput"><span class="identifier">sN</span></tt>) to <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">add</span><span class="special">(</span><span class="identifier">s1</span><span class="special">,</span>
+ <span class="identifier">d1</span><span class="special">)(</span><span class="identifier">s2</span><span class="special">,</span>
+ <span class="identifier">d2</span><span class="special">)...(</span><span class="identifier">sN</span><span class="special">,</span>
+ <span class="identifier">dN</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Adds one or more symbols (<tt class="computeroutput"><span class="identifier">s1</span></tt>...<tt class="computeroutput"><span class="identifier">sN</span></tt>) with associated data (<tt class="computeroutput"><span class="identifier">d1</span></tt>...<tt class="computeroutput"><span class="identifier">dN</span></tt>)
+ to <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span> <span class="special">-=</span>
+ <span class="identifier">s1</span><span class="special">,</span>
+ <span class="identifier">s2</span><span class="special">,...</span>
+ <span class="identifier">sN</span></tt>
+ </p></td>
+<td><p>
+ Remove one or more symbols (<tt class="computeroutput"><span class="identifier">s1</span></tt>...<tt class="computeroutput"><span class="identifier">sN</span></tt>) from <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">remove</span><span class="special">(</span><span class="identifier">s1</span><span class="special">)(</span><span class="identifier">s2</span><span class="special">)...(</span><span class="identifier">sN</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Remove one or more symbols (<tt class="computeroutput"><span class="identifier">s1</span></tt>...<tt class="computeroutput"><span class="identifier">sN</span></tt>) from <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">clear</span><span class="special">()</span></tt>
+ </p></td>
+<td><p>
+ Erase all of the symbols in <tt class="computeroutput"><span class="identifier">sym</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">at</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Returns a reference to the object associated with symbol, <tt class="computeroutput"><span class="identifier">s</span></tt>. If <tt class="computeroutput"><span class="identifier">sym</span></tt>
+ does not already contain such an object, <tt class="computeroutput"><span class="identifier">at</span></tt>
+ inserts the default object <tt class="computeroutput"><span class="identifier">T</span><span class="special">()</span></tt>.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">find</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ Returns a pointer to the object associated with symbol, <tt class="computeroutput"><span class="identifier">s</span></tt>. If <tt class="computeroutput"><span class="identifier">sym</span></tt>
+ does not already contain such an object, <tt class="computeroutput"><span class="identifier">find</span></tt>
+ returns a null pointer.
+ </p></td>
+</tr>
+<tr>
+<td><p>
+ <tt class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">for_each</span><span class="special">(</span><span class="identifier">f</span><span class="special">)</span></tt>
+ </p></td>
+<td><p>
+ For each symbol in <tt class="computeroutput"><span class="identifier">sym</span></tt>,
+ <tt class="computeroutput"><span class="identifier">s</span></tt>, a <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special"><</span><span class="identifier">Char</span><span class="special">></span></tt>
+ with associated data, <tt class="computeroutput"><span class="identifier">d</span></tt>,
+ an object of type <tt class="computeroutput"><span class="identifier">T</span></tt>,
+ invoke <tt class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">,</span>
+ <span class="identifier">d</span><span class="special">)</span></tt>.
+ </p></td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.string.symbols.attributes"></a><h6>
+<a name="id468302"></a>
+ Attributes
+ </h6>
+<p>
+ The attribute of <tt class="computeroutput"><span class="identifier">symbol</span><span class="special"><</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">T</span><span class="special">></span></tt> is <tt class="computeroutput"><span class="identifier">T</span></tt>.
+ </p>
+<a name="spirit.qi.reference.string.symbols.example"></a><h6>
+<a name="id468380"></a>
+ Example
+ </h6>
+<p>
+ Some includes:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">qi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_core</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</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">include</span><span class="special">/</span><span class="identifier">phoenix_operator</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">iostream</span><span class="special">></span>
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">string</span><span class="special">></span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Our test function:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">P</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
+<span class="keyword">void</span> <span class="identifier">test_parser_attr</span><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span><span class="special">*</span> <span class="identifier">input</span><span class="special">,</span> <span class="identifier">P</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">T</span><span class="special">&</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">input</span><span class="special">);</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">f</span><span class="special">(</span><span class="identifier">s</span><span class="special">.</span><span class="identifier">begin</span><span class="special">());</span>
+ <span class="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">qi</span><span class="special">::</span><span class="identifier">parse</span><span class="special">(</span><span class="identifier">f</span><span class="special">,</span> <span class="identifier">s</span><span class="special">.</span><span class="identifier">end</span><span class="special">(),</span> <span class="identifier">p</span><span class="special">,</span> <span class="identifier">attr</span><span class="special">))</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="string">"ok"</span> <span class="special"><<</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"><<</span> <span class="string">"fail"</span> <span class="special"><<</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">qi</span><span class="special">::</span><span class="identifier">parse</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">qi</span><span class="special">::</span><span class="identifier">symbols</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">no_case</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ Symbols with data:
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">symbols</span><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">sym</span><span class="special">;</span>
+
+<span class="identifier">sym</span><span class="special">.</span><span class="identifier">add</span>
+ <span class="special">(</span><span class="string">"Apple"</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span>
+ <span class="special">(</span><span class="string">"Banana"</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span>
+ <span class="special">(</span><span class="string">"Orange"</span><span class="special">,</span> <span class="number">3</span><span class="special">)</span>
+<span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
+<span class="identifier">test_parser_attr</span><span class="special">(</span><span class="string">"Banana"</span><span class="special">,</span> <span class="identifier">sym</span><span class="special">,</span> <span class="identifier">i</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">i</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ When symbols is used for case-insensitive parsing (in a no_case[a]
+ directive), added symbol strings should be in lowercase. Symbol strings
+ containing one or more uppercase characters will not match any input
+ when symbols is used in a <tt class="computeroutput"><span class="identifier">no_case</span></tt>
+ directive.
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting"><span class="identifier">symbols</span><span class="special"><</span><span class="keyword">char</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">sym</span><span class="special">;</span>
+
+<span class="identifier">sym</span><span class="special">.</span><span class="identifier">add</span>
+ <span class="special">(</span><span class="string">"apple"</span><span class="special">,</span> <span class="number">1</span><span class="special">)</span> <span class="comment">// symbol strings are added in lowercase...
+</span> <span class="special">(</span><span class="string">"banana"</span><span class="special">,</span> <span class="number">2</span><span class="special">)</span>
+ <span class="special">(</span><span class="string">"orange"</span><span class="special">,</span> <span class="number">3</span><span class="special">)</span>
+<span class="special">;</span>
+
+<span class="keyword">int</span> <span class="identifier">i</span><span class="special">;</span>
+<span class="comment">// ...because sym is used for case-insensitive parsing
+</span><span class="identifier">test_parser_attr</span><span class="special">(</span><span class="string">"Apple"</span><span class="special">,</span> <span class="identifier">no_case</span><span class="special">[</span> <span class="identifier">sym</span> <span class="special">],</span> <span class="identifier">i</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">i</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="identifier">test_parser_attr</span><span class="special">(</span><span class="string">"ORANGE"</span><span class="special">,</span> <span class="identifier">no_case</span><span class="special">[</span> <span class="identifier">sym</span> <span class="special">],</span> <span class="identifier">i</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">i</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</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>
@@ -56,7 +863,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="directive/no_case.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="string/lit_string.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="directive.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.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/string/lit_string.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/string/lit_string.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/string/lit_string.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -42,7 +42,7 @@
</li>
</ul></div>
<a name="spirit.qi.reference.string.lit_string.description"></a><h6>
-<a name="id462729"></a>
+<a name="id462876"></a>
<a href="lit_string.html#spirit.qi.reference.string.lit_string.description">Description</a>
</h6>
<p>
@@ -51,7 +51,7 @@
parser is not applied in between characters of the string.
</p>
<a name="spirit.qi.reference.string.lit_string.header"></a><h6>
-<a name="id462774"></a>
+<a name="id462920"></a>
<a href="lit_string.html#spirit.qi.reference.string.lit_string.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/string/lit.hpp>
@@ -61,7 +61,7 @@
Also, see Include Structure.
</p>
<a name="spirit.qi.reference.string.lit_string.model_of"></a><h6>
-<a name="id462887"></a>
+<a name="id463033"></a>
<a href="lit_string.html#spirit.qi.reference.string.lit_string.model_of">Model
of</a>
</h6>
@@ -96,7 +96,7 @@
</dl>
</div>
<a name="spirit.qi.reference.string.lit_string.expression_semantics"></a><h6>
-<a name="id463080"></a>
+<a name="id463226"></a>
<a href="lit_string.html#spirit.qi.reference.string.lit_string.expression_semantics">Expression
Semantics</a>
</h6>
@@ -178,7 +178,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.string.lit_string.attributes"></a><h6>
-<a name="id463556"></a>
+<a name="id463702"></a>
<a href="lit_string.html#spirit.qi.reference.string.lit_string.attributes">Attributes</a>
</h6>
<div class="informaltable"><table class="table">
@@ -254,7 +254,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.string.lit_string.complexity"></a><h6>
-<a name="id464130"></a>
+<a name="id464277"></a>
<a href="lit_string.html#spirit.qi.reference.string.lit_string.complexity">Complexity</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -271,7 +271,7 @@
of characters in the string to be parsed.
</p>
<a name="spirit.qi.reference.string.lit_string.example"></a><h6>
-<a name="id464183"></a>
+<a name="id464330"></a>
<a href="lit_string.html#spirit.qi.reference.string.lit_string.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/string/symbols.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/string/symbols.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/string/symbols.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -30,7 +30,7 @@
<div></div>
</div>
<a name="spirit.qi.reference.string.symbols.description"></a><h6>
-<a name="id465689"></a>
+<a name="id465836"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.description">Description</a>
</h6>
<p>
@@ -50,7 +50,7 @@
its behavior.
</p>
<a name="spirit.qi.reference.string.symbols.header"></a><h6>
-<a name="id465759"></a>
+<a name="id466179"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.header">Header</a>
</h6>
<pre class="programlisting"><span class="comment">// forwards to <boost/spirit/home/qi/string/symbols.hpp>
@@ -60,14 +60,14 @@
Also, see Include Structure.
</p>
<a name="spirit.qi.reference.string.symbols.synopsis"></a><h6>
-<a name="id465872"></a>
+<a name="id353129"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.synopsis">Synopsis</a>
</h6>
<pre class="programlisting"><span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Char</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">struct</span> <span class="identifier">symbols</span><span class="special">;</span>
</pre>
<a name="spirit.qi.reference.string.symbols.template_parameters"></a><h6>
-<a name="id465966"></a>
+<a name="id353223"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.template_parameters">Template
parameters</a>
</h6>
@@ -114,7 +114,7 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.string.symbols.model_of"></a><h6>
-<a name="id466130"></a>
+<a name="id466414"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.model_of">Model of</a>
</h6>
<div class="blockquote"><blockquote class="blockquote">
@@ -176,7 +176,7 @@
</dl>
</div>
<a name="spirit.qi.reference.string.symbols.expression_semantics"></a><h6>
-<a name="id466553"></a>
+<a name="id466836"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.expression_semantics">Expression
Semantics</a>
</h6>
@@ -346,14 +346,14 @@
</tbody>
</table></div>
<a name="spirit.qi.reference.string.symbols.attributes"></a><h6>
-<a name="id468018"></a>
+<a name="id468302"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.attributes">Attributes</a>
</h6>
<p>
The attribute of <tt class="computeroutput"><span class="identifier">symbol</span><span class="special"><</span><span class="identifier">Char</span><span class="special">,</span> <span class="identifier">T</span><span class="special">></span></tt> is <tt class="computeroutput"><span class="identifier">T</span></tt>.
</p>
<a name="spirit.qi.reference.string.symbols.example"></a><h6>
-<a name="id468096"></a>
+<a name="id468380"></a>
<a href="symbols.html#spirit.qi.reference.string.symbols.example">Example</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/support/multi_pass.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/support/multi_pass.html (original)
+++ trunk/libs/spirit/doc/html/spirit/support/multi_pass.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -64,7 +64,7 @@
iterator was created.
</p>
<a name="spirit.support.multi_pass.using_the_multi_pass"></a><h4>
-<a name="id604749"></a>
+<a name="id604928"></a>
<a href="multi_pass.html#spirit.support.multi_pass.using_the_multi_pass">Using the
multi_pass</a>
</h4>
@@ -212,7 +212,7 @@
<p>
</p>
<a name="spirit.support.multi_pass.using_the_flush_multi_pass_parser"></a><h4>
-<a name="id606536"></a>
+<a name="id606715"></a>
<a href="multi_pass.html#spirit.support.multi_pass.using_the_flush_multi_pass_parser">Using
the flush_multi_pass parser</a>
</h4>
@@ -234,7 +234,7 @@
thrown.
</p>
<a name="spirit.support.multi_pass.the_multi_pass_policies"></a><h4>
-<a name="id606691"></a>
+<a name="id606870"></a>
<a href="multi_pass.html#spirit.support.multi_pass.the_multi_pass_policies">The multi_pass
Policies</a>
</h4>
@@ -275,7 +275,7 @@
the functionality groups:
</p>
<div class="table">
-<a name="id606855"></a><p class="title"><b>Table 30. Policies needed for default_policy template</b></p>
+<a name="id607033"></a><p class="title"><b>Table 22. Policies needed for default_policy template</b></p>
<table class="table" summary="Policies needed for default_policy template">
<colgroup>
<col>
@@ -338,7 +338,7 @@
implementations.
</p>
<a name="spirit.support.multi_pass.predefined_policies"></a><h4>
-<a name="id607119"></a>
+<a name="id607298"></a>
<a href="multi_pass.html#spirit.support.multi_pass.predefined_policies">Predefined
policies</a>
</h4>
@@ -347,7 +347,7 @@
policies are defined in the namespace <tt class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">spirit</span><span class="special">::</span><span class="identifier">iterator_policies</span></tt>.
</p>
<div class="table">
-<a name="id607184"></a><p class="title"><b>Table 31. Predefined policy classes</b></p>
+<a name="id607362"></a><p class="title"><b>Table 23. Predefined policy classes</b></p>
<table class="table" summary="Predefined policy classes">
<colgroup>
<col>
@@ -528,7 +528,7 @@
</table>
</div>
<a name="spirit.support.multi_pass.combinations__how_to_specify_your_own_custom_multi_pass"></a><h4>
-<a name="id608131"></a>
+<a name="id608310"></a>
<a href="multi_pass.html#spirit.support.multi_pass.combinations__how_to_specify_your_own_custom_multi_pass">Combinations:
How to specify your own custom multi_pass</a>
</h4>
@@ -574,7 +574,7 @@
behaviors while wrapping an <tt class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">istream_iterator</span><span class="special"><</span><span class="keyword">char</span><span class="special">></span></tt>.
</p>
<a name="spirit.support.multi_pass.dealing_with_constant_look_ahead"></a><h4>
-<a name="id608749"></a>
+<a name="id608928"></a>
<a href="multi_pass.html#spirit.support.multi_pass.dealing_with_constant_look_ahead">Dealing
with constant look ahead</a>
</h4>
@@ -593,7 +593,7 @@
StoragePolicy.
</p>
<a name="spirit.support.multi_pass.how_to_write_a_functor_for_use_with_the__code__phrase_role__identifier__functor_input__phrase___code__inputpolicy"></a><h4>
-<a name="id608963"></a>
+<a name="id609143"></a>
<a href="multi_pass.html#spirit.support.multi_pass.how_to_write_a_functor_for_use_with_the__code__phrase_role__identifier__functor_input__phrase___code__inputpolicy">How
to write a functor for use with the <tt class="computeroutput"><span class="identifier">functor_input</span></tt>
InputPolicy</a>
@@ -652,7 +652,7 @@
<span class="special">}</span>
</pre>
<a name="spirit.support.multi_pass.how_to_write_policies_for_use_with_multi_pass"></a><h4>
-<a name="id609782"></a>
+<a name="id609961"></a>
<a href="multi_pass.html#spirit.support.multi_pass.how_to_write_policies_for_use_with_multi_pass">How
to write policies for use with multi_pass</a>
</h4>
@@ -669,7 +669,7 @@
copies of a particular <tt class="computeroutput"><span class="identifier">multi_pass</span></tt>.
</p>
<a name="spirit.support.multi_pass.inputpolicy"></a><h4>
-<a name="id609908"></a>
+<a name="id610087"></a>
<a href="multi_pass.html#spirit.support.multi_pass.inputpolicy">InputPolicy</a>
</h4>
<p>
@@ -765,7 +765,7 @@
constructor of <tt class="computeroutput"><span class="identifier">shared</span></tt>.
</p>
<a name="spirit.support.multi_pass.ownershippolicy"></a><h4>
-<a name="id611116"></a>
+<a name="id611295"></a>
<a href="multi_pass.html#spirit.support.multi_pass.ownershippolicy">OwnershipPolicy</a>
</h4>
<p>
@@ -832,7 +832,7 @@
constructor of <tt class="computeroutput"><span class="identifier">shared</span></tt>.
</p>
<a name="spirit.support.multi_pass.checkingpolicy"></a><h4>
-<a name="id611860"></a>
+<a name="id612039"></a>
<a href="multi_pass.html#spirit.support.multi_pass.checkingpolicy">CheckingPolicy</a>
</h4>
<p>
@@ -891,7 +891,7 @@
constructor of <tt class="computeroutput"><span class="identifier">shared</span></tt>.
</p>
<a name="spirit.support.multi_pass.storagepolicy"></a><h4>
-<a name="id612495"></a>
+<a name="id612674"></a>
<a href="multi_pass.html#spirit.support.multi_pass.storagepolicy">StoragePolicy</a>
</h4>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/what_s_new.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/what_s_new.html (original)
+++ trunk/libs/spirit/doc/html/spirit/what_s_new.html 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -155,12 +155,12 @@
</li>
<li>
Added <tt class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">omit</span><span class="special">[]</span></tt>
- directive (see <a href="karma/reference/directive/omit.html" title=" Consume Attribute
+ directive (see <a href="karma/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>)
</li>
<li>
Added <tt class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">buffer</span><span class="special">[]</span></tt>
- directive (see <a href="karma/reference/directive/buffer.html" title=" Temporary
+ directive (see <a href="karma/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>)
</li>
<li>
@@ -177,7 +177,7 @@
first test if the attribute value is equal to the immediate literal. They
fail not while generating anything if those are not equal. Otherwise they
generate their immediate literal. For more information see for instance
- <a href="karma/reference/numeric/signed_int.html" title=" Signed
+ <a href="karma/reference/numeric.html#spirit.karma.reference.numeric.signed_int" title=" Signed
Integer Number Generators"><tt class="computeroutput"><span class="identifier">int_</span></tt></a>.
</li>
<li>
Modified: trunk/libs/spirit/doc/qi/quick_reference.qbk
==============================================================================
--- trunk/libs/spirit/doc/qi/quick_reference.qbk (original)
+++ trunk/libs/spirit/doc/qi/quick_reference.qbk 2009-08-22 01:26:45 EDT (Sat, 22 Aug 2009)
@@ -46,7 +46,9 @@
[endsect]
[section Qi Parsers]
-[table char
+[section char]
+
+[table
[[Expression] [Attribute] [Description]]
[[`char_`] [`Ch`] [Matches any character]]
[[`char_(ch)`] [`Ch`] [Matches `ch`]]
@@ -80,7 +82,10 @@
`std::isupper` in the current character set]]
]
-[table numeric
+[endsect]
+[section numeric]
+
+[table
[[Expression] [Attribute] [Description]]
[[`float_`] [`float`] [Parse a floating point number into a `float`]]
[[`double_`] [`double`] [Parse a floating point number into a `double`]]
@@ -99,7 +104,10 @@
[[`long_long`] [`long long`] [Parse a long long]]
]
-[table string
+[endsect]
+[section string]
+
+[table
[[Expression] [Attribute] [Description]]
[[[qi_lit_string `ch`]] [`Unused`] [Matches `ch`]]
[[[qi_lit_string `str`]] [`Unused`] [Matches `str`]]
@@ -127,7 +135,10 @@
the key]]
]
-[table auxiliary
+[endsect]
+[section auxiliary]
+
+[table
[[Expression] [Attribute] [Description]]
[[`eol`] [`Unused`] [Matches the end of line (`\r` or `\n` or `\r\n`)]]
[[`eoi`] [`Unused`] [Matches the end of input (first == last)]]
@@ -141,7 +152,10 @@
argument `attrib` as its attribute.]]
]
-[table binary
+[endsect]
+[section binary]
+
+[table
[[Expression] [Attribute] [Description]]
[[`byte_`] [8 bits native endian] [Matches an 8 bit binary]]
[[`word`] [16 bits native endian] [Matches a 16 bit binary]]
@@ -155,7 +169,10 @@
[[`little_qword`] [64 bits little endian] [Matches a 64 bit binary]]
]
-[table directive
+[endsect]
+[section directive]
+
+[table
[[Expression] [Attribute] [Description]]
[[`lexeme[a]`] [`A`] [Disable skip parsing for `a`]]
[[__qi_no_case__] [`A`] [Inhibits case-sensitivity for `a`]]
@@ -171,7 +188,10 @@
[[`skip(p)[a]`] [`A`] [Use `p` as a skipper for parsing `a`]]
]
-[table operator
+[endsect]
+[section operator]
+
+[table
[[Expression] [Attribute] [Description]]
[[`!a`] [`Unused`] [Not predicate. Ensure that `a` does not match
but don't move the iterator position]]
@@ -194,12 +214,16 @@
] [Permutation. Parse `a` and `b` in any order]]
]
-[table action
+[endsect]
+[section action]
+
+[table
[[Expression] [Attribute] [Description]]
[[`p[fa]`] [Attribute of `p`] [Call semantic action, `fa` if p succeeds.]]
]
[endsect]
+[endsect]
[section Compound Attribute Rules]
The notation will be for instance:
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk