|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55748 - in trunk/libs/spirit/doc: . html html/spirit html/spirit/abstracts html/spirit/karma html/spirit/karma/performance_measurements html/spirit/karma/performance_measurements/numeric_performance html/spirit/karma/quick_reference html/spirit/karma/quick_reference/primitive_generators 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/notes html/spirit/qi/quick_reference html/spirit/qi/quick_reference/qi_parsers 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/qi/tutorials html/spirit/support
From: hartmut.kaiser_at_[hidden]
Date: 2009-08-23 22:07:32
Author: hkaiser
Date: 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
New Revision: 55748
URL: http://svn.boost.org/trac/boost/changeset/55748
Log:
Spirit: changed chunking level to 4 again
Added:
trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/double_performance.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/format_performance.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/auxiliary.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/binary.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/char.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/floating_point.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/signed_int.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/string.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/unsigned_int.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eol.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eps.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/lazy.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_class.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_generator.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/directive/alignment.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/directive/buffer.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/directive/delimit.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/directive/maxwidth.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/directive/omit.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/directive/repeat.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/directive/upperlower.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/generator.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/narygenerator.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/floating_point.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/alternative.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/and_predicate.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/kleene.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/list.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/not_predicate.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/optional.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/plus.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/karma/reference/operator/sequence.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_primitives.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_definition.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_values.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/lexer.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/token.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/tokendef.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/action.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/auxiliary.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/binary.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/char.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/directive.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/numeric.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/operator.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/string.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary/attr.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/binaryparser.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/naryparser.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/parser.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/unaryparser.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/string/lit_string.html (contents, props changed)
trunk/libs/spirit/doc/html/spirit/qi/reference/string/symbols.html (contents, props changed)
Text files modified:
trunk/libs/spirit/doc/Jamfile | 2
trunk/libs/spirit/doc/html/index.html | 4
trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html | 16
trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html | 18
trunk/libs/spirit/doc/html/spirit/acknowledgments.html | 2
trunk/libs/spirit/doc/html/spirit/faq.html | 12
trunk/libs/spirit/doc/html/spirit/introduction.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 | 995 ------------
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/compound_attribute_rules.html | 20
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/directives.html | 44
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/operators.html | 22
trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators.html | 1532 -------------------
trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary.html | 547 ------
trunk/libs/spirit/doc/html/spirit/karma/reference/char.html | 1281 ----------------
trunk/libs/spirit/doc/html/spirit/karma/reference/directive.html | 2480 -------------------------------
trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts.html | 958 ------------
trunk/libs/spirit/doc/html/spirit/karma/reference/karma_basics.html | 10
trunk/libs/spirit/doc/html/spirit/karma/reference/numeric.html | 3139 ---------------------------------------
trunk/libs/spirit/doc/html/spirit/karma/reference/operator.html | 2172 ---------------------------
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 | 6
trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives.html | 349 ----
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 | 10
trunk/libs/spirit/doc/html/spirit/lex/lexer_introduction.html | 6
trunk/libs/spirit/doc/html/spirit/lex/reference/concepts.html | 530 ------
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/notes/porting_from_spirit_1_8_x.html | 10
trunk/libs/spirit/doc/html/spirit/preface.html | 18
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/compound_attribute_rules.html | 8
trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers.html | 1687 ---------------------
trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary.html | 288 ---
trunk/libs/spirit/doc/html/spirit/qi/reference/basics.html | 10
trunk/libs/spirit/doc/html/spirit/qi/reference/directive.html | 280 ---
trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts.html | 868 ----------
trunk/libs/spirit/doc/html/spirit/qi/reference/string.html | 953 ------------
trunk/libs/spirit/doc/html/spirit/qi/tutorials/employee___parsing_into_structs.html | 14
trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___asts_.html | 22
trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___error_handling.html | 6
trunk/libs/spirit/doc/html/spirit/qi/tutorials/quick_start.html | 2
trunk/libs/spirit/doc/html/spirit/qi/tutorials/roman_numerals.html | 8
trunk/libs/spirit/doc/html/spirit/qi/tutorials/semantic_actions.html | 2
trunk/libs/spirit/doc/html/spirit/qi/tutorials/warming_up.html | 10
trunk/libs/spirit/doc/html/spirit/support/multi_pass.html | 28
trunk/libs/spirit/doc/html/spirit/what_s_new.html | 14
55 files changed, 338 insertions(+), 18157 deletions(-)
Modified: trunk/libs/spirit/doc/Jamfile
==============================================================================
--- trunk/libs/spirit/doc/Jamfile (original)
+++ trunk/libs/spirit/doc/Jamfile 2009-08-23 22:07:18 EDT (Sun, 23 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=3
+ <xsl:param>chunk.section.depth=4
<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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -34,7 +34,7 @@
<div><p class="copyright">Copyright © 2001-2009 Joel
de Guzman, Hartmut Kaiser</p></div>
<div><div class="legalnotice" title="Legal Notice">
-<a name="id1079623"></a><p>
+<a name="id1100550"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -200,7 +200,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 24, 2009 at 01:49:49 GMT</small></p></td>
+<td align="left"><p><small>Last revised: August 24, 2009 at 02:02:36 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html (original)
+++ trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -29,9 +29,9 @@
</h3></div></div></div>
<p>
Parsing Expression Grammars (PEG)
- <sup>[<a name="id1089835" href="#ftn.id1089835" class="footnote">5</a>]</sup>
+ <sup>[<a name="id1110451" href="#ftn.id1110451" class="footnote">5</a>]</sup>
are a derivative of Extended Backus-Naur Form (EBNF)
- <sup>[<a name="id1089847" href="#ftn.id1089847" class="footnote">6</a>]</sup>
+ <sup>[<a name="id1110463" href="#ftn.id1110463" class="footnote">6</a>]</sup>
with a different interpretation, designed to represent a recursive descent
parser. A PEG can be directly represented as a recursive-descent parser.
</p>
@@ -42,7 +42,7 @@
Abstract Syntax Tree) for each PEG grammar.
</p>
<a name="spirit.abstracts.parsing_expression_grammar.sequences"></a><h5>
-<a name="id1089867"></a>
+<a name="id1110483"></a>
<a class="link" href="parsing_expression_grammar.html#spirit.abstracts.parsing_expression_grammar.sequences">Sequences</a>
</h5>
<p>
@@ -83,7 +83,7 @@
</p></td></tr>
</table></div>
<a name="spirit.abstracts.parsing_expression_grammar.alternatives"></a><h5>
-<a name="id1089985"></a>
+<a name="id1110601"></a>
<a class="link" href="parsing_expression_grammar.html#spirit.abstracts.parsing_expression_grammar.alternatives">Alternatives</a>
</h5>
<p>
@@ -126,7 +126,7 @@
about this $$$).
</p>
<a name="spirit.abstracts.parsing_expression_grammar.loops"></a><h5>
-<a name="id1090124"></a>
+<a name="id1110740"></a>
<a class="link" href="parsing_expression_grammar.html#spirit.abstracts.parsing_expression_grammar.loops">Loops</a>
</h5>
<p>
@@ -189,7 +189,7 @@
We will see more of these other mechanisms shortly.
</p>
<a name="spirit.abstracts.parsing_expression_grammar.difference"></a><h5>
-<a name="id1090265"></a>
+<a name="id1110881"></a>
<a class="link" href="parsing_expression_grammar.html#spirit.abstracts.parsing_expression_grammar.difference">Difference</a>
</h5>
<p>
@@ -205,11 +205,11 @@
</p>
<div class="footnotes">
<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id1089835" href="#id1089835" class="para">5</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1110451" href="#id1110451" class="para">5</a>] </sup>
Bryan Ford: Parsing Expression Grammars: A Recognition-Based Syntactic
Foundation, http://pdos.csail.mit.edu/~baford/packrat/popl04/
</p></div>
-<div class="footnote"><p><sup>[<a name="ftn.id1089847" href="#id1089847" class="para">6</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1110463" href="#id1110463" class="para">6</a>] </sup>
Richard E. Pattis: EBNF: A Notation to Describe Syntax, http://www.cs.cmu.edu/~pattis/misc/ebnf.pdf
</p></div>
</div>
Modified: trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html (original)
+++ trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -28,20 +28,20 @@
</h3></div></div></div>
<p>
In the next section, we will deal with Parsing Expression Grammars (PEG)
- <sup>[<a name="id1089407" href="#ftn.id1089407" class="footnote">2</a>]</sup>
+ <sup>[<a name="id1110024" href="#ftn.id1110024" class="footnote">2</a>]</sup>
, a variant of Extended Backus-Naur Form (EBNF)
- <sup>[<a name="id1089419" href="#ftn.id1089419" class="footnote">3</a>]</sup>
+ <sup>[<a name="id1110036" href="#ftn.id1110036" class="footnote">3</a>]</sup>
with a different interpretation. It is easier to understand PEG using Syntax
Diagrams. Syntax diagrams represent a grammar graphically. It was used extensibly
by Niklaus Wirth
- <sup>[<a name="id1089431" href="#ftn.id1089431" class="footnote">4</a>]</sup>
+ <sup>[<a name="id1110048" href="#ftn.id1110048" class="footnote">4</a>]</sup>
in the "Pascal User Manual". Syntax Diagrams are easily understandable
with programmers due to its similarity to flow charts. The isomorphism of
the diagrams and functions make it ideal for representing Recursive Descent
parsers which are essentially mutually recursive functions.
</p>
<a name="spirit.abstracts.syntax_diagram.elements"></a><h5>
-<a name="id1089443"></a>
+<a name="id1110060"></a>
<a class="link" href="syntax_diagram.html#spirit.abstracts.syntax_diagram.elements">Elements</a>
</h5>
<p>
@@ -85,7 +85,7 @@
</p>
</blockquote></div>
<a name="spirit.abstracts.syntax_diagram.constructs"></a><h5>
-<a name="id1089543"></a>
+<a name="id1110159"></a>
<a class="link" href="syntax_diagram.html#spirit.abstracts.syntax_diagram.constructs">Constructs</a>
</h5>
<p>
@@ -156,7 +156,7 @@
This behavior is quite obvious with syntax diagrams as they resemble flow-charts.
</p>
<a name="spirit.abstracts.syntax_diagram.predicates"></a><h5>
-<a name="id1089704"></a>
+<a name="id1110320"></a>
<a class="link" href="syntax_diagram.html#spirit.abstracts.syntax_diagram.predicates">Predicates</a>
</h5>
<p>
@@ -211,14 +211,14 @@
</p>
<div class="footnotes">
<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id1089407" href="#id1089407" class="para">2</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1110024" href="#id1110024" class="para">2</a>] </sup>
Bryan Ford: Parsing Expression Grammars: A Recognition-Based Syntactic
Foundation, http://pdos.csail.mit.edu/~baford/packrat/popl04/
</p></div>
-<div class="footnote"><p><sup>[<a name="ftn.id1089419" href="#id1089419" class="para">3</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1110036" href="#id1110036" class="para">3</a>] </sup>
Richard E. Pattis: EBNF: A Notation to Describe Syntax, http://www.cs.cmu.edu/~pattis/misc/ebnf.pdf
</p></div>
-<div class="footnote"><p><sup>[<a name="ftn.id1089431" href="#id1089431" class="para">4</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1110048" href="#id1110048" class="para">4</a>] </sup>
Niklaus Wirth: The Programming Language Pascal. (July 1973)
</p></div>
</div>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -47,7 +47,7 @@
<span class="bold"><strong>FIXME</strong></span>: Add more people
</p>
<a name="spirit.acknowledgments.acknowledgements_from_the_spirit_v1__emphasis_classic__emphasis__documentation"></a><h4>
-<a name="id1299537"></a>
+<a name="id1321003"></a>
<a class="link" 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>
</h4>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -27,7 +27,7 @@
<a name="spirit.faq"></a><a class="link" href="faq.html" title="Spirit FAQ"> Spirit FAQ</a>
</h2></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><h4>
-<a name="id1288019"></a>
+<a name="id1309000"></a>
<a class="link" 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>
@@ -64,7 +64,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><h4>
-<a name="id1289965"></a>
+<a name="id1310264"></a>
<a class="link" 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>
@@ -172,19 +172,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><h4>
-<a name="id1290475"></a>
+<a name="id1310774"></a>
<a class="link" 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 <code class="computeroutput"><span class="identifier">no_case</span></code>
directive?</a>
</h4>
<p>
- In order to perform case-insensitive parsing (using <a class="link" href="qi/reference/directive.html#spirit.qi.reference.directive.no_case" title="no_case"><code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>)
- with a symbol table (i.e. use a <a class="link" href="qi/reference/string.html#spirit.qi.reference.string.symbols" title="symbols"><code 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></code></a> parser in a <code class="computeroutput"><span class="identifier">no_case</span></code>
+ In order to perform case-insensitive parsing (using <a class="link" href="qi/reference/directive/no_case.html" title="no_case"><code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>)
+ with a symbol table (i.e. use a <a class="link" href="qi/reference/string/symbols.html" title="symbols"><code 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></code></a> parser in a <code class="computeroutput"><span class="identifier">no_case</span></code>
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><h4>
-<a name="id1290557"></a>
+<a name="id1310855"></a>
<a class="link" 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 <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function</span></code>
and/or <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">function4</span></code>. What does this mean?</a>
Modified: trunk/libs/spirit/doc/html/spirit/introduction.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/introduction.html (original)
+++ trunk/libs/spirit/doc/html/spirit/introduction.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -30,7 +30,7 @@
Boost Spirit is an object-oriented, recursive-descent parser and output generation
library for C++. It allows you to write grammars and format descriptions using
a format similar to Extended Backus Naur Form (EBNF)
- <sup>[<a name="id1085583" href="#ftn.id1085583" class="footnote">1</a>]</sup>
+ <sup>[<a name="id1106200" href="#ftn.id1106200" class="footnote">1</a>]</sup>
directly in C++. These inline grammar specifications can mix freely with other
C++ code and, thanks to the generative power of C++ templates, are immediately
executable. In retrospect, conventional compiler-compilers or parser-generators
@@ -134,7 +134,7 @@
<p><br class="figure-break">
</p>
<a name="spirit.introduction.a_quick_overview_of_parsing_with__emphasis_spirit_qi__emphasis_"></a><h4>
-<a name="id1085797"></a>
+<a name="id1106413"></a>
<a class="link" href="introduction.html#spirit.introduction.a_quick_overview_of_parsing_with__emphasis_spirit_qi__emphasis_">A
Quick Overview of Parsing with <span class="emphasis"><em>Spirit.Qi</em></span></a>
</h4>
@@ -224,7 +224,7 @@
<code class="computeroutput"><span class="special">;</span></code>.
</p>
<a name="spirit.introduction.a_quick_overview_of_output_generation_with__emphasis_spirit_karma__emphasis_"></a><h4>
-<a name="id1086753"></a>
+<a name="id1107370"></a>
<a class="link" href="introduction.html#spirit.introduction.a_quick_overview_of_output_generation_with__emphasis_spirit_karma__emphasis_">A
Quick Overview of Output Generation with <span class="emphasis"><em>Spirit.Karma</em></span></a>
</h4>
@@ -257,7 +257,7 @@
of the same <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span></code>:
</p>
<div class="table">
-<a name="id1088187"></a><p class="title"><b>Table 2. Different output formats for `std::vector<int>`</b></p>
+<a name="id1108803"></a><p class="title"><b>Table 2. Different output formats for `std::vector<int>`</b></p>
<div class="table-contents"><table class="table" summary="Different output formats for `std::vector<int>`">
<colgroup>
<col>
@@ -376,7 +376,7 @@
next table gives some related examples.
</p>
<div class="table">
-<a name="id1088571"></a><p class="title"><b>Table 3. Different data types usable with the output format
+<a name="id1109187"></a><p class="title"><b>Table 3. Different data types usable with the output format
`*(int_ << eol)`</b></p>
<div class="table-contents"><table class="table" summary="Different data types usable with the output format
`*(int_ << eol)`">
@@ -450,7 +450,7 @@
</div>
<br class="table-break"><div class="footnotes">
<br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id1085583" href="#id1085583" class="para">1</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1106200" href="#id1106200" class="para">1</a>] </sup>
<a href="http://www.cl.cam.ac.uk/%7Emgk25/iso-14977.pdf" target="_top">ISO-EBNF</a>
</p></div>
</div>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../index.html" title="Spirit 2.1">
<link rel="up" href="../index.html" title="Spirit 2.1">
-<link rel="prev" href="qi/reference/string.html" title="String">
+<link rel="prev" href="qi/reference/string/symbols.html" title="symbols">
<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.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/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>
</div>
<div class="section" title="Karma - Writing Generators">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -83,7 +83,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../index.html" title="Spirit 2.1">
<link rel="up" href="../karma.html" title="Karma - Writing Generators">
-<link rel="prev" href="reference/auxiliary.html" title="Auxiliary">
+<link rel="prev" href="reference/auxiliary/lazy.html" title="lazy">
<link rel="next" href="performance_measurements/numeric_performance.html" title="Performance of Numeric Generators">
</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="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>
+<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>
</div>
<div class="section" title="Performance Measurements">
<div class="titlepage"><div><div><h3 class="title">
@@ -40,7 +40,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -7,7 +7,7 @@
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../performance_measurements.html" title="Performance Measurements">
<link rel="prev" href="../performance_measurements.html" title="Performance Measurements">
-<link rel="next" href="../../lex.html" title="Lex - Writing Lexical Analyzers">
+<link rel="next" href="numeric_performance/int_performance.html" title="Comparing the performance of a single int_ generator">
</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="../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>
+<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>
</div>
<div class="section" title="Performance of Numeric Generators">
<div class="titlepage"><div><div><h4 class="title">
@@ -28,996 +28,13 @@
Performance of Numeric Generators</a>
</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.int_performance">
+<dt><span class="section"><a href="numeric_performance/int_performance.html">
Comparing the performance of a single int_ generator</a></span></dt>
-<dt><span class="section"><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.double_performance">
+<dt><span class="section"><a href="numeric_performance/double_performance.html">
Comparing the performance of a single double_ generator</a></span></dt>
-<dt><span class="section"><a href="numeric_performance.html#spirit.karma.performance_measurements.numeric_performance.format_performance">
+<dt><span class="section"><a href="numeric_performance/format_performance.html">
Comparing the performance of a sequence of several generators</a></span></dt>
</dl></div>
-<div class="section" title="Comparing the performance of a single int_ generator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.performance_measurements.numeric_performance.int_performance"></a><a class="link" 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>
-<p>
- This performance measurements are centered around default formatting
- of a single <code class="computeroutput"><span class="keyword">int</span></code> integer
- number using different libraries and methods. The overall execution times
- for those examples are compared below. We compare using <code class="computeroutput"><span class="identifier">sprintf</span></code>, 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 <code class="computeroutput"><span class="identifier">ltoa</span></code>:
- </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
- <a class="link" href="numeric_performance.html#spirit.karma.int_performance" title="Figure 3. Performance comparison for a single int">figure</a>.
- </p>
-<div class="table">
-<a name="id1246158"></a><p class="title"><b>Table 6. Performance comparison for a single int (all
- times in [s], 10000000 iterations)</b></p>
-<div class="table-contents"><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>
-</div>
-<br class="table-break"><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>
-<div class="figure-contents"><span class="inlinemediaobject"><img src="../../.././images/int_performance.png" alt="Performance comparison for a single int"></span></div>
-</div>
-<p><br class="figure-break">
- </p>
-</div>
-<div class="section" title="Comparing the performance of a single double_ generator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.performance_measurements.numeric_performance.double_performance"></a><a class="link" 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>
-<p>
- This performance measurements are centered around default formatting
- of a single <code class="computeroutput"><span class="keyword">double</span></code> floating
- point number using different libraries and methods. The overall execution
- times for those examples are compared below. We compare using <code class="computeroutput"><span class="identifier">sprintf</span></code>, 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 <code class="computeroutput"><span class="identifier">sprintf</span></code>:
- </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
- <a class="link" href="numeric_performance.html#spirit.karma.double_performance" title="Figure 4. Performance comparison for a single double">figure</a>.
- </p>
-<div class="table">
-<a name="id1247215"></a><p class="title"><b>Table 7. Performance comparison for a single double (all
- times in [s], 1000000 iterations)</b></p>
-<div class="table-contents"><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>
-</div>
-<br class="table-break"><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>
-<div class="figure-contents"><span class="inlinemediaobject"><img src="../../.././images/double_performance.png" alt="Performance comparison for a single double"></span></div>
-</div>
-<p><br class="figure-break">
- </p>
-</div>
-<div class="section" title="Comparing the performance of a sequence of several generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.performance_measurements.numeric_performance.format_performance"></a><a class="link" 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>
-<p>
- This performance measurements are centered around formatting of a sequence
- of different items, including 2 <code class="computeroutput"><span class="keyword">double</span></code>
- floating point numbers using different libraries and methods. The overall
- execution times for those examples are compared below. We compare using
- <code class="computeroutput"><span class="identifier">sprintf</span></code>, 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 class="link" 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="id1248882"></a><p class="title"><b>Table 8. Performance comparison for a sequence of several
- items (all times in [s], 1000000 iterations)</b></p>
-<div class="table-contents"><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>
-</div>
-<br class="table-break"><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>
-<div class="figure-contents"><span class="inlinemediaobject"><img src="../../.././images/format_performance.png" alt="Performance comparison for a sequence of several items"></span></div>
-</div>
-<p><br class="figure-break">
- </p>
-</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -1030,7 +47,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="../../lex.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="numeric_performance/int_performance.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/double_performance.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/double_performance.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,363 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Comparing the performance of a single double_ generator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../numeric_performance.html" title="Performance of Numeric Generators">
+<link rel="prev" href="int_performance.html" title="Comparing the performance of a single int_ generator">
+<link rel="next" href="format_performance.html" title="Comparing the performance of a sequence of several generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="int_performance.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric_performance.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="format_performance.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Comparing the performance of a single double_ generator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.performance_measurements.numeric_performance.double_performance"></a><a class="link" href="double_performance.html" title="Comparing the performance of a single double_ generator">
+ Comparing the performance of a single double_ generator</a>
+</h5></div></div></div>
+<p>
+ This performance measurements are centered around default formatting
+ of a single <code class="computeroutput"><span class="keyword">double</span></code> floating
+ point number using different libraries and methods. The overall execution
+ times for those examples are compared below. We compare using <code class="computeroutput"><span class="identifier">sprintf</span></code>, 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 <code class="computeroutput"><span class="identifier">sprintf</span></code>:
+ </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
+ <a class="link" 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="id1268650"></a><p class="title"><b>Table 7. Performance comparison for a single double (all
+ times in [s], 1000000 iterations)</b></p>
+<div class="table-contents"><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>
+</div>
+<br class="table-break"><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>
+<div class="figure-contents"><span class="inlinemediaobject"><img src="../../../.././images/double_performance.png" alt="Performance comparison for a single double"></span></div>
+</div>
+<p><br class="figure-break">
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="int_performance.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric_performance.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="format_performance.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/format_performance.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/format_performance.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,384 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Comparing the performance of a sequence of several generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../numeric_performance.html" title="Performance of Numeric Generators">
+<link rel="prev" href="double_performance.html" title="Comparing the performance of a single double_ 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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="double_performance.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric_performance.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" title="Comparing the performance of a sequence of several generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.performance_measurements.numeric_performance.format_performance"></a><a class="link" href="format_performance.html" title="Comparing the performance of a sequence of several generators">
+ Comparing the performance of a sequence of several generators</a>
+</h5></div></div></div>
+<p>
+ This performance measurements are centered around formatting of a sequence
+ of different items, including 2 <code class="computeroutput"><span class="keyword">double</span></code>
+ floating point numbers using different libraries and methods. The overall
+ execution times for those examples are compared below. We compare using
+ <code class="computeroutput"><span class="identifier">sprintf</span></code>, 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 class="link" href="format_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="id1270317"></a><p class="title"><b>Table 8. Performance comparison for a sequence of several
+ items (all times in [s], 1000000 iterations)</b></p>
+<div class="table-contents"><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>
+</div>
+<br class="table-break"><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>
+<div class="figure-contents"><span class="inlinemediaobject"><img src="../../../.././images/format_performance.png" alt="Performance comparison for a sequence of several items"></span></div>
+</div>
+<p><br class="figure-break">
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="double_performance.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric_performance.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,353 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Comparing the performance of a single int_ generator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../numeric_performance.html" title="Performance of Numeric Generators">
+<link rel="prev" href="../numeric_performance.html" title="Performance of Numeric Generators">
+<link rel="next" href="double_performance.html" title="Comparing the performance of a single double_ generator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../numeric_performance.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric_performance.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="double_performance.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Comparing the performance of a single int_ generator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.performance_measurements.numeric_performance.int_performance"></a><a class="link" href="int_performance.html" title="Comparing the performance of a single int_ generator">
+ Comparing the performance of a single int_ generator</a>
+</h5></div></div></div>
+<p>
+ This performance measurements are centered around default formatting
+ of a single <code class="computeroutput"><span class="keyword">int</span></code> integer
+ number using different libraries and methods. The overall execution times
+ for those examples are compared below. We compare using <code class="computeroutput"><span class="identifier">sprintf</span></code>, 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 <code class="computeroutput"><span class="identifier">ltoa</span></code>:
+ </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
+ <a class="link" 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="id1267593"></a><p class="title"><b>Table 6. Performance comparison for a single int (all
+ times in [s], 10000000 iterations)</b></p>
+<div class="table-contents"><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>
+</div>
+<br class="table-break"><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>
+<div class="figure-contents"><span class="inlinemediaobject"><img src="../../../.././images/int_performance.png" alt="Performance comparison for a single int"></span></div>
+</div>
+<p><br class="figure-break">
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../numeric_performance.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric_performance.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="double_performance.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -41,7 +41,7 @@
<span class="identifier">b</span></code> will be <code 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></code>.
</p>
<div class="table">
-<a name="id1163619"></a><p class="title"><b>Table 5. Spirit.Karma compound generator attribute types</b></p>
+<a name="id1184569"></a><p class="title"><b>Table 5. Spirit.Karma compound generator attribute types</b></p>
<div class="table-contents"><table class="table" summary="Spirit.Karma compound generator attribute types">
<colgroup>
<col>
@@ -63,7 +63,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.sequence" title="Sequences (operator<<())">sequence
+ <a class="link" href="../reference/operator/sequence.html" title="Sequences (operator<<())">sequence
(<code class="computeroutput"><span class="special"><<</span></code>)</a>
</p>
</td>
@@ -87,7 +87,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.alternative" title="Alternatives (operator|())">alternative
+ <a class="link" href="../reference/operator/alternative.html" title="Alternatives (operator|())">alternative
(<code class="computeroutput"><span class="special">|</span></code>)</a>
</p>
</td>
@@ -107,7 +107,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.kleene" title="Kleene Star (unary operator*())">kleene (unary
+ <a class="link" href="../reference/operator/kleene.html" title="Kleene Star (unary operator*())">kleene (unary
<code class="computeroutput"><span class="special">*</span></code>)</a>
</p>
</td>
@@ -124,7 +124,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.plus" title="Plus (unary operator+())">plus (unary
+ <a class="link" href="../reference/operator/plus.html" title="Plus (unary operator+())">plus (unary
<code class="computeroutput"><span class="special">+</span></code>)</a>
</p>
</td>
@@ -141,7 +141,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.list" title="Lists (operator%())">list (<code class="computeroutput"><span class="special">%</span></code>)</a>
+ <a class="link" href="../reference/operator/list.html" title="Lists (operator%())">list (<code class="computeroutput"><span class="special">%</span></code>)</a>
</p>
</td>
<td>
@@ -157,7 +157,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.repeat" title="Repetition Directive (repeat[])">repetition</a>
+ <a class="link" href="../reference/directive/repeat.html" title="Repetition Directive (repeat[])">repetition</a>
</p>
</td>
<td>
@@ -173,7 +173,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.optional" title="Optional (unary operator-())">optional
+ <a class="link" href="../reference/operator/optional.html" title="Optional (unary operator-())">optional
(unary <code class="computeroutput"><span class="special">-</span></code>)</a>
</p>
</td>
@@ -190,7 +190,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.and_predicate" title="And Predicate (unary operator&())">and
+ <a class="link" href="../reference/operator/and_predicate.html" title="And Predicate (unary operator&())">and
predicate (unary <code class="computeroutput"><span class="special">&</span></code>)</a>
</p>
</td>
@@ -205,7 +205,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.not_predicate" title="Not Predicate (unary operator!())">not
+ <a class="link" href="../reference/operator/not_predicate.html" title="Not Predicate (unary operator!())">not
predicate (unary <code class="computeroutput"><span class="special">!</span></code>)</a>
</p>
</td>
Modified: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/directives.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/quick_reference/directives.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/directives.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -58,7 +58,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.upperlower" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">lower</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/upperlower.html" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">lower</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -76,7 +76,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.upperlower" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">upper</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/upperlower.html" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">upper</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -94,7 +94,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -112,7 +112,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
</p>
</td>
<td>
@@ -130,7 +130,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
</p>
</td>
@@ -151,7 +151,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -169,7 +169,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
</p>
</td>
<td>
@@ -187,7 +187,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
</p>
</td>
@@ -208,7 +208,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -226,7 +226,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
</p>
</td>
<td>
@@ -244,7 +244,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
+ <a class="link" href="../reference/directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code 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></code></a>
</p>
</td>
@@ -265,7 +265,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.maxwidth" title="Controlling the Maximum Field Wield (maxwidth[])"><code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/maxwidth.html" title="Controlling the Maximum Field Wield (maxwidth[])"><code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -283,7 +283,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.maxwidth" title="Controlling the Maximum Field Wield (maxwidth[])"><code 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></code></a>
+ <a class="link" href="../reference/directive/maxwidth.html" title="Controlling the Maximum Field Wield (maxwidth[])"><code 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></code></a>
</p>
</td>
<td>
@@ -301,7 +301,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.repeat" title="Repetition Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/repeat.html" title="Repetition Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -319,7 +319,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.repeat" title="Repetition Directive (repeat[])"><code 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></code></a>
+ <a class="link" href="../reference/directive/repeat.html" title="Repetition Directive (repeat[])"><code 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></code></a>
</p>
</td>
<td>
@@ -336,7 +336,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.repeat" title="Repetition Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num1</span><span class="special">,</span>
+ <a class="link" href="../reference/directive/repeat.html" title="Repetition Directive (repeat[])"><code 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></code></a>
</p>
</td>
@@ -355,7 +355,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.repeat" title="Repetition Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span><span class="special">(</span><span class="identifier">num</span><span class="special">,</span>
+ <a class="link" href="../reference/directive/repeat.html" title="Repetition Directive (repeat[])"><code 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></code></a>
</p>
</td>
@@ -373,7 +373,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.delimit" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -390,7 +390,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.delimit" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -407,7 +407,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.delimit" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code 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></code></a>
+ <a class="link" href="../reference/directive/delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code 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></code></a>
</p>
</td>
<td>
@@ -425,7 +425,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.omit" title="Consume Attribute (omit[])"><code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/omit.html" title="Consume Attribute (omit[])"><code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
@@ -443,7 +443,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ <a class="link" href="../reference/directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
</p>
</td>
<td>
Modified: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/operators.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/quick_reference/operators.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/operators.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../quick_reference.html" title="Quick Reference">
-<link rel="prev" href="primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="primitive_generators/auxiliary.html" title="Auxiliary Generators">
<link rel="next" href="directives.html" title="Generator Directives">
</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="primitive_generators.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="directives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitive_generators/auxiliary.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="directives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Generator Operators">
<div class="titlepage"><div><div><h4 class="title">
@@ -58,7 +58,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.not_predicate" title="Not Predicate (unary operator!())"><code class="computeroutput"><span class="special">!</span><span class="identifier">a</span></code></a>
+ <a class="link" href="../reference/operator/not_predicate.html" title="Not Predicate (unary operator!())"><code class="computeroutput"><span class="special">!</span><span class="identifier">a</span></code></a>
</p>
</td>
<td>
@@ -76,7 +76,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.not_predicate" title="Not Predicate (unary operator!())"><code class="computeroutput"><span class="special">&</span><span class="identifier">a</span></code></a>
+ <a class="link" href="../reference/operator/not_predicate.html" title="Not Predicate (unary operator!())"><code class="computeroutput"><span class="special">&</span><span class="identifier">a</span></code></a>
</p>
</td>
<td>
@@ -94,7 +94,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.optional" title="Optional (unary operator-())"><code class="computeroutput"><span class="special">-</span><span class="identifier">a</span></code></a>
+ <a class="link" href="../reference/operator/optional.html" title="Optional (unary operator-())"><code class="computeroutput"><span class="special">-</span><span class="identifier">a</span></code></a>
</p>
</td>
<td>
@@ -112,7 +112,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.kleene" title="Kleene Star (unary operator*())"><code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code></a>
+ <a class="link" href="../reference/operator/kleene.html" title="Kleene Star (unary operator*())"><code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code></a>
</p>
</td>
<td>
@@ -130,7 +130,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.plus" title="Plus (unary operator+())"><code class="computeroutput"><span class="special">+</span><span class="identifier">a</span></code></a>
+ <a class="link" href="../reference/operator/plus.html" title="Plus (unary operator+())"><code class="computeroutput"><span class="special">+</span><span class="identifier">a</span></code></a>
</p>
</td>
<td>
@@ -148,7 +148,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.alternative" title="Alternatives (operator|())"><code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
+ <a class="link" href="../reference/operator/alternative.html" title="Alternatives (operator|())"><code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
<span class="identifier">b</span></code></a>
</p>
</td>
@@ -168,7 +168,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.sequence" title="Sequences (operator<<())"><code class="computeroutput"><span class="identifier">a</span> <span class="special"><<</span>
+ <a class="link" href="../reference/operator/sequence.html" title="Sequences (operator<<())"><code class="computeroutput"><span class="identifier">a</span> <span class="special"><<</span>
<span class="identifier">b</span></code></a>
</p>
</td>
@@ -188,7 +188,7 @@
<tr>
<td>
<p>
- <a class="link" href="../reference/operator.html#spirit.karma.reference.operator.list" title="Lists (operator%())"><code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
+ <a class="link" href="../reference/operator/list.html" title="Lists (operator%())"><code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
<span class="identifier">b</span></code></a>
</p>
</td>
@@ -230,7 +230,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="primitive_generators.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="directives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="primitive_generators/auxiliary.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="directives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -7,7 +7,7 @@
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../quick_reference.html" title="Quick Reference">
<link rel="prev" href="common_notation.html" title="Common Notation">
-<link rel="next" href="operators.html" title="Generator Operators">
+<link rel="next" href="primitive_generators/char.html" title="Character 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="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="operators.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="primitive_generators/char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Primitive Generators">
<div class="titlepage"><div><div><h4 class="title">
@@ -28,1533 +28,21 @@
Primitive Generators</a>
</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.char">
+<dt><span class="section"><a href="primitive_generators/char.html">
Character Generators</a></span></dt>
-<dt><span class="section"><a href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.string">
+<dt><span class="section"><a href="primitive_generators/string.html">
String Generators</a></span></dt>
-<dt><span class="section"><a href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.floating_point">
+<dt><span class="section"><a href="primitive_generators/floating_point.html">
Floating Point Number Generators</a></span></dt>
-<dt><span class="section"><a href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.unsigned_int">
+<dt><span class="section"><a href="primitive_generators/unsigned_int.html">
Unsigned Integer Generators</a></span></dt>
-<dt><span class="section"><a href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.signed_int">
+<dt><span class="section"><a href="primitive_generators/signed_int.html">
Integer Generators</a></span></dt>
-<dt><span class="section"><a href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.binary">
+<dt><span class="section"><a href="primitive_generators/binary.html">
Binary Generators</a></span></dt>
-<dt><span class="section"><a href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.auxiliary">
+<dt><span class="section"><a href="primitive_generators/auxiliary.html">
Auxiliary Generators</a></span></dt>
</dl></div>
-<div class="section" title="Character Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.quick_reference.primitive_generators.char"></a><a class="link" href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.char" title="Character Generators">
- Character Generators</a>
-</h5></div></div></div>
-<p>
- See here for more information about <a class="link" href="../reference/char.html" title="Char">Character
- Generators</a>.
- </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>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_generator" title="Character Generators"><code class="computeroutput"><span class="identifier">ch</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_generator" title="Character Generators"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_generator" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">ch</span></code>,
- if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_generator" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>,
- if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_generator" title="Character Generators"><code 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></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>,
- if <code class="computeroutput"><span class="identifier">c</span></code> belongs
- to the chracter range from <code class="computeroutput"><span class="identifier">ch</span></code>
- to <code class="computeroutput"><span class="identifier">ch2</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_generator" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>,
- if <code class="computeroutput"><span class="identifier">c</span></code> belongs
- to the chracter set <code class="computeroutput"><span class="identifier">charset</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">alnum</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">alpha</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">blank</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">cntrl</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">digit</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">graph</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">print</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">punct</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">space</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code>,
- or a single space character in the character set defined by
- <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">xdigit</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">lower</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"><code class="computeroutput"><span class="identifier">upper</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="String Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.quick_reference.primitive_generators.string"></a><a class="link" href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.string" title="String Generators">
- String Generators</a>
-</h5></div></div></div>
-<p>
- See here for more information about String Generators .
- </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>
- <code class="computeroutput"><span class="identifier">str</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">str</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">str</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Str</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">str</span></code>,
- if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="Floating Point Number Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.quick_reference.primitive_generators.floating_point"></a><a class="link" href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.floating_point" title="Floating Point Number Generators">
- Floating Point Number Generators</a>
-</h5></div></div></div>
-<p>
- See here for more information about <a class="link" href="../reference/numeric.html" title="Numeric">Numeric
- Generators</a>.
- </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>
- <a class="link" href="../reference/numeric.html" title="Numeric"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">num</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">float_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">float</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a floating point number from a <code class="computeroutput"><span class="keyword">float</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">float</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a floating point number from a <code class="computeroutput"><span class="keyword">float</span></code>,
- if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">double_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a floating point number from a <code class="computeroutput"><span class="keyword">double</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="identifier">num</span></code>
- as a floating point number from a <code class="computeroutput"><span class="keyword">double</span></code>,
- if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">long_double</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a floating point number from a <code class="computeroutput"><span class="keyword">long</span>
- <span class="keyword">double</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a floating point number from a <code class="computeroutput"><span class="keyword">long</span>
- <span class="keyword">double</span></code>, if an attribute
- is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators">
-<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>
- </a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a floating point number <code class="computeroutput"><span class="identifier">Num</span></code>
- using the supplied floating point formatting policies
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators">
-<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>
- </a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate floating point number <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="identifier">Num</span></code> using
- the supplied floating point formatting policies, if an attribute
- is supplied it must match
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="Unsigned Integer Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.quick_reference.primitive_generators.unsigned_int"></a><a class="link" href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.unsigned_int" title="Unsigned Integer Generators">
- Unsigned Integer Generators</a>
-</h5></div></div></div>
-<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>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ushort_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned short integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ushort_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an unsigned short integer, if an attribute is supplied it
- must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">uint_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned int
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">uint_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an unsigned int, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned long integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an unsigned long integer, if an attribute is supplied it must
- match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_long</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned long long
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an unsigned long long, if an attribute is supplied it must
- match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">bin</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a binary integer from an <code class="computeroutput"><span class="keyword">unsigned</span>
- <span class="keyword">int</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">oct</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an octal integer from an <code class="computeroutput"><span class="keyword">unsigned</span>
- <span class="keyword">int</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">hex</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a hexadecimal integer from an <code class="computeroutput"><span class="keyword">unsigned</span>
- <span class="keyword">int</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators">
-<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>
- </a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators">
-<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>
- </a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="identifier">Num</span></code>, if
- an attribute is supplied it must match
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="Integer Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.quick_reference.primitive_generators.signed_int"></a><a class="link" href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.signed_int" title="Integer Generators">
- Integer Generators</a>
-</h5></div></div></div>
-<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>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">short_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a short integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a short integer, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">int_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an int
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an int, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a long integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as long integer, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_long</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a long long
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an long long, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators">
-<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>
- </a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators">
-<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>
- </a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="identifier">Num</span></code>, if
- an attribute is supplied it must match
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="Binary Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.quick_reference.primitive_generators.binary"></a><a class="link" href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.binary" title="Binary Generators">
- Binary Generators</a>
-</h5></div></div></div>
-<p>
- See here for more information about Binary Generators .
- </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>
- <code class="computeroutput"><span class="identifier">byte_</span></code>
- </p>
- </td>
-<td>
- <p>
- 8 bits native endian
- </p>
- </td>
-<td>
- <p>
- Generates an 8 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">word</span></code>
- </p>
- </td>
-<td>
- <p>
- 16 bits native endian
- </p>
- </td>
-<td>
- <p>
- Generates a 16 bit binary in native endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">big_word</span></code>
- </p>
- </td>
-<td>
- <p>
- 16 bits big endian
- </p>
- </td>
-<td>
- <p>
- Generates a 16 bit binary in big endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">little_word</span></code>
- </p>
- </td>
-<td>
- <p>
- 16 bits little endian
- </p>
- </td>
-<td>
- <p>
- Generates a 16 bit binary in little endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">dword</span></code>
- </p>
- </td>
-<td>
- <p>
- 32 bits native endian
- </p>
- </td>
-<td>
- <p>
- Generates a 32 bit binary in native endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">big_dword</span></code>
- </p>
- </td>
-<td>
- <p>
- 32 bits big endian
- </p>
- </td>
-<td>
- <p>
- Generates a 32 bit binary in big endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">little_dword</span></code>
- </p>
- </td>
-<td>
- <p>
- 32 bits little endian
- </p>
- </td>
-<td>
- <p>
- Generates a 32 bit binary in little endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">qword</span></code>
- </p>
- </td>
-<td>
- <p>
- 64 bits native endian
- </p>
- </td>
-<td>
- <p>
- Generates a 64 bit binary in native endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">big_qword</span></code>
- </p>
- </td>
-<td>
- <p>
- 64 bits big endian
- </p>
- </td>
-<td>
- <p>
- Generates a 64 bit binary in big endian representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">little_qword</span></code>
- </p>
- </td>
-<td>
- <p>
- 64 bits little endian
- </p>
- </td>
-<td>
- <p>
- Generates a 64 bit binary in little endian representation
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="Auxiliary Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.quick_reference.primitive_generators.auxiliary"></a><a class="link" href="primitive_generators.html#spirit.karma.quick_reference.primitive_generators.auxiliary" title="Auxiliary Generators">
- Auxiliary Generators</a>
-</h5></div></div></div>
-<p>
- See here for more information about <a class="link" href="../reference/auxiliary.html" title="Auxiliary">Auxiliary
- Generators</a>.
- </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>
- <a class="link" href="../reference/auxiliary.html#spirit.karma.reference.auxiliary.eol" title="eol"><code class="computeroutput"><span class="identifier">eol</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the end of line (<code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code>)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/auxiliary.html#spirit.karma.reference.auxiliary.eps" title="eps"><code class="computeroutput"><span class="identifier">eps</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an empty string
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/auxiliary.html#spirit.karma.reference.auxiliary.eps" title="eps"><code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- If <code class="computeroutput"><span class="identifier">b</span></code> is true,
- generate an empty string
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/auxiliary.html#spirit.karma.reference.auxiliary.lazy" title="lazy"><code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- Attribute of <code class="computeroutput"><span class="identifier">G</span></code>
- where <code class="computeroutput"><span class="identifier">G</span></code> is the
- return type of <code class="computeroutput"><span class="identifier">fg</span></code>
- </p>
- </td>
-<td>
- <p>
- Invoke <code class="computeroutput"><span class="identifier">fg</span></code> at
- generation time, returning a generator <code class="computeroutput"><span class="identifier">g</span></code>
- which is then called to generate.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/auxiliary.html#spirit.karma.reference.auxiliary.lazy" title="lazy"><code class="computeroutput"><span class="identifier">fg</span></code></a>
- </p>
- </td>
-<td>
- <p>
- see <a class="link" href="../reference/auxiliary.html#spirit.karma.reference.auxiliary.lazy" title="lazy"><code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code></a>
- above
- </p>
- </td>
-<td>
- <p>
- Equivalent to <a class="link" href="../reference/auxiliary.html#spirit.karma.reference.auxiliary.lazy" title="lazy"><code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code></a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">g</span><span class="special">[</span><span class="identifier">fa</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Attribute of <code class="computeroutput"><span class="identifier">g</span></code>
- </p>
- </td>
-<td>
- <p>
- Call semantic action <code class="computeroutput"><span class="identifier">fa</span></code>
- (before executing <code class="computeroutput"><span class="identifier">g</span></code>).
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -1567,7 +55,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="operators.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="primitive_generators/char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/auxiliary.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/auxiliary.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,184 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Auxiliary Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="binary.html" title="Binary Generators">
+<link rel="next" href="../operators.html" title="Generator Operators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="../operators.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Auxiliary Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.quick_reference.primitive_generators.auxiliary"></a><a class="link" href="auxiliary.html" title="Auxiliary Generators">
+ Auxiliary Generators</a>
+</h5></div></div></div>
+<p>
+ See here for more information about <a class="link" href="../../reference/auxiliary.html" title="Auxiliary">Auxiliary
+ Generators</a>.
+ </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>
+ <a class="link" href="../../reference/auxiliary/eol.html" title="eol"><code class="computeroutput"><span class="identifier">eol</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the end of line (<code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code>)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/auxiliary/eps.html" title="eps"><code class="computeroutput"><span class="identifier">eps</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an empty string
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/auxiliary/eps.html" title="eps"><code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If <code class="computeroutput"><span class="identifier">b</span></code> is true,
+ generate an empty string
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/auxiliary/lazy.html" title="lazy"><code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Attribute of <code class="computeroutput"><span class="identifier">G</span></code>
+ where <code class="computeroutput"><span class="identifier">G</span></code> is the
+ return type of <code class="computeroutput"><span class="identifier">fg</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Invoke <code class="computeroutput"><span class="identifier">fg</span></code> at
+ generation time, returning a generator <code class="computeroutput"><span class="identifier">g</span></code>
+ which is then called to generate.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/auxiliary/lazy.html" title="lazy"><code class="computeroutput"><span class="identifier">fg</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ see <a class="link" href="../../reference/auxiliary/lazy.html" title="lazy"><code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code></a>
+ above
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <a class="link" href="../../reference/auxiliary/lazy.html" title="lazy"><code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">g</span><span class="special">[</span><span class="identifier">fa</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Attribute of <code class="computeroutput"><span class="identifier">g</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Call semantic action <code class="computeroutput"><span class="identifier">fa</span></code>
+ (before executing <code class="computeroutput"><span class="identifier">g</span></code>).
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="../operators.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/binary.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/binary.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,244 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Binary Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="signed_int.html" title="Integer Generators">
+<link rel="next" href="auxiliary.html" title="Auxiliary Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="signed_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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" title="Binary Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.quick_reference.primitive_generators.binary"></a><a class="link" href="binary.html" title="Binary Generators">
+ Binary Generators</a>
+</h5></div></div></div>
+<p>
+ See here for more information about Binary Generators .
+ </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>
+ <code class="computeroutput"><span class="identifier">byte_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 8 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates an 8 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">word</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 16 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 16 bit binary in native endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big_word</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 16 bits big endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 16 bit binary in big endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little_word</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 16 bits little endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 16 bit binary in little endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">dword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 32 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 32 bit binary in native endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big_dword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 32 bits big endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 32 bit binary in big endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little_dword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 32 bits little endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 32 bit binary in little endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">qword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 64 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 64 bit binary in native endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big_qword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 64 bits big endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 64 bit binary in big endian representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little_qword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 64 bits little endian
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a 64 bit binary in little endian representation
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="signed_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/char.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/char.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,414 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Character Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="next" href="string.html" title="String Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../primitive_generators.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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" title="Character Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.quick_reference.primitive_generators.char"></a><a class="link" href="char.html" title="Character Generators">
+ Character Generators</a>
+</h5></div></div></div>
+<p>
+ See here for more information about <a class="link" href="../../reference/char.html" title="Char">Character
+ Generators</a>.
+ </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>
+ <a class="link" href="../../reference/char/char_generator.html" title="Character Generators"><code class="computeroutput"><span class="identifier">ch</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_generator.html" title="Character Generators"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_generator.html" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">ch</span></code>,
+ if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_generator.html" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>,
+ if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_generator.html" title="Character Generators"><code 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></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>,
+ if <code class="computeroutput"><span class="identifier">c</span></code> belongs
+ to the chracter range from <code class="computeroutput"><span class="identifier">ch</span></code>
+ to <code class="computeroutput"><span class="identifier">ch2</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_generator.html" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>,
+ if <code class="computeroutput"><span class="identifier">c</span></code> belongs
+ to the chracter set <code class="computeroutput"><span class="identifier">charset</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">alnum</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">alpha</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">blank</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">cntrl</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">digit</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">graph</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">print</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">punct</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">space</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code>,
+ or a single space character in the character set defined by
+ <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">xdigit</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">lower</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/char/char_class.html" title="Character Class Generators"><code class="computeroutput"><span class="identifier">upper</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">NS</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../primitive_generators.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/floating_point.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/floating_point.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,248 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Floating Point Number Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="string.html" title="String Generators">
+<link rel="next" href="unsigned_int.html" title="Unsigned Integer Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="unsigned_int.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Floating Point Number Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.quick_reference.primitive_generators.floating_point"></a><a class="link" href="floating_point.html" title="Floating Point Number Generators">
+ Floating Point Number Generators</a>
+</h5></div></div></div>
+<p>
+ See here for more information about <a class="link" href="../../reference/numeric.html" title="Numeric">Numeric
+ Generators</a>.
+ </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>
+ <a class="link" href="../../reference/numeric.html" title="Numeric"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">num</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">float_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">float</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a floating point number from a <code class="computeroutput"><span class="keyword">float</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">float</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a floating point number from a <code class="computeroutput"><span class="keyword">float</span></code>,
+ if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">double_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a floating point number from a <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="identifier">num</span></code>
+ as a floating point number from a <code class="computeroutput"><span class="keyword">double</span></code>,
+ if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">long_double</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a floating point number from a <code class="computeroutput"><span class="keyword">long</span>
+ <span class="keyword">double</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators"><code class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a floating point number from a <code class="computeroutput"><span class="keyword">long</span>
+ <span class="keyword">double</span></code>, if an attribute
+ is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators">
+<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>
+ </a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a floating point number <code class="computeroutput"><span class="identifier">Num</span></code>
+ using the supplied floating point formatting policies
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/floating_point.html" title="Floating Point Number Generators">
+<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>
+ </a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate floating point number <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="identifier">Num</span></code> using
+ the supplied floating point formatting policies, if an attribute
+ is supplied it must match
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="unsigned_int.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/signed_int.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/signed_int.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,255 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Integer Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="unsigned_int.html" title="Unsigned Integer Generators">
+<link rel="next" href="binary.html" title="Binary Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unsigned_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="binary.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Integer Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.quick_reference.primitive_generators.signed_int"></a><a class="link" href="signed_int.html" title="Integer Generators">
+ Integer Generators</a>
+</h5></div></div></div>
+<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>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">short_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a short integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a short integer, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">int_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an int
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an int, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a long integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as long integer, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_long</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a long long
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an long long, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators">
+<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>
+ </a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/signed_int.html" title="Signed Integer Number Generators">
+<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>
+ </a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="identifier">Num</span></code>, if
+ an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unsigned_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="binary.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/string.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/string.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,126 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>String Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="char.html" title="Character Generators">
+<link rel="next" href="floating_point.html" title="Floating Point Number Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="char.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="floating_point.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="String Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.quick_reference.primitive_generators.string"></a><a class="link" href="string.html" title="String Generators">
+ String Generators</a>
+</h5></div></div></div>
+<p>
+ See here for more information about String Generators .
+ </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>
+ <code class="computeroutput"><span class="identifier">str</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">str</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">str</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Str</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">str</span></code>,
+ if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="char.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="floating_point.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/unsigned_int.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/quick_reference/primitive_generators/unsigned_int.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,314 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Unsigned Integer Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../primitive_generators.html" title="Primitive Generators">
+<link rel="prev" href="floating_point.html" title="Floating Point Number Generators">
+<link rel="next" href="signed_int.html" title="Integer Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="floating_point.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="signed_int.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Unsigned Integer Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.quick_reference.primitive_generators.unsigned_int"></a><a class="link" href="unsigned_int.html" title="Unsigned Integer Generators">
+ Unsigned Integer Generators</a>
+</h5></div></div></div>
+<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>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ushort_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned short integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ushort_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an unsigned short integer, if an attribute is supplied it
+ must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">uint_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned int
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">uint_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an unsigned int, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned long integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an unsigned long integer, if an attribute is supplied it must
+ match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_long</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned long long
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an unsigned long long, if an attribute is supplied it must
+ match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">bin</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a binary integer from an <code class="computeroutput"><span class="keyword">unsigned</span>
+ <span class="keyword">int</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">oct</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an octal integer from an <code class="computeroutput"><span class="keyword">unsigned</span>
+ <span class="keyword">int</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators"><code class="computeroutput"><span class="identifier">hex</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a hexadecimal integer from an <code class="computeroutput"><span class="keyword">unsigned</span>
+ <span class="keyword">int</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators">
+<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>
+ </a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators">
+<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>
+ </a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="identifier">Num</span></code>, if
+ an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="floating_point.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../primitive_generators.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="signed_int.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,8 +6,8 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="operator.html" title="Operator">
-<link rel="next" href="../performance_measurements.html" title="Performance Measurements">
+<link rel="prev" href="operator/not_predicate.html" title="Not Predicate (unary operator!())">
+<link rel="next" href="auxiliary/eol.html" title="eol">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,16 +20,16 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Auxiliary">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.karma.reference.auxiliary"></a><a class="link" href="auxiliary.html" title="Auxiliary">Auxiliary</a>
</h4></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
@@ -37,543 +37,12 @@
and <code class="computeroutput"><span class="identifier">eps</span></code>, <code class="computeroutput"><span class="identifier">lazy</span></code> generators.
</p>
<a name="spirit.karma.reference.auxiliary.module_header"></a><h6>
-<a name="id1242551"></a>
+<a name="id1263440"></a>
<a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.module_header">Module Header</a>
</h6>
<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" title="eol">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.auxiliary.eol"></a><a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eol" title="eol">eol</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.auxiliary.eol.description"></a><h6>
-<a name="id1242627"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eol.description">Description</a>
- </h6>
-<p>
- The <code class="computeroutput"><span class="identifier">eol</span></code> component generates
- a single newline character. It is equivalent to <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="char">'\n'</span><span class="special">)</span></code>
- or simply '\n' (please see the <a class="link" href="char.html#spirit.karma.reference.char.char_generator" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span></code></a> generator module for more
- details).
- </p>
-<a name="spirit.karma.reference.auxiliary.eol.header"></a><h6>
-<a name="id1242680"></a>
- <a class="link" href="auxiliary.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.auxiliary.eol.model_of"></a><h6>
-<a name="id1242754"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eol.model_of">Model of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.auxiliary.eol.expression_semantics"></a><h6>
-<a name="id1242792"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">eol</span></code>
- </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="id1242881"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eol.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">eol</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<a name="spirit.karma.reference.auxiliary.eol.complexity"></a><h6>
-<a name="id1242959"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eol.complexity">Complexity</a>
- </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="id1242987"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eol.example">Example</a>
- </h6>
-</div>
-<div class="section" title="eps">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.auxiliary.eps"></a><a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eps" title="eps">eps</a>
-</h5></div></div></div>
-<p>
- The family of <code class="computeroutput"><span class="identifier">eps</span></code> 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="id1243022"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eps.description">Description</a>
- </h6>
-<p>
- The <code class="computeroutput"><span class="identifier">eps</span></code> creates a component
- generating an empty string while always succeeding. The <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
- component generates an empty string as well, but succeeds only if <code class="computeroutput"><span class="identifier">b</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>
- and fails otherwise. It's lazy variant <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></code> is equivalent to <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code> except it evaluates the supplied function
- <code class="computeroutput"><span class="identifier">fb</span></code> 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="id1243121"></a>
- <a class="link" href="auxiliary.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.auxiliary.eps.model_of"></a><h6>
-<a name="id1243196"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eps.model_of">Model of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">b</span></code></span></dt>
-<dd><p>
- A boolean value.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">fb</span></code></span></dt>
-<dd><p>
- A <a class="link" 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="id1243282"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">eps</span></code>
- </p>
- </td>
-<td>
- <p>
- Creates a component generating an empty string. Succeeds always.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Creates a component generating an empty string. Succeeds if
- <code class="computeroutput"><span class="identifier">b</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Creates a component generating an empty string. Succeeds if
- <code class="computeroutput"><span class="identifier">fb</span></code> returns <code class="computeroutput"><span class="keyword">true</span></code> at generate time.
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.karma.reference.auxiliary.eps.attributes"></a><h6>
-<a name="id1243469"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eps.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">eps</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.karma.reference.auxiliary.eps.complexity"></a><h6>
-<a name="id1243631"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eps.complexity">Complexity</a>
- </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="id1243659"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eps.example">Example</a>
- </h6>
-</div>
-<div class="section" title="lazy">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.auxiliary.lazy"></a><a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.lazy" title="lazy">lazy</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.auxiliary.lazy.description"></a><h6>
-<a name="id1243683"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.lazy.description">Description</a>
- </h6>
-<p>
- The familiy of <code class="computeroutput"><span class="identifier">lazy</span></code> 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="id1243707"></a>
- <a class="link" href="auxiliary.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.auxiliary.lazy.model_of"></a><h6>
-<a name="id1243781"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.lazy.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">fg</span></code></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 <code class="computeroutput"><span class="identifier">fg</span></code> 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 <code class="computeroutput"><span class="identifier">G</span></code>, the function's
- return value, is the type of the generator to be invoked, and <code class="computeroutput"><span class="identifier">Context</span></code> is the generators's Context
- type (The first argument is <code class="computeroutput"><span class="identifier">unused</span></code>
- to make the <code class="computeroutput"><span class="identifier">Context</span></code> the
- second argument. This is done for uniformity with <a class="link" 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="id1243923"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">fg</span></code>
- </p>
- </td>
-<td>
- <p>
- The Boost.Phoenix
- function object <code class="computeroutput"><span class="identifier">fg</span></code>
- 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>
- <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code>
- </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 <code class="computeroutput"><span class="identifier">lazy</span></code> does
- not require <code class="computeroutput"><span class="identifier">fg</span></code>
- 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="id1244075"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.lazy.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">fg</span></code>
- </p>
- </td>
-<td>
- <p>
- The attribute type <code class="computeroutput"><span class="identifier">G</span></code>
- as exposed by the generator <code class="computeroutput"><span class="identifier">g</span></code>
- returned from <code class="computeroutput"><span class="identifier">fg</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- The attribute type <code class="computeroutput"><span class="identifier">G</span></code>
- as exposed by the generator <code class="computeroutput"><span class="identifier">g</span></code>
- returned from <code class="computeroutput"><span class="identifier">fg</span></code>.
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.karma.reference.auxiliary.lazy.complexity"></a><h6>
-<a name="id1244224"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.lazy.complexity">Complexity</a>
- </h6>
-<p>
- The complexity of the <code class="computeroutput"><span class="identifier">lazy</span></code>
- component is determined by the complexity of the generator returned from
- <code class="computeroutput"><span class="identifier">fg</span></code>.
- </p>
-<a name="spirit.karma.reference.auxiliary.lazy.example"></a><h6>
-<a name="id1244255"></a>
- <a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.lazy.example">Example</a>
- </h6>
-</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -586,7 +55,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eol.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eol.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,172 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>eol</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../auxiliary.html" title="Auxiliary">
+<link rel="prev" href="../auxiliary.html" title="Auxiliary">
+<link rel="next" href="eps.html" title="eps">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../auxiliary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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="eps.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="eol">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.auxiliary.eol"></a><a class="link" href="eol.html" title="eol">eol</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.auxiliary.eol.description"></a><h6>
+<a name="id1263516"></a>
+ <a class="link" href="eol.html#spirit.karma.reference.auxiliary.eol.description">Description</a>
+ </h6>
+<p>
+ The <code class="computeroutput"><span class="identifier">eol</span></code> component generates
+ a single newline character. It is equivalent to <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="char">'\n'</span><span class="special">)</span></code>
+ or simply '\n' (please see the <a class="link" href="../char/char_generator.html" title="Character Generators"><code class="computeroutput"><span class="identifier">char_</span></code></a> generator module for more
+ details).
+ </p>
+<a name="spirit.karma.reference.auxiliary.eol.header"></a><h6>
+<a name="id1263569"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eol.model_of"></a><h6>
+<a name="id1263643"></a>
+ <a class="link" href="eol.html#spirit.karma.reference.auxiliary.eol.model_of">Model of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.auxiliary.eol.expression_semantics"></a><h6>
+<a name="id1263682"></a>
+ <a class="link" href="eol.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 <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">eol</span></code>
+ </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="id1263770"></a>
+ <a class="link" href="eol.html#spirit.karma.reference.auxiliary.eol.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">eol</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.eol.complexity"></a><h6>
+<a name="id1263848"></a>
+ <a class="link" href="eol.html#spirit.karma.reference.auxiliary.eol.complexity">Complexity</a>
+ </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="id1263876"></a>
+ <a class="link" href="eol.html#spirit.karma.reference.auxiliary.eol.example">Example</a>
+ </h6>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../auxiliary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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="eps.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eps.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/eps.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,246 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>eps</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../auxiliary.html" title="Auxiliary">
+<link rel="prev" href="eol.html" title="eol">
+<link rel="next" href="lazy.html" title="lazy">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="eol.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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="lazy.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="eps">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.auxiliary.eps"></a><a class="link" href="eps.html" title="eps">eps</a>
+</h5></div></div></div>
+<p>
+ The family of <code class="computeroutput"><span class="identifier">eps</span></code> 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="id1263911"></a>
+ <a class="link" href="eps.html#spirit.karma.reference.auxiliary.eps.description">Description</a>
+ </h6>
+<p>
+ The <code class="computeroutput"><span class="identifier">eps</span></code> creates a component
+ generating an empty string while always succeeding. The <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
+ component generates an empty string as well, but succeeds only if <code class="computeroutput"><span class="identifier">b</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>
+ and fails otherwise. It's lazy variant <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></code> is equivalent to <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code> except it evaluates the supplied function
+ <code class="computeroutput"><span class="identifier">fb</span></code> 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="id1264010"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.auxiliary.eps.model_of"></a><h6>
+<a name="id1264085"></a>
+ <a class="link" href="eps.html#spirit.karma.reference.auxiliary.eps.model_of">Model of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">b</span></code></span></dt>
+<dd><p>
+ A boolean value.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">fb</span></code></span></dt>
+<dd><p>
+ A <a class="link" 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="id1264171"></a>
+ <a class="link" href="eps.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 <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">eps</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a component generating an empty string. Succeeds always.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a component generating an empty string. Succeeds if
+ <code class="computeroutput"><span class="identifier">b</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Creates a component generating an empty string. Succeeds if
+ <code class="computeroutput"><span class="identifier">fb</span></code> returns <code class="computeroutput"><span class="keyword">true</span></code> at generate time.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.eps.attributes"></a><h6>
+<a name="id1264358"></a>
+ <a class="link" href="eps.html#spirit.karma.reference.auxiliary.eps.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">eps</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">fb</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.eps.complexity"></a><h6>
+<a name="id1264520"></a>
+ <a class="link" href="eps.html#spirit.karma.reference.auxiliary.eps.complexity">Complexity</a>
+ </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="id1264548"></a>
+ <a class="link" href="eps.html#spirit.karma.reference.auxiliary.eps.example">Example</a>
+ </h6>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="eol.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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="lazy.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/lazy.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/auxiliary/lazy.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,230 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lazy</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../auxiliary.html" title="Auxiliary">
+<link rel="prev" href="eps.html" title="eps">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="eps.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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" title="lazy">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.auxiliary.lazy"></a><a class="link" href="lazy.html" title="lazy">lazy</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.auxiliary.lazy.description"></a><h6>
+<a name="id1264572"></a>
+ <a class="link" href="lazy.html#spirit.karma.reference.auxiliary.lazy.description">Description</a>
+ </h6>
+<p>
+ The familiy of <code class="computeroutput"><span class="identifier">lazy</span></code> 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="id1264596"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.auxiliary.lazy.model_of"></a><h6>
+<a name="id1264670"></a>
+ <a class="link" href="lazy.html#spirit.karma.reference.auxiliary.lazy.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">fg</span></code></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 <code class="computeroutput"><span class="identifier">fg</span></code> 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 <code class="computeroutput"><span class="identifier">G</span></code>, the function's
+ return value, is the type of the generator to be invoked, and <code class="computeroutput"><span class="identifier">Context</span></code> is the generators's Context
+ type (The first argument is <code class="computeroutput"><span class="identifier">unused</span></code>
+ to make the <code class="computeroutput"><span class="identifier">Context</span></code> the
+ second argument. This is done for uniformity with <a class="link" 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="id1264812"></a>
+ <a class="link" href="lazy.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 <a class="link" href="../generator_concepts/generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">fg</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The Boost.Phoenix
+ function object <code class="computeroutput"><span class="identifier">fg</span></code>
+ 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>
+ <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code>
+ </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 <code class="computeroutput"><span class="identifier">lazy</span></code> does
+ not require <code class="computeroutput"><span class="identifier">fg</span></code>
+ 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="id1264964"></a>
+ <a class="link" href="lazy.html#spirit.karma.reference.auxiliary.lazy.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">fg</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The attribute type <code class="computeroutput"><span class="identifier">G</span></code>
+ as exposed by the generator <code class="computeroutput"><span class="identifier">g</span></code>
+ returned from <code class="computeroutput"><span class="identifier">fg</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fg</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The attribute type <code class="computeroutput"><span class="identifier">G</span></code>
+ as exposed by the generator <code class="computeroutput"><span class="identifier">g</span></code>
+ returned from <code class="computeroutput"><span class="identifier">fg</span></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.auxiliary.lazy.complexity"></a><h6>
+<a name="id1265113"></a>
+ <a class="link" href="lazy.html#spirit.karma.reference.auxiliary.lazy.complexity">Complexity</a>
+ </h6>
+<p>
+ The complexity of the <code class="computeroutput"><span class="identifier">lazy</span></code>
+ component is determined by the complexity of the generator returned from
+ <code class="computeroutput"><span class="identifier">fg</span></code>.
+ </p>
+<a name="spirit.karma.reference.auxiliary.lazy.example"></a><h6>
+<a name="id1265144"></a>
+ <a class="link" href="lazy.html#spirit.karma.reference.auxiliary.lazy.example">Example</a>
+ </h6>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="eps.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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/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-23 22:07:18 EDT (Sun, 23 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="prev" href="karma_basics.html" title="Basics">
-<link rel="next" href="numeric.html" title="Numeric">
+<link rel="next" href="char/char_generator.html" title="Character Generators">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,16 +20,16 @@
</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="numeric.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="char/char_generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Char">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.karma.reference.char"></a><a class="link" href="char.html" title="Char"> Char</a>
</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="char.html#spirit.karma.reference.char.char_generator"> Character
+<dt><span class="section"><a href="char/char_generator.html"> Character
Generators</a></span></dt>
-<dt><span class="section"><a href="char.html#spirit.karma.reference.char.char_class"> Character
+<dt><span class="section"><a href="char/char_class.html"> Character
Class Generators</a></span></dt>
</dl></div>
<p>
@@ -38,1281 +38,12 @@
generators.
</p>
<a name="spirit.karma.reference.char.module_header"></a><h6>
-<a name="id1173181"></a>
+<a name="id1193589"></a>
<a class="link" href="char.html#spirit.karma.reference.char.module_header">Module Header</a>
</h6>
<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" title="Character Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.char.char_generator"></a><a class="link" href="char.html#spirit.karma.reference.char.char_generator" title="Character Generators"> Character
- Generators</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.char.char_generator.description"></a><h6>
-<a name="id1173257"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_generator.description">Description</a>
- </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>
- <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">ch</span></code>,
- same as <code 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></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the mandatory attribute as a single character interpreted
- in the character set define by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">ch</span></code>
- as a character interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>, if an attribute is supplied
- it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">c</span></code> as
- a character interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>, if an attribute is supplied
- it must match, equivalent to <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="char">'c'</span><span class="special">)</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </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 <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it belongs
- to <code class="computeroutput"><span class="identifier">charset</span></code> interpreted
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<p>
- In the table above, <code class="computeroutput"><span class="identifier">ns</span></code>
- is a <a class="link" 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="id1173709"></a>
- <a class="link" href="char.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.char.char_generator.model_of"></a><h6>
-<a name="id1173784"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_generator.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">ch</span></code>,
- <code class="computeroutput"><span class="identifier">ch1</span></code>, <code class="computeroutput"><span class="identifier">ch2</span></code></span></dt>
-<dd><p>
- Character-class specific character (See Character Class Types), or
- a <a class="link" 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"><code class="computeroutput"><span class="identifier">charset</span></code></span></dt>
-<dd><p>
- Character-set specifier string (See Character Class Types), or a
- <a class="link" 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"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
-<dd><p>
- A <a class="link" 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="id1173912"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate the character literal <code class="computeroutput"><span class="identifier">ch</span></code>.
- This generator never fails (except if the underlying output stream
- reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate the character literal <code class="computeroutput"><span class="identifier">ch</span></code>.
- This generator never fails (except if the underlying output stream
- reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate the character provided by a mandatory attribute interpreted
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>.
- This generator never fails (except if the underlying output stream
- reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate the character <code class="computeroutput"><span class="identifier">ch</span></code>
- 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate the character <code class="computeroutput"><span class="identifier">c</span></code>
- 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate the character provided by a mandatory attribute interpreted
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>.
- The generator succeeds as long as the attribute belongs to the
- character range <code class="computeroutput"><span class="special">[</span><span class="identifier">ch1</span><span class="special">,</span>
- <span class="identifier">ch2</span><span class="special">]</span></code>
- (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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate the character provided by a mandatory attribute interpreted
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>.
- The generator succeeds as long as the attribute belongs to the
- character set <code class="computeroutput"><span class="identifier">charset</span></code>
- (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 <code class="computeroutput"><span class="identifier">ch</span></code> is assumed
- to belong to the character range defined by <code 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></code> if its character value (binary representation)
- interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- is not smaller than the character value of <code class="computeroutput"><span class="identifier">ch1</span></code>
- and not larger then the character value of <code class="computeroutput"><span class="identifier">ch2</span></code>
- (i.e. <code 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></code>).
- </p>
-<p>
- The <code class="computeroutput"><span class="identifier">charset</span></code> parameter
- passed to <code 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></code>
- 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 <code class="computeroutput"><span class="char">'-'</span></code>
- character which has a special meaning if it is not specified as the first
- and not the last character in <code class="computeroutput"><span class="identifier">charset</span></code>.
- If the <code class="computeroutput"><span class="char">'-'</span></code> is used in between
- to characters it is interpreted as spanning a character range. A character
- <code class="computeroutput"><span class="identifier">ch</span></code> is considered to belong
- to the defined character set <code class="computeroutput"><span class="identifier">charset</span></code>
- 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>
- <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"abc"</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- 'a', 'b', and 'c'
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-z"</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- all characters (and including) from 'a' to 'z'
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z"</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- all characters (and including) from 'a' to 'z' and 'A' and 'Z'
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"-1-9"</span><span class="special">)</span></code>
- </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="id1175022"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_generator.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
- is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">ch</span></code> and succeeds
- only if both are equal, failing otherwise
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">c</span></code> and succeeds
- only if both are equal, failing otherwise
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
- is mandatory (otherwise compilation will fail), the generator
- succeeds if the attribute belongs to the character range <code class="computeroutput"><span class="special">[</span><span class="identifier">ch1</span><span class="special">,</span> <span class="identifier">ch2</span><span class="special">]</span></code> interpreted in the character
- set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
- is mandatory (otherwise compilation will fail), the generator
- succeeds if the attribute belongs to the character set <code class="computeroutput"><span class="identifier">charset</span></code>, interpreted in the
- character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.karma.reference.char.char_generator.complexity"></a><h6>
-<a name="id1175444"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_generator.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- O(1)
- </p>
-<p>
- </p>
-</blockquote></div>
-<p>
- The complexity of <code class="computeroutput"><span class="identifier">ch</span></code>,
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>,
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>, <code 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></code>, and <code 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></code> is constant as all generators emit exactly
- one character per invocation.
- </p>
-<p>
- The character range generator (<code 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></code>) additionally requires constant lookup
- time for the verification whether the attribute belongs to the character
- range.
- </p>
-<p>
- The character set generator (<code 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></code>) 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="id1175628"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_generator.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">char_</span></code>
- 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" title="Character Class Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.char.char_class"></a><a class="link" href="char.html#spirit.karma.reference.char.char_class" title="Character Class Generators"> Character
- Class Generators</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.char.char_class.description"></a><h6>
-<a name="id1178168"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_class.description">Description</a>
- </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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alnum</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alpha</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- thh concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">blank</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">cntrl</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">digit</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">graph</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">print</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">punct</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">xdigit</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code>
- in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">space</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates the character supplied as the attribute if it satisfies
- the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code>
- in or a single space character the character set defined by
- <code class="computeroutput"><span class="identifier">ns</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<p>
- In the table above, <code class="computeroutput"><span class="identifier">ns</span></code>
- is a <a class="link" 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 <code class="computeroutput"><span class="identifier">Ch</span></code>
- and will not compile if no attribute is associated.
- </p>
-<a name="spirit.karma.reference.char.char_class.header"></a><h6>
-<a name="id1178874"></a>
- <a class="link" href="char.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.char.char_class.model_of"></a><h6>
-<a name="id1178949"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_class.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
-<dd><p>
- A <a class="link" 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="id1179017"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alnum</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alpha</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">blank</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">cntrl</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">digit</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">graph</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">print</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">punct</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">xdigit</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span></code>
- </p>
- </td>
-<td>
- <p>
- If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code> 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>
- <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">space</span></code>
- </p>
- </td>
-<td>
- <p>
- If the optional attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code> 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
- <code class="computeroutput"><span class="identifier">ns</span></code>.
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<p>
- Possible values for <code class="computeroutput"><span class="identifier">ns</span></code>
- are described in the section <a class="link" href="karma_basics.html#spirit.karma.reference.karma_basics.character_encoding_namespace">Character
- Encoding Namespace</a>.
- </p>
-<div class="note" title="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 align="left" valign="top">
-<p>
- The generators <code class="computeroutput"><span class="identifier">alpha</span></code>
- and <code class="computeroutput"><span class="identifier">alnum</span></code> might seem
- to behave unexpected if used inside a <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code> or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> directive. Both directives additionally
- apply the semanitics of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code>
- or <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code> 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 <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> behaves correspondingly.
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.char.char_class.attributes"></a><h6>
-<a name="id1179891"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_class.attributes">Attributes</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- All listed character class generators can take any attribute <code class="computeroutput"><span class="identifier">Ch</span></code>. All character class generators
- (except <code class="computeroutput"><span class="identifier">space</span></code>) 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="id1179930"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_class.complexity">Complexity</a>
- </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="id1179958"></a>
- <a class="link" href="char.html#spirit.karma.reference.char.char_class.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">alpha</span></code>
- 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>
@@ -1325,7 +56,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="numeric.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="char/char_generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_class.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_class.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,634 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Character Class Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../char.html" title="Char">
+<link rel="prev" href="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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="char_generator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../char.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" title="Character Class Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.char.char_class"></a><a class="link" href="char_class.html" title="Character Class Generators"> Character
+ Class Generators</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.char.char_class.description"></a><h6>
+<a name="id1199126"></a>
+ <a class="link" href="char_class.html#spirit.karma.reference.char.char_class.description">Description</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alnum</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alpha</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ thh concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">blank</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">cntrl</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">digit</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">graph</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">print</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">punct</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">xdigit</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code>
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">space</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it satisfies
+ the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code>
+ in or a single space character the character set defined by
+ <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ In the table above, <code class="computeroutput"><span class="identifier">ns</span></code>
+ is a <a class="link" 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 <code class="computeroutput"><span class="identifier">Ch</span></code>
+ and will not compile if no attribute is associated.
+ </p>
+<a name="spirit.karma.reference.char.char_class.header"></a><h6>
+<a name="id1199832"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.char.char_class.model_of"></a><h6>
+<a name="id1199907"></a>
+ <a class="link" href="char_class.html#spirit.karma.reference.char.char_class.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
+<dd><p>
+ A <a class="link" 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="id1199975"></a>
+ <a class="link" href="char_class.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 <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alnum</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">alpha</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">blank</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">cntrl</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">digit</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">graph</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">print</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">punct</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">xdigit</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the mandatory attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code> 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>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">space</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If the optional attribute satisfies the concept of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code> 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
+ <code class="computeroutput"><span class="identifier">ns</span></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Possible values for <code class="computeroutput"><span class="identifier">ns</span></code>
+ are described in the section <a class="link" href="../karma_basics.html#spirit.karma.reference.karma_basics.character_encoding_namespace">Character
+ Encoding Namespace</a>.
+ </p>
+<div class="note" title="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 align="left" valign="top">
+<p>
+ The generators <code class="computeroutput"><span class="identifier">alpha</span></code>
+ and <code class="computeroutput"><span class="identifier">alnum</span></code> might seem
+ to behave unexpected if used inside a <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code> or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> directive. Both directives additionally
+ apply the semanitics of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code>
+ or <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code> 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 <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> behaves correspondingly.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.char.char_class.attributes"></a><h6>
+<a name="id1200849"></a>
+ <a class="link" href="char_class.html#spirit.karma.reference.char.char_class.attributes">Attributes</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ All listed character class generators can take any attribute <code class="computeroutput"><span class="identifier">Ch</span></code>. All character class generators
+ (except <code class="computeroutput"><span class="identifier">space</span></code>) 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="id1200888"></a>
+ <a class="link" href="char_class.html#spirit.karma.reference.char.char_class.complexity">Complexity</a>
+ </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="id1200916"></a>
+ <a class="link" href="char_class.html#spirit.karma.reference.char.char_class.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">alpha</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="char_generator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../char.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_generator.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/char/char_generator.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,713 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Character Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../char.html" title="Char">
+<link rel="prev" href="../char.html" title="Char">
+<link rel="next" href="char_class.html" title="Character Class Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../char.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../char.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_class.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Character Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.char.char_generator"></a><a class="link" href="char_generator.html" title="Character Generators"> Character
+ Generators</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.char.char_generator.description"></a><h6>
+<a name="id1193665"></a>
+ <a class="link" href="char_generator.html#spirit.karma.reference.char.char_generator.description">Description</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">ch</span></code>,
+ same as <code 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></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the mandatory attribute as a single character interpreted
+ in the character set define by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">ch</span></code>
+ as a character interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>, if an attribute is supplied
+ it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">c</span></code> as
+ a character interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>, if an attribute is supplied
+ it must match, equivalent to <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="char">'c'</span><span class="special">)</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </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 <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates the character supplied as the attribute if it belongs
+ to <code class="computeroutput"><span class="identifier">charset</span></code> interpreted
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ In the table above, <code class="computeroutput"><span class="identifier">ns</span></code>
+ is a <a class="link" 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="id1194117"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.char.char_generator.model_of"></a><h6>
+<a name="id1194192"></a>
+ <a class="link" href="char_generator.html#spirit.karma.reference.char.char_generator.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">ch</span></code>,
+ <code class="computeroutput"><span class="identifier">ch1</span></code>, <code class="computeroutput"><span class="identifier">ch2</span></code></span></dt>
+<dd><p>
+ Character-class specific character (See Character Class Types), or
+ a <a class="link" 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"><code class="computeroutput"><span class="identifier">charset</span></code></span></dt>
+<dd><p>
+ Character-set specifier string (See Character Class Types), or a
+ <a class="link" 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"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
+<dd><p>
+ A <a class="link" 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="id1194320"></a>
+ <a class="link" href="char_generator.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 <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the character literal <code class="computeroutput"><span class="identifier">ch</span></code>.
+ This generator never fails (except if the underlying output stream
+ reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the character literal <code class="computeroutput"><span class="identifier">ch</span></code>.
+ This generator never fails (except if the underlying output stream
+ reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the character provided by a mandatory attribute interpreted
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>.
+ This generator never fails (except if the underlying output stream
+ reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the character <code class="computeroutput"><span class="identifier">ch</span></code>
+ 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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the character <code class="computeroutput"><span class="identifier">c</span></code>
+ 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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the character provided by a mandatory attribute interpreted
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>.
+ The generator succeeds as long as the attribute belongs to the
+ character range <code class="computeroutput"><span class="special">[</span><span class="identifier">ch1</span><span class="special">,</span>
+ <span class="identifier">ch2</span><span class="special">]</span></code>
+ (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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the character provided by a mandatory attribute interpreted
+ in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>.
+ The generator succeeds as long as the attribute belongs to the
+ character set <code class="computeroutput"><span class="identifier">charset</span></code>
+ (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 <code class="computeroutput"><span class="identifier">ch</span></code> is assumed
+ to belong to the character range defined by <code 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></code> if its character value (binary representation)
+ interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ is not smaller than the character value of <code class="computeroutput"><span class="identifier">ch1</span></code>
+ and not larger then the character value of <code class="computeroutput"><span class="identifier">ch2</span></code>
+ (i.e. <code 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></code>).
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">charset</span></code> parameter
+ passed to <code 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></code>
+ 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 <code class="computeroutput"><span class="char">'-'</span></code>
+ character which has a special meaning if it is not specified as the first
+ and not the last character in <code class="computeroutput"><span class="identifier">charset</span></code>.
+ If the <code class="computeroutput"><span class="char">'-'</span></code> is used in between
+ to characters it is interpreted as spanning a character range. A character
+ <code class="computeroutput"><span class="identifier">ch</span></code> is considered to belong
+ to the defined character set <code class="computeroutput"><span class="identifier">charset</span></code>
+ 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>
+ <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"abc"</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 'a', 'b', and 'c'
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-z"</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ all characters (and including) from 'a' to 'z'
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"a-zA-Z"</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ all characters (and including) from 'a' to 'z' and 'A' and 'Z'
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"-1-9"</span><span class="special">)</span></code>
+ </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="id1195433"></a>
+ <a class="link" href="char_generator.html#spirit.karma.reference.char.char_generator.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">ch</span></code> and succeeds
+ only if both are equal, failing otherwise
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">c</span></code> and succeeds
+ only if both are equal, failing otherwise
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
+ is mandatory (otherwise compilation will fail), the generator
+ succeeds if the attribute belongs to the character range <code class="computeroutput"><span class="special">[</span><span class="identifier">ch1</span><span class="special">,</span> <span class="identifier">ch2</span><span class="special">]</span></code> interpreted in the character
+ set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>, attribute
+ is mandatory (otherwise compilation will fail), the generator
+ succeeds if the attribute belongs to the character set <code class="computeroutput"><span class="identifier">charset</span></code>, interpreted in the
+ character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.char.char_generator.complexity"></a><h6>
+<a name="id1195856"></a>
+ <a class="link" href="char_generator.html#spirit.karma.reference.char.char_generator.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(1)
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ The complexity of <code class="computeroutput"><span class="identifier">ch</span></code>,
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>,
+ <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">char_</span></code>, <code 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></code>, and <code 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></code> is constant as all generators emit exactly
+ one character per invocation.
+ </p>
+<p>
+ The character range generator (<code 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></code>) additionally requires constant lookup
+ time for the verification whether the attribute belongs to the character
+ range.
+ </p>
+<p>
+ The character set generator (<code 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></code>) 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="id1196039"></a>
+ <a class="link" href="char_generator.html#spirit.karma.reference.char.char_generator.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">char_</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../char.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../char.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_class.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,8 +6,8 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="numeric.html" title="Numeric">
-<link rel="next" href="operator.html" title="Operator">
+<link rel="prev" 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[])">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,26 +20,26 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Directive">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.karma.reference.directive"></a><a class="link" href="directive.html" title="Directive">Directive</a>
</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.alignment"> Alignment
+<dt><span class="section"><a href="directive/alignment.html"> Alignment
Directives (<code class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></code>, <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>, and <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>)</a></span></dt>
-<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.repeat"> Repetition
+<dt><span class="section"><a href="directive/repeat.html"> Repetition
Directive (<code class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></code>)</a></span></dt>
-<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.delimit"> Directives
+<dt><span class="section"><a href="directive/delimit.html"> Directives
Controlling Automatic Delimiting (<code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code>)</a></span></dt>
-<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.upperlower"> Directives
+<dt><span class="section"><a href="directive/upperlower.html"> Directives
Controlling Case Sensitivity (<code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>)</a></span></dt>
-<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.maxwidth"> Controlling
+<dt><span class="section"><a href="directive/maxwidth.html"> Controlling
the Maximum Field Wield (<code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>)</a></span></dt>
-<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.buffer"> Temporary
+<dt><span class="section"><a href="directive/buffer.html"> Temporary
Output Buffering (<code class="computeroutput"><span class="identifier">buffer</span><span class="special">[]</span></code>)</a></span></dt>
-<dt><span class="section"><a href="directive.html#spirit.karma.reference.directive.omit"> Consume Attribute
+<dt><span class="section"><a href="directive/omit.html"> Consume Attribute
(<code class="computeroutput"><span class="identifier">omit</span><span class="special">[]</span></code>)</a></span></dt>
</dl></div>
<p>
@@ -50,2468 +50,12 @@
controlling case sensitivity (<code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>), field width (<code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>), buffering (<code class="computeroutput"><span class="identifier">buffer</span><span class="special">[]</span></code>), and attribute handling (<code class="computeroutput"><span class="identifier">omit</span><span class="special">[]</span></code>).
</p>
<a name="spirit.karma.reference.directive.module_header"></a><h6>
-<a name="id1203670"></a>
+<a name="id1224448"></a>
<a class="link" href="directive.html#spirit.karma.reference.directive.module_header">Module Header</a>
</h6>
<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" title="Alignment Directives (left_align[], center[], and right_align[])">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.directive.alignment"></a><a class="link" href="directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"> Alignment
- Directives (<code class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></code>, <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>, and <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.directive.alignment.description"></a><h6>
-<a name="id1203847"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.alignment.description">Description</a>
- </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="id1203864"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.alignment.header">Header</a>
- </h6>
-<p>
- For the <code class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></code>
- 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 <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>
- 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 <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>
- 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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.directive.alignment.model_of"></a><h6>
-<a name="id1204087"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.alignment.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
-<dd><p>
- A generator object
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">pad</span></code></span></dt>
-<dd><p>
- A generator object, or a <a class="link" 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"><code class="computeroutput"><span class="identifier">A</span></code>,
- <code class="computeroutput"><span class="identifier">Pad</span></code></span></dt>
-<dd><p>
- Attribute types of the generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">pad</span></code>
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">width</span></code></span></dt>
-<dd><p>
- Numeric literal, any unsigned integer value, or a <a class="link" 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="id1204237"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> left
- aligned in a column of width as defined by the preprocessor constant
- <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
- (default: 10), while using <code class="computeroutput"><span class="identifier">space</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- does not fail (except if the underlying output stream reports
- an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> left
- aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
- while using <code class="computeroutput"><span class="identifier">space</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- does not fail (except if the underlying output stream reports
- an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> left
- aligned in a column of width as defined by the preprocessor constant
- <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
- (default: 10), while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">pad</span></code> do not
- fail (except if the underlying output stream reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> left
- aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
- while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">pad</span></code> do not
- fail (except if the underlying output stream reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
- in a column of width as defined by the preprocessor constant
- <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
- (default: 10), while using <code class="computeroutput"><span class="identifier">space</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- does not fail (except if the underlying output stream reports
- an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
- in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
- while using <code class="computeroutput"><span class="identifier">space</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- does not fail (except if the underlying output stream reports
- an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
- in a column of width as defined by the preprocessor constant
- <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
- (default: 10), while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">pad</span></code> do not
- fail (except if the underlying output stream reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
- in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
- while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">pad</span></code> do not
- fail (except if the underlying output stream reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> right
- aligned in a column of width as defined by the preprocessor constant
- <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
- (default: 10), while using <code class="computeroutput"><span class="identifier">space</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- does not fail (except if the underlying output stream reports
- an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> right
- aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
- while using <code class="computeroutput"><span class="identifier">space</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- does not fail (except if the underlying output stream reports
- an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> right
- aligned in a column of width as defined by the preprocessor constant
- <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
- (default: 10), while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">pad</span></code> do not
- fail (except if the underlying output stream reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> right
- aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
- while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
- to emit the necessary padding. This generator succeeds as long
- as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">pad</span></code> do not
- fail (except if the underlying output stream reports an error).
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<div class="note" title="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 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 <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>
- 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: <code class="computeroutput"><span class="string">" 123456"</span></code>
- (without the quotes).
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.directive.alignment.attributes"></a><h6>
-<a name="id1205276"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.alignment.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></code>
- </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>
- <code 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></code>
- </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>
- <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></code>
- </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>
- <code 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></code>
- </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>
- <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></code>
- </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>
- <code 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></code>
- </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="id1207218"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.alignment.complexity">Complexity</a>
- </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 <code class="computeroutput"><span class="identifier">N</span></code> 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="id1207250"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.alignment.example">Example</a>
- </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" title="Repetition Directive (repeat[])">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.directive.repeat"></a><a class="link" href="directive.html#spirit.karma.reference.directive.repeat" title="Repetition Directive (repeat[])"> Repetition
- Directive (<code class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.directive.repeat.description"></a><h6>
-<a name="id1209594"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.repeat.description">Description</a>
- </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="id1209611"></a>
- <a class="link" href="directive.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.directive.repeat.model_of"></a><h6>
-<a name="id1209685"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.repeat.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
-<dd><p>
- A generator object
- </p></dd>
-<dt><span class="term"><code 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></code></span></dt>
-<dd><p>
- Numeric literals, any unsigned integer value, or a <a class="link" 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"><code class="computeroutput"><span class="identifier">inf</span></code></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="id1209808"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
- zero or more times. This generator succeeds as long as its embedded
- generator <code class="computeroutput"><span class="identifier">a</span></code> does
- not fail (except if the underlying output stream reports an error).
- This variant of <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></code> is semantically equivalent
- to the <a class="link" href="operator.html#spirit.karma.reference.operator.kleene" title="Kleene Star (unary operator*())">Kleene
- Star operator <code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code></a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
- exactly <code class="computeroutput"><span class="identifier">num</span></code> times.
- This generator succeeds as long as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code> does not fail and as long
- as the associated attribute (container) contains at least <code class="computeroutput"><span class="identifier">num</span></code> elements (except if the
- underlying output stream reports an error).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
- at least <code class="computeroutput"><span class="identifier">num1</span></code>
- times but not more than <code class="computeroutput"><span class="identifier">num2</span></code>
- times. This generator succeeds as long as its embedded generator
- <code class="computeroutput"><span class="identifier">a</span></code> does not fail
- and as long as the associated attribute (container) contains
- at least <code class="computeroutput"><span class="identifier">num1</span></code>
- elements (except if the underlying output stream reports an error).
- If the associated attribute (container) does contain more than
- <code class="computeroutput"><span class="identifier">num2</span></code> elements,
- this directive limits the repeat count to <code class="computeroutput"><span class="identifier">num2</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
- at least <code class="computeroutput"><span class="identifier">num1</span></code>
- times. No upper limit for the repeat count is set. This generator
- succeeds as long as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- does not fail and as long as the associated attribute (container)
- contains at least <code class="computeroutput"><span class="identifier">num</span></code>
- 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="id1210198"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.repeat.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </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>
- <code 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></code>
- </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>
- <code 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></code>
- </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>
- <code 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></code>
- </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" title="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 align="left" valign="top">
-<p>
- The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as placeholders only.
- </p>
-<p>
- The notation of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> stands for <span class="emphasis"><em>any STL container</em></span>
- holding elements of type <code class="computeroutput"><span class="identifier">A</span></code>.
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.directive.repeat.complexity"></a><h6>
-<a name="id1210917"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.repeat.complexity">Complexity</a>
- </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="id1210941"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.repeat.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">repeat</span></code>
- 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" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.directive.delimit"></a><a class="link" href="directive.html#spirit.karma.reference.directive.delimit" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"> Directives
- Controlling Automatic Delimiting (<code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.directive.delimit.description"></a><h6>
-<a name="id1213262"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.delimit.description">Description</a>
- </h6>
-<p>
- The directives <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> can be used to control automatic delimiting.
- The directive <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> disabled any automatic delimiting,
- while the directive <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code> (re-)enable automatic delimiting.
- </p>
-<a name="spirit.karma.reference.directive.delimit.header"></a><h6>
-<a name="id1213322"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.delimit.header">Header</a>
- </h6>
-<p>
- For the <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code>
- 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 <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code>
- 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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.directive.delimit.model_of"></a><h6>
-<a name="id1213478"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.delimit.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
-<dd><p>
- A generator object
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">d</span></code></span></dt>
-<dd><p>
- A generator object, or a <a class="link" 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"><code class="computeroutput"><span class="identifier">A</span></code>,
- <code class="computeroutput"><span class="identifier">D</span></code></span></dt>
-<dd><p>
- Attribute types of the generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">d</span></code>
- </p></dd>
-</dl>
-</div>
-<a name="spirit.karma.reference.directive.delimit.expression_semantics"></a><h6>
-<a name="id1213604"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Enable automatic delimiting for the embedded generator <code class="computeroutput"><span class="identifier">a</span></code> while using the <code class="computeroutput"><span class="identifier">space</span></code> generator as the delimiting
- generator. If used inside a <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> directive it re-enables the
- delimiter generator as used outside of this <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Enable automatic delimiting for the embedded generator <code class="computeroutput"><span class="identifier">a</span></code> while using the generator
- <code class="computeroutput"><span class="identifier">d</span></code> 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>
- <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Disable automatic delimiting for the embedded generator <code class="computeroutput"><span class="identifier">a</span></code>. 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="id1213838"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.delimit.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </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>
- <code 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></code>
- </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>
- <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </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="id1214282"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.delimit.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- The overall complexity of the generator directives <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code>
- and <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code>
- 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="id1214327"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.delimit.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">delimit</span></code>
- 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" title="Directives Controlling Case Sensitivity (upper[] and lower[])">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.directive.upperlower"></a><a class="link" href="directive.html#spirit.karma.reference.directive.upperlower" title="Directives Controlling Case Sensitivity (upper[] and lower[])"> Directives
- Controlling Case Sensitivity (<code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.directive.upperlower.description"></a><h6>
-<a name="id1215480"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.upperlower.description">Description</a>
- </h6>
-<p>
- The generator directives <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[]</span></code> 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 <code class="computeroutput"><span class="identifier">ns</span></code> (see <a class="link" 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="id1215545"></a>
- <a class="link" href="directive.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.directive.upperlower.model_of"></a><h6>
-<a name="id1215619"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.upperlower.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
-<dd><p>
- A generator object
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
-<dd><p>
- Attribute type of the generator <code class="computeroutput"><span class="identifier">a</span></code>
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
-<dd><p>
- A <a class="link" 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="id1215728"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> as
- lower case, interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>. 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">a</span></code> as
- upper case, interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>. 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" title="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 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 <code class="computeroutput"><span class="string">"aB"</span></code>
- (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 <code class="computeroutput"><span class="identifier">ns</span></code>.
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.directive.upperlower.attributes"></a><h6>
-<a name="id1215995"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.upperlower.attributes">Attributes</a>
- </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>
- <code 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></code>
- </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>
- <code 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></code>
- </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="id1216313"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.upperlower.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- The overall complexity of the generator directives <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[]</span></code>
- and <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[]</span></code>
- 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="id1216373"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.upperlower.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">upper</span></code>
- and <code class="computeroutput"><span class="identifier">lower</span></code> 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" title="Controlling the Maximum Field Wield (maxwidth[])">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.directive.maxwidth"></a><a class="link" href="directive.html#spirit.karma.reference.directive.maxwidth" title="Controlling the Maximum Field Wield (maxwidth[])"> Controlling
- the Maximum Field Wield (<code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.directive.maxwidth.description"></a><h6>
-<a name="id1217157"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.maxwidth.description">Description</a>
- </h6>
-<p>
- The <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>
- 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="id1217185"></a>
- <a class="link" href="directive.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.directive.maxwidth.model_of"></a><h6>
-<a name="id1217259"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.maxwidth.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
-<dd><p>
- A generator object
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
-<dd><p>
- Attribute type of the generator <code class="computeroutput"><span class="identifier">a</span></code>
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
-<dd><p>
- Numeric literal, any unsigned integer value, or a <a class="link" 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="id1217372"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </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
- <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_MAXWIDTH</span></code>.
- 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>
- <code 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></code>
- </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 <code class="computeroutput"><span class="identifier">num</span></code>.
- 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" title="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 align="left" valign="top">
-<p>
- The <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>
- 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 <code class="computeroutput"><span class="identifier">left</span><span class="special">-</span><span class="identifier">align</span><span class="special">[]</span></code>, <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>, or <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>, 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: <code class="computeroutput"><span class="string">"1234 "</span></code>
- (without the quotes).
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.directive.maxwidth.attributes"></a><h6>
-<a name="id1219283"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.maxwidth.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </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>
- <code 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></code>
- </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="id1219579"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.maxwidth.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- The overall complexity of the generator directive <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code> is defined by the complexity of
- its embedded generator. The complexity of the directive itself is
- O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1219621"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.maxwidth.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">maxwidth</span></code>
- 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" title="Temporary Output Buffering (buffer[])">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.directive.buffer"></a><a class="link" href="directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"> Temporary
- Output Buffering (<code class="computeroutput"><span class="identifier">buffer</span><span class="special">[]</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.directive.buffer.description"></a><h6>
-<a name="id1220436"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.buffer.description">Description</a>
- </h6>
-<p>
- All generator components (except the <a class="link" href="operator.html#spirit.karma.reference.operator.alternative" title="Alternatives (operator|())">alternative
- (<code class="computeroutput"><span class="special">|</span></code>)</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="id1220465"></a>
- <a class="link" href="directive.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.directive.buffer.model_of"></a><h6>
-<a name="id1220539"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.buffer.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
-<dd><p>
- A generator object
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
-<dd><p>
- Attribute type of generator <code class="computeroutput"><span class="identifier">a</span></code>
- </p></dd>
-</dl>
-</div>
-<a name="spirit.karma.reference.directive.buffer.expression_semantics"></a><h6>
-<a name="id1220628"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- The embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
- is invoked but its output is temporarily intercepted and stored
- in an internal buffer. If <code class="computeroutput"><span class="identifier">a</span></code>
- 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" title="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 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 <code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code> into an additional optional: <code class="computeroutput"><span class="special">-</span><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code> (see <a class="link" href="operator.html#spirit.karma.reference.operator.optional" title="Optional (unary operator-())">optional
- (unary <code class="computeroutput"><span class="special">-</span></code>)</a>).
- </p></td></tr>
-</table></div>
-<a name="spirit.karma.reference.directive.buffer.attributes"></a><h6>
-<a name="id1220801"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.buffer.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </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="id1220962"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.buffer.complexity">Complexity</a>
- </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="id1220986"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.buffer.example">Example</a>
- </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 class="link" href="operator.html#spirit.karma.reference.operator.plus" title="Plus (unary operator+())">plus
- (unary <code class="computeroutput"><span class="special">+</span></code>)</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" title="Consume Attribute (omit[])">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.directive.omit"></a><a class="link" href="directive.html#spirit.karma.reference.directive.omit" title="Consume Attribute (omit[])"> Consume Attribute
- (<code class="computeroutput"><span class="identifier">omit</span><span class="special">[]</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.directive.omit.description"></a><h6>
-<a name="id1222141"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.omit.description">Description</a>
- </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="id1222158"></a>
- <a class="link" href="directive.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.directive.omit.model_of"></a><h6>
-<a name="id1222232"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.omit.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
-<dd><p>
- A generator object
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
-<dd><p>
- Attribute type of generator <code class="computeroutput"><span class="identifier">a</span></code>
- </p></dd>
-</dl>
-</div>
-<a name="spirit.karma.reference.directive.omit.expression_semantics"></a><h6>
-<a name="id1222321"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- The <code class="computeroutput"><span class="identifier">omit</span></code> directive
- consumes the attribute type of the embedded generator <code class="computeroutput"><span class="identifier">A</span></code> 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="id1222435"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.omit.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </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="id1222596"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.omit.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- The overall complexity of the <code class="computeroutput"><span class="identifier">omit</span></code>
- 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="id1222627"></a>
- <a class="link" href="directive.html#spirit.karma.reference.directive.omit.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">omit</span></code>
- 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 <code class="computeroutput"><span class="identifier">double_</span></code>
- 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 <code class="computeroutput"><span class="identifier">omit</span></code>
- 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 <code class="computeroutput"><span class="identifier">omit</span></code> 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>
@@ -2524,7 +68,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/alignment.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/alignment.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,718 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Alignment Directives (left_align[], center[], and right_align[])</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="../directive.html" title="Directive">
+<link rel="next" href="repeat.html" title="Repetition Directive (repeat[])">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../directive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="repeat.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Alignment Directives (left_align[], center[], and right_align[])">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.alignment"></a><a class="link" href="alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"> Alignment
+ Directives (<code class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></code>, <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>, and <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.directive.alignment.description"></a><h6>
+<a name="id1224557"></a>
+ <a class="link" href="alignment.html#spirit.karma.reference.directive.alignment.description">Description</a>
+ </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="id1224574"></a>
+ <a class="link" href="alignment.html#spirit.karma.reference.directive.alignment.header">Header</a>
+ </h6>
+<p>
+ For the <code class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></code>
+ 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 <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>
+ 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 <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>
+ 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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.directive.alignment.model_of"></a><h6>
+<a name="id1224797"></a>
+ <a class="link" href="alignment.html#spirit.karma.reference.directive.alignment.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">pad</span></code></span></dt>
+<dd><p>
+ A generator object, or a <a class="link" 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"><code class="computeroutput"><span class="identifier">A</span></code>,
+ <code class="computeroutput"><span class="identifier">Pad</span></code></span></dt>
+<dd><p>
+ Attribute types of the generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">pad</span></code>
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">width</span></code></span></dt>
+<dd><p>
+ Numeric literal, any unsigned integer value, or a <a class="link" 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="id1224947"></a>
+ <a class="link" href="alignment.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">left_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> left
+ aligned in a column of width as defined by the preprocessor constant
+ <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
+ (default: 10), while using <code class="computeroutput"><span class="identifier">space</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> left
+ aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
+ while using <code class="computeroutput"><span class="identifier">space</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> left
+ aligned in a column of width as defined by the preprocessor constant
+ <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
+ (default: 10), while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">pad</span></code> do not
+ fail (except if the underlying output stream reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> left
+ aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
+ while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">pad</span></code> do not
+ fail (except if the underlying output stream reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">center</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
+ in a column of width as defined by the preprocessor constant
+ <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
+ (default: 10), while using <code class="computeroutput"><span class="identifier">space</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
+ in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
+ while using <code class="computeroutput"><span class="identifier">space</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
+ in a column of width as defined by the preprocessor constant
+ <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
+ (default: 10), while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">pad</span></code> do not
+ fail (except if the underlying output stream reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> centered
+ in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
+ while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">pad</span></code> do not
+ fail (except if the underlying output stream reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> right
+ aligned in a column of width as defined by the preprocessor constant
+ <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
+ (default: 10), while using <code class="computeroutput"><span class="identifier">space</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> right
+ aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
+ while using <code class="computeroutput"><span class="identifier">space</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ does not fail (except if the underlying output stream reports
+ an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> right
+ aligned in a column of width as defined by the preprocessor constant
+ <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_LENGTH</span></code>
+ (default: 10), while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">pad</span></code> do not
+ fail (except if the underlying output stream reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> right
+ aligned in a column of the given <code class="computeroutput"><span class="identifier">width</span></code>,
+ while using the generator <code class="computeroutput"><span class="identifier">pad</span></code>
+ to emit the necessary padding. This generator succeeds as long
+ as its embedded and padding generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">pad</span></code> do not
+ fail (except if the underlying output stream reports an error).
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="note" title="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 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 <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>
+ 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: <code class="computeroutput"><span class="string">" 123456"</span></code>
+ (without the quotes).
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.alignment.attributes"></a><h6>
+<a name="id1225986"></a>
+ <a class="link" href="alignment.html#spirit.karma.reference.directive.alignment.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">left_align</span><span class="special">[]</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">left_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></code>
+ </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>
+ <code 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></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">center</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></code>
+ </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>
+ <code 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></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">width</span><span class="special">)[]</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">right_align</span><span class="special">(</span><span class="identifier">pad</span><span class="special">)[]</span></code>
+ </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>
+ <code 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></code>
+ </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="id1227813"></a>
+ <a class="link" href="alignment.html#spirit.karma.reference.directive.alignment.complexity">Complexity</a>
+ </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 <code class="computeroutput"><span class="identifier">N</span></code> 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="id1227844"></a>
+ <a class="link" href="alignment.html#spirit.karma.reference.directive.alignment.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../directive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="repeat.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/buffer.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/buffer.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,289 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Temporary Output Buffering (buffer[])</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="maxwidth.html" title="Controlling the Maximum Field Wield (maxwidth[])">
+<link rel="next" href="omit.html" title="Consume Attribute (omit[])">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="maxwidth.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="omit.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Temporary Output Buffering (buffer[])">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.buffer"></a><a class="link" href="buffer.html" title="Temporary Output Buffering (buffer[])"> Temporary
+ Output Buffering (<code class="computeroutput"><span class="identifier">buffer</span><span class="special">[]</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.directive.buffer.description"></a><h6>
+<a name="id1241031"></a>
+ <a class="link" href="buffer.html#spirit.karma.reference.directive.buffer.description">Description</a>
+ </h6>
+<p>
+ All generator components (except the <a class="link" href="../operator/alternative.html" title="Alternatives (operator|())">alternative
+ (<code class="computeroutput"><span class="special">|</span></code>)</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="id1241060"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.directive.buffer.model_of"></a><h6>
+<a name="id1241134"></a>
+ <a class="link" href="buffer.html#spirit.karma.reference.directive.buffer.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
+<dd><p>
+ Attribute type of generator <code class="computeroutput"><span class="identifier">a</span></code>
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.buffer.expression_semantics"></a><h6>
+<a name="id1241223"></a>
+ <a class="link" href="buffer.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ is invoked but its output is temporarily intercepted and stored
+ in an internal buffer. If <code class="computeroutput"><span class="identifier">a</span></code>
+ 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" title="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 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 <code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code> into an additional optional: <code class="computeroutput"><span class="special">-</span><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code> (see <a class="link" href="../operator/optional.html" title="Optional (unary operator-())">optional
+ (unary <code class="computeroutput"><span class="special">-</span></code>)</a>).
+ </p></td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.buffer.attributes"></a><h6>
+<a name="id1241396"></a>
+ <a class="link" href="buffer.html#spirit.karma.reference.directive.buffer.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </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="id1241556"></a>
+ <a class="link" href="buffer.html#spirit.karma.reference.directive.buffer.complexity">Complexity</a>
+ </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="id1241580"></a>
+ <a class="link" href="buffer.html#spirit.karma.reference.directive.buffer.example">Example</a>
+ </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 class="link" href="../operator/plus.html" title="Plus (unary operator+())">plus
+ (unary <code class="computeroutput"><span class="special">+</span></code>)</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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="maxwidth.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="omit.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/delimit.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/delimit.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,354 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Directives Controlling Automatic Delimiting (verbatim[] and delimit[])</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="repeat.html" title="Repetition Directive (repeat[])">
+<link rel="next" href="upperlower.html" title="Directives Controlling Case Sensitivity (upper[] and lower[])">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="repeat.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="upperlower.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.delimit"></a><a class="link" href="delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"> Directives
+ Controlling Automatic Delimiting (<code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.directive.delimit.description"></a><h6>
+<a name="id1233856"></a>
+ <a class="link" href="delimit.html#spirit.karma.reference.directive.delimit.description">Description</a>
+ </h6>
+<p>
+ The directives <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> can be used to control automatic delimiting.
+ The directive <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> disabled any automatic delimiting,
+ while the directive <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code> (re-)enable automatic delimiting.
+ </p>
+<a name="spirit.karma.reference.directive.delimit.header"></a><h6>
+<a name="id1233916"></a>
+ <a class="link" href="delimit.html#spirit.karma.reference.directive.delimit.header">Header</a>
+ </h6>
+<p>
+ For the <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code>
+ 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 <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code>
+ 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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.directive.delimit.model_of"></a><h6>
+<a name="id1234072"></a>
+ <a class="link" href="delimit.html#spirit.karma.reference.directive.delimit.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">d</span></code></span></dt>
+<dd><p>
+ A generator object, or a <a class="link" 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"><code class="computeroutput"><span class="identifier">A</span></code>,
+ <code class="computeroutput"><span class="identifier">D</span></code></span></dt>
+<dd><p>
+ Attribute types of the generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">d</span></code>
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.delimit.expression_semantics"></a><h6>
+<a name="id1234198"></a>
+ <a class="link" href="delimit.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Enable automatic delimiting for the embedded generator <code class="computeroutput"><span class="identifier">a</span></code> while using the <code class="computeroutput"><span class="identifier">space</span></code> generator as the delimiting
+ generator. If used inside a <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> directive it re-enables the
+ delimiter generator as used outside of this <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code> 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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Enable automatic delimiting for the embedded generator <code class="computeroutput"><span class="identifier">a</span></code> while using the generator
+ <code class="computeroutput"><span class="identifier">d</span></code> 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>
+ <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Disable automatic delimiting for the embedded generator <code class="computeroutput"><span class="identifier">a</span></code>. 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="id1234432"></a>
+ <a class="link" href="delimit.html#spirit.karma.reference.directive.delimit.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </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>
+ <code 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></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </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="id1234876"></a>
+ <a class="link" href="delimit.html#spirit.karma.reference.directive.delimit.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the generator directives <code class="computeroutput"><span class="identifier">delimit</span><span class="special">[]</span></code>
+ and <code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[]</span></code>
+ 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="id1234922"></a>
+ <a class="link" href="delimit.html#spirit.karma.reference.directive.delimit.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">delimit</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="repeat.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="upperlower.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/maxwidth.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/maxwidth.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,335 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Controlling the Maximum Field Wield (maxwidth[])</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="upperlower.html" title="Directives Controlling Case Sensitivity (upper[] and lower[])">
+<link rel="next" href="buffer.html" title="Temporary Output Buffering (buffer[])">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="upperlower.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="buffer.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Controlling the Maximum Field Wield (maxwidth[])">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.maxwidth"></a><a class="link" href="maxwidth.html" title="Controlling the Maximum Field Wield (maxwidth[])"> Controlling
+ the Maximum Field Wield (<code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.directive.maxwidth.description"></a><h6>
+<a name="id1238162"></a>
+ <a class="link" href="maxwidth.html#spirit.karma.reference.directive.maxwidth.description">Description</a>
+ </h6>
+<p>
+ The <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>
+ 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="id1238189"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.directive.maxwidth.model_of"></a><h6>
+<a name="id1238264"></a>
+ <a class="link" href="maxwidth.html#spirit.karma.reference.directive.maxwidth.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
+<dd><p>
+ Attribute type of the generator <code class="computeroutput"><span class="identifier">a</span></code>
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
+<dd><p>
+ Numeric literal, any unsigned integer value, or a <a class="link" 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="id1238376"></a>
+ <a class="link" href="maxwidth.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </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
+ <code class="computeroutput"><span class="identifier">BOOST_KARMA_DEFAULT_FIELD_MAXWIDTH</span></code>.
+ 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>
+ <code 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></code>
+ </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 <code class="computeroutput"><span class="identifier">num</span></code>.
+ 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" title="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 align="left" valign="top">
+<p>
+ The <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code>
+ 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 <code class="computeroutput"><span class="identifier">left</span><span class="special">-</span><span class="identifier">align</span><span class="special">[]</span></code>, <code class="computeroutput"><span class="identifier">center</span><span class="special">[]</span></code>, or <code class="computeroutput"><span class="identifier">right_align</span><span class="special">[]</span></code>, 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: <code class="computeroutput"><span class="string">"1234 "</span></code>
+ (without the quotes).
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.maxwidth.attributes"></a><h6>
+<a name="id1239878"></a>
+ <a class="link" href="maxwidth.html#spirit.karma.reference.directive.maxwidth.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </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>
+ <code 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></code>
+ </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="id1240174"></a>
+ <a class="link" href="maxwidth.html#spirit.karma.reference.directive.maxwidth.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the generator directive <code class="computeroutput"><span class="identifier">maxwidth</span><span class="special">[]</span></code> is defined by the complexity of
+ its embedded generator. The complexity of the directive itself is
+ O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1240216"></a>
+ <a class="link" href="maxwidth.html#spirit.karma.reference.directive.maxwidth.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">maxwidth</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="upperlower.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="buffer.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/omit.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/omit.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,299 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Consume Attribute (omit[])</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="buffer.html" title="Temporary Output Buffering (buffer[])">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="buffer.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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" title="Consume Attribute (omit[])">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.omit"></a><a class="link" href="omit.html" title="Consume Attribute (omit[])"> Consume Attribute
+ (<code class="computeroutput"><span class="identifier">omit</span><span class="special">[]</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.directive.omit.description"></a><h6>
+<a name="id1242748"></a>
+ <a class="link" href="omit.html#spirit.karma.reference.directive.omit.description">Description</a>
+ </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="id1242765"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.directive.omit.model_of"></a><h6>
+<a name="id1242840"></a>
+ <a class="link" href="omit.html#spirit.karma.reference.directive.omit.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
+<dd><p>
+ Attribute type of generator <code class="computeroutput"><span class="identifier">a</span></code>
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.directive.omit.expression_semantics"></a><h6>
+<a name="id1242928"></a>
+ <a class="link" href="omit.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The <code class="computeroutput"><span class="identifier">omit</span></code> directive
+ consumes the attribute type of the embedded generator <code class="computeroutput"><span class="identifier">A</span></code> 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="id1243042"></a>
+ <a class="link" href="omit.html#spirit.karma.reference.directive.omit.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </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="id1243203"></a>
+ <a class="link" href="omit.html#spirit.karma.reference.directive.omit.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the <code class="computeroutput"><span class="identifier">omit</span></code>
+ 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="id1243234"></a>
+ <a class="link" href="omit.html#spirit.karma.reference.directive.omit.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">omit</span></code>
+ 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 <code class="computeroutput"><span class="identifier">double_</span></code>
+ 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 <code class="computeroutput"><span class="identifier">omit</span></code>
+ 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 <code class="computeroutput"><span class="identifier">omit</span></code> 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="buffer.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/repeat.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/repeat.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,406 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Repetition Directive (repeat[])</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])">
+<link rel="next" href="delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="alignment.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="delimit.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Repetition Directive (repeat[])">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.repeat"></a><a class="link" href="repeat.html" title="Repetition Directive (repeat[])"> Repetition
+ Directive (<code class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.directive.repeat.description"></a><h6>
+<a name="id1230189"></a>
+ <a class="link" href="repeat.html#spirit.karma.reference.directive.repeat.description">Description</a>
+ </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="id1230206"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.directive.repeat.model_of"></a><h6>
+<a name="id1230280"></a>
+ <a class="link" href="repeat.html#spirit.karma.reference.directive.repeat.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><code 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></code></span></dt>
+<dd><p>
+ Numeric literals, any unsigned integer value, or a <a class="link" 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"><code class="computeroutput"><span class="identifier">inf</span></code></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="id1230402"></a>
+ <a class="link" href="repeat.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
+ zero or more times. This generator succeeds as long as its embedded
+ generator <code class="computeroutput"><span class="identifier">a</span></code> does
+ not fail (except if the underlying output stream reports an error).
+ This variant of <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[]</span></code> is semantically equivalent
+ to the <a class="link" href="../operator/kleene.html" title="Kleene Star (unary operator*())">Kleene
+ Star operator <code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
+ exactly <code class="computeroutput"><span class="identifier">num</span></code> times.
+ This generator succeeds as long as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code> does not fail and as long
+ as the associated attribute (container) contains at least <code class="computeroutput"><span class="identifier">num</span></code> elements (except if the
+ underlying output stream reports an error).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
+ at least <code class="computeroutput"><span class="identifier">num1</span></code>
+ times but not more than <code class="computeroutput"><span class="identifier">num2</span></code>
+ times. This generator succeeds as long as its embedded generator
+ <code class="computeroutput"><span class="identifier">a</span></code> does not fail
+ and as long as the associated attribute (container) contains
+ at least <code class="computeroutput"><span class="identifier">num1</span></code>
+ elements (except if the underlying output stream reports an error).
+ If the associated attribute (container) does contain more than
+ <code class="computeroutput"><span class="identifier">num2</span></code> elements,
+ this directive limits the repeat count to <code class="computeroutput"><span class="identifier">num2</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat the generator <code class="computeroutput"><span class="identifier">a</span></code>
+ at least <code class="computeroutput"><span class="identifier">num1</span></code>
+ times. No upper limit for the repeat count is set. This generator
+ succeeds as long as its embedded generator <code class="computeroutput"><span class="identifier">a</span></code>
+ does not fail and as long as the associated attribute (container)
+ contains at least <code class="computeroutput"><span class="identifier">num</span></code>
+ 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="id1230792"></a>
+ <a class="link" href="repeat.html#spirit.karma.reference.directive.repeat.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </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>
+ <code 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></code>
+ </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>
+ <code 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></code>
+ </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>
+ <code 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></code>
+ </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" title="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 align="left" valign="top">
+<p>
+ The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as placeholders only.
+ </p>
+<p>
+ The notation of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> stands for <span class="emphasis"><em>any STL container</em></span>
+ holding elements of type <code class="computeroutput"><span class="identifier">A</span></code>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.repeat.complexity"></a><h6>
+<a name="id1231511"></a>
+ <a class="link" href="repeat.html#spirit.karma.reference.directive.repeat.complexity">Complexity</a>
+ </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="id1231535"></a>
+ <a class="link" href="repeat.html#spirit.karma.reference.directive.repeat.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">repeat</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="alignment.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="delimit.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/directive/upperlower.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/directive/upperlower.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,328 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Directives Controlling Case Sensitivity (upper[] and lower[])</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])">
+<link rel="next" href="maxwidth.html" title="Controlling the Maximum Field Wield (maxwidth[])">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="delimit.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="maxwidth.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Directives Controlling Case Sensitivity (upper[] and lower[])">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.directive.upperlower"></a><a class="link" href="upperlower.html" title="Directives Controlling Case Sensitivity (upper[] and lower[])"> Directives
+ Controlling Case Sensitivity (<code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.directive.upperlower.description"></a><h6>
+<a name="id1236484"></a>
+ <a class="link" href="upperlower.html#spirit.karma.reference.directive.upperlower.description">Description</a>
+ </h6>
+<p>
+ The generator directives <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[]</span></code> and <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[]</span></code> 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 <code class="computeroutput"><span class="identifier">ns</span></code> (see <a class="link" 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="id1236549"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.directive.upperlower.model_of"></a><h6>
+<a name="id1236623"></a>
+ <a class="link" href="upperlower.html#spirit.karma.reference.directive.upperlower.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ A generator object
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">A</span></code></span></dt>
+<dd><p>
+ Attribute type of the generator <code class="computeroutput"><span class="identifier">a</span></code>
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
+<dd><p>
+ A <a class="link" 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="id1236732"></a>
+ <a class="link" href="upperlower.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> as
+ lower case, interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>. 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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">a</span></code> as
+ upper case, interpreted in the character set defined by <code class="computeroutput"><span class="identifier">ns</span></code>. 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" title="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 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 <code class="computeroutput"><span class="string">"aB"</span></code>
+ (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 <code class="computeroutput"><span class="identifier">ns</span></code>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.directive.upperlower.attributes"></a><h6>
+<a name="id1236999"></a>
+ <a class="link" href="upperlower.html#spirit.karma.reference.directive.upperlower.attributes">Attributes</a>
+ </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>
+ <code 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></code>
+ </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>
+ <code 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></code>
+ </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="id1237317"></a>
+ <a class="link" href="upperlower.html#spirit.karma.reference.directive.upperlower.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ The overall complexity of the generator directives <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">lower</span><span class="special">[]</span></code>
+ and <code class="computeroutput"><span class="identifier">ns</span><span class="special">::</span><span class="identifier">upper</span><span class="special">[]</span></code>
+ 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="id1237377"></a>
+ <a class="link" href="upperlower.html#spirit.karma.reference.directive.upperlower.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">upper</span></code>
+ and <code class="computeroutput"><span class="identifier">lower</span></code> 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="delimit.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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="maxwidth.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.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-23 22:07:18 EDT (Sun, 23 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="prev" href="../reference.html" title="Reference">
-<link rel="next" href="karma_basics.html" title="Basics">
+<link rel="next" href="generator_concepts/generator.html" title="Generator">
</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="karma_basics.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="generator_concepts/generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Generator Concepts">
<div class="titlepage"><div><div><h4 class="title">
@@ -28,11 +28,11 @@
Concepts</a>
</h4></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
@@ -45,948 +45,6 @@
<p>
The following sections provide details on these concepts.
</p>
-<div class="section" title="Generator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.generator_concepts.generator"></a><a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator">Generator</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.generator_concepts.generator.description"></a><h6>
-<a name="id1167891"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator.description">Description</a>
- </h6>
-<p>
- The <span class="emphasis"><em>Generator</em></span> is the most fundamental concept. A
- Generator has a member function, <code class="computeroutput"><span class="identifier">generate</span></code>,
- that accepts an <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
- and returns bool as its result. The iterator receives the data being
- generated. The Generator's <code class="computeroutput"><span class="identifier">generate</span></code>
- member function returns <code class="computeroutput"><span class="keyword">true</span></code>
- 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" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
-<dd><p>
- A <code class="computeroutput"><span class="identifier">Generator</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></span></dt>
-<dd><p>
- A <code class="computeroutput"><span class="identifier">Generator</span></code> type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">OutIter</span></code></span></dt>
-<dd><p>
- An <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
- type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">sink</span></code></span></dt>
-<dd><p>
- An <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
- instance.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Context</span></code></span></dt>
-<dd><p>
- The generator's Context type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">context</span></code></span></dt>
-<dd><p>
- The generator's Context, or <code class="computeroutput"><span class="identifier">unused</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">delimit</span></code></span></dt>
-<dd><p>
- A delimiter Generator, or <code class="computeroutput"><span class="identifier">unused</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">attrib</span></code></span></dt>
-<dd><p>
- A Compatible Attributes, or <code class="computeroutput"><span class="identifier">unused</span></code>.
- </p></dd>
-</dl>
-</div>
-<a name="spirit.karma.reference.generator_concepts.generator.valid_expressions"></a><h6>
-<a name="id1168146"></a>
- <a class="link" 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, <code class="computeroutput"><span class="identifier">g</span></code>, as well as how <code class="computeroutput"><span class="identifier">delimit</span></code>
- and <code class="computeroutput"><span class="identifier">attrib</span></code> are handled
- by <code class="computeroutput"><span class="identifier">g</span></code>, are left unspecified
- in the base <code class="computeroutput"><span class="identifier">Generator</span></code>
- 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 <code class="computeroutput"><span class="identifier">sink</span></code>. Use
- the <code class="computeroutput"><span class="identifier">delimit</span></code> generator
- for delimiting. Return <code class="computeroutput"><span class="keyword">true</span></code>
- if successful, otherwise return <code class="computeroutput"><span class="keyword">false</span></code>.
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">bool</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Get information about a Generator.
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">info</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.karma.reference.generator_concepts.generator.type_expressions"></a><h6>
-<a name="id1168953"></a>
- <a class="link" 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- The Generator's attribute.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
- is a Generator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- otherwise (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
- Boolean Constant</a>).
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">properties</span></code>
- </p>
- </td>
-<td>
- <p>
- A <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span></code> (See <a href="../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
- Integral Constant</a>) holding a value from the <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generator_properties</span></code> enumeration.
- The default value is <code class="computeroutput"><span class="identifier">generator_properties</span><span class="special">::</span><span class="identifier">no_properties</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.karma.reference.generator_concepts.generator.postcondition"></a><h6>
-<a name="id1169218"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator.postcondition">Postcondition</a>
- </h6>
-<p>
- Upon return from <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">generate</span></code> the following post conditions
- should hold:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- On successful generation, <code class="computeroutput"><span class="identifier">sink</span></code>
- receives the generated characters/tokens sequence.
- </li>
-<li class="listitem">
- No pre-delimits: <code class="computeroutput"><span class="identifier">delimit</span></code>
- characters/tokens will not be emitted in front of any other output.
- </li>
-<li class="listitem">
- The attribute <code class="computeroutput"><span class="identifier">attrib</span></code>
- has not been modified.
- </li>
-</ul></div>
-<a name="spirit.karma.reference.generator_concepts.generator.models"></a><h6>
-<a name="id1169288"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator.models">Models</a>
- </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" title="PrimitiveGenerator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.generator_concepts.primitivegenerator"></a><a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator">PrimitiveGenerator</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.generator_concepts.primitivegenerator.description"></a><h6>
-<a name="id1169330"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator.description">Description</a>
- </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="id1169350"></a>
- <a class="link" 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>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit"></a><h6>
-<a name="id1169384"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit">Post-delimit</a>
- </h6>
-<p>
- Before exiting the <code class="computeroutput"><span class="identifier">generate</span></code>
- 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 <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span></code>:
- </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="id1169457"></a>
- <a class="link" 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>,
- is a PrimitiveGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1169591"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator.models">Models</a>
- </h6>
-<p>
- The following generators conform to this model:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eol" title="eol"><code class="computeroutput"><span class="identifier">eol</span></code></a> ,
- </li>
-<li class="listitem">
-<a class="link" href="auxiliary.html#spirit.karma.reference.auxiliary.eps" title="eps"><code class="computeroutput"><span class="identifier">eps</span></code></a>,
- </li>
-<li class="listitem">
-<a class="link" href="numeric.html" title="Numeric">Numeric generators</a>,
- </li>
-<li class="listitem">
-<a class="link" href="char.html#spirit.karma.reference.char.char_generator" title="Character Generators">Character
- generators</a>.
- </li>
-</ul></div>
-<p>
- <span class="bold"><strong>FIXME</strong></span> Add more links to <span class="emphasis"><em>PrimitiveGenerator</em></span>
- models here.
- </p>
-</div>
-<div class="section" title="UnaryGenerator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.generator_concepts.unarygenerator"></a><a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator">UnaryGenerator</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.generator_concepts.unarygenerator.description"></a><h6>
-<a name="id1169682"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator.description">Description</a>
- </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="id1169703"></a>
- <a class="link" 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>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
-<dd><p>
- A UnaryGenerator.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></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="id1169780"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator.valid_expressions">Valid
- Expressions</a>
- </h6>
-<p>
- In addition to the requirements defined in <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>, 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>
- <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">subject</span></code>
- </p>
- </td>
-<td>
- <p>
- Subject generator.
- </p>
- </td>
-<td>
- <p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<a name="spirit.karma.reference.generator_concepts.unarygenerator.type_expressions"></a><h6>
-<a name="id1169895"></a>
- <a class="link" 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>
- <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">subject_type</span></code>
- </p>
- </td>
-<td>
- <p>
- The subject generator type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
- is a UnaryGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1170060"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator.invariants">Invariants</a>
- </h6>
-<p>
- For any UnaryGenerator, <code class="computeroutput"><span class="identifier">G</span></code>,
- the following invariant always holds:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li></ul></div>
-<a name="spirit.karma.reference.generator_concepts.unarygenerator.models"></a><h6>
-<a name="id1170146"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator.models">Models</a>
- </h6>
-<p>
- The following generators conform to this model:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<a class="link" href="operator.html#spirit.karma.reference.operator.kleene" title="Kleene Star (unary operator*())">Kleene Star
- (unary <code class="computeroutput"><span class="special">*</span></code>)</a>,
- </li>
-<li class="listitem">
-<a class="link" href="operator.html#spirit.karma.reference.operator.plus" title="Plus (unary operator+())">plus (unary <code class="computeroutput"><span class="special">+</span></code>)</a> operator,
- </li>
-<li class="listitem">
-<a class="link" href="operator.html#spirit.karma.reference.operator.optional" title="Optional (unary operator-())">optional (unary
- <code class="computeroutput"><span class="special">-</span></code>)</a> operator,
- </li>
-<li class="listitem">
-<a class="link" href="operator.html#spirit.karma.reference.operator.and_predicate" title="And Predicate (unary operator&())">and predicate
- (unary <code class="computeroutput"><span class="special">&</span></code>)</a> and
- <a class="link" href="operator.html#spirit.karma.reference.operator.not_predicate" title="Not Predicate (unary operator!())">not predicate
- (unary <code class="computeroutput"><span class="special">!</span></code>)</a> operators,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">left_align</span></code></a>, <a class="link" href="directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">center</span></code></a>, and <a class="link" href="directive.html#spirit.karma.reference.directive.alignment" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">right_align</span></code></a> directives,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.repeat" title="Repetition Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span></code></a> directive,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.delimit" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
- directive,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.delimit" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">delimit</span></code></a> directive,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.upperlower" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">lower</span></code></a> and <a class="link" href="directive.html#spirit.karma.reference.directive.upperlower" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">upper</span></code></a> directives,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.maxwidth" title="Controlling the Maximum Field Wield (maxwidth[])"><code class="computeroutput"><span class="identifier">maxwidth</span></code></a> directive,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
- directive,
- </li>
-<li class="listitem">
-<a class="link" href="directive.html#spirit.karma.reference.directive.omit" title="Consume Attribute (omit[])"><code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
- directive.
- </li>
-</ul></div>
-<p>
- <span class="bold"><strong>FIXME</strong></span> Add more links to models of UnaryGenerator
- concept
- </p>
-</div>
-<div class="section" title="BinaryGenerator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.generator_concepts.binarygenerator"></a><a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator" title="BinaryGenerator">BinaryGenerator</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.generator_concepts.binarygenerator.description"></a><h6>
-<a name="id1170434"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator.description">Description</a>
- </h6>
-<p>
- <span class="emphasis"><em>BinaryGenerator</em></span> is a composite parser that has a
- two subjects, <code class="computeroutput"><span class="identifier">left</span></code> and
- <code class="computeroutput"><span class="identifier">right</span></code>. The BinaryGenerator
- allows its subjects to be treated in the same way as a single instance
- of a <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a> following the Composite
- Design Pattern.
- </p>
-<a name="spirit.karma.reference.generator_concepts.binarygenerator.refinement_of"></a><h6>
-<a name="id1170480"></a>
- <a class="link" 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>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
-<dd><p>
- A BinaryGenerator.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></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="id1170557"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator.valid_expressions">Valid
- Expressions</a>
- </h6>
-<p>
- In addition to the requirements defined in <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>, 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>
- <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">left</span></code>
- </p>
- </td>
-<td>
- <p>
- Left generator.
- </p>
- </td>
-<td>
- <p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">right</span></code>
- </p>
- </td>
-<td>
- <p>
- Right generator.
- </p>
- </td>
-<td>
- <p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.karma.reference.generator_concepts.binarygenerator.type_expressions"></a><h6>
-<a name="id1170719"></a>
- <a class="link" 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>
- <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">left_type</span></code>
- </p>
- </td>
-<td>
- <p>
- The left parser type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">right_type</span></code>
- </p>
- </td>
-<td>
- <p>
- The right parser type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
- is a BinaryGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1170918"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator.invariants">Invariants</a>
- </h6>
-<p>
- For any BinaryGenerator, <code class="computeroutput"><span class="identifier">G</span></code>,
- the following invariants always hold:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li>
-<li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li>
-</ul></div>
-<a name="spirit.karma.reference.generator_concepts.binarygenerator.models"></a><h6>
-<a name="id1171055"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator.models">Models</a>
- </h6>
-<p>
- The following generators conform to this model:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<a class="link" href="operator.html#spirit.karma.reference.operator.list" title="Lists (operator%())">list (<code class="computeroutput"><span class="special">%</span></code>)</a>.
- </li></ul></div>
-<p>
- <span class="bold"><strong>FIXME</strong></span> Add more links to models of BinaryGenerator
- concept
- </p>
-</div>
-<div class="section" title="NaryGenerator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.generator_concepts.narygenerator"></a><a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator" title="NaryGenerator">NaryGenerator</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.generator_concepts.narygenerator.description"></a><h6>
-<a name="id1172289"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator.description">Description</a>
- </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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a> following the Composite
- Design Pattern.
- </p>
-<a name="spirit.karma.reference.generator_concepts.narygenerator.refinement_of"></a><h6>
-<a name="id1172320"></a>
- <a class="link" 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>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
-<dd><p>
- A NaryGenerator.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></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="id1172397"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator.valid_expressions">Valid
- Expressions</a>
- </h6>
-<p>
- In addition to the requirements defined in <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>, 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>
- <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">elements</span></code>
- </p>
- </td>
-<td>
- <p>
- The tuple of elements.
- </p>
- </td>
-<td>
- <p>
- A Fusion
- Sequence of <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.generator" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a> types.
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<a name="spirit.karma.reference.generator_concepts.narygenerator.type_expressions"></a><h6>
-<a name="id1172517"></a>
- <a class="link" 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>
- <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">elements_type</span></code>
- </p>
- </td>
-<td>
- <p>
- Elements tuple type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
- is a NaryGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1172683"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator.invariants">Invariants</a>
- </h6>
-<p>
- For each element, <code class="computeroutput"><span class="identifier">E</span></code>,
- in any NaryGenerator, <code class="computeroutput"><span class="identifier">G</span></code>,
- the following invariant always holds:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li></ul></div>
-<a name="spirit.karma.reference.generator_concepts.narygenerator.models"></a><h6>
-<a name="id1172769"></a>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator.models">Models</a>
- </h6>
-<p>
- The following generators conform to this model:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<a class="link" href="operator.html#spirit.karma.reference.operator.sequence" title="Sequences (operator<<())">sequence (<code class="computeroutput"><span class="special"><<</span></code>)</a>,
- </li>
-<li class="listitem">
-<a class="link" href="operator.html#spirit.karma.reference.operator.alternative" title="Alternatives (operator|())">alternative
- (<code class="computeroutput"><span class="special">|</span></code>)</a>.
- </li>
-</ul></div>
-<p>
- <span class="bold"><strong>FIXME</strong></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>
@@ -999,7 +57,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="karma_basics.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="generator_concepts/generator.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,247 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>BinaryGenerator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../generator_concepts.html" title="Generator Concepts">
+<link rel="prev" href="unarygenerator.html" title="UnaryGenerator">
+<link rel="next" href="narygenerator.html" title="NaryGenerator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unarygenerator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="narygenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="BinaryGenerator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.binarygenerator"></a><a class="link" href="binarygenerator.html" title="BinaryGenerator">BinaryGenerator</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.description"></a><h6>
+<a name="id1190292"></a>
+ <a class="link" href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.description">Description</a>
+ </h6>
+<p>
+ <span class="emphasis"><em>BinaryGenerator</em></span> is a composite parser that has a
+ two subjects, <code class="computeroutput"><span class="identifier">left</span></code> and
+ <code class="computeroutput"><span class="identifier">right</span></code>. The BinaryGenerator
+ allows its subjects to be treated in the same way as a single instance
+ of a <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a> following the Composite
+ Design Pattern.
+ </p>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.refinement_of"></a><h6>
+<a name="id1190339"></a>
+ <a class="link" href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
+<dd><p>
+ A BinaryGenerator.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></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="id1190416"></a>
+ <a class="link" href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>, 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>
+ <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">left</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Left generator.
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">right</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Right generator.
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.type_expressions"></a><h6>
+<a name="id1190578"></a>
+ <a class="link" href="binarygenerator.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>
+ <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">left_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The left parser type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">right_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The right parser type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
+ is a BinaryGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1190777"></a>
+ <a class="link" href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.invariants">Invariants</a>
+ </h6>
+<p>
+ For any BinaryGenerator, <code class="computeroutput"><span class="identifier">G</span></code>,
+ the following invariants always hold:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li>
+<li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li>
+</ul></div>
+<a name="spirit.karma.reference.generator_concepts.binarygenerator.models"></a><h6>
+<a name="id1190914"></a>
+ <a class="link" href="binarygenerator.html#spirit.karma.reference.generator_concepts.binarygenerator.models">Models</a>
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<a class="link" href="../operator/list.html" title="Lists (operator%())">list (<code class="computeroutput"><span class="special">%</span></code>)</a>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add more links to models of BinaryGenerator
+ concept
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unarygenerator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="narygenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/generator.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/generator.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,278 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Generator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../generator_concepts.html" title="Generator Concepts">
+<link rel="prev" href="../generator_concepts.html" title="Generator Concepts">
+<link rel="next" href="primitivegenerator.html" title="PrimitiveGenerator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../generator_concepts.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="primitivegenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Generator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.generator"></a><a class="link" href="generator.html" title="Generator">Generator</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.generator_concepts.generator.description"></a><h6>
+<a name="id1188296"></a>
+ <a class="link" href="generator.html#spirit.karma.reference.generator_concepts.generator.description">Description</a>
+ </h6>
+<p>
+ The <span class="emphasis"><em>Generator</em></span> is the most fundamental concept. A
+ Generator has a member function, <code class="computeroutput"><span class="identifier">generate</span></code>,
+ that accepts an <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
+ and returns bool as its result. The iterator receives the data being
+ generated. The Generator's <code class="computeroutput"><span class="identifier">generate</span></code>
+ member function returns <code class="computeroutput"><span class="keyword">true</span></code>
+ 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" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
+<dd><p>
+ A <code class="computeroutput"><span class="identifier">Generator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></span></dt>
+<dd><p>
+ A <code class="computeroutput"><span class="identifier">Generator</span></code> type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">OutIter</span></code></span></dt>
+<dd><p>
+ An <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
+ type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">sink</span></code></span></dt>
+<dd><p>
+ An <code class="computeroutput"><span class="identifier">OutputIterator</span></code>
+ instance.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Context</span></code></span></dt>
+<dd><p>
+ The generator's Context type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">context</span></code></span></dt>
+<dd><p>
+ The generator's Context, or <code class="computeroutput"><span class="identifier">unused</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">delimit</span></code></span></dt>
+<dd><p>
+ A delimiter Generator, or <code class="computeroutput"><span class="identifier">unused</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">attrib</span></code></span></dt>
+<dd><p>
+ A Compatible Attributes, or <code class="computeroutput"><span class="identifier">unused</span></code>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.generator_concepts.generator.valid_expressions"></a><h6>
+<a name="id1188550"></a>
+ <a class="link" href="generator.html#spirit.karma.reference.generator_concepts.generator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In the expressions below, the behavior of the generator, <code class="computeroutput"><span class="identifier">g</span></code>, as well as how <code class="computeroutput"><span class="identifier">delimit</span></code>
+ and <code class="computeroutput"><span class="identifier">attrib</span></code> are handled
+ by <code class="computeroutput"><span class="identifier">g</span></code>, are left unspecified
+ in the base <code class="computeroutput"><span class="identifier">Generator</span></code>
+ 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 <code class="computeroutput"><span class="identifier">sink</span></code>. Use
+ the <code class="computeroutput"><span class="identifier">delimit</span></code> generator
+ for delimiting. Return <code class="computeroutput"><span class="keyword">true</span></code>
+ if successful, otherwise return <code class="computeroutput"><span class="keyword">false</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">bool</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Get information about a Generator.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">info</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.generator.type_expressions"></a><h6>
+<a name="id1188811"></a>
+ <a class="link" href="generator.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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The Generator's attribute.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
+ is a Generator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ otherwise (See <a href="../../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Boolean Constant</a>).
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">properties</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span></code> (See <a href="../../../../../../../../libs/mpl/doc/refmanual/integral-constant.html" target="_top">MPL
+ Integral Constant</a>) holding a value from the <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">generator_properties</span></code> enumeration.
+ The default value is <code class="computeroutput"><span class="identifier">generator_properties</span><span class="special">::</span><span class="identifier">no_properties</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.generator.postcondition"></a><h6>
+<a name="id1189076"></a>
+ <a class="link" href="generator.html#spirit.karma.reference.generator_concepts.generator.postcondition">Postcondition</a>
+ </h6>
+<p>
+ Upon return from <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">generate</span></code> the following post conditions
+ should hold:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ On successful generation, <code class="computeroutput"><span class="identifier">sink</span></code>
+ receives the generated characters/tokens sequence.
+ </li>
+<li class="listitem">
+ No pre-delimits: <code class="computeroutput"><span class="identifier">delimit</span></code>
+ characters/tokens will not be emitted in front of any other output.
+ </li>
+<li class="listitem">
+ The attribute <code class="computeroutput"><span class="identifier">attrib</span></code>
+ has not been modified.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.generator_concepts.generator.models"></a><h6>
+<a name="id1189146"></a>
+ <a class="link" href="generator.html#spirit.karma.reference.generator_concepts.generator.models">Models</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../generator_concepts.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="primitivegenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/narygenerator.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/narygenerator.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,217 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>NaryGenerator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../generator_concepts.html" title="Generator Concepts">
+<link rel="prev" href="binarygenerator.html" title="BinaryGenerator">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binarygenerator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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" title="NaryGenerator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.narygenerator"></a><a class="link" href="narygenerator.html" title="NaryGenerator">NaryGenerator</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.description"></a><h6>
+<a name="id1192696"></a>
+ <a class="link" href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.description">Description</a>
+ </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 <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a> following the Composite
+ Design Pattern.
+ </p>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.refinement_of"></a><h6>
+<a name="id1192728"></a>
+ <a class="link" href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
+<dd><p>
+ A NaryGenerator.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></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="id1192804"></a>
+ <a class="link" href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>, 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>
+ <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">elements</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The tuple of elements.
+ </p>
+ </td>
+<td>
+ <p>
+ A Fusion
+ Sequence of <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a> types.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.type_expressions"></a><h6>
+<a name="id1192924"></a>
+ <a class="link" href="narygenerator.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>
+ <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">elements_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Elements tuple type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
+ is a NaryGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1193091"></a>
+ <a class="link" href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.invariants">Invariants</a>
+ </h6>
+<p>
+ For each element, <code class="computeroutput"><span class="identifier">E</span></code>,
+ in any NaryGenerator, <code class="computeroutput"><span class="identifier">G</span></code>,
+ the following invariant always holds:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li></ul></div>
+<a name="spirit.karma.reference.generator_concepts.narygenerator.models"></a><h6>
+<a name="id1193176"></a>
+ <a class="link" href="narygenerator.html#spirit.karma.reference.generator_concepts.narygenerator.models">Models</a>
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<a class="link" href="../operator/sequence.html" title="Sequences (operator<<())">sequence (<code class="computeroutput"><span class="special"><<</span></code>)</a>,
+ </li>
+<li class="listitem">
+<a class="link" href="../operator/alternative.html" title="Alternatives (operator|())">alternative
+ (<code class="computeroutput"><span class="special">|</span></code>)</a>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add more links to models of NaryGenerator
+ concept
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binarygenerator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,144 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>PrimitiveGenerator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../generator_concepts.html" title="Generator Concepts">
+<link rel="prev" href="generator.html" title="Generator">
+<link rel="next" href="unarygenerator.html" title="UnaryGenerator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="unarygenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="PrimitiveGenerator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator"></a><a class="link" href="primitivegenerator.html" title="PrimitiveGenerator">PrimitiveGenerator</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator.description"></a><h6>
+<a name="id1189188"></a>
+ <a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.description">Description</a>
+ </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="id1189208"></a>
+ <a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit"></a><h6>
+<a name="id1189242"></a>
+ <a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.post_delimit">Post-delimit</a>
+ </h6>
+<p>
+ Before exiting the <code class="computeroutput"><span class="identifier">generate</span></code>
+ 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 <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit_out</span></code>:
+ </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="id1189315"></a>
+ <a class="link" href="primitivegenerator.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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>,
+ is a PrimitiveGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1189450"></a>
+ <a class="link" href="primitivegenerator.html#spirit.karma.reference.generator_concepts.primitivegenerator.models">Models</a>
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<a class="link" href="../auxiliary/eol.html" title="eol"><code class="computeroutput"><span class="identifier">eol</span></code></a> ,
+ </li>
+<li class="listitem">
+<a class="link" href="../auxiliary/eps.html" title="eps"><code class="computeroutput"><span class="identifier">eps</span></code></a>,
+ </li>
+<li class="listitem">
+<a class="link" href="../numeric.html" title="Numeric">Numeric generators</a>,
+ </li>
+<li class="listitem">
+<a class="link" href="../char/char_generator.html" title="Character Generators">Character
+ generators</a>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add more links to <span class="emphasis"><em>PrimitiveGenerator</em></span>
+ models here.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="generator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="unarygenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,251 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>UnaryGenerator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../generator_concepts.html" title="Generator Concepts">
+<link rel="prev" href="primitivegenerator.html" title="PrimitiveGenerator">
+<link rel="next" href="binarygenerator.html" title="BinaryGenerator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="primitivegenerator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="binarygenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="UnaryGenerator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.generator_concepts.unarygenerator"></a><a class="link" href="unarygenerator.html" title="UnaryGenerator">UnaryGenerator</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.description"></a><h6>
+<a name="id1189541"></a>
+ <a class="link" href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.description">Description</a>
+ </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="id1189561"></a>
+ <a class="link" href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">g</span></code></span></dt>
+<dd><p>
+ A UnaryGenerator.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">G</span></code></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="id1189638"></a>
+ <a class="link" href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>, 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>
+ <code class="computeroutput"><span class="identifier">g</span><span class="special">.</span><span class="identifier">subject</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Subject generator.
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="generator.html" title="Generator"><code class="computeroutput"><span class="identifier">Generator</span></code></a>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.type_expressions"></a><h6>
+<a name="id1189753"></a>
+ <a class="link" href="unarygenerator.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>
+ <code class="computeroutput"><span class="identifier">G</span><span class="special">::</span><span class="identifier">subject_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The subject generator type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">G</span></code>
+ is a UnaryGenerator, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1189919"></a>
+ <a class="link" href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.invariants">Invariants</a>
+ </h6>
+<p>
+ For any UnaryGenerator, <code class="computeroutput"><span class="identifier">G</span></code>,
+ the following invariant always holds:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li></ul></div>
+<a name="spirit.karma.reference.generator_concepts.unarygenerator.models"></a><h6>
+<a name="id1190004"></a>
+ <a class="link" href="unarygenerator.html#spirit.karma.reference.generator_concepts.unarygenerator.models">Models</a>
+ </h6>
+<p>
+ The following generators conform to this model:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<a class="link" href="../operator/kleene.html" title="Kleene Star (unary operator*())">Kleene Star
+ (unary <code class="computeroutput"><span class="special">*</span></code>)</a>,
+ </li>
+<li class="listitem">
+<a class="link" href="../operator/plus.html" title="Plus (unary operator+())">plus (unary <code class="computeroutput"><span class="special">+</span></code>)</a> operator,
+ </li>
+<li class="listitem">
+<a class="link" href="../operator/optional.html" title="Optional (unary operator-())">optional (unary
+ <code class="computeroutput"><span class="special">-</span></code>)</a> operator,
+ </li>
+<li class="listitem">
+<a class="link" href="../operator/and_predicate.html" title="And Predicate (unary operator&())">and predicate
+ (unary <code class="computeroutput"><span class="special">&</span></code>)</a> and
+ <a class="link" href="../operator/not_predicate.html" title="Not Predicate (unary operator!())">not predicate
+ (unary <code class="computeroutput"><span class="special">!</span></code>)</a> operators,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">left_align</span></code></a>, <a class="link" href="../directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">center</span></code></a>, and <a class="link" href="../directive/alignment.html" title="Alignment Directives (left_align[], center[], and right_align[])"><code class="computeroutput"><span class="identifier">right_align</span></code></a> directives,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/repeat.html" title="Repetition Directive (repeat[])"><code class="computeroutput"><span class="identifier">repeat</span></code></a> directive,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">verbatim</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ directive,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/delimit.html" title="Directives Controlling Automatic Delimiting (verbatim[] and delimit[])"><code class="computeroutput"><span class="identifier">delimit</span></code></a> directive,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/upperlower.html" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">lower</span></code></a> and <a class="link" href="../directive/upperlower.html" title="Directives Controlling Case Sensitivity (upper[] and lower[])"><code class="computeroutput"><span class="identifier">upper</span></code></a> directives,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/maxwidth.html" title="Controlling the Maximum Field Wield (maxwidth[])"><code class="computeroutput"><span class="identifier">maxwidth</span></code></a> directive,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ directive,
+ </li>
+<li class="listitem">
+<a class="link" href="../directive/omit.html" title="Consume Attribute (omit[])"><code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ directive.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add more links to models of UnaryGenerator
+ concept
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="primitivegenerator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../generator_concepts.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="binarygenerator.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="generator_concepts.html" title="Generator Concepts">
+<link rel="prev" href="generator_concepts/narygenerator.html" title="NaryGenerator">
<link rel="next" href="char.html" title="Char">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,14 +20,14 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Basics">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.karma.reference.karma_basics"></a><a class="link" href="karma_basics.html" title="Basics"> Basics</a>
</h4></div></div></div>
<a name="spirit.karma.reference.karma_basics.lazy_argument"></a><h6>
-<a name="id1172843"></a>
+<a name="id1193251"></a>
<a class="link" href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
Argument</a>
</h6>
@@ -53,7 +53,7 @@
Actions</a>).
</p>
<a name="spirit.karma.reference.karma_basics.character_encoding_namespace"></a><h6>
-<a name="id1172983"></a>
+<a name="id1193391"></a>
<a class="link" href="karma_basics.html#spirit.karma.reference.karma_basics.character_encoding_namespace">Character
Encoding Namespace</a>
</h6>
@@ -125,7 +125,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,8 +6,8 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="char.html" title="Char">
-<link rel="next" href="directive.html" title="Directive">
+<link rel="prev" href="char/char_class.html" title="Character Class Generators">
+<link rel="next" href="numeric/signed_int.html" title="Signed Integer Number Generators">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,18 +20,18 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Numeric">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.karma.reference.numeric"></a><a class="link" href="numeric.html" title="Numeric"> Numeric</a>
</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="numeric.html#spirit.karma.reference.numeric.signed_int"> Signed
+<dt><span class="section"><a href="numeric/signed_int.html"> Signed
Integer Number Generators</a></span></dt>
-<dt><span class="section"><a href="numeric.html#spirit.karma.reference.numeric.unsigned_int"> Unsigned
+<dt><span class="section"><a href="numeric/unsigned_int.html"> Unsigned
Integer Number Generators</a></span></dt>
-<dt><span class="section"><a href="numeric.html#spirit.karma.reference.numeric.floating_point"> Floating
+<dt><span class="section"><a href="numeric/floating_point.html"> Floating
Point Number Generators</a></span></dt>
</dl></div>
<p>
@@ -40,3135 +40,12 @@
integer, and floating point number generators.
</p>
<a name="spirit.karma.reference.numeric.module_header"></a><h6>
-<a name="id1180889"></a>
+<a name="id1202014"></a>
<a class="link" href="numeric.html#spirit.karma.reference.numeric.module_header">Module Header</a>
</h6>
<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" title="Signed Integer Number Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.numeric.signed_int"></a><a class="link" href="numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"> Signed
- Integer Number Generators</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.numeric.signed_int.description"></a><h6>
-<a name="id1180965"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.signed_int.description">Description</a>
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">num</span></code>,
- where <code class="computeroutput"><span class="identifier">num</span></code> can
- be a <code class="computeroutput"><span class="keyword">short</span></code>, <code class="computeroutput"><span class="keyword">int</span></code>, <code class="computeroutput"><span class="keyword">long</span></code>,
- or <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">short_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="keyword">short</span> <span class="keyword">int</span></code> as given by the mandatory
- attribute
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="keyword">short</span> <span class="keyword">int</span></code>,
- if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">int_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an <code class="computeroutput"><span class="keyword">int</span></code>
- as given by the mandatory attribute
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an <code class="computeroutput"><span class="keyword">int</span></code>, if an
- attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">int</span></code> as given by the mandatory
- attribute
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">int</span></code>,
- if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_long</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code> as given by the mandatory
- attribute
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>,
- 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="identifier">Num</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="identifier">Num</span></code>, 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 <a class="link" href="numeric.html#spirit.karma.reference.numeric.signed_int.additional_requirements">below</a>).
- </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 class="link" 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="id1181766"></a>
- <a class="link" href="numeric.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.numeric.signed_int.model_of"></a><h6>
-<a name="id1181841"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.signed_int.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
-<dd><p>
- Numeric literal, any signed integer value, or a <a class="link" href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
- Argument</a> that evaluates to a signed integer value of type
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Num</span></code></span></dt>
-<dd><p>
- Type of <code class="computeroutput"><span class="identifier">num</span></code>: any
- signed integer type
- </p></dd>
-</dl>
-</div>
-<a name="spirit.karma.reference.numeric.signed_int.expression_semantics"></a><h6>
-<a name="id1181943"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate the integer literal <code class="computeroutput"><span class="identifier">num</span></code>
- 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 <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>) are predefined specializations of the
- <code 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></code>
- 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 <code class="computeroutput"><span class="identifier">Num</span></code>
- provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Radix</span></code> (possible values are
- <code class="computeroutput"><span class="number">2</span></code>, <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>,
- and <code class="computeroutput"><span class="number">16</span></code>, the default
- value is <code class="computeroutput"><span class="number">10</span></code>). If
- <code class="computeroutput"><span class="identifier">force_sign</span></code> is
- <code class="computeroutput"><span class="keyword">false</span></code> (the default),
- a sign is only printed for negative literals. If <code class="computeroutput"><span class="identifier">force_sign</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>, all numbers will be printed
- using a sign, i.e. <code class="computeroutput"><span class="char">'-'</span></code>
- for negative numbers, <code class="computeroutput"><span class="char">'+'</span></code>
- for positive numbers, and <code class="computeroutput"><span class="char">' '</span></code>
- 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 <code class="computeroutput"><span class="identifier">Num</span></code>
- provided by the immediate literal value the generator is initialized
- from, using the specified <code class="computeroutput"><span class="identifier">Radix</span></code>
- (possible values are <code class="computeroutput"><span class="number">2</span></code>,
- <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>, and <code class="computeroutput"><span class="number">16</span></code>,
- the default value is <code class="computeroutput"><span class="number">10</span></code>).
- If <code class="computeroutput"><span class="identifier">force_sign</span></code>
- is <code class="computeroutput"><span class="keyword">false</span></code> (the default),
- a sign is only printed for negative literals. If <code class="computeroutput"><span class="identifier">force_sign</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>, all numbers will be printed
- using a sign, i.e. <code class="computeroutput"><span class="char">'-'</span></code>
- for negative numbers, <code class="computeroutput"><span class="char">'+'</span></code>
- for positive numbers, and <code class="computeroutput"><span class="char">' '</span></code>
- 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="id1183686"></a>
- <a class="link" 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 <code class="computeroutput"><span class="identifier">Num</span></code>
- to instantiate and use a <code 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></code>.
- </p>
-<p>
- If <code 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></code> is <code class="computeroutput"><span class="keyword">true</span></code>
- the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
- defined:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
- <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
- <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
- and <code class="computeroutput"><span class="special">>=</span></code>
-</li>
-<li class="listitem">
- numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
- <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
- <code class="computeroutput"><span class="special">*</span></code>, <code class="computeroutput"><span class="special">%</span></code>,
- and unary <code class="computeroutput"><span class="special">-</span></code>
-</li>
-</ul></div>
-<p>
- If <code 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></code> is <code class="computeroutput"><span class="keyword">false</span></code>
- the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
- defined:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
- <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
- <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
- and <code class="computeroutput"><span class="special">>=</span></code>
-</li>
-<li class="listitem">
- numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
- <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
- <code class="computeroutput"><span class="special">*</span></code>, <code class="computeroutput"><span class="special">%</span></code>,
- and unary <code class="computeroutput"><span class="special">-</span></code>
-</li>
-<li class="listitem">
- helper functions implementing the interface and the semantics of:
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fabs</span></code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></code>,
- and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></code>.
- </li>
-</ul></div>
-<a name="spirit.karma.reference.numeric.signed_int.attributes"></a><h6>
-<a name="id1184137"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.signed_int.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">short_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">short</span></code>, attribute
- is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">short</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> and
- succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">int_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">int</span></code>, attribute is
- mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">int</span></code>, attribute is
- optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> and
- succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span></code>, attribute
- is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> and
- succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_long</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>,
- attribute is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>,
- attribute is optional, if it is supplied, the generator compares
- the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
- 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>, 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> 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="id1184694"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.signed_int.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1184725"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.signed_int.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">int_</span></code>
- 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" title="Unsigned Integer Number Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.numeric.unsigned_int"></a><a class="link" href="numeric.html#spirit.karma.reference.numeric.unsigned_int" title="Unsigned Integer Number Generators"> Unsigned
- Integer Number Generators</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.numeric.unsigned_int.description"></a><h6>
-<a name="id1187070"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.unsigned_int.description">Description</a>
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">num</span></code>,
- where <code class="computeroutput"><span class="identifier">num</span></code> can
- be a <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>,
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>,
- or <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ushort</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a short integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ushort</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a short integer, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">uint</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an int
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">uint</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an int, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a long integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as long integer, if an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong_long</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a long long
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned <code class="computeroutput"><span class="identifier">Num</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="identifier">Num</span></code>, if
- an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">bin</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned integer in binary (base 2) representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">bin</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an unsigned integer in binary (base 2) representation, if
- an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">oct</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned integer in octal (base 8) representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">oct</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as an unsigned integer in octal (base 8) representation, if an
- attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">hex</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate an unsigned integer in hexadecimal (base 16) representation
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">hex</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- 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 <a class="link" href="numeric.html#spirit.karma.reference.numeric.unsigned_int.additional_requirements">below</a>).
- </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 class="link" 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="id1188134"></a>
- <a class="link" href="numeric.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.numeric.unsigned_int.model_of"></a><h6>
-<a name="id1188209"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.unsigned_int.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
-<dd><p>
- Numeric literal, any unsigned integer value, or a <a class="link" href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
- Argument</a> that evaluates to an unsigned integer value of type
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Num</span></code></span></dt>
-<dd><p>
- Type of <code class="computeroutput"><span class="identifier">num</span></code>: any
- unsigned integer type
- </p></dd>
-</dl>
-</div>
-<a name="spirit.karma.reference.numeric.unsigned_int.expression_semantics"></a><h6>
-<a name="id1188308"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate the integer literal <code class="computeroutput"><span class="identifier">num</span></code>
- 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 (<code class="computeroutput"><span class="identifier">bin</span></code>: radix is 2, <code class="computeroutput"><span class="identifier">oct</span></code>: radix is 8, <code class="computeroutput"><span class="identifier">hex</span></code>: 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 (<code class="computeroutput"><span class="identifier">bin</span></code>:
- radix is 2, <code class="computeroutput"><span class="identifier">oct</span></code>:
- radix is 8, <code class="computeroutput"><span class="identifier">hex</span></code>:
- 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 <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>) are predefined specializations of the
- <code 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></code>
- 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 <code class="computeroutput"><span class="identifier">Num</span></code>
- provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Radix</span></code> (possible values are
- <code class="computeroutput"><span class="number">2</span></code>, <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>,
- and <code class="computeroutput"><span class="number">16</span></code>, the default
- value is <code class="computeroutput"><span class="number">10</span></code>).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 <code class="computeroutput"><span class="identifier">Num</span></code>
- provided by the immediate literal value the generator is initialized
- from, using the specified <code class="computeroutput"><span class="identifier">Radix</span></code>
- (possible values are <code class="computeroutput"><span class="number">2</span></code>,
- <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>, and <code class="computeroutput"><span class="number">16</span></code>,
- the default value is <code class="computeroutput"><span class="number">10</span></code>).
- 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="id1188960"></a>
- <a class="link" 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 <code class="computeroutput"><span class="identifier">Num</span></code>
- to instantiate and use a <code 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></code>.
- </p>
-<p>
- If <code 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></code> is <code class="computeroutput"><span class="keyword">true</span></code>
- the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
- defined:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
- <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
- <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
- and <code class="computeroutput"><span class="special">>=</span></code>
-</li>
-<li class="listitem">
- numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
- <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
- <code class="computeroutput"><span class="special">*</span></code>, and <code class="computeroutput"><span class="special">%</span></code>
-</li>
-</ul></div>
-<p>
- If <code 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></code> is <code class="computeroutput"><span class="keyword">false</span></code>
- the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
- defined:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
- <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
- <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
- and <code class="computeroutput"><span class="special">>=</span></code>
-</li>
-<li class="listitem">
- numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
- <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
- <code class="computeroutput"><span class="special">*</span></code>, and <code class="computeroutput"><span class="special">%</span></code>
-</li>
-<li class="listitem">
- helper functions implementing the interface and the semantics of:
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></code>, and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></code>.
- </li>
-</ul></div>
-<a name="spirit.karma.reference.numeric.unsigned_int.attributes"></a><h6>
-<a name="id1189605"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.unsigned_int.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ushort</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>,
- attribute is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ushort</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>,
- attribute is optional, if it is supplied, the generator compares
- the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
- and succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">uint</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
- attribute is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">uint</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
- attribute is optional, if it is supplied, the generator compares
- the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
- and succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>,
- attribute is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>,
- attribute is optional, if it is supplied, the generator compares
- the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
- and succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong_long</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>, attribute is mandatory
- (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>, attribute is optional,
- if it is supplied, the generator compares the attribute with
- <code class="computeroutput"><span class="identifier">num</span></code> 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>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
- 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>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
- attribute is optional, if it is supplied, the generator compares
- the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
- 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>, 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> 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="id1190314"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.unsigned_int.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1190346"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.unsigned_int.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">uint</span></code>
- 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" title="Floating Point Number Generators">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.numeric.floating_point"></a><a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point" title="Floating Point Number Generators"> Floating
- Point Number Generators</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.numeric.floating_point.description"></a><h6>
-<a name="id1191587"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point.description">Description</a>
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Generates <code class="computeroutput"><span class="identifier">num</span></code>,
- where <code class="computeroutput"><span class="identifier">num</span></code> can
- be a <code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>, or <code class="computeroutput"><span class="keyword">long</span>
- <span class="keyword">double</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">float_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">float</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="keyword">float</span></code>
- as given by the mandatory attribute
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">float</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="keyword">float</span></code>, if an
- attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">double_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="keyword">double</span></code>
- as given by the mandatory attribute
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="keyword">double</span></code>, if
- an attribute is supplied it must match
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_double</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="keyword">double</span></code>
- as given by the mandatory attribute
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="keyword">double</span></code>, 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a <code class="computeroutput"><span class="identifier">Num</span></code>
- using the provided policies <code class="computeroutput"><span class="identifier">Policies</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate <code class="computeroutput"><span class="identifier">num</span></code>
- as a <code class="computeroutput"><span class="identifier">Num</span></code> using
- the provided policies <code class="computeroutput"><span class="identifier">Policies</span></code>,
- 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 <a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point.additional_requirements">below</a>).
- </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 class="link" 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="id1192247"></a>
- <a class="link" href="numeric.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.numeric.floating_point.model_of"></a><h6>
-<a name="id1192321"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
-<dd><p>
- Numeric literal, any floating point value, or a <a class="link" href="karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
- Argument</a> that evaluates to a floating point value of type
- <code class="computeroutput"><span class="identifier">Num</span></code>
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Num</span></code></span></dt>
-<dd><p>
- Type of <code class="computeroutput"><span class="identifier">num</span></code>: any
- floating point type
- </p></dd>
-</dl>
-</div>
-<a name="spirit.karma.reference.numeric.floating_point.expression_semantics"></a><h6>
-<a name="id1192421"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.primitivegenerator" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate the floating point literal <code class="computeroutput"><span class="identifier">num</span></code>
- using the default formatting (no trailing zeros, <code class="computeroutput"><span class="identifier">fixed</span></code> representation for numbers
- <code 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></code>, 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, <code class="computeroutput"><span class="identifier">fixed</span></code> representation for numbers
- <code 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></code>, 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, <code class="computeroutput"><span class="identifier">fixed</span></code>
- representation for numbers <code 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></code>,
- 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 <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>) are predefined specializations of the
- <code 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></code>
- 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 <code class="computeroutput"><span class="identifier">Num</span></code>
- provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Policies</span></code>. 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 <code class="computeroutput"><span class="identifier">Policies</span></code>
- see <a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point.floating_point_formatting_policies">below</a>).
- </p>
-<a name="spirit.karma.reference.numeric.floating_point.additional_requirements"></a><h6>
-<a name="id1192979"></a>
- <a class="link" 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 <code class="computeroutput"><span class="identifier">Num</span></code>
- to instantiate a <code 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></code>.
- </p>
-<p>
- In order to be usable as the first template parameter for <code class="computeroutput"><span class="identifier">real_generator</span><span class="special"><></span></code>
- the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
- defined:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
- <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
- <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
- and <code class="computeroutput"><span class="special">>=</span></code>
-</li>
-<li class="listitem">
- numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
- <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
- <code class="computeroutput"><span class="special">*</span></code>, and <code class="computeroutput"><span class="special">%</span></code>
-</li>
-<li class="listitem">
- functions implementing the interface and the semantics of: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">log10</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">modf</span></code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></code>, and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></code>
-</li>
-<li class="listitem">
- a valid specialization of the type <code 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></code> allowing for numeric property inspection.
- </li>
-</ul></div>
-<a name="spirit.karma.reference.numeric.floating_point.attributes"></a><h6>
-<a name="id1193291"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">float_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">float</span></code>, attribute
- is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">float_</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> and
- succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">double_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">double</span></code>, attribute
- is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">double</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> and
- succeeds only if both are equal, failing otherwise.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_double</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>,
- attribute is mandatory (otherwise compilation will fail)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>,
- attribute is optional, if it is supplied, the generator compares
- the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
- 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>, 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>
- <code class="computeroutput"><span class="identifier">Num</span></code>, attribute
- is optional, if it is supplied, the generator compares the attribute
- with <code class="computeroutput"><span class="identifier">num</span></code> 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="id1197116"></a>
- <a class="link" 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 <code class="computeroutput"><span class="identifier">real_policies</span><span class="special"><</span><span class="identifier">Num</span><span class="special">></span></code> and use it as a template parameter
- to the <code class="computeroutput"><span class="identifier">real_generator</span><span class="special"><></span></code> 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 <code class="computeroutput"><span class="identifier">T</span></code>
- should be the type to be formatted using the overloaded policy type.
- At the same time <code class="computeroutput"><span class="identifier">T</span></code> 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="id1197472"></a>
- <a class="link" 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 <code class="computeroutput"><span class="identifier">Inserter</span></code>. 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>
- <code class="computeroutput"><span class="identifier">sink</span></code>: is the
- output iterator to use for generation
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: is the floating
- point number to convert
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">p</span></code>: 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 <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code> returns true, then all generated
- numbers will have a sign (<code class="computeroutput"><span class="char">'+'</span></code>
- or <code class="computeroutput"><span class="char">'-'</span></code>, zeros will
- have a space instead of a sign).
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code> 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 <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> function).
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code> 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 <code class="computeroutput"><span class="number">0.001</span></code> and
- <code class="computeroutput"><span class="number">100000</span></code> will be generated
- using the fixed format, all others will be generated using the
- scientific representation.
- </p>
- <p>
- The <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> can be used to force the output
- of trailing zeros in the fractional part up to the number of
- digits returned by the <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> member function. The default
- is not to generate the trailing zeros.
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: 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 <code class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">scientific</span></code>
- (generate floating point values in scientific notation) or <code class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">fixed</span></code> (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>
- <code class="computeroutput"><span class="identifier">n</span></code>: 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"><strong>Note:</strong></span> If the trailing_zeros
- flag is not in effect additional semantics apply. See the description
- for the <code class="computeroutput"><span class="identifier">fraction_part</span><span class="special">()</span></code> function below. Moreover, this
- precision will be limited to the value of <code 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></code>.
- </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>
- <code class="computeroutput"><span class="identifier">sink</span></code>: is the
- output iterator to use for generation
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: is the absolute
- value of the integer part of the floating point number to convert
- (always non-negative)
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">sign</span></code>: is the
- sign of the overall floating point number to convert.
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">force_sign</span></code>: 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
- <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code>
- described above)
- </p>
- <p>
- The return value defines the outcome of the whole generator.
- If it is <code class="computeroutput"><span class="keyword">false</span></code>,
- no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
- it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
- <code class="computeroutput"><span class="identifier">sink</span></code>: is the
- output iterator to use for generation
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: 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 <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
- function earlier. I.e. a fractional part of <code class="computeroutput"><span class="number">0.01234</span></code>
- is represented as <code class="computeroutput"><span class="number">1234</span></code>
- when the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="number">5</span></code>.
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">precision</span></code>: The
- number of digits to emit as returned by the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
- 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"><strong>Note:</strong></span> If the <code class="computeroutput"><span class="identifier">trailing_zeros</span></code>
- flag is not in effect additional comments apply. See the description
- for the <code class="computeroutput"><span class="identifier">fraction_part</span><span class="special">()</span></code> function below.
- </p>
- <p>
- The return value defines the outcome of the whole generator.
- If it is <code class="computeroutput"><span class="keyword">false</span></code>,
- no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
- it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
- <code class="computeroutput"><span class="identifier">sink</span></code>: is the
- output iterator to use for generation
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: 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 <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
- function earlier. I.e. a fractional part of <code class="computeroutput"><span class="number">0.01234</span></code>
- is represented as <code class="computeroutput"><span class="number">1234</span></code>
- when the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="number">5</span></code>.
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">adjprec</span></code>: The
- corrected number of digits to emit (see note below)
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">precision</span></code>: The
- number of digits to emit as returned by the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
- described above
- </p>
- <p>
- <span class="bold"><strong>Note:</strong></span> If <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> returns <code class="computeroutput"><span class="keyword">false</span></code>
- the <code class="computeroutput"><span class="identifier">adjprec</span></code> parameter
- will have been corrected from the value the <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> 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
- <code class="computeroutput"><span class="number">0.0123</span></code> and a value
- of <code class="computeroutput"><span class="number">5</span></code> returned from
- <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
- will result in:
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="keyword">false</span></code>:
- <code class="computeroutput"><span class="identifier">n</span></code> will be <code class="computeroutput"><span class="number">123</span></code>, and <code class="computeroutput"><span class="identifier">adjprec</span></code>
- will be <code class="computeroutput"><span class="number">4</span></code> (as we
- need to print <code class="computeroutput"><span class="number">0123</span></code>)
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="keyword">true</span></code>:
- <code class="computeroutput"><span class="identifier">n</span></code> will be <code class="computeroutput"><span class="number">1230</span></code>, and <code class="computeroutput"><span class="identifier">adjprec</span></code>
- will be <code class="computeroutput"><span class="number">5</span></code> (as we
- need to print <code class="computeroutput"><span class="number">01230</span></code>)
- </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 <code class="computeroutput"><span class="keyword">false</span></code>,
- no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
- it is <code class="computeroutput"><span class="keyword">true</span></code>, 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 <code class="computeroutput"><span class="identifier">floatfield</span><span class="special">()</span></code> function returned the <code class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">scientific</span></code> flag).
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">sink</span></code>: is the
- output iterator to use for generation
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: The (signed)
- exponential part of the floating point number to convert.
- </p>
- <p>
- The template parameters <code class="computeroutput"><span class="identifier">CharEncoding</span></code>
- and <code class="computeroutput"><span class="identifier">Tag</span></code> are either
- of the type <code class="computeroutput"><span class="identifier">unused_type</span></code>
- or describe the character class and conversion to be applied
- to any output possibly influenced by either the <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>
- or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code>
- directives.
- </p>
- <p>
- The return value defines the outcome of the whole generator.
- If it is <code class="computeroutput"><span class="keyword">false</span></code>,
- no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
- it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
- <code class="computeroutput"><span class="identifier">sink</span></code>: is the
- output iterator to use for generation
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: is the (signed)
- floating point number to convert
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">force_sign</span></code>: 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
- <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code>
- described above)
- </p>
- <p>
- The template parameters <code class="computeroutput"><span class="identifier">CharEncoding</span></code>
- and <code class="computeroutput"><span class="identifier">Tag</span></code> are either
- of the type <code class="computeroutput"><span class="identifier">unused_type</span></code>
- or describe the character class and conversion to be applied
- to any output possibly influenced by either the <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>
- or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code>
- directives.
- </p>
- <p>
- The return value defines the outcome of the whole generator.
- If it is <code class="computeroutput"><span class="keyword">false</span></code>,
- no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
- it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
- <code class="computeroutput"><span class="identifier">sink</span></code>: is the
- output iterator to use for generation
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">n</span></code>: is the (signed)
- floating point number to convert
- </p>
- <p>
- <code class="computeroutput"><span class="identifier">force_sign</span></code>: 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
- <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code>
- described above)
- </p>
- <p>
- The template parameters <code class="computeroutput"><span class="identifier">CharEncoding</span></code>
- and <code class="computeroutput"><span class="identifier">Tag</span></code> are either
- of the type <code class="computeroutput"><span class="identifier">unused_type</span></code>
- or describe the character class and conversion to be applied
- to any output possibly influenced by either the <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>
- or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code>
- directives.
- </p>
- <p>
- The return value defines the outcome of the whole generator.
- If it is <code class="computeroutput"><span class="keyword">false</span></code>,
- no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
- it is <code class="computeroutput"><span class="keyword">true</span></code>, 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 <code class="computeroutput"><span class="identifier">real_policies</span><span class="special"><></span></code> 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="id1202205"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1202238"></a>
- <a class="link" href="numeric.html#spirit.karma.reference.numeric.floating_point.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">double_</span></code>
- 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>
@@ -3181,7 +58,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/floating_point.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/floating_point.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,1321 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Floating Point Number Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../numeric.html" title="Numeric">
+<link rel="prev" href="unsigned_int.html" title="Unsigned Integer Number Generators">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unsigned_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric.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" title="Floating Point Number Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.numeric.floating_point"></a><a class="link" href="floating_point.html" title="Floating Point Number Generators"> Floating
+ Point Number Generators</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.numeric.floating_point.description"></a><h6>
+<a name="id1212307"></a>
+ <a class="link" href="floating_point.html#spirit.karma.reference.numeric.floating_point.description">Description</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">num</span></code>,
+ where <code class="computeroutput"><span class="identifier">num</span></code> can
+ be a <code class="computeroutput"><span class="keyword">float</span></code>, <code class="computeroutput"><span class="keyword">double</span></code>, or <code class="computeroutput"><span class="keyword">long</span>
+ <span class="keyword">double</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">float_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">float</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="keyword">float</span></code>
+ as given by the mandatory attribute
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">float</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="keyword">float</span></code>, if an
+ attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">double_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="keyword">double</span></code>
+ as given by the mandatory attribute
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="keyword">double</span></code>, if
+ an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="keyword">double</span></code>
+ as given by the mandatory attribute
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="keyword">double</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="identifier">Num</span></code>
+ using the provided policies <code class="computeroutput"><span class="identifier">Policies</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="identifier">Num</span></code> using
+ the provided policies <code class="computeroutput"><span class="identifier">Policies</span></code>,
+ 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 <a class="link" href="floating_point.html#spirit.karma.reference.numeric.floating_point.additional_requirements">below</a>).
+ </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 class="link" href="../../performance_measurements/numeric_performance/double_performance.html" 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="id1212967"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.numeric.floating_point.model_of"></a><h6>
+<a name="id1213041"></a>
+ <a class="link" href="floating_point.html#spirit.karma.reference.numeric.floating_point.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
+<dd><p>
+ Numeric literal, any floating point value, or a <a class="link" href="../karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a floating point value of type
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Num</span></code></span></dt>
+<dd><p>
+ Type of <code class="computeroutput"><span class="identifier">num</span></code>: any
+ floating point type
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.numeric.floating_point.expression_semantics"></a><h6>
+<a name="id1213141"></a>
+ <a class="link" href="floating_point.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 <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the floating point literal <code class="computeroutput"><span class="identifier">num</span></code>
+ using the default formatting (no trailing zeros, <code class="computeroutput"><span class="identifier">fixed</span></code> representation for numbers
+ <code 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></code>, 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, <code class="computeroutput"><span class="identifier">fixed</span></code> representation for numbers
+ <code 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></code>, 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, <code class="computeroutput"><span class="identifier">fixed</span></code>
+ representation for numbers <code 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></code>,
+ 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 <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>) are predefined specializations of the
+ <code 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></code>
+ 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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Policies</span></code>. 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 <code class="computeroutput"><span class="identifier">Policies</span></code>
+ see <a class="link" href="floating_point.html#spirit.karma.reference.numeric.floating_point.floating_point_formatting_policies">below</a>).
+ </p>
+<a name="spirit.karma.reference.numeric.floating_point.additional_requirements"></a><h6>
+<a name="id1213699"></a>
+ <a class="link" href="floating_point.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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ to instantiate a <code 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></code>.
+ </p>
+<p>
+ In order to be usable as the first template parameter for <code class="computeroutput"><span class="identifier">real_generator</span><span class="special"><></span></code>
+ the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
+ <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
+ <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
+ and <code class="computeroutput"><span class="special">>=</span></code>
+</li>
+<li class="listitem">
+ numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
+ <code class="computeroutput"><span class="special">*</span></code>, and <code class="computeroutput"><span class="special">%</span></code>
+</li>
+<li class="listitem">
+ functions implementing the interface and the semantics of: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">log10</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">modf</span></code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></code>, and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></code>
+</li>
+<li class="listitem">
+ a valid specialization of the type <code 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></code> allowing for numeric property inspection.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.numeric.floating_point.attributes"></a><h6>
+<a name="id1214011"></a>
+ <a class="link" href="floating_point.html#spirit.karma.reference.numeric.floating_point.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">float_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">float</span></code>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">float_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">float_</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> and
+ succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">double_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">double</span></code>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">double_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">double</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> and
+ succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_double</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
+ 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> 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="id1220164"></a>
+ <a class="link" href="floating_point.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 <code class="computeroutput"><span class="identifier">real_policies</span><span class="special"><</span><span class="identifier">Num</span><span class="special">></span></code> and use it as a template parameter
+ to the <code class="computeroutput"><span class="identifier">real_generator</span><span class="special"><></span></code> 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 <code class="computeroutput"><span class="identifier">T</span></code>
+ should be the type to be formatted using the overloaded policy type.
+ At the same time <code class="computeroutput"><span class="identifier">T</span></code> 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="id1220519"></a>
+ <a class="link" href="floating_point.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 <code class="computeroutput"><span class="identifier">Inserter</span></code>. 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>
+ <code class="computeroutput"><span class="identifier">sink</span></code>: is the
+ output iterator to use for generation
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: is the floating
+ point number to convert
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">p</span></code>: 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 <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code> returns true, then all generated
+ numbers will have a sign (<code class="computeroutput"><span class="char">'+'</span></code>
+ or <code class="computeroutput"><span class="char">'-'</span></code>, zeros will
+ have a space instead of a sign).
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code> 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 <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> function).
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code> 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 <code class="computeroutput"><span class="number">0.001</span></code> and
+ <code class="computeroutput"><span class="number">100000</span></code> will be generated
+ using the fixed format, all others will be generated using the
+ scientific representation.
+ </p>
+ <p>
+ The <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> can be used to force the output
+ of trailing zeros in the fractional part up to the number of
+ digits returned by the <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> member function. The default
+ is not to generate the trailing zeros.
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: 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 <code class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">scientific</span></code>
+ (generate floating point values in scientific notation) or <code class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">fixed</span></code> (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>
+ <code class="computeroutput"><span class="identifier">n</span></code>: 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"><strong>Note:</strong></span> If the trailing_zeros
+ flag is not in effect additional semantics apply. See the description
+ for the <code class="computeroutput"><span class="identifier">fraction_part</span><span class="special">()</span></code> function below. Moreover, this
+ precision will be limited to the value of <code 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></code>.
+ </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>
+ <code class="computeroutput"><span class="identifier">sink</span></code>: is the
+ output iterator to use for generation
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: is the absolute
+ value of the integer part of the floating point number to convert
+ (always non-negative)
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">sign</span></code>: is the
+ sign of the overall floating point number to convert.
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">force_sign</span></code>: 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
+ <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code>
+ described above)
+ </p>
+ <p>
+ The return value defines the outcome of the whole generator.
+ If it is <code class="computeroutput"><span class="keyword">false</span></code>,
+ no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
+ it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">sink</span></code>: is the
+ output iterator to use for generation
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: 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 <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
+ function earlier. I.e. a fractional part of <code class="computeroutput"><span class="number">0.01234</span></code>
+ is represented as <code class="computeroutput"><span class="number">1234</span></code>
+ when the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="number">5</span></code>.
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">precision</span></code>: The
+ number of digits to emit as returned by the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
+ 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"><strong>Note:</strong></span> If the <code class="computeroutput"><span class="identifier">trailing_zeros</span></code>
+ flag is not in effect additional comments apply. See the description
+ for the <code class="computeroutput"><span class="identifier">fraction_part</span><span class="special">()</span></code> function below.
+ </p>
+ <p>
+ The return value defines the outcome of the whole generator.
+ If it is <code class="computeroutput"><span class="keyword">false</span></code>,
+ no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
+ it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">sink</span></code>: is the
+ output iterator to use for generation
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: 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 <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
+ function earlier. I.e. a fractional part of <code class="computeroutput"><span class="number">0.01234</span></code>
+ is represented as <code class="computeroutput"><span class="number">1234</span></code>
+ when the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="number">5</span></code>.
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">adjprec</span></code>: The
+ corrected number of digits to emit (see note below)
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">precision</span></code>: The
+ number of digits to emit as returned by the function <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
+ described above
+ </p>
+ <p>
+ <span class="bold"><strong>Note:</strong></span> If <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> returns <code class="computeroutput"><span class="keyword">false</span></code>
+ the <code class="computeroutput"><span class="identifier">adjprec</span></code> parameter
+ will have been corrected from the value the <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code> 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
+ <code class="computeroutput"><span class="number">0.0123</span></code> and a value
+ of <code class="computeroutput"><span class="number">5</span></code> returned from
+ <code class="computeroutput"><span class="identifier">precision</span><span class="special">()</span></code>
+ will result in:
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="keyword">false</span></code>:
+ <code class="computeroutput"><span class="identifier">n</span></code> will be <code class="computeroutput"><span class="number">123</span></code>, and <code class="computeroutput"><span class="identifier">adjprec</span></code>
+ will be <code class="computeroutput"><span class="number">4</span></code> (as we
+ need to print <code class="computeroutput"><span class="number">0123</span></code>)
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">trailing_zeros</span><span class="special">()</span></code> returned <code class="computeroutput"><span class="keyword">true</span></code>:
+ <code class="computeroutput"><span class="identifier">n</span></code> will be <code class="computeroutput"><span class="number">1230</span></code>, and <code class="computeroutput"><span class="identifier">adjprec</span></code>
+ will be <code class="computeroutput"><span class="number">5</span></code> (as we
+ need to print <code class="computeroutput"><span class="number">01230</span></code>)
+ </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 <code class="computeroutput"><span class="keyword">false</span></code>,
+ no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
+ it is <code class="computeroutput"><span class="keyword">true</span></code>, 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 <code class="computeroutput"><span class="identifier">floatfield</span><span class="special">()</span></code> function returned the <code class="computeroutput"><span class="identifier">fmtflags</span><span class="special">::</span><span class="identifier">scientific</span></code> flag).
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">sink</span></code>: is the
+ output iterator to use for generation
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: The (signed)
+ exponential part of the floating point number to convert.
+ </p>
+ <p>
+ The template parameters <code class="computeroutput"><span class="identifier">CharEncoding</span></code>
+ and <code class="computeroutput"><span class="identifier">Tag</span></code> are either
+ of the type <code class="computeroutput"><span class="identifier">unused_type</span></code>
+ or describe the character class and conversion to be applied
+ to any output possibly influenced by either the <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>
+ or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code>
+ directives.
+ </p>
+ <p>
+ The return value defines the outcome of the whole generator.
+ If it is <code class="computeroutput"><span class="keyword">false</span></code>,
+ no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
+ it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">sink</span></code>: is the
+ output iterator to use for generation
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: is the (signed)
+ floating point number to convert
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">force_sign</span></code>: 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
+ <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code>
+ described above)
+ </p>
+ <p>
+ The template parameters <code class="computeroutput"><span class="identifier">CharEncoding</span></code>
+ and <code class="computeroutput"><span class="identifier">Tag</span></code> are either
+ of the type <code class="computeroutput"><span class="identifier">unused_type</span></code>
+ or describe the character class and conversion to be applied
+ to any output possibly influenced by either the <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>
+ or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code>
+ directives.
+ </p>
+ <p>
+ The return value defines the outcome of the whole generator.
+ If it is <code class="computeroutput"><span class="keyword">false</span></code>,
+ no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
+ it is <code class="computeroutput"><span class="keyword">true</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">sink</span></code>: is the
+ output iterator to use for generation
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code>: is the (signed)
+ floating point number to convert
+ </p>
+ <p>
+ <code class="computeroutput"><span class="identifier">force_sign</span></code>: 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
+ <code class="computeroutput"><span class="identifier">force_sign</span><span class="special">()</span></code>
+ described above)
+ </p>
+ <p>
+ The template parameters <code class="computeroutput"><span class="identifier">CharEncoding</span></code>
+ and <code class="computeroutput"><span class="identifier">Tag</span></code> are either
+ of the type <code class="computeroutput"><span class="identifier">unused_type</span></code>
+ or describe the character class and conversion to be applied
+ to any output possibly influenced by either the <code class="computeroutput"><span class="identifier">lower</span><span class="special">[]</span></code>
+ or <code class="computeroutput"><span class="identifier">upper</span><span class="special">[]</span></code>
+ directives.
+ </p>
+ <p>
+ The return value defines the outcome of the whole generator.
+ If it is <code class="computeroutput"><span class="keyword">false</span></code>,
+ no further output is generated, imediatly returning <code class="computeroutput"><span class="keyword">false</span></code> from the calling <code class="computeroutput"><span class="identifier">real_generator</span></code> as well. If
+ it is <code class="computeroutput"><span class="keyword">true</span></code>, 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 <code class="computeroutput"><span class="identifier">real_policies</span><span class="special"><></span></code> 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="id1222983"></a>
+ <a class="link" href="floating_point.html#spirit.karma.reference.numeric.floating_point.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1223017"></a>
+ <a class="link" href="floating_point.html#spirit.karma.reference.numeric.floating_point.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">double_</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unsigned_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,873 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Signed Integer Number Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../numeric.html" title="Numeric">
+<link rel="prev" href="../numeric.html" title="Numeric">
+<link rel="next" href="unsigned_int.html" title="Unsigned Integer Number Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../numeric.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric.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="unsigned_int.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Signed Integer Number Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.numeric.signed_int"></a><a class="link" href="signed_int.html" title="Signed Integer Number Generators"> Signed
+ Integer Number Generators</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.numeric.signed_int.description"></a><h6>
+<a name="id1202090"></a>
+ <a class="link" href="signed_int.html#spirit.karma.reference.numeric.signed_int.description">Description</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">num</span></code>,
+ where <code class="computeroutput"><span class="identifier">num</span></code> can
+ be a <code class="computeroutput"><span class="keyword">short</span></code>, <code class="computeroutput"><span class="keyword">int</span></code>, <code class="computeroutput"><span class="keyword">long</span></code>,
+ or <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">short_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="keyword">short</span> <span class="keyword">int</span></code> as given by the mandatory
+ attribute
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="keyword">short</span> <span class="keyword">int</span></code>,
+ if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">int_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an <code class="computeroutput"><span class="keyword">int</span></code>
+ as given by the mandatory attribute
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an <code class="computeroutput"><span class="keyword">int</span></code>, if an
+ attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">int</span></code> as given by the mandatory
+ attribute
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">int</span></code>,
+ if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code> as given by the mandatory
+ attribute
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>,
+ 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a <code class="computeroutput"><span class="identifier">Num</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="identifier">Num</span></code>, 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 <a class="link" href="signed_int.html#spirit.karma.reference.numeric.signed_int.additional_requirements">below</a>).
+ </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 class="link" href="../../performance_measurements/numeric_performance/int_performance.html" 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="id1202892"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.numeric.signed_int.model_of"></a><h6>
+<a name="id1202966"></a>
+ <a class="link" href="signed_int.html#spirit.karma.reference.numeric.signed_int.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
+<dd><p>
+ Numeric literal, any signed integer value, or a <a class="link" href="../karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to a signed integer value of type
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Num</span></code></span></dt>
+<dd><p>
+ Type of <code class="computeroutput"><span class="identifier">num</span></code>: any
+ signed integer type
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.numeric.signed_int.expression_semantics"></a><h6>
+<a name="id1203068"></a>
+ <a class="link" href="signed_int.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 <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the integer literal <code class="computeroutput"><span class="identifier">num</span></code>
+ 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 <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>) are predefined specializations of the
+ <code 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></code>
+ 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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Radix</span></code> (possible values are
+ <code class="computeroutput"><span class="number">2</span></code>, <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>,
+ and <code class="computeroutput"><span class="number">16</span></code>, the default
+ value is <code class="computeroutput"><span class="number">10</span></code>). If
+ <code class="computeroutput"><span class="identifier">force_sign</span></code> is
+ <code class="computeroutput"><span class="keyword">false</span></code> (the default),
+ a sign is only printed for negative literals. If <code class="computeroutput"><span class="identifier">force_sign</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>, all numbers will be printed
+ using a sign, i.e. <code class="computeroutput"><span class="char">'-'</span></code>
+ for negative numbers, <code class="computeroutput"><span class="char">'+'</span></code>
+ for positive numbers, and <code class="computeroutput"><span class="char">' '</span></code>
+ 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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ provided by the immediate literal value the generator is initialized
+ from, using the specified <code class="computeroutput"><span class="identifier">Radix</span></code>
+ (possible values are <code class="computeroutput"><span class="number">2</span></code>,
+ <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>, and <code class="computeroutput"><span class="number">16</span></code>,
+ the default value is <code class="computeroutput"><span class="number">10</span></code>).
+ If <code class="computeroutput"><span class="identifier">force_sign</span></code>
+ is <code class="computeroutput"><span class="keyword">false</span></code> (the default),
+ a sign is only printed for negative literals. If <code class="computeroutput"><span class="identifier">force_sign</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>, all numbers will be printed
+ using a sign, i.e. <code class="computeroutput"><span class="char">'-'</span></code>
+ for negative numbers, <code class="computeroutput"><span class="char">'+'</span></code>
+ for positive numbers, and <code class="computeroutput"><span class="char">' '</span></code>
+ 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="id1203723"></a>
+ <a class="link" href="signed_int.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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ to instantiate and use a <code 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></code>.
+ </p>
+<p>
+ If <code 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></code> is <code class="computeroutput"><span class="keyword">true</span></code>
+ the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
+ <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
+ <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
+ and <code class="computeroutput"><span class="special">>=</span></code>
+</li>
+<li class="listitem">
+ numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
+ <code class="computeroutput"><span class="special">*</span></code>, <code class="computeroutput"><span class="special">%</span></code>,
+ and unary <code class="computeroutput"><span class="special">-</span></code>
+</li>
+</ul></div>
+<p>
+ If <code 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></code> is <code class="computeroutput"><span class="keyword">false</span></code>
+ the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
+ <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
+ <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
+ and <code class="computeroutput"><span class="special">>=</span></code>
+</li>
+<li class="listitem">
+ numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
+ <code class="computeroutput"><span class="special">*</span></code>, <code class="computeroutput"><span class="special">%</span></code>,
+ and unary <code class="computeroutput"><span class="special">-</span></code>
+</li>
+<li class="listitem">
+ helper functions implementing the interface and the semantics of:
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fabs</span></code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></code>,
+ and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></code>.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.numeric.signed_int.attributes"></a><h6>
+<a name="id1204174"></a>
+ <a class="link" href="signed_int.html#spirit.karma.reference.numeric.signed_int.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">short_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">short</span></code>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">short_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">short</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> and
+ succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">int_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">int</span></code>, attribute is
+ mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">int_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">int</span></code>, attribute is
+ optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> and
+ succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span></code>, attribute
+ is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> and
+ succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
+ 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> 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="id1204731"></a>
+ <a class="link" href="signed_int.html#spirit.karma.reference.numeric.signed_int.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1204762"></a>
+ <a class="link" href="signed_int.html#spirit.karma.reference.numeric.signed_int.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">int_</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../numeric.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric.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="unsigned_int.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,1046 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Unsigned Integer Number Generators</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../numeric.html" title="Numeric">
+<link rel="prev" href="signed_int.html" title="Signed Integer Number Generators">
+<link rel="next" href="floating_point.html" title="Floating Point Number Generators">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="signed_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric.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="floating_point.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Unsigned Integer Number Generators">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.numeric.unsigned_int"></a><a class="link" href="unsigned_int.html" title="Unsigned Integer Number Generators"> Unsigned
+ Integer Number Generators</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.numeric.unsigned_int.description"></a><h6>
+<a name="id1207653"></a>
+ <a class="link" href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.description">Description</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generates <code class="computeroutput"><span class="identifier">num</span></code>,
+ where <code class="computeroutput"><span class="identifier">num</span></code> can
+ be a <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>,
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>,
+ or <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ushort</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a short integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ushort</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as a short integer, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an int
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an int, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a long integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as long integer, if an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong_long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a long long
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned <code class="computeroutput"><span class="identifier">Num</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned <code class="computeroutput"><span class="identifier">num</span></code>
+ as a <code class="computeroutput"><span class="identifier">Num</span></code>, if
+ an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">bin</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned integer in binary (base 2) representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">bin</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an unsigned integer in binary (base 2) representation, if
+ an attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">oct</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned integer in octal (base 8) representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">oct</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ as an unsigned integer in octal (base 8) representation, if an
+ attribute is supplied it must match
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">hex</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate an unsigned integer in hexadecimal (base 16) representation
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">hex</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="computeroutput"><span class="identifier">num</span></code>
+ 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 <a class="link" href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.additional_requirements">below</a>).
+ </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 class="link" href="../../performance_measurements/numeric_performance/int_performance.html" 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="id1208718"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.numeric.unsigned_int.model_of"></a><h6>
+<a name="id1208792"></a>
+ <a class="link" href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">num</span></code></span></dt>
+<dd><p>
+ Numeric literal, any unsigned integer value, or a <a class="link" href="../karma_basics.html#spirit.karma.reference.karma_basics.lazy_argument">Lazy
+ Argument</a> that evaluates to an unsigned integer value of type
+ <code class="computeroutput"><span class="identifier">Num</span></code>
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Num</span></code></span></dt>
+<dd><p>
+ Type of <code class="computeroutput"><span class="identifier">num</span></code>: any
+ unsigned integer type
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.karma.reference.numeric.unsigned_int.expression_semantics"></a><h6>
+<a name="id1208892"></a>
+ <a class="link" href="unsigned_int.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 <a class="link" href="../generator_concepts/primitivegenerator.html" title="PrimitiveGenerator"><code class="computeroutput"><span class="identifier">PrimitiveGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate the integer literal <code class="computeroutput"><span class="identifier">num</span></code>
+ 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 (<code class="computeroutput"><span class="identifier">bin</span></code>: radix is 2, <code class="computeroutput"><span class="identifier">oct</span></code>: radix is 8, <code class="computeroutput"><span class="identifier">hex</span></code>: 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 (<code class="computeroutput"><span class="identifier">bin</span></code>:
+ radix is 2, <code class="computeroutput"><span class="identifier">oct</span></code>:
+ radix is 8, <code class="computeroutput"><span class="identifier">hex</span></code>:
+ 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 <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>) are predefined specializations of the
+ <code 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></code>
+ 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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Radix</span></code> (possible values are
+ <code class="computeroutput"><span class="number">2</span></code>, <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>,
+ and <code class="computeroutput"><span class="number">16</span></code>, the default
+ value is <code class="computeroutput"><span class="number">10</span></code>).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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ provided by the immediate literal value the generator is initialized
+ from, using the specified <code class="computeroutput"><span class="identifier">Radix</span></code>
+ (possible values are <code class="computeroutput"><span class="number">2</span></code>,
+ <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>, and <code class="computeroutput"><span class="number">16</span></code>,
+ the default value is <code class="computeroutput"><span class="number">10</span></code>).
+ 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="id1209543"></a>
+ <a class="link" href="unsigned_int.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 <code class="computeroutput"><span class="identifier">Num</span></code>
+ to instantiate and use a <code 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></code>.
+ </p>
+<p>
+ If <code 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></code> is <code class="computeroutput"><span class="keyword">true</span></code>
+ the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
+ <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
+ <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
+ and <code class="computeroutput"><span class="special">>=</span></code>
+</li>
+<li class="listitem">
+ numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
+ <code class="computeroutput"><span class="special">*</span></code>, and <code class="computeroutput"><span class="special">%</span></code>
+</li>
+</ul></div>
+<p>
+ If <code 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></code> is <code class="computeroutput"><span class="keyword">false</span></code>
+ the type <code class="computeroutput"><span class="identifier">Num</span></code> must have
+ defined:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ comparison operators for: <code class="computeroutput"><span class="special"><</span></code>,
+ <code class="computeroutput"><span class="special"><=</span></code>, <code class="computeroutput"><span class="special">==</span></code>,
+ <code class="computeroutput"><span class="special">!=</span></code>, <code class="computeroutput"><span class="special">></span></code>,
+ and <code class="computeroutput"><span class="special">>=</span></code>
+</li>
+<li class="listitem">
+ numeric operators for: <code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">-</span></code>, <code class="computeroutput"><span class="special">/</span></code>,
+ <code class="computeroutput"><span class="special">*</span></code>, and <code class="computeroutput"><span class="special">%</span></code>
+</li>
+<li class="listitem">
+ helper functions implementing the interface and the semantics of:
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">fmod</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pow</span></code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">lround</span></code>, <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ltrunc</span></code>,
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">floor</span></code>, and <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ceil</span></code>.
+ </li>
+</ul></div>
+<a name="spirit.karma.reference.numeric.unsigned_int.attributes"></a><h6>
+<a name="id1210325"></a>
+ <a class="link" href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ushort</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ushort</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
+ and succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
+ and succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>,
+ attribute is mandatory (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
+ and succeeds only if both are equal, failing otherwise.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong_long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>, attribute is mandatory
+ (otherwise compilation will fail)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong_long</span><span class="special">(</span><span class="identifier">num</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>, attribute is optional,
+ if it is supplied, the generator compares the attribute with
+ <code class="computeroutput"><span class="identifier">num</span></code> 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>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
+ 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>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>,
+ attribute is optional, if it is supplied, the generator compares
+ the attribute with <code class="computeroutput"><span class="identifier">num</span></code>
+ 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>, 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>
+ <code class="computeroutput"><span class="identifier">Num</span></code>, attribute
+ is optional, if it is supplied, the generator compares the attribute
+ with <code class="computeroutput"><span class="identifier">num</span></code> 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="id1211034"></a>
+ <a class="link" href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(N), where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1211066"></a>
+ <a class="link" href="unsigned_int.html#spirit.karma.reference.numeric.unsigned_int.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">uint</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="signed_int.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../numeric.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="floating_point.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,8 +6,8 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="directive.html" title="Directive">
-<link rel="next" href="auxiliary.html" title="Auxiliary">
+<link rel="prev" href="directive/omit.html" title="Consume Attribute (omit[])">
+<link rel="next" href="operator/sequence.html" title="Sequences (operator<<())">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,27 +20,27 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Operator">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.karma.reference.operator"></a><a class="link" href="operator.html" title="Operator">Operator</a>
</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.sequence"> Sequences
+<dt><span class="section"><a href="operator/sequence.html"> Sequences
(<code class="computeroutput"><span class="keyword">operator</span><span class="special"><<()</span></code>)</a></span></dt>
-<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.alternative"> Alternatives
+<dt><span class="section"><a href="operator/alternative.html"> Alternatives
(<code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>)</a></span></dt>
-<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.kleene"> Kleene Star
+<dt><span class="section"><a href="operator/kleene.html"> Kleene Star
(unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">*()</span></code>)</a></span></dt>
-<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.plus"> Plus (unary
+<dt><span class="section"><a href="operator/plus.html"> Plus (unary
<code class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span></code>)</a></span></dt>
-<dt><span class="section"> Lists (operator%()
)</span></dt>
-<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.optional"> Optional
+<dt><span class="section"> Lists (operator%()
)</span></dt>
+<dt><span class="section"><a href="operator/optional.html"> Optional
(unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">-()</span></code>)</a></span></dt>
-<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.and_predicate"> And
+<dt><span class="section"><a href="operator/and_predicate.html"> And
Predicate (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">&()</span></code>)</a></span></dt>
-<dt><span class="section"><a href="operator.html#spirit.karma.reference.operator.not_predicate"> Not
+<dt><span class="section"><a href="operator/not_predicate.html"> Not
Predicate (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">!()</span></code>)</a></span></dt>
</dl></div>
<p>
@@ -54,2158 +54,12 @@
and the <span class="emphasis"><em>not</em></span> predicate (unary <code class="computeroutput"><span class="special">!</span></code>).
</p>
<a name="spirit.karma.reference.operator.module_header"></a><h6>
-<a name="id1225133"></a>
+<a name="id1245744"></a>
<a class="link" href="operator.html#spirit.karma.reference.operator.module_header">Module Header</a>
</h6>
<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" title="Sequences (operator<<())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.sequence"></a><a class="link" href="operator.html#spirit.karma.reference.operator.sequence" title="Sequences (operator<<())"> Sequences
- (<code class="computeroutput"><span class="keyword">operator</span><span class="special"><<()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.sequence.description"></a><h6>
-<a name="id1225219"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.sequence.description">Description</a>
- </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="id1225236"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.sequence.model_of"></a><h6>
-<a name="id1225310"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.sequence.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.sequence.expression_semantics"></a><h6>
-<a name="id1225346"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special"><<</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- The generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">b</span></code> 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" title="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 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 class="link" href="directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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="id1225539"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.sequence.attributes">Attributes</a>
- </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 (<code class="computeroutput"><span class="special"><<</span></code>)
- </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" title="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 align="left" valign="top">
-<p>
- The table above uses <code 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></code> and <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as placeholders only.
- </p>
-<p>
- The notation <code 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></code> stands for <span class="emphasis"><em>any fusion
- sequence of two elements</em></span>, where <code class="computeroutput"><span class="identifier">A</span></code>
- is the type of its first element and <code class="computeroutput"><span class="identifier">B</span></code>
- is the type of its second element.
- </p>
-<p>
- The notation of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> stands for <span class="emphasis"><em>any STL container</em></span>
- holding elements of type <code class="computeroutput"><span class="identifier">A</span></code>.
- </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="id1226337"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.sequence.complexity">Complexity</a>
- </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="id1226361"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.sequence.example">Example</a>
- </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" title="Alternatives (operator|())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.alternative"></a><a class="link" href="operator.html#spirit.karma.reference.operator.alternative" title="Alternatives (operator|())"> Alternatives
- (<code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.alternative.description"></a><h6>
-<a name="id1227733"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.alternative.description">Description</a>
- </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="id1227750"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.alternative.model_of"></a><h6>
-<a name="id1227824"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.alternative.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.alternative.expression_semantics"></a><h6>
-<a name="id1227858"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.narygenerator" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- The generators <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">b</span></code> 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="id1227969"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.alternative.attributes">Attributes</a>
- </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 (<code class="computeroutput"><span class="special">|</span></code>)
- </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" title="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 align="left" valign="top"><p>
- The table above uses <code 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></code> as a placeholder only. The notation
- <code 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></code>
- stands for the type <code 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></code>.
- </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="id1228468"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.alternative.complexity">Complexity</a>
- </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="id1228492"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.alternative.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">double_</span></code> generator
- is chosen for output formatting because the supplied attribute type is
- not compatible (i.e. not convertible) to the attribute type of the <code class="computeroutput"><span class="identifier">string</span></code> 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 <code class="computeroutput"><span class="string">"example"</span></code>,
- 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" title="Kleene Star (unary operator*())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.kleene"></a><a class="link" href="operator.html#spirit.karma.reference.operator.kleene" title="Kleene Star (unary operator*())"> Kleene Star
- (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">*()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.kleene.description"></a><h6>
-<a name="id1229586"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.kleene.description">Description</a>
- </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="id1229602"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.kleene.model_of"></a><h6>
-<a name="id1229698"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.kleene.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.kleene.expression_semantics"></a><h6>
-<a name="id1229737"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- The generator <code class="computeroutput"><span class="identifier">a</span></code>
- is executed zero or more times depending on the availability
- of an attribute. The execution of <code class="computeroutput"><span class="identifier">a</span></code>
- 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="id1229844"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.kleene.attributes">Attributes</a>
- </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 <code class="computeroutput"><span class="special">*</span></code>)
- </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" title="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 align="left" valign="top"><p>
- The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
- of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- stands for <span class="emphasis"><em>any STL container</em></span> holding elements
- of type <code class="computeroutput"><span class="identifier">A</span></code>.
- </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" title="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 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 class="link" href="directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
- 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 <code class="computeroutput"><span class="identifier">a</span></code> 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 <code class="computeroutput"><span class="identifier">a</span></code>.
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.operator.kleene.complexity"></a><h6>
-<a name="id1230169"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.kleene.complexity">Complexity</a>
- </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="id1230193"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.kleene.example">Example</a>
- </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" title="Plus (unary operator+())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.plus"></a><a class="link" href="operator.html#spirit.karma.reference.operator.plus" title="Plus (unary operator+())"> Plus (unary
- <code class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.plus.description"></a><h6>
-<a name="id1231112"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.plus.description">Description</a>
- </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="id1231129"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.plus.model_of"></a><h6>
-<a name="id1231203"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.plus.model_of">Model of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.plus.expression_semantics"></a><h6>
-<a name="id1231242"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="special">+</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- The generator <code class="computeroutput"><span class="identifier">a</span></code>
- is executed one or more times depending on the availability of
- an attribute. The execution of <code class="computeroutput"><span class="identifier">a</span></code>
- 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="id1231348"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.plus.attributes">Attributes</a>
- </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 <code class="computeroutput"><span class="special">+</span></code>)
- </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" title="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 align="left" valign="top"><p>
- The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
- of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- stands for <span class="emphasis"><em>any STL container</em></span> holding elements
- of type <code class="computeroutput"><span class="identifier">A</span></code>.
- </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" title="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 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 class="link" href="directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
- 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 <code class="computeroutput"><span class="identifier">a</span></code> 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 <code class="computeroutput"><span class="identifier">a</span></code>.
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.operator.plus.complexity"></a><h6>
-<a name="id1231674"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.plus.complexity">Complexity</a>
- </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="id1231698"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.plus.example">Example</a>
- </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" title="Lists (operator%())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.list"></a><a class="link" href="operator.html#spirit.karma.reference.operator.list" title="Lists (operator%())"> Lists (<code class="computeroutput"><span class="keyword">operator</span><span class="special">%()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.list.description"></a><h6>
-<a name="id1234534"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.list.description">Description</a>
- </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="id1234551"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.list.model_of"></a><h6>
-<a name="id1234626"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.list.model_of">Model of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator" title="BinaryGenerator"><code class="computeroutput"><span class="identifier">BinaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.list.expression_semantics"></a><h6>
-<a name="id1234664"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.binarygenerator" title="BinaryGenerator"><code class="computeroutput"><span class="identifier">BinaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- The generator <code class="computeroutput"><span class="identifier">a</span></code>
- is executed one or more times depending on the availability of
- an attribute. The output generated by <code class="computeroutput"><span class="identifier">a</span></code>
- is interspaced with the output generated by <code class="computeroutput"><span class="identifier">b</span></code>.
- 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 <code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span> <span class="identifier">b</span></code>
- is a shortcut for <code 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></code>.
- It is almost semantically equivalent, except for the attribute of <code class="computeroutput"><span class="identifier">b</span></code>, which gets ignored in the case of
- the list generator.
- </p>
-<a name="spirit.karma.reference.operator.list.attributes"></a><h6>
-<a name="id1234845"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.list.attributes">Attributes</a>
- </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 (<code class="computeroutput"><span class="special">%</span></code>)
- </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" title="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 align="left" valign="top"><p>
- The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
- of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- stands for <span class="emphasis"><em>any STL container</em></span> holding elements
- of type <code class="computeroutput"><span class="identifier">A</span></code>.
- </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 <code class="computeroutput"><span class="identifier">unused_type</span></code> 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" title="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 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 class="link" href="operator.html#spirit.karma.reference.operator.optional" title="Optional (unary operator-())">optional
- (unary <code class="computeroutput"><span class="special">-</span></code>)</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" title="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 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 class="link" href="directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.operator.list.complexity"></a><h6>
-<a name="id1235247"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.list.complexity">Complexity</a>
- </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="id1235271"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.list.example">Example</a>
- </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" title="Optional (unary operator-())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.optional"></a><a class="link" href="operator.html#spirit.karma.reference.operator.optional" title="Optional (unary operator-())"> Optional
- (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">-()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.optional.description"></a><h6>
-<a name="id1236203"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.optional.description">Description</a>
- </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="id1236220"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.optional.model_of"></a><h6>
-<a name="id1236294"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.optional.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.optional.expression_semantics"></a><h6>
-<a name="id1236333"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="special">-</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- The generator <code class="computeroutput"><span class="identifier">a</span></code>
- 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="id1236432"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.optional.attributes">Attributes</a>
- </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 <code class="computeroutput"><span class="special">-</span></code>)
- </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" title="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 align="left" valign="top"><p>
- The table above uses <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
- of <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- stands for the data type <code 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></code>.
- </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" title="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 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 class="link" href="directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
- </p>
-</td></tr>
-</table></div>
-<a name="spirit.karma.reference.operator.optional.complexity"></a><h6>
-<a name="id1236729"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.optional.complexity">Complexity</a>
- </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="id1236753"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.optional.example">Example</a>
- </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" title="And Predicate (unary operator&())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.and_predicate"></a><a class="link" href="operator.html#spirit.karma.reference.operator.and_predicate" title="And Predicate (unary operator&())"> And
- Predicate (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">&()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.and_predicate.description"></a><h6>
-<a name="id1237691"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.and_predicate.description">Description</a>
- </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="id1237710"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.and_predicate.model_of"></a><h6>
-<a name="id1237785"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.and_predicate.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.and_predicate.expression_semantics"></a><h6>
-<a name="id1237821"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="special">&</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- The generator <code class="computeroutput"><span class="identifier">a</span></code>
- 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="id1237924"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.and_predicate.attributes">Attributes</a>
- </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 <code class="computeroutput"><span class="special">&</span></code>)
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<div class="note" title="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 align="left" valign="top"><p>
- The attribute of the and predicate is not always <code class="computeroutput"><span class="identifier">Unused</span></code>,
- 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="id1239296"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.and_predicate.complexity">Complexity</a>
- </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="id1239322"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.and_predicate.example">Example</a>
- </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" title="Not Predicate (unary operator!())">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.karma.reference.operator.not_predicate"></a><a class="link" href="operator.html#spirit.karma.reference.operator.not_predicate" title="Not Predicate (unary operator!())"> Not
- Predicate (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">!()</span></code>)</a>
-</h5></div></div></div>
-<a name="spirit.karma.reference.operator.not_predicate.description"></a><h6>
-<a name="id1240396"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.not_predicate.description">Description</a>
- </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="id1240416"></a>
- <a class="link" href="operator.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.karma.reference.operator.not_predicate.model_of"></a><h6>
-<a name="id1240490"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.not_predicate.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.karma.reference.operator.not_predicate.expression_semantics"></a><h6>
-<a name="id1240526"></a>
- <a class="link" 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 <a class="link" href="generator_concepts.html#spirit.karma.reference.generator_concepts.unarygenerator" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
- </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>
- <code class="computeroutput"><span class="special">!</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- The generator <code class="computeroutput"><span class="identifier">a</span></code>
- 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="id1240629"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.not_predicate.attributes">Attributes</a>
- </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 <code class="computeroutput"><span class="special">!</span></code>)
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<div class="note" title="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 align="left" valign="top"><p>
- The attribute of the and predicate is not always <code class="computeroutput"><span class="identifier">Unused</span></code>,
- 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="id1240756"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.not_predicate.complexity">Complexity</a>
- </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="id1240783"></a>
- <a class="link" href="operator.html#spirit.karma.reference.operator.not_predicate.example">Example</a>
- </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>
@@ -2218,7 +72,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/alternative.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/alternative.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,307 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Alternatives (operator|())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="sequence.html" title="Sequences (operator<<())">
+<link rel="next" href="kleene.html" title="Kleene Star (unary operator*())">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sequence.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="kleene.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Alternatives (operator|())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.alternative"></a><a class="link" href="alternative.html" title="Alternatives (operator|())"> Alternatives
+ (<code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.alternative.description"></a><h6>
+<a name="id1247798"></a>
+ <a class="link" href="alternative.html#spirit.karma.reference.operator.alternative.description">Description</a>
+ </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="id1247815"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.alternative.model_of"></a><h6>
+<a name="id1247890"></a>
+ <a class="link" href="alternative.html#spirit.karma.reference.operator.alternative.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/narygenerator.html" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.alternative.expression_semantics"></a><h6>
+<a name="id1247923"></a>
+ <a class="link" href="alternative.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 <a class="link" href="../generator_concepts/narygenerator.html" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">b</span></code> 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="id1248035"></a>
+ <a class="link" href="alternative.html#spirit.karma.reference.operator.alternative.attributes">Attributes</a>
+ </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 (<code class="computeroutput"><span class="special">|</span></code>)
+ </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" title="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 align="left" valign="top"><p>
+ The table above uses <code 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></code> as a placeholder only. The notation
+ <code 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></code>
+ stands for the type <code 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></code>.
+ </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="id1248534"></a>
+ <a class="link" href="alternative.html#spirit.karma.reference.operator.alternative.complexity">Complexity</a>
+ </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="id1248558"></a>
+ <a class="link" href="alternative.html#spirit.karma.reference.operator.alternative.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">double_</span></code> generator
+ is chosen for output formatting because the supplied attribute type is
+ not compatible (i.e. not convertible) to the attribute type of the <code class="computeroutput"><span class="identifier">string</span></code> 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 <code class="computeroutput"><span class="string">"example"</span></code>,
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="sequence.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="kleene.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/and_predicate.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/and_predicate.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,270 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>And Predicate (unary operator&())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="optional.html" title="Optional (unary operator-())">
+<link rel="next" href="not_predicate.html" title="Not Predicate (unary operator!())">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="optional.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="not_predicate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="And Predicate (unary operator&())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.and_predicate"></a><a class="link" href="and_predicate.html" title="And Predicate (unary operator&())"> And
+ Predicate (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">&()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.and_predicate.description"></a><h6>
+<a name="id1258580"></a>
+ <a class="link" href="and_predicate.html#spirit.karma.reference.operator.and_predicate.description">Description</a>
+ </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="id1258600"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.and_predicate.model_of"></a><h6>
+<a name="id1258674"></a>
+ <a class="link" href="and_predicate.html#spirit.karma.reference.operator.and_predicate.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.and_predicate.expression_semantics"></a><h6>
+<a name="id1258710"></a>
+ <a class="link" href="and_predicate.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="special">&</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generator <code class="computeroutput"><span class="identifier">a</span></code>
+ 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="id1258813"></a>
+ <a class="link" href="and_predicate.html#spirit.karma.reference.operator.and_predicate.attributes">Attributes</a>
+ </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 <code class="computeroutput"><span class="special">&</span></code>)
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<div class="note" title="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 align="left" valign="top"><p>
+ The attribute of the and predicate is not always <code class="computeroutput"><span class="identifier">Unused</span></code>,
+ 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="id1260185"></a>
+ <a class="link" href="and_predicate.html#spirit.karma.reference.operator.and_predicate.complexity">Complexity</a>
+ </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="id1260212"></a>
+ <a class="link" href="and_predicate.html#spirit.karma.reference.operator.and_predicate.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="optional.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="not_predicate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/kleene.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/kleene.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,318 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Kleene Star (unary operator*())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="alternative.html" title="Alternatives (operator|())">
+<link rel="next" href="plus.html" title="Plus (unary operator+())">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="alternative.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="plus.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Kleene Star (unary operator*())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.kleene"></a><a class="link" href="kleene.html" title="Kleene Star (unary operator*())"> Kleene Star
+ (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">*()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.kleene.description"></a><h6>
+<a name="id1249651"></a>
+ <a class="link" href="kleene.html#spirit.karma.reference.operator.kleene.description">Description</a>
+ </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="id1249668"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.kleene.model_of"></a><h6>
+<a name="id1250861"></a>
+ <a class="link" href="kleene.html#spirit.karma.reference.operator.kleene.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.kleene.expression_semantics"></a><h6>
+<a name="id1250899"></a>
+ <a class="link" href="kleene.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generator <code class="computeroutput"><span class="identifier">a</span></code>
+ is executed zero or more times depending on the availability
+ of an attribute. The execution of <code class="computeroutput"><span class="identifier">a</span></code>
+ 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="id1251006"></a>
+ <a class="link" href="kleene.html#spirit.karma.reference.operator.kleene.attributes">Attributes</a>
+ </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 <code class="computeroutput"><span class="special">*</span></code>)
+ </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" title="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 align="left" valign="top"><p>
+ The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
+ of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ stands for <span class="emphasis"><em>any STL container</em></span> holding elements
+ of type <code class="computeroutput"><span class="identifier">A</span></code>.
+ </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" title="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 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 class="link" href="../directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
+ 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 <code class="computeroutput"><span class="identifier">a</span></code> 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 <code class="computeroutput"><span class="identifier">a</span></code>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.kleene.complexity"></a><h6>
+<a name="id1251331"></a>
+ <a class="link" href="kleene.html#spirit.karma.reference.operator.kleene.complexity">Complexity</a>
+ </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="id1251355"></a>
+ <a class="link" href="kleene.html#spirit.karma.reference.operator.kleene.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="alternative.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="plus.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/list.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/list.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,339 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Lists (operator%())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="plus.html" title="Plus (unary operator+())">
+<link rel="next" href="optional.html" title="Optional (unary operator-())">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="plus.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="optional.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Lists (operator%())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.list"></a><a class="link" href="list.html" title="Lists (operator%())"> Lists (<code class="computeroutput"><span class="keyword">operator</span><span class="special">%()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.list.description"></a><h6>
+<a name="id1255150"></a>
+ <a class="link" href="list.html#spirit.karma.reference.operator.list.description">Description</a>
+ </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="id1255167"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.list.model_of"></a><h6>
+<a name="id1255242"></a>
+ <a class="link" href="list.html#spirit.karma.reference.operator.list.model_of">Model of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/binarygenerator.html" title="BinaryGenerator"><code class="computeroutput"><span class="identifier">BinaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.list.expression_semantics"></a><h6>
+<a name="id1255280"></a>
+ <a class="link" href="list.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 <a class="link" href="../generator_concepts/binarygenerator.html" title="BinaryGenerator"><code class="computeroutput"><span class="identifier">BinaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generator <code class="computeroutput"><span class="identifier">a</span></code>
+ is executed one or more times depending on the availability of
+ an attribute. The output generated by <code class="computeroutput"><span class="identifier">a</span></code>
+ is interspaced with the output generated by <code class="computeroutput"><span class="identifier">b</span></code>.
+ 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 <code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span> <span class="identifier">b</span></code>
+ is a shortcut for <code 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></code>.
+ It is almost semantically equivalent, except for the attribute of <code class="computeroutput"><span class="identifier">b</span></code>, which gets ignored in the case of
+ the list generator.
+ </p>
+<a name="spirit.karma.reference.operator.list.attributes"></a><h6>
+<a name="id1255461"></a>
+ <a class="link" href="list.html#spirit.karma.reference.operator.list.attributes">Attributes</a>
+ </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 (<code class="computeroutput"><span class="special">%</span></code>)
+ </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" title="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 align="left" valign="top"><p>
+ The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
+ of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ stands for <span class="emphasis"><em>any STL container</em></span> holding elements
+ of type <code class="computeroutput"><span class="identifier">A</span></code>.
+ </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 <code class="computeroutput"><span class="identifier">unused_type</span></code> 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" title="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 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 class="link" href="optional.html" title="Optional (unary operator-())">optional
+ (unary <code class="computeroutput"><span class="special">-</span></code>)</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" title="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 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 class="link" href="../directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.list.complexity"></a><h6>
+<a name="id1255863"></a>
+ <a class="link" href="list.html#spirit.karma.reference.operator.list.complexity">Complexity</a>
+ </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="id1255887"></a>
+ <a class="link" href="list.html#spirit.karma.reference.operator.list.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="plus.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="optional.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/not_predicate.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/not_predicate.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,270 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Not Predicate (unary operator!())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="and_predicate.html" title="And Predicate (unary operator&())">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="and_predicate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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" title="Not Predicate (unary operator!())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.not_predicate"></a><a class="link" href="not_predicate.html" title="Not Predicate (unary operator!())"> Not
+ Predicate (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">!()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.not_predicate.description"></a><h6>
+<a name="id1261286"></a>
+ <a class="link" href="not_predicate.html#spirit.karma.reference.operator.not_predicate.description">Description</a>
+ </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="id1261305"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.not_predicate.model_of"></a><h6>
+<a name="id1261379"></a>
+ <a class="link" href="not_predicate.html#spirit.karma.reference.operator.not_predicate.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.not_predicate.expression_semantics"></a><h6>
+<a name="id1261415"></a>
+ <a class="link" href="not_predicate.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="special">!</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generator <code class="computeroutput"><span class="identifier">a</span></code>
+ 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="id1261518"></a>
+ <a class="link" href="not_predicate.html#spirit.karma.reference.operator.not_predicate.attributes">Attributes</a>
+ </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 <code class="computeroutput"><span class="special">!</span></code>)
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<div class="note" title="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 align="left" valign="top"><p>
+ The attribute of the and predicate is not always <code class="computeroutput"><span class="identifier">Unused</span></code>,
+ 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="id1261646"></a>
+ <a class="link" href="not_predicate.html#spirit.karma.reference.operator.not_predicate.complexity">Complexity</a>
+ </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="id1261672"></a>
+ <a class="link" href="not_predicate.html#spirit.karma.reference.operator.not_predicate.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="and_predicate.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/optional.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/optional.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,308 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Optional (unary operator-())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="list.html" title="Lists (operator%())">
+<link rel="next" href="and_predicate.html" title="And Predicate (unary operator&())">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="list.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="and_predicate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Optional (unary operator-())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.optional"></a><a class="link" href="optional.html" title="Optional (unary operator-())"> Optional
+ (unary <code class="computeroutput"><span class="keyword">operator</span><span class="special">-()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.optional.description"></a><h6>
+<a name="id1257092"></a>
+ <a class="link" href="optional.html#spirit.karma.reference.operator.optional.description">Description</a>
+ </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="id1257109"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.optional.model_of"></a><h6>
+<a name="id1257184"></a>
+ <a class="link" href="optional.html#spirit.karma.reference.operator.optional.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.optional.expression_semantics"></a><h6>
+<a name="id1257222"></a>
+ <a class="link" href="optional.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="special">-</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generator <code class="computeroutput"><span class="identifier">a</span></code>
+ 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="id1257322"></a>
+ <a class="link" href="optional.html#spirit.karma.reference.operator.optional.attributes">Attributes</a>
+ </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 <code class="computeroutput"><span class="special">-</span></code>)
+ </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" title="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 align="left" valign="top"><p>
+ The table above uses <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
+ of <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ stands for the data type <code 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></code>.
+ </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" title="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 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 class="link" href="../directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.optional.complexity"></a><h6>
+<a name="id1257618"></a>
+ <a class="link" href="optional.html#spirit.karma.reference.operator.optional.complexity">Complexity</a>
+ </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="id1257642"></a>
+ <a class="link" href="optional.html#spirit.karma.reference.operator.optional.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="list.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="and_predicate.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/plus.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/plus.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,333 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Plus (unary operator+())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="kleene.html" title="Kleene Star (unary operator*())">
+<link rel="next" href="list.html" title="Lists (operator%())">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="kleene.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="list.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Plus (unary operator+())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.plus"></a><a class="link" href="plus.html" title="Plus (unary operator+())"> Plus (unary
+ <code class="computeroutput"><span class="keyword">operator</span><span class="special">+()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.plus.description"></a><h6>
+<a name="id1252274"></a>
+ <a class="link" href="plus.html#spirit.karma.reference.operator.plus.description">Description</a>
+ </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="id1252291"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.plus.model_of"></a><h6>
+<a name="id1252365"></a>
+ <a class="link" href="plus.html#spirit.karma.reference.operator.plus.model_of">Model of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.plus.expression_semantics"></a><h6>
+<a name="id1252404"></a>
+ <a class="link" href="plus.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 <a class="link" href="../generator_concepts/unarygenerator.html" title="UnaryGenerator"><code class="computeroutput"><span class="identifier">UnaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="special">+</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generator <code class="computeroutput"><span class="identifier">a</span></code>
+ is executed one or more times depending on the availability of
+ an attribute. The execution of <code class="computeroutput"><span class="identifier">a</span></code>
+ 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="id1252511"></a>
+ <a class="link" href="plus.html#spirit.karma.reference.operator.plus.attributes">Attributes</a>
+ </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 <code class="computeroutput"><span class="special">+</span></code>)
+ </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" title="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 align="left" valign="top"><p>
+ The table above uses <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as a placeholder only. The notation
+ of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ stands for <span class="emphasis"><em>any STL container</em></span> holding elements
+ of type <code class="computeroutput"><span class="identifier">A</span></code>.
+ </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" title="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 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 class="link" href="../directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">a</span></code>.
+ 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 <code class="computeroutput"><span class="identifier">a</span></code> 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 <code class="computeroutput"><span class="identifier">a</span></code>.
+ </p>
+</td></tr>
+</table></div>
+<a name="spirit.karma.reference.operator.plus.complexity"></a><h6>
+<a name="id1252836"></a>
+ <a class="link" href="plus.html#spirit.karma.reference.operator.plus.complexity">Complexity</a>
+ </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="id1252860"></a>
+ <a class="link" href="plus.html#spirit.karma.reference.operator.plus.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="kleene.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="list.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/karma/reference/operator/sequence.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/operator/sequence.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,313 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Sequences (operator<<())</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../operator.html" title="Operator">
+<link rel="prev" href="../operator.html" title="Operator">
+<link rel="next" href="alternative.html" title="Alternatives (operator|())">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../operator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="alternative.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Sequences (operator<<())">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.karma.reference.operator.sequence"></a><a class="link" href="sequence.html" title="Sequences (operator<<())"> Sequences
+ (<code class="computeroutput"><span class="keyword">operator</span><span class="special"><<()</span></code>)</a>
+</h5></div></div></div>
+<a name="spirit.karma.reference.operator.sequence.description"></a><h6>
+<a name="id1245831"></a>
+ <a class="link" href="sequence.html#spirit.karma.reference.operator.sequence.description">Description</a>
+ </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="id1245848"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.karma.reference.operator.sequence.model_of"></a><h6>
+<a name="id1245922"></a>
+ <a class="link" href="sequence.html#spirit.karma.reference.operator.sequence.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../generator_concepts/narygenerator.html" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.karma.reference.operator.sequence.expression_semantics"></a><h6>
+<a name="id1245958"></a>
+ <a class="link" href="sequence.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 <a class="link" href="../generator_concepts/narygenerator.html" title="NaryGenerator"><code class="computeroutput"><span class="identifier">NaryGenerator</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special"><<</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The generators <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">b</span></code> 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" title="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 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 class="link" href="../directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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="id1246151"></a>
+ <a class="link" href="sequence.html#spirit.karma.reference.operator.sequence.attributes">Attributes</a>
+ </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 (<code class="computeroutput"><span class="special"><<</span></code>)
+ </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" title="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 align="left" valign="top">
+<p>
+ The table above uses <code 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></code> and <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> as placeholders only.
+ </p>
+<p>
+ The notation <code 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></code> stands for <span class="emphasis"><em>any fusion
+ sequence of two elements</em></span>, where <code class="computeroutput"><span class="identifier">A</span></code>
+ is the type of its first element and <code class="computeroutput"><span class="identifier">B</span></code>
+ is the type of its second element.
+ </p>
+<p>
+ The notation of <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code> stands for <span class="emphasis"><em>any STL container</em></span>
+ holding elements of type <code class="computeroutput"><span class="identifier">A</span></code>.
+ </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="id1246949"></a>
+ <a class="link" href="sequence.html#spirit.karma.reference.operator.sequence.complexity">Complexity</a>
+ </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="id1246973"></a>
+ <a class="link" href="sequence.html#spirit.karma.reference.operator.sequence.example">Example</a>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../operator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../operator.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="alternative.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -28,7 +28,7 @@
Generator Attributes</a>
</h4></div></div></div>
<a name="spirit.karma.tutorials.karma_attributes.attributes_of_primitive_generators"></a><h6>
-<a name="id1150006"></a>
+<a name="id1170652"></a>
<a class="link" href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.attributes_of_primitive_generators">Attributes
of Primitive Generators</a>
</h6>
@@ -59,7 +59,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><h6>
-<a name="id1150198"></a>
+<a name="id1170844"></a>
<a class="link" href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.attributes_of_compound_generators">Attributes
of Compound Generators</a>
</h6>
@@ -118,7 +118,7 @@
Attribute Rules</a>.
</p>
<a name="spirit.karma.tutorials.karma_attributes.the_attribute_of_sequence_generators"></a><h6>
-<a name="id1150543"></a>
+<a name="id1171188"></a>
<a class="link" href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.the_attribute_of_sequence_generators">The
Attribute of Sequence Generators</a>
</h6>
@@ -185,7 +185,7 @@
</td></tr>
</table></div>
<a name="spirit.karma.tutorials.karma_attributes.the_attribute_of_alternative_generators"></a><h6>
-<a name="id1151410"></a>
+<a name="id1171808"></a>
<a class="link" href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.the_attribute_of_alternative_generators">The
Attribute of Alternative Generators</a>
</h6>
@@ -214,7 +214,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><h6>
-<a name="id1151607"></a>
+<a name="id1172004"></a>
<a class="link" href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.more_about_attributes_of_compound_generators">More
About Attributes of Compound Generators</a>
</h6>
@@ -321,7 +321,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><h6>
-<a name="id1152343"></a>
+<a name="id1172740"></a>
<a class="link" href="karma_attributes.html#spirit.karma.tutorials.karma_attributes.attributes_of_rules_and_grammars">Attributes
of Rules and Grammars</a>
</h6>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -27,7 +27,7 @@
<a name="spirit.karma.tutorials.quick_start"></a><a class="link" href="quick_start.html" title="Quick Start">Quick Start</a>
</h4></div></div></div>
<a name="spirit.karma.tutorials.quick_start.spirit_karma___what_s_that_"></a><h6>
-<a name="id1143852"></a>
+<a name="id1165061"></a>
<a class="link" href="quick_start.html#spirit.karma.tutorials.quick_start.spirit_karma___what_s_that_">Spirit.Karma
- what's that?</a>
</h6>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -269,7 +269,7 @@
The examples above can be found here: actions.cpp
</p>
<a name="spirit.karma.tutorials.semantic_actions.phoenix"></a><h6>
-<a name="id1149112"></a>
+<a name="id1169758"></a>
<a class="link" href="semantic_actions.html#spirit.karma.tutorials.semantic_actions.phoenix">Phoenix</a>
</h6>
<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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -31,7 +31,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><h6>
-<a name="id1143978"></a>
+<a name="id1165187"></a>
<a class="link" href="warming_up.html#spirit.karma.tutorials.warming_up.trivial_example__1_generating_a_number">Trivial
Example #1 Generating a number</a>
</h6>
@@ -51,7 +51,7 @@
to a floating point generator or parser: <code class="computeroutput"><span class="identifier">double_</span></code>.
</p>
<a name="spirit.karma.tutorials.warming_up.trivial_example__2_generating_two_numbers"></a><h6>
-<a name="id1144021"></a>
+<a name="id1165230"></a>
<a class="link" href="warming_up.html#spirit.karma.tutorials.warming_up.trivial_example__2_generating_two_numbers">Trivial
Example #2 Generating two numbers</a>
</h6>
@@ -89,7 +89,7 @@
</p></td></tr>
</table></div>
<a name="spirit.karma.tutorials.warming_up.trivial_example__3_generating_one_or_more_numbers"></a><h6>
-<a name="id1144106"></a>
+<a name="id1165315"></a>
<a class="link" 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>
</h6>
@@ -114,7 +114,7 @@
numbers, if needed.
</p>
<a name="spirit.karma.tutorials.warming_up.trivial_example__4_generating_a_comma_delimited_list_of_numbers"></a><h6>
-<a name="id1144154"></a>
+<a name="id1165363"></a>
<a class="link" 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>
</h6>
@@ -137,7 +137,7 @@
in the generated output zero or more times.
</p>
<a name="spirit.karma.tutorials.warming_up.let_s_generate_"></a><h6>
-<a name="id1144289"></a>
+<a name="id1165497"></a>
<a class="link" href="warming_up.html#spirit.karma.tutorials.warming_up.let_s_generate_">Let's
Generate!</a>
</h6>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../index.html" title="Spirit 2.1">
<link rel="up" href="../index.html" title="Spirit 2.1">
-<link rel="prev" href="karma/performance_measurements/numeric_performance.html" title="Performance of Numeric Generators">
+<link rel="prev" href="karma/performance_measurements/numeric_performance/format_performance.html" title="Comparing the performance of a sequence of several 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">
@@ -20,7 +20,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Lex - Writing Lexical Analyzers">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -75,7 +75,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -7,7 +7,7 @@
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../abstracts.html" title="Abstracts">
<link rel="prev" href="../abstracts.html" title="Abstracts">
-<link rel="next" href="lexer_tokenizing.html" title="Tokenizing Input Data">
+<link rel="next" href="lexer_primitives/lexer_primitives.html" title="Lexer Primitives">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,357 +20,20 @@
</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_tokenizing.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_primitives/lexer_primitives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Lexer Primitives">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.lex.abstracts.lexer_primitives"></a><a class="link" href="lexer_primitives.html" title="Lexer Primitives">Lexer Primitives</a>
</h4></div></div></div>
<div class="toc"><dl>
-<dt><span class="section"><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_primitives">
+<dt><span class="section"><a href="lexer_primitives/lexer_primitives.html">
Lexer Primitives</a></span></dt>
-<dt><span class="section"><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values">
+<dt><span class="section"><a href="lexer_primitives/lexer_token_values.html">
About Tokens and Token Values</a></span></dt>
-<dt><span class="section"><a href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_definition">
+<dt><span class="section"><a href="lexer_primitives/lexer_token_definition.html">
Ways to define Tokens</a></span></dt>
</dl></div>
-<div class="section" title="Lexer Primitives"><div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.lex.abstracts.lexer_primitives.lexer_primitives"></a><a class="link" href="lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_primitives" title="Lexer Primitives">
- Lexer Primitives</a>
-</h5></div></div></div></div>
-<div class="section" title="About Tokens and Token Values">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values"></a><a class="link" 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>
-<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 class="link" 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 <a class="link" href="../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
- 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="id1262790"></a>
- <a class="link" 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 <a class="link" href="../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a>
- template) and a token itself (for instance represented by the <a class="link" href="../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
- template).
- </p>
-<p>
- The token definition is used to describe the main features of a particular
- token type, especially:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- to simplify the definition of a token type using a regular expression
- pattern applied while matching this token type,
- </li>
-<li class="listitem">
- to associate a token type with a particular lexer state,
- </li>
-<li class="listitem">
- to optionally assign a token id to a token type,
- </li>
-<li class="listitem">
- to optionally associate some code to execute whenever an instance of
- this token type has been matched,
- </li>
-<li class="listitem">
- 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 <a class="link" href="lexer_primitives.html#spirit.lex.tokenstructure" title="Figure 8. The structure of a token">figure</a>
- 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>
-<div class="figure-contents"><span class="inlinemediaobject"><img src="../../.././images/tokenstructure.png" alt="The structure of a token"></span></div>
-</div>
-<p><br class="figure-break">
- </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 <a class="link" href="../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
- 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" title="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 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 <a class="link" href="../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
- 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" title="where:">
-<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 <code class="computeroutput"><span class="keyword">char</span>
- <span class="keyword">const</span><span class="special">*</span></code>.
- </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 <code class="computeroutput"><span class="identifier">omitted</span></code>.
- If the mpl sequence is empty (which is the default), all token instances
- will store a <code 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></code> pointing to the start and the
- end of the matched section in the input stream. If the type is <code class="computeroutput"><span class="identifier">omitted</span></code>, 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 <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- or <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>, 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 <code class="computeroutput"><span class="identifier">omitted</span></code> 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="id1263284"></a>
- <a class="link" 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 <a class="link" href="../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a>
- 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" title="where:">
-<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 <code class="computeroutput"><span class="identifier">unused_type</span></code>, 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 <code class="computeroutput"><span class="identifier">omitted</span></code>
- 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 <code class="computeroutput"><span class="keyword">char</span></code>.
- </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 <code class="computeroutput"><span class="identifier">identifier</span></code> or <code class="computeroutput"><span class="identifier">integer</span></code>).
- 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" title="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 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 <a class="link" href="../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a>
- 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="id1263540"></a>
- <a class="link" 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 <a class="link" href="../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a></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 (<code class="computeroutput"><span class="identifier">if_</span></code>,
- <code class="computeroutput"><span class="identifier">else_</span></code>, and <code class="computeroutput"><span class="identifier">while_</span></code>). Their token value will always
- hold the iterator range of the matched input sequence only. The token
- definitions for the <code class="computeroutput"><span class="identifier">identifier</span></code>
- and the integer <code class="computeroutput"><span class="identifier">constant</span></code>
- are specialized to expose an explicit token type each: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> and <code class="computeroutput"><span class="keyword">unsigned</span>
- <span class="keyword">int</span></code>.
- </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 <a class="link" href="../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a> 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 <code class="computeroutput"><span class="identifier">omitted</span></code> can be used: <code class="computeroutput"><span class="identifier">token_def</span><span class="special"><</span><span class="identifier">omitted</span><span class="special">></span></code>
- and <code 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></code>.
- </p>
-</div>
-<div class="section" title="Ways to define Tokens"><div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_definition"></a><a class="link" 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>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -383,7 +46,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_tokenizing.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_primitives/lexer_primitives.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_primitives.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_primitives.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,43 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Lexer Primitives</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../lexer_primitives.html" title="Lexer Primitives">
+<link rel="prev" href="../lexer_primitives.html" title="Lexer Primitives">
+<link rel="next" href="lexer_token_values.html" title="About Tokens and Token Values">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../lexer_primitives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_primitives.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_token_values.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Lexer Primitives"><div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_primitives"></a><a class="link" href="lexer_primitives.html" title="Lexer Primitives">
+ Lexer Primitives</a>
+</h5></div></div></div></div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../lexer_primitives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_primitives.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_token_values.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_definition.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_definition.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,43 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Ways to define Tokens</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../lexer_primitives.html" title="Lexer Primitives">
+<link rel="prev" href="lexer_token_values.html" title="About Tokens and Token Values">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexer_token_values.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_primitives.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" title="Ways to define Tokens"><div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_definition"></a><a class="link" href="lexer_token_definition.html" title="Ways to define Tokens">
+ Ways to define Tokens</a>
+</h5></div></div></div></div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexer_token_values.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_primitives.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>
Added: trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_values.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/lex/abstracts/lexer_primitives/lexer_token_values.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,368 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About Tokens and Token Values</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../lexer_primitives.html" title="Lexer Primitives">
+<link rel="prev" href="lexer_primitives.html" title="Lexer Primitives">
+<link rel="next" href="lexer_token_definition.html" title="Ways to define Tokens">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexer_primitives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_primitives.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_token_definition.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="About Tokens and Token Values">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.lex.abstracts.lexer_primitives.lexer_token_values"></a><a class="link" href="lexer_token_values.html" title="About Tokens and Token Values">
+ About Tokens and Token Values</a>
+</h5></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 class="link" href="../../reference/concepts/token.html" 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 <a class="link" href="../../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
+ 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="id1283541"></a>
+ <a class="link" 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>
+<p>
+ It is very important to understand the difference between a token definition
+ (represented by the <a class="link" href="../../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a>
+ template) and a token itself (for instance represented by the <a class="link" href="../../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
+ template).
+ </p>
+<p>
+ The token definition is used to describe the main features of a particular
+ token type, especially:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ to simplify the definition of a token type using a regular expression
+ pattern applied while matching this token type,
+ </li>
+<li class="listitem">
+ to associate a token type with a particular lexer state,
+ </li>
+<li class="listitem">
+ to optionally assign a token id to a token type,
+ </li>
+<li class="listitem">
+ to optionally associate some code to execute whenever an instance of
+ this token type has been matched,
+ </li>
+<li class="listitem">
+ 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 <a class="link" href="lexer_token_values.html#spirit.lex.tokenstructure" title="Figure 8. The structure of a token">figure</a>
+ 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>
+<div class="figure-contents"><span class="inlinemediaobject"><img src="../../../.././images/tokenstructure.png" alt="The structure of a token"></span></div>
+</div>
+<p><br class="figure-break">
+ </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 <a class="link" href="../../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
+ 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" title="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 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 <a class="link" href="../../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a>
+ 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" title="where:">
+<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 <code class="computeroutput"><span class="keyword">char</span>
+ <span class="keyword">const</span><span class="special">*</span></code>.
+ </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 <code class="computeroutput"><span class="identifier">omitted</span></code>.
+ If the mpl sequence is empty (which is the default), all token instances
+ will store a <code 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></code> pointing to the start and the
+ end of the matched section in the input stream. If the type is <code class="computeroutput"><span class="identifier">omitted</span></code>, 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 <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ or <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>, 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 <code class="computeroutput"><span class="identifier">omitted</span></code> 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="id1284035"></a>
+ <a class="link" 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>
+<p>
+ The token definitions (represented by the <a class="link" href="../../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a>
+ 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" title="where:">
+<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 <code class="computeroutput"><span class="identifier">unused_type</span></code>, 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 <code class="computeroutput"><span class="identifier">omitted</span></code>
+ 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 <code class="computeroutput"><span class="keyword">char</span></code>.
+ </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 <code class="computeroutput"><span class="identifier">identifier</span></code> or <code class="computeroutput"><span class="identifier">integer</span></code>).
+ 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" title="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 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 <a class="link" href="../../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a>
+ 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="id1284291"></a>
+ <a class="link" 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 <a class="link" href="../../reference/token_class.html" title="Token Class"><code class="computeroutput"><span class="identifier">lexertl_token</span><span class="special"><></span></code></a></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 (<code class="computeroutput"><span class="identifier">if_</span></code>,
+ <code class="computeroutput"><span class="identifier">else_</span></code>, and <code class="computeroutput"><span class="identifier">while_</span></code>). Their token value will always
+ hold the iterator range of the matched input sequence only. The token
+ definitions for the <code class="computeroutput"><span class="identifier">identifier</span></code>
+ and the integer <code class="computeroutput"><span class="identifier">constant</span></code>
+ are specialized to expose an explicit token type each: <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> and <code class="computeroutput"><span class="keyword">unsigned</span>
+ <span class="keyword">int</span></code>.
+ </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 <a class="link" href="../../reference/tokendef_class.html" title="TokenDef Class"><code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code></a> 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 <code class="computeroutput"><span class="identifier">omitted</span></code> can be used: <code class="computeroutput"><span class="identifier">token_def</span><span class="special"><</span><span class="identifier">omitted</span><span class="special">></span></code>
+ and <code 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></code>.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexer_primitives.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../lexer_primitives.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_token_definition.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -105,7 +105,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><h6>
-<a name="id1267832"></a>
+<a name="id1288730"></a>
<a class="link" 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>
</h6>
@@ -120,7 +120,7 @@
of the available functionality.
</p>
<div class="table">
-<a name="id1267852"></a><p class="title"><b>Table 9. Functions exposed by any context passed to a lexer
+<a name="id1288750"></a><p class="title"><b>Table 9. Functions exposed by any context passed to a lexer
semantic action</b></p>
<div class="table-contents"><table class="table" summary="Functions exposed by any context passed to a lexer
semantic action">
@@ -241,7 +241,7 @@
</table></div>
</div>
<br class="table-break"><a name="spirit.lex.abstracts.lexer_semantic_actions.lexer_semantic_actions_using_phoenix"></a><h6>
-<a name="id1268370"></a>
+<a name="id1289268"></a>
<a class="link" href="lexer_semantic_actions.html#spirit.lex.abstracts.lexer_semantic_actions.lexer_semantic_actions_using_phoenix">Lexer
Semantic Actions Using Phoenix</a>
</h6>
@@ -253,7 +253,7 @@
predefined Spirit placeholders:
</p>
<div class="table">
-<a name="id1268393"></a><p class="title"><b>Table 10. Predefined Phoenix placeholders for lexer semantic
+<a name="id1289291"></a><p class="title"><b>Table 10. Predefined Phoenix placeholders for lexer semantic
actions</b></p>
<div class="table-contents"><table class="table" summary="Predefined Phoenix placeholders for lexer semantic
actions">
@@ -384,7 +384,7 @@
table lists the available support functions and describes their functionality:
</p>
<div class="table">
-<a name="id1268672"></a><p class="title"><b>Table 11. Support functions usable from Phoenix expressions
+<a name="id1289570"></a><p class="title"><b>Table 11. Support functions usable from Phoenix expressions
inside lexer semantic actions</b></p>
<div class="table-contents"><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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -27,17 +27,17 @@
<a name="spirit.lex.abstracts.lexer_states"></a><a class="link" href="lexer_states.html" title="Lexer States"> Lexer States</a>
</h4></div></div></div>
<a name="spirit.lex.abstracts.lexer_states.controlling_the_lexer_state_from_lexer_semantic_actions"></a><h6>
-<a name="id1277560"></a>
+<a name="id1298463"></a>
<a class="link" 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>
</h6>
<a name="spirit.lex.abstracts.lexer_states.controlling_the_lexer_state_from_parser_semantic_actions"></a><h6>
-<a name="id1277574"></a>
+<a name="id1298476"></a>
<a class="link" 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>
</h6>
<a name="spirit.lex.abstracts.lexer_states.using_a_lexer_state_for_the_skip_parser"></a><h6>
-<a name="id1277587"></a>
+<a name="id1298489"></a>
<a class="link" 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>
</h6>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -176,7 +176,7 @@
<p>
</p>
<a name="spirit.lex.abstracts.lexer_static_model.generating_the_static_analyzer"></a><h6>
-<a name="id1271380"></a>
+<a name="id1292282"></a>
<a class="link" href="lexer_static_model.html#spirit.lex.abstracts.lexer_static_model.generating_the_static_analyzer">Generating
the Static Analyzer</a>
</h6>
@@ -225,7 +225,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><h6>
-<a name="id1271707"></a>
+<a name="id1292610"></a>
<a class="link" href="lexer_static_model.html#spirit.lex.abstracts.lexer_static_model.modifying_the_dynamic_analyzer">Modifying
the Dynamic Analyzer</a>
</h6>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../abstracts.html" title="Abstracts">
-<link rel="prev" href="lexer_primitives.html" title="Lexer Primitives">
+<link rel="prev" href="lexer_primitives/lexer_token_definition.html" title="Ways to define Tokens">
<link rel="next" href="lexer_semantic_actions.html" title="Lexer Semantic Actions">
</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="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>
+<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>
</div>
<div class="section" title="Tokenizing Input Data">
<div class="titlepage"><div><div><h4 class="title">
@@ -28,7 +28,7 @@
Input Data</a>
</h4></div></div></div>
<a name="spirit.lex.abstracts.lexer_tokenizing.the_tokenize_function"></a><h6>
-<a name="id1264448"></a>
+<a name="id1285892"></a>
<a class="link" href="lexer_tokenizing.html#spirit.lex.abstracts.lexer_tokenizing.the_tokenize_function">The
tokenize function</a>
</h6>
@@ -228,7 +228,7 @@
</dl>
</div>
<a name="spirit.lex.abstracts.lexer_tokenizing.the_generate_static_function"></a><h6>
-<a name="id1267210"></a>
+<a name="id1288108"></a>
<a class="link" href="lexer_tokenizing.html#spirit.lex.abstracts.lexer_tokenizing.the_generate_static_function">The
generate_static function</a>
</h6>
@@ -244,7 +244,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -56,7 +56,7 @@
</li>
</ul></div>
<a name="spirit.lex.lexer_introduction.why_use_a_separate_lexer_"></a><h5>
-<a name="id1249235"></a>
+<a name="id1270670"></a>
<a class="link" href="lexer_introduction.html#spirit.lex.lexer_introduction.why_use_a_separate_lexer_">Why
Use a Separate Lexer?</a>
</h5>
@@ -155,7 +155,7 @@
grammar recognizers.
</p>
<a name="spirit.lex.lexer_introduction.advantages_of_using__emphasis_spirit_lex__emphasis_"></a><h5>
-<a name="id1249444"></a>
+<a name="id1270879"></a>
<a class="link" 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>
</h5>
@@ -203,7 +203,7 @@
application.
</p>
<a name="spirit.lex.lexer_introduction.the_library_structure_of__emphasis_spirit_lex__emphasis_"></a><h5>
-<a name="id1249547"></a>
+<a name="id1270982"></a>
<a class="link" 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>
</h5>
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-23 22:07:18 EDT (Sun, 23 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="prev" href="../reference.html" title="Reference">
-<link rel="next" href="lexer_class.html" title="Lexer Class">
+<link rel="next" href="concepts/lexer.html" title="Lexer">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,535 +20,17 @@
</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="lexer_class.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="concepts/lexer.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Concepts">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.lex.reference.concepts"></a><a class="link" href="concepts.html" title="Concepts"> Concepts</a>
</h4></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" title="Lexer">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.lex.reference.concepts.lexer"></a><a class="link" href="concepts.html#spirit.lex.reference.concepts.lexer" title="Lexer">Lexer</a>
-</h5></div></div></div>
-<div class="table">
-<a name="id1277638"></a><p class="title"><b>Table 12. Regular expressions support</b></p>
-<div class="table-contents"><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>
- <code class="computeroutput"><span class="identifier">x</span></code>
- </p>
- </td>
-<td>
- <p>
- Match any character <code class="computeroutput"><span class="identifier">x</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">.</span></code>
- </p>
- </td>
-<td>
- <p>
- Match any except newline (or optionally <span class="bold"><strong>any</strong></span>
- character)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">[</span><span class="identifier">xyz</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- A character class; in this case matches <code class="computeroutput"><span class="identifier">x</span></code>,
- <code class="computeroutput"><span class="identifier">y</span></code> or <code class="computeroutput"><span class="identifier">z</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">[</span><span class="identifier">abj</span><span class="special">-</span><span class="identifier">oZ</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- A character class with a range in it; matches <code class="computeroutput"><span class="identifier">a</span></code>,
- <code class="computeroutput"><span class="identifier">b</span></code> any letter from
- <code class="computeroutput"><span class="identifier">j</span></code> through <code class="computeroutput"><span class="identifier">o</span></code> or a <code class="computeroutput"><span class="identifier">Z</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">[^</span><span class="identifier">A</span><span class="special">-</span><span class="identifier">Z</span><span class="special">]</span></code>
- </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>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">*</span></code>
- </p>
- </td>
-<td>
- <p>
- Zero or more r's (greedy), where r is any regular expression
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">*?</span></code>
- </p>
- </td>
-<td>
- <p>
- Zero or more r's (abstemious), where r is any regular expression
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">+</span></code>
- </p>
- </td>
-<td>
- <p>
- One or more r's (greedy)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">+?</span></code>
- </p>
- </td>
-<td>
- <p>
- One or more r's (abstemious)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">?</span></code>
- </p>
- </td>
-<td>
- <p>
- Zero or one r's (greedy), i.e. optional
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">??</span></code>
- </p>
- </td>
-<td>
- <p>
- Zero or one r's (abstemious), i.e. optional
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Anywhere between two and five r's (greedy)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Anywhere between two and five r's (abstemious)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,}</span></code>
- </p>
- </td>
-<td>
- <p>
- Two or more r's (greedy)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,}?</span></code>
- </p>
- </td>
-<td>
- <p>
- Two or more r's (abstemious)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">4</span><span class="special">}</span></code>
- </p>
- </td>
-<td>
- <p>
- Exactly four r's
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">{</span><span class="identifier">NAME</span><span class="special">}</span></code>
- </p>
- </td>
-<td>
- <p>
- The macro <code class="computeroutput"><span class="identifier">NAME</span></code>
- (see below)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="string">"[xyz]\"foo"</span></code>
- </p>
- </td>
-<td>
- <p>
- The literal string <code class="computeroutput"><span class="special">[</span><span class="identifier">xyz</span><span class="special">]\</span><span class="error">"</span><span class="identifier">foo</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">X</span></code>
- </p>
- </td>
-<td>
- <p>
- If X is <code class="computeroutput"><span class="identifier">a</span></code>, <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">e</span></code>,
- <code class="computeroutput"><span class="identifier">n</span></code>, <code class="computeroutput"><span class="identifier">r</span></code>, <code class="computeroutput"><span class="identifier">f</span></code>,
- <code class="computeroutput"><span class="identifier">t</span></code>, <code class="computeroutput"><span class="identifier">v</span></code> then the ANSI-C interpretation
- of <code class="computeroutput"><span class="special">\</span><span class="identifier">x</span></code>.
- Otherwise a literal <code class="computeroutput"><span class="identifier">X</span></code>
- (used to escape operators such as <code class="computeroutput"><span class="special">*</span></code>)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="number">0</span></code>
- </p>
- </td>
-<td>
- <p>
- A NUL character (ASCII code 0)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="number">123</span></code>
- </p>
- </td>
-<td>
- <p>
- The character with octal value 123
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">x2a</span></code>
- </p>
- </td>
-<td>
- <p>
- The character with hexadecimal value 2a
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">cX</span></code>
- </p>
- </td>
-<td>
- <p>
- A named control character <code class="computeroutput"><span class="identifier">X</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">d</span></code>
- </p>
- </td>
-<td>
- <p>
- A shortcut for <code class="computeroutput"><span class="special">[</span><span class="number">0</span><span class="special">-</span><span class="number">9</span><span class="special">]</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">D</span></code>
- </p>
- </td>
-<td>
- <p>
- A shortcut for <code class="computeroutput"><span class="special">[^</span><span class="number">0</span><span class="special">-</span><span class="number">9</span><span class="special">]</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">s</span></code>
- </p>
- </td>
-<td>
- <p>
- A shortcut for <code 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></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">S</span></code>
- </p>
- </td>
-<td>
- <p>
- A shortcut for <code 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></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">w</span></code>
- </p>
- </td>
-<td>
- <p>
- A shortcut for <code 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></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">\</span><span class="identifier">W</span></code>
- </p>
- </td>
-<td>
- <p>
- A shortcut for <code 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></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">(</span><span class="identifier">r</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Match an <code class="computeroutput"><span class="identifier">r</span></code>; parenthesis
- are used to override precedence (see below)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </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 '<code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code>'.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">rs</span></code>
- </p>
- </td>
-<td>
- <p>
- The regular expression <code class="computeroutput"><span class="identifier">r</span></code>
- followed by the regular expression <code class="computeroutput"><span class="identifier">s</span></code>
- (a sequence)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">r</span><span class="special">|</span><span class="identifier">s</span></code>
- </p>
- </td>
-<td>
- <p>
- Either an <code class="computeroutput"><span class="identifier">r</span></code> or
- and <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">^</span><span class="identifier">r</span></code>
- </p>
- </td>
-<td>
- <p>
- An <code class="computeroutput"><span class="identifier">r</span></code> 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>
- <code class="computeroutput"><span class="identifier">r</span></code>$
- </p>
- </td>
-<td>
- <p>
- An <code class="computeroutput"><span class="identifier">r</span></code> but only at
- the end of a line (i.e. just before a newline)
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<br class="table-break"><div class="note" title="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 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="id1279216"></a>
- <a class="link" href="concepts.html#spirit.lex.reference.concepts.lexer.regular_expression_precedence">Regular
- Expression Precedence</a>
- </h6>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<code class="computeroutput"><span class="identifier">rs</span></code> has highest precedence
- </li>
-<li class="listitem">
-<code class="computeroutput"><span class="identifier">r</span><span class="special">*</span></code>
- has next highest (<code class="computeroutput"><span class="special">+</span></code>,
- <code class="computeroutput"><span class="special">?</span></code>, <code class="computeroutput"><span class="special">{</span><span class="identifier">n</span><span class="special">,</span><span class="identifier">m</span><span class="special">}</span></code>
- have the same precedence as <code class="computeroutput"><span class="special">*</span></code>)
- </li>
-<li class="listitem">
-<code class="computeroutput"><span class="identifier">r</span><span class="special">|</span><span class="identifier">s</span></code> has the lowest precedence
- </li>
-</ul></div>
-<a name="spirit.lex.reference.concepts.lexer.macros"></a><h6>
-<a name="id1279320"></a>
- <a class="link" href="concepts.html#spirit.lex.reference.concepts.lexer.macros">Macros</a>
- </h6>
-<p>
- Regular expressions can be given a name and referred to in rules using
- the syntax <code class="computeroutput"><span class="special">{</span><span class="identifier">NAME</span><span class="special">}</span></code> where <code class="computeroutput"><span class="identifier">NAME</span></code>
- is the name you have given to the macro. A macro name can be at most
- 30 characters long and must start with a <code class="computeroutput"><span class="identifier">_</span></code>
- or a letter. Subsequent characters can be <code class="computeroutput"><span class="identifier">_</span></code>,
- <code class="computeroutput"><span class="special">-</span></code>, a letter or a decimal
- digit. Use the <code class="computeroutput"><span class="identifier">rules</span><span class="special">::</span><span class="identifier">add_macro</span><span class="special">()</span></code> method to define a macro.
- </p>
-</div>
-<div class="section" title="Token"><div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.lex.reference.concepts.token"></a><a class="link" href="concepts.html#spirit.lex.reference.concepts.token" title="Token">Token</a>
-</h5></div></div></div></div>
-<div class="section" title="TokenDef"><div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.lex.reference.concepts.tokendef"></a><a class="link" href="concepts.html#spirit.lex.reference.concepts.tokendef" title="TokenDef">TokenDef</a>
-</h5></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>
@@ -561,7 +43,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="lexer_class.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="concepts/lexer.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/lexer.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/lexer.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,551 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Lexer</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="../concepts.html" title="Concepts">
+<link rel="next" href="token.html" title="Token">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../concepts.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Lexer">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.lex.reference.concepts.lexer"></a><a class="link" href="lexer.html" title="Lexer">Lexer</a>
+</h5></div></div></div>
+<div class="table">
+<a name="id1298541"></a><p class="title"><b>Table 12. Regular expressions support</b></p>
+<div class="table-contents"><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>
+ <code class="computeroutput"><span class="identifier">x</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match any character <code class="computeroutput"><span class="identifier">x</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">.</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match any except newline (or optionally <span class="bold"><strong>any</strong></span>
+ character)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">xyz</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A character class; in this case matches <code class="computeroutput"><span class="identifier">x</span></code>,
+ <code class="computeroutput"><span class="identifier">y</span></code> or <code class="computeroutput"><span class="identifier">z</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">[</span><span class="identifier">abj</span><span class="special">-</span><span class="identifier">oZ</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A character class with a range in it; matches <code class="computeroutput"><span class="identifier">a</span></code>,
+ <code class="computeroutput"><span class="identifier">b</span></code> any letter from
+ <code class="computeroutput"><span class="identifier">j</span></code> through <code class="computeroutput"><span class="identifier">o</span></code> or a <code class="computeroutput"><span class="identifier">Z</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">[^</span><span class="identifier">A</span><span class="special">-</span><span class="identifier">Z</span><span class="special">]</span></code>
+ </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>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">*</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Zero or more r's (greedy), where r is any regular expression
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">*?</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Zero or more r's (abstemious), where r is any regular expression
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">+</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ One or more r's (greedy)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">+?</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ One or more r's (abstemious)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">?</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Zero or one r's (greedy), i.e. optional
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">??</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Zero or one r's (abstemious), i.e. optional
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Anywhere between two and five r's (greedy)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Anywhere between two and five r's (abstemious)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,}</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Two or more r's (greedy)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">2</span><span class="special">,}?</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Two or more r's (abstemious)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">{</span><span class="number">4</span><span class="special">}</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Exactly four r's
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">{</span><span class="identifier">NAME</span><span class="special">}</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The macro <code class="computeroutput"><span class="identifier">NAME</span></code>
+ (see below)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="string">"[xyz]\"foo"</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The literal string <code class="computeroutput"><span class="special">[</span><span class="identifier">xyz</span><span class="special">]\</span><span class="error">"</span><span class="identifier">foo</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">X</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If X is <code class="computeroutput"><span class="identifier">a</span></code>, <code class="computeroutput"><span class="identifier">b</span></code>, <code class="computeroutput"><span class="identifier">e</span></code>,
+ <code class="computeroutput"><span class="identifier">n</span></code>, <code class="computeroutput"><span class="identifier">r</span></code>, <code class="computeroutput"><span class="identifier">f</span></code>,
+ <code class="computeroutput"><span class="identifier">t</span></code>, <code class="computeroutput"><span class="identifier">v</span></code> then the ANSI-C interpretation
+ of <code class="computeroutput"><span class="special">\</span><span class="identifier">x</span></code>.
+ Otherwise a literal <code class="computeroutput"><span class="identifier">X</span></code>
+ (used to escape operators such as <code class="computeroutput"><span class="special">*</span></code>)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="number">0</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A NUL character (ASCII code 0)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="number">123</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The character with octal value 123
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">x2a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The character with hexadecimal value 2a
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">cX</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A named control character <code class="computeroutput"><span class="identifier">X</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">d</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A shortcut for <code class="computeroutput"><span class="special">[</span><span class="number">0</span><span class="special">-</span><span class="number">9</span><span class="special">]</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">D</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A shortcut for <code class="computeroutput"><span class="special">[^</span><span class="number">0</span><span class="special">-</span><span class="number">9</span><span class="special">]</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">s</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A shortcut for <code 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></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">S</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A shortcut for <code 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></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">w</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A shortcut for <code 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></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">\</span><span class="identifier">W</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ A shortcut for <code 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></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">(</span><span class="identifier">r</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match an <code class="computeroutput"><span class="identifier">r</span></code>; parenthesis
+ are used to override precedence (see below)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </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 '<code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code>'.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rs</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The regular expression <code class="computeroutput"><span class="identifier">r</span></code>
+ followed by the regular expression <code class="computeroutput"><span class="identifier">s</span></code>
+ (a sequence)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">r</span><span class="special">|</span><span class="identifier">s</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Either an <code class="computeroutput"><span class="identifier">r</span></code> or
+ and <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">^</span><span class="identifier">r</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ An <code class="computeroutput"><span class="identifier">r</span></code> 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>
+ <code class="computeroutput"><span class="identifier">r</span></code>$
+ </p>
+ </td>
+<td>
+ <p>
+ An <code class="computeroutput"><span class="identifier">r</span></code> but only at
+ the end of a line (i.e. just before a newline)
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><div class="note" title="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 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="id1300119"></a>
+ <a class="link" href="lexer.html#spirit.lex.reference.concepts.lexer.regular_expression_precedence">Regular
+ Expression Precedence</a>
+ </h6>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">rs</span></code> has highest precedence
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">r</span><span class="special">*</span></code>
+ has next highest (<code class="computeroutput"><span class="special">+</span></code>,
+ <code class="computeroutput"><span class="special">?</span></code>, <code class="computeroutput"><span class="special">{</span><span class="identifier">n</span><span class="special">,</span><span class="identifier">m</span><span class="special">}</span></code>
+ have the same precedence as <code class="computeroutput"><span class="special">*</span></code>)
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">r</span><span class="special">|</span><span class="identifier">s</span></code> has the lowest precedence
+ </li>
+</ul></div>
+<a name="spirit.lex.reference.concepts.lexer.macros"></a><h6>
+<a name="id1300222"></a>
+ <a class="link" href="lexer.html#spirit.lex.reference.concepts.lexer.macros">Macros</a>
+ </h6>
+<p>
+ Regular expressions can be given a name and referred to in rules using
+ the syntax <code class="computeroutput"><span class="special">{</span><span class="identifier">NAME</span><span class="special">}</span></code> where <code class="computeroutput"><span class="identifier">NAME</span></code>
+ is the name you have given to the macro. A macro name can be at most
+ 30 characters long and must start with a <code class="computeroutput"><span class="identifier">_</span></code>
+ or a letter. Subsequent characters can be <code class="computeroutput"><span class="identifier">_</span></code>,
+ <code class="computeroutput"><span class="special">-</span></code>, a letter or a decimal
+ digit. Use the <code class="computeroutput"><span class="identifier">rules</span><span class="special">::</span><span class="identifier">add_macro</span><span class="special">()</span></code> method to define a macro.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../concepts.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/token.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/token.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Token</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="lexer.html" title="Lexer">
+<link rel="next" href="tokendef.html" title="TokenDef">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexer.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="tokendef.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Token"><div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.lex.reference.concepts.token"></a><a class="link" href="token.html" title="Token">Token</a>
+</h5></div></div></div></div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lexer.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="tokendef.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/tokendef.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/lex/reference/concepts/tokendef.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>TokenDef</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="token.html" title="Token">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="token.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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" title="TokenDef"><div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.lex.reference.concepts.tokendef"></a><a class="link" href="tokendef.html" title="TokenDef">TokenDef</a>
+</h5></div></div></div></div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="token.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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/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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="concepts.html" title="Concepts">
+<link rel="prev" href="concepts/tokendef.html" title="TokenDef">
<link rel="next" href="token_class.html" title="Token Class">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,29 +20,29 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Lexer Class">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.lex.reference.lexer_class"></a><a class="link" href="lexer_class.html" title="Lexer Class">Lexer Class</a>
</h4></div></div></div>
<a name="spirit.lex.reference.lexer_class.the_lexertl_lexer_class_implementing_the_dynamic_model"></a><h6>
-<a name="id1279431"></a>
+<a name="id1300334"></a>
<a class="link" 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>
</h6>
<a name="spirit.lex.reference.lexer_class.the_lexertl_actor_lexer_class_implementing_the_dynamic_model"></a><h6>
-<a name="id1279444"></a>
+<a name="id1300347"></a>
<a class="link" 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>
</h6>
<a name="spirit.lex.reference.lexer_class.the_lexertl_static_lexer_class_implementing_the_static_model"></a><h6>
-<a name="id1279458"></a>
+<a name="id1300360"></a>
<a class="link" 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>
</h6>
<a name="spirit.lex.reference.lexer_class.the_lexertl_static_actor_lexer_class_implementing_the_static_model"></a><h6>
-<a name="id1279471"></a>
+<a name="id1300373"></a>
<a class="link" 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>
</h6>
@@ -58,7 +58,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -39,7 +39,7 @@
(for the full example code see here: word_count_functor.cpp).
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.prerequisites"></a><h6>
-<a name="id1249816"></a>
+<a name="id1271251"></a>
<a class="link" href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.prerequisites">Prerequisites</a>
</h6>
<p>
@@ -78,7 +78,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.defining_tokens"></a><h6>
-<a name="id1250736"></a>
+<a name="id1271625"></a>
<a class="link" href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.defining_tokens">Defining
Tokens</a>
</h6>
@@ -133,7 +133,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.doing_the_useful_work"></a><h6>
-<a name="id1251044"></a>
+<a name="id1271933"></a>
<a class="link" href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.doing_the_useful_work">Doing
the Useful Work</a>
</h6>
@@ -198,7 +198,7 @@
as well.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart1.pulling_everything_together"></a><h6>
-<a name="id1251544"></a>
+<a name="id1272433"></a>
<a class="link" href="lexer_quickstart1.html#spirit.lex.tutorials.lexer_quickstart1.pulling_everything_together">Pulling
Everything Together</a>
</h6>
@@ -251,7 +251,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><h6>
-<a name="id1252370"></a>
+<a name="id1273259"></a>
<a class="link" 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>
</h6>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -40,7 +40,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><h6>
-<a name="id1254518"></a>
+<a name="id1275407"></a>
<a class="link" href="lexer_quickstart2.html#spirit.lex.tutorials.lexer_quickstart2.prerequisites">Prerequisites</a>
</h6>
<p>
@@ -114,7 +114,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart2.semantic_actions_in__emphasis_spirit_lex__emphasis_"></a><h6>
-<a name="id1255167"></a>
+<a name="id1276056"></a>
<a class="link" 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>
</h6>
@@ -173,7 +173,7 @@
Semantic Actions</a>.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart2.associating_token_definitions_with_the_lexer"></a><h6>
-<a name="id1255785"></a>
+<a name="id1276674"></a>
<a class="link" href="lexer_quickstart2.html#spirit.lex.tutorials.lexer_quickstart2.associating_token_definitions_with_the_lexer">Associating
Token Definitions with the Lexer</a>
</h6>
@@ -209,7 +209,7 @@
with the constant defined by <code 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></code>.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart2.pulling_everything_together"></a><h6>
-<a name="id1256073"></a>
+<a name="id1276962"></a>
<a class="link" href="lexer_quickstart2.html#spirit.lex.tutorials.lexer_quickstart2.pulling_everything_together">Pulling
everything together</a>
</h6>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -65,7 +65,7 @@
code see here: word_count.cpp).
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.prerequisites"></a><h6>
-<a name="id1257691"></a>
+<a name="id1278034"></a>
<a class="link" href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.prerequisites">Prerequisites</a>
</h6>
<p>
@@ -115,7 +115,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.defining_tokens"></a><h6>
-<a name="id1258122"></a>
+<a name="id1278465"></a>
<a class="link" href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.defining_tokens">Defining
Tokens</a>
</h6>
@@ -168,7 +168,7 @@
<p>
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.using_token_definition_instances_as_parsers"></a><h6>
-<a name="id1258459"></a>
+<a name="id1278802"></a>
<a class="link" href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.using_token_definition_instances_as_parsers">Using
Token Definition Instances as Parsers</a>
</h6>
@@ -309,7 +309,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 class="link" href="../abstracts/lexer_primitives.html#spirit.lex.abstracts.lexer_primitives.lexer_token_values" title="About Tokens and Token Values">About
+ this topic here: <a class="link" href="../abstracts/lexer_primitives/lexer_token_values.html" 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 <code class="computeroutput"><span class="identifier">token_def</span><span class="special"><></span></code>'s parser attributes: the <code class="computeroutput"><span class="identifier">word</span></code> token definition is declared as
a <code class="computeroutput"><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></code>,
@@ -322,7 +322,7 @@
<span class="identifier">size</span><span class="special">(</span><span class="identifier">_1</span><span class="special">)</span></code>.
</p>
<a name="spirit.lex.tutorials.lexer_quickstart3.pulling_everything_together"></a><h6>
-<a name="id1261804"></a>
+<a name="id1282555"></a>
<a class="link" href="lexer_quickstart3.html#spirit.lex.tutorials.lexer_quickstart3.pulling_everything_together">Pulling
Everything Together</a>
</h6>
Modified: trunk/libs/spirit/doc/html/spirit/notes/porting_from_spirit_1_8_x.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/notes/porting_from_spirit_1_8_x.html (original)
+++ trunk/libs/spirit/doc/html/spirit/notes/porting_from_spirit_1_8_x.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -40,7 +40,7 @@
<a href="http://spirit.sourceforge.net" target="_top">Spirit</a>.
</p>
<a name="spirit.notes.porting_from_spirit_1_8_x.include_files"></a><h5>
-<a name="id1290755"></a>
+<a name="id1311053"></a>
<a class="link" href="porting_from_spirit_1_8_x.html#spirit.notes.porting_from_spirit_1_8_x.include_files">Include
Files</a>
</h5>
@@ -221,7 +221,7 @@
</tbody>
</table></div>
<a name="spirit.notes.porting_from_spirit_1_8_x.the_free_parse_functions"></a><h5>
-<a name="id1291388"></a>
+<a name="id1311687"></a>
<a class="link" href="porting_from_spirit_1_8_x.html#spirit.notes.porting_from_spirit_1_8_x.the_free_parse_functions">The
Free Parse Functions</a>
</h5>
@@ -406,7 +406,7 @@
Encoding Namespace</a> for more information.
</p>
<a name="spirit.notes.porting_from_spirit_1_8_x.naming_conventions"></a><h5>
-<a name="id1294668"></a>
+<a name="id1315513"></a>
<a class="link" href="porting_from_spirit_1_8_x.html#spirit.notes.porting_from_spirit_1_8_x.naming_conventions">Naming
Conventions</a>
</h5>
@@ -424,7 +424,7 @@
parser primitives, directives and operators.
</p>
<a name="spirit.notes.porting_from_spirit_1_8_x.parser_attributes"></a><h5>
-<a name="id1294738"></a>
+<a name="id1315582"></a>
<a class="link" href="porting_from_spirit_1_8_x.html#spirit.notes.porting_from_spirit_1_8_x.parser_attributes">Parser
Attributes</a>
</h5>
@@ -442,7 +442,7 @@
it is helpful to get access to the underlying matched input sequence.
</p>
<a name="spirit.notes.porting_from_spirit_1_8_x.grammars_and_rules"></a><h5>
-<a name="id1294792"></a>
+<a name="id1315636"></a>
<a class="link" href="porting_from_spirit_1_8_x.html#spirit.notes.porting_from_spirit_1_8_x.grammars_and_rules">Grammars
and Rules</a>
</h5>
Modified: trunk/libs/spirit/doc/html/spirit/preface.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/preface.html (original)
+++ trunk/libs/spirit/doc/html/spirit/preface.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -41,11 +41,11 @@
</p>
</blockquote></div>
<a name="spirit.preface.history"></a><h4>
-<a name="id1079673"></a>
+<a name="id1100601"></a>
<a class="link" href="preface.html#spirit.preface.history">History</a>
</h4>
<a name="spirit.preface._emphasis_80s__emphasis_"></a><h4>
-<a name="id1079687"></a>
+<a name="id1100614"></a>
<a class="link" href="preface.html#spirit.preface._emphasis_80s__emphasis_"><span class="emphasis"><em>80s</em></span></a>
</h4>
<p>
@@ -59,7 +59,7 @@
parser. This worked very well.
</p>
<a name="spirit.preface._emphasis_90s__emphasis_"></a><h4>
-<a name="id1079705"></a>
+<a name="id1100632"></a>
<a class="link" href="preface.html#spirit.preface._emphasis_90s__emphasis_"><span class="emphasis"><em>90s</em></span></a>
</h4>
<p>
@@ -97,7 +97,7 @@
here: pre-Spirit.
</p>
<a name="spirit.preface._emphasis_2001_to_2006__emphasis_"></a><h4>
-<a name="id1079747"></a>
+<a name="id1100674"></a>
<a class="link" href="preface.html#spirit.preface._emphasis_2001_to_2006__emphasis_"><span class="emphasis"><em>2001
to 2006</em></span></a>
</h4>
@@ -127,7 +127,7 @@
for design and implementation quality, robustness, and reusability.
</p>
<a name="spirit.preface._emphasis_2007__emphasis_"></a><h4>
-<a name="id1079781"></a>
+<a name="id1100709"></a>
<a class="link" href="preface.html#spirit.preface._emphasis_2007__emphasis_"><span class="emphasis"><em>2007</em></span></a>
</h4>
<p>
@@ -164,7 +164,7 @@
gives you the right ingredients to create a sledgehammer easily.
</p>
<a name="spirit.preface.new_ideas__spirit_v2"></a><h4>
-<a name="id1079857"></a>
+<a name="id1100784"></a>
<a class="link" href="preface.html#spirit.preface.new_ideas__spirit_v2">New Ideas: Spirit V2</a>
</h4>
<p>
@@ -202,7 +202,7 @@
same underlying component library as for the parser and generator libraries.
</p>
<a name="spirit.preface.how_to_use_this_manual"></a><h4>
-<a name="id1079907"></a>
+<a name="id1100835"></a>
<a class="link" href="preface.html#spirit.preface.how_to_use_this_manual">How to use this manual</a>
</h4>
<p>
@@ -233,7 +233,7 @@
icons precede some text to indicate:
</p>
<div class="table">
-<a name="id1079960"></a><p class="title"><b>Table 1. Icons</b></p>
+<a name="id1100888"></a><p class="title"><b>Table 1. Icons</b></p>
<div class="table-contents"><table class="table" summary="Icons">
<colgroup>
<col>
@@ -354,7 +354,7 @@
Tools</a>.
</p>
<a name="spirit.preface.support"></a><h4>
-<a name="id1080201"></a>
+<a name="id1101129"></a>
<a class="link" href="preface.html#spirit.preface.support">Support</a>
</h4>
<p>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../quick_reference.html" title="Quick Reference">
-<link rel="prev" href="qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="qi_parsers/action.html" title="action">
<link rel="next" href="non_terminals.html" title="Non-terminals">
</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_parsers.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="non_terminals.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="qi_parsers/action.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="non_terminals.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Compound Attribute Rules">
<div class="titlepage"><div><div><h4 class="title">
@@ -41,7 +41,7 @@
<span class="identifier">b</span></code> will be <code 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></code>.
</p>
<div class="table">
-<a name="id1119841"></a><p class="title"><b>Table 4. compound parser attribute types</b></p>
+<a name="id1140504"></a><p class="title"><b>Table 4. compound parser attribute types</b></p>
<div class="table-contents"><table class="table" summary="compound parser attribute types">
<colgroup>
<col>
@@ -301,7 +301,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="qi_parsers.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="non_terminals.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="qi_parsers/action.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="non_terminals.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -7,7 +7,7 @@
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../quick_reference.html" title="Quick Reference">
<link rel="prev" href="common_notation.html" title="Common Notation">
-<link rel="next" href="compound_attribute_rules.html" title="Compound Attribute Rules">
+<link rel="next" href="qi_parsers/char.html" title="char">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,1687 +20,22 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="compound_attribute_rules.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="qi_parsers/char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Qi Parsers">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.qi.quick_reference.qi_parsers"></a><a class="link" href="qi_parsers.html" title="Qi Parsers">Qi Parsers</a>
</h4></div></div></div>
<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>
+<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" title="char">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.char"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.char" title="char">char</a>
-</h5></div></div></div>
-<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>
- <code class="computeroutput"><span class="identifier">char_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches any character
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a range of chars from <code class="computeroutput"><span class="identifier">ch</span></code>
- to <code class="computeroutput"><span class="identifier">ch2</span></code> (inclusive)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character set <code class="computeroutput"><span class="identifier">charset</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">alnum</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">alpha</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">blank</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">cntrl</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">digit</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">graph</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">print</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">punct</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">space</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">xdigit</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lower</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">upper</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Ch</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code> in the current character
- set
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="numeric">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.numeric"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.numeric" title="numeric">numeric</a>
-</h5></div></div></div>
-<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>
- <code class="computeroutput"><span class="identifier">float_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">float</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a floating point number into a <code class="computeroutput"><span class="keyword">float</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">double_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a floating point number into a <code class="computeroutput"><span class="keyword">double</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_double</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a floating point number into a <code class="computeroutput"><span class="keyword">long</span>
- <span class="keyword">double</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">bin</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a binary integer into an <code class="computeroutput"><span class="keyword">unsigned</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">oct</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse an octal integer into an <code class="computeroutput"><span class="keyword">unsigned</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">hex</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a hexadecimal integer into an <code class="computeroutput"><span class="keyword">unsigned</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ushort_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse an unsigned short integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse an unsigned long integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">uint_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse an unsigned int
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">ulong_long</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
- <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse an unsigned long long
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">short_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">short</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a short integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a long integer
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">int_</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">int</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse an int
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">long_long</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
- </p>
- </td>
-<td>
- <p>
- Parse a long long
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="string">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.string"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.string" title="string">string</a>
-</h5></div></div></div>
-<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>
- <a class="link" href="../reference/string.html#spirit.qi.reference.string.lit_string" title="lit/string"><code class="computeroutput"><span class="identifier">ch</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/string.html#spirit.qi.reference.string.lit_string" title="lit/string"><code class="computeroutput"><span class="identifier">str</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches <code class="computeroutput"><span class="identifier">str</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/string.html#spirit.qi.reference.string.lit_string" title="lit/string"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches <code class="computeroutput"><span class="identifier">ch</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/string.html#spirit.qi.reference.string.lit_string" title="lit/string"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches <code class="computeroutput"><span class="identifier">str</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/string.html#spirit.qi.reference.string.lit_string" title="lit/string"><code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Str</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches <code class="computeroutput"><span class="identifier">str</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/string.html#spirit.qi.reference.string.symbols" title="symbols"><code 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></code></a>
- </p>
- </td>
-<td>
- <p>
- N/A
- </p>
- </td>
-<td>
- <p>
- Declare a symbol table, <code class="computeroutput"><span class="identifier">sym</span></code>.
- <code class="computeroutput"><span class="identifier">Ch</span></code> is the underlying
- char type of the symbol table keys. <code class="computeroutput"><span class="identifier">T</span></code>
- is the data type associated with each key.
- </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">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>
- </td>
-<td>
- <p>
- N/A
- </p>
- </td>
-<td>
- <p>
- Add symbols into a symbol table, <code class="computeroutput"><span class="identifier">sym</span></code>.
- val1 and val2 are optional data of type <code class="computeroutput"><span class="identifier">T</span></code>,
- the data type associated with each key.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">sym</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">T</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches entries in the symbol table, <code class="computeroutput"><span class="identifier">sym</span></code>.
- If successful, returns the data associated with the key
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="auxiliary">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.auxiliary"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.auxiliary" title="auxiliary">auxiliary</a>
-</h5></div></div></div>
-<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>
- <code class="computeroutput"><span class="identifier">eol</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches the end of line (<code class="computeroutput"><span class="special">\</span><span class="identifier">r</span></code> or <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code> or <code class="computeroutput"><span class="special">\</span><span class="identifier">r</span><span class="special">\</span><span class="identifier">n</span></code>)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">eoi</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Matches the end of input (first == last)
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">eps</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Match an empty string
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- If <code class="computeroutput"><span class="identifier">b</span></code> is true,
- match an empty string
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Attribute of <code class="computeroutput"><span class="identifier">P</span></code>
- where <code class="computeroutput"><span class="identifier">P</span></code> is the
- return type of <code class="computeroutput"><span class="identifier">fp</span></code>
- </p>
- </td>
-<td>
- <p>
- Invoke <code class="computeroutput"><span class="identifier">fp</span></code> at
- parse time, returning a parser <code class="computeroutput"><span class="identifier">p</span></code>
- which is then called to parse.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">fp</span></code>
- </p>
- </td>
-<td>
- <p>
- see <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></code>
- above
- </p>
- </td>
-<td>
- <p>
- Equivalent to <code class="computeroutput"><span class="identifier">lazy</span><span class="special">[</span><span class="identifier">fp</span><span class="special">]</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/auxiliary.html#spirit.qi.reference.auxiliary.attr" title="attr"><code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Attrib</span></code>
- </p>
- </td>
-<td>
- <p>
- Doesn't consume/parse any input, but exposes the argument <code class="computeroutput"><span class="identifier">attrib</span></code> as its attribute.
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="binary">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.binary"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.binary" title="binary">binary</a>
-</h5></div></div></div>
-<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>
- <code class="computeroutput"><span class="identifier">byte_</span></code>
- </p>
- </td>
-<td>
- <p>
- 8 bits native endian
- </p>
- </td>
-<td>
- <p>
- Matches an 8 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">word</span></code>
- </p>
- </td>
-<td>
- <p>
- 16 bits native endian
- </p>
- </td>
-<td>
- <p>
- Matches a 16 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">big_word</span></code>
- </p>
- </td>
-<td>
- <p>
- 16 bits big endian
- </p>
- </td>
-<td>
- <p>
- Matches a 16 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">little_word</span></code>
- </p>
- </td>
-<td>
- <p>
- 16 bits little endian
- </p>
- </td>
-<td>
- <p>
- Matches a 16 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">dword</span></code>
- </p>
- </td>
-<td>
- <p>
- 32 bits native endian
- </p>
- </td>
-<td>
- <p>
- Matches a 32 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">big_dword</span></code>
- </p>
- </td>
-<td>
- <p>
- 32 bits big endian
- </p>
- </td>
-<td>
- <p>
- Matches a 32 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">little_dword</span></code>
- </p>
- </td>
-<td>
- <p>
- 32 bits little endian
- </p>
- </td>
-<td>
- <p>
- Matches a 32 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">qword</span></code>
- </p>
- </td>
-<td>
- <p>
- 64 bits native endian
- </p>
- </td>
-<td>
- <p>
- Matches a 64 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">big_qword</span></code>
- </p>
- </td>
-<td>
- <p>
- 64 bits big endian
- </p>
- </td>
-<td>
- <p>
- Matches a 64 bit binary
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">little_qword</span></code>
- </p>
- </td>
-<td>
- <p>
- 64 bits little endian
- </p>
- </td>
-<td>
- <p>
- Matches a 64 bit binary
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="directive">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.directive"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.directive" title="directive">directive</a>
-</h5></div></div></div>
-<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>
- <code class="computeroutput"><span class="identifier">lexeme</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">A</span></code>
- </p>
- </td>
-<td>
- <p>
- Disable skip parsing for <code class="computeroutput"><span class="identifier">a</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <a class="link" href="../reference/directive.html#spirit.qi.reference.directive.no_case" title="no_case"><code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">A</span></code>
- </p>
- </td>
-<td>
- <p>
- Inhibits case-sensitivity for <code class="computeroutput"><span class="identifier">a</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Ignores the attribute type of <code class="computeroutput"><span class="identifier">a</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">raw</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Presents the transduction of <code class="computeroutput"><span class="identifier">a</span></code>
- as an iterator range
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Repeat <code class="computeroutput"><span class="identifier">a</span></code> zero
- or more times
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> times
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> to <code class="computeroutput"><span class="identifier">M</span></code>
- times
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> or more times
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">skip</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">A</span></code>
- </p>
- </td>
-<td>
- <p>
- Reestablish the skipper that got inhibited by lexeme
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">A</span></code>
- </p>
- </td>
-<td>
- <p>
- Use <code class="computeroutput"><span class="identifier">p</span></code> as a skipper
- for parsing <code class="computeroutput"><span class="identifier">a</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="operator">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.operator"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.operator" title="operator">operator</a>
-</h5></div></div></div>
-<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>
- <code class="computeroutput"><span class="special">!</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- Not predicate. Ensure that <code class="computeroutput"><span class="identifier">a</span></code>
- does not match but don't move the iterator position
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">&</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Unused</span></code>
- </p>
- </td>
-<td>
- <p>
- And predicate. Ensure that <code class="computeroutput"><span class="identifier">a</span></code>
- matches but don't move the iterator position
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">-</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Optional. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- zero or one time
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Kleene. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- zero or more times
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="special">+</span><span class="identifier">a</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Plus. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- one or more times
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Alternative. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- or <code class="computeroutput"><span class="identifier">b</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">>></span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Sequence. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- followed by <code class="computeroutput"><span class="identifier">b</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">></span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Expect. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- followed by <code class="computeroutput"><span class="identifier">b</span></code>.
- <code class="computeroutput"><span class="identifier">b</span></code> is expected
- to match when <code class="computeroutput"><span class="identifier">a</span></code>
- matches, otherwise, an <code class="computeroutput"><span class="identifier">expectation_failure</span></code>
- is thrown.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">-</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">A</span></code>
- </p>
- </td>
-<td>
- <p>
- Difference. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- but not <code class="computeroutput"><span class="identifier">b</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">||</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Sequential Or. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- or <code class="computeroutput"><span class="identifier">b</span></code> or <code class="computeroutput"><span class="identifier">a</span></code> followed by <code class="computeroutput"><span class="identifier">b</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- List. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- delimited <code class="computeroutput"><span class="identifier">b</span></code> one
- or more times
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">a</span> <span class="special">^</span>
- <span class="identifier">b</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span></code>
- <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">>,</span></code>
- <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">B</span><span class="special">></span>
- <span class="special">></span></code>
- </p>
- </td>
-<td>
- <p>
- Permutation. Parse <code class="computeroutput"><span class="identifier">a</span></code>
- and <code class="computeroutput"><span class="identifier">b</span></code> in any
- order
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-</div>
-<div class="section" title="action">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.quick_reference.qi_parsers.action"></a><a class="link" href="qi_parsers.html#spirit.qi.quick_reference.qi_parsers.action" title="action">action</a>
-</h5></div></div></div>
-<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>
- <code class="computeroutput"><span class="identifier">p</span><span class="special">[</span><span class="identifier">fa</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Attribute of <code class="computeroutput"><span class="identifier">p</span></code>
- </p>
- </td>
-<td>
- <p>
- Call semantic action, <code class="computeroutput"><span class="identifier">fa</span></code>
- if p succeeds.
- </p>
- </td>
-</tr></tbody>
-</table></div>
-</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
@@ -1713,7 +48,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="compound_attribute_rules.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="common_notation.html"><img src="../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../quick_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="qi_parsers/char.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/action.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/action.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,86 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>action</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="operator.html" title="operator">
+<link rel="next" href="../compound_attribute_rules.html" title="Compound Attribute Rules">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="operator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="../compound_attribute_rules.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="action">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.action"></a><a class="link" href="action.html" title="action">action</a>
+</h5></div></div></div>
+<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>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">[</span><span class="identifier">fa</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Attribute of <code class="computeroutput"><span class="identifier">p</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Call semantic action, <code class="computeroutput"><span class="identifier">fa</span></code>
+ if p succeeds.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="operator.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="../compound_attribute_rules.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/auxiliary.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/auxiliary.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,195 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>auxiliary</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="string.html" title="string">
+<link rel="next" href="binary.html" title="binary">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="binary.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="auxiliary">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.auxiliary"></a><a class="link" href="auxiliary.html" title="auxiliary">auxiliary</a>
+</h5></div></div></div>
+<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>
+ <code class="computeroutput"><span class="identifier">eol</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches the end of line (<code class="computeroutput"><span class="special">\</span><span class="identifier">r</span></code> or <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span></code> or <code class="computeroutput"><span class="special">\</span><span class="identifier">r</span><span class="special">\</span><span class="identifier">n</span></code>)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">eoi</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches the end of input (first == last)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">eps</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Match an empty string
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">eps</span><span class="special">(</span><span class="identifier">b</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If <code class="computeroutput"><span class="identifier">b</span></code> is true,
+ match an empty string
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Attribute of <code class="computeroutput"><span class="identifier">P</span></code>
+ where <code class="computeroutput"><span class="identifier">P</span></code> is the
+ return type of <code class="computeroutput"><span class="identifier">fp</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Invoke <code class="computeroutput"><span class="identifier">fp</span></code> at
+ parse time, returning a parser <code class="computeroutput"><span class="identifier">p</span></code>
+ which is then called to parse.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fp</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ see <code class="computeroutput"><span class="identifier">lazy</span><span class="special">(</span><span class="identifier">fp</span><span class="special">)</span></code>
+ above
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="identifier">lazy</span><span class="special">[</span><span class="identifier">fp</span><span class="special">]</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/auxiliary/attr.html" title="attr"><code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Attrib</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Doesn't consume/parse any input, but exposes the argument <code class="computeroutput"><span class="identifier">attrib</span></code> as its attribute.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="binary.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/binary.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/binary.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,240 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>binary</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="auxiliary.html" title="auxiliary">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="auxiliary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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" title="binary">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.binary"></a><a class="link" href="binary.html" title="binary">binary</a>
+</h5></div></div></div>
+<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>
+ <code class="computeroutput"><span class="identifier">byte_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 8 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches an 8 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">word</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 16 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 16 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big_word</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 16 bits big endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 16 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little_word</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 16 bits little endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 16 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">dword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 32 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 32 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big_dword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 32 bits big endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 32 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little_dword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 32 bits little endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 32 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">qword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 64 bits native endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 64 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">big_qword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 64 bits big endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 64 bit binary
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">little_qword</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ 64 bits little endian
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a 64 bit binary
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="auxiliary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/char.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/char.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,373 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>char</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="../qi_parsers.html" title="Qi Parsers">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../qi_parsers.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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" title="char">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.char"></a><a class="link" href="char.html" title="char">char</a>
+</h5></div></div></div>
+<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>
+ <code class="computeroutput"><span class="identifier">char_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches any character
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="string">"c"</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a single char string literal, <code class="computeroutput"><span class="identifier">c</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a range of chars from <code class="computeroutput"><span class="identifier">ch</span></code>
+ to <code class="computeroutput"><span class="identifier">ch2</span></code> (inclusive)
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">char_</span><span class="special">(</span><span class="identifier">charset</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character set <code class="computeroutput"><span class="identifier">charset</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">alnum</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalnum</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">alpha</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isalpha</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">blank</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isblank</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">cntrl</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iscntrl</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">digit</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isdigit</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">graph</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isgraph</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">print</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isprint</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">punct</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">ispunct</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">space</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isspace</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">xdigit</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isxdigit</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lower</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">islower</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">upper</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Ch</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches a character based on the equivalent of <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">isupper</span></code> in the current character
+ set
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../qi_parsers.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/directive.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/directive.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,246 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>directive</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="binary.html" title="binary">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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" title="directive">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.directive"></a><a class="link" href="directive.html" title="directive">directive</a>
+</h5></div></div></div>
+<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>
+ <code class="computeroutput"><span class="identifier">lexeme</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">A</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Disable skip parsing for <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/directive/no_case.html" title="no_case"><code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">A</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Inhibits case-sensitivity for <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Ignores the attribute type of <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">raw</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Presents the transduction of <code class="computeroutput"><span class="identifier">a</span></code>
+ as an iterator range
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">repeat</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat <code class="computeroutput"><span class="identifier">a</span></code> zero
+ or more times
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> times
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> to <code class="computeroutput"><span class="identifier">M</span></code>
+ times
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Repeat <code class="computeroutput"><span class="identifier">a</span></code> <code class="computeroutput"><span class="identifier">N</span></code> or more times
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">skip</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">A</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Reestablish the skipper that got inhibited by lexeme
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">A</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Use <code class="computeroutput"><span class="identifier">p</span></code> as a skipper
+ for parsing <code class="computeroutput"><span class="identifier">a</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/numeric.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/numeric.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,310 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>numeric</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="char.html" title="char">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="char.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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" title="numeric">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.numeric"></a><a class="link" href="numeric.html" title="numeric">numeric</a>
+</h5></div></div></div>
+<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>
+ <code class="computeroutput"><span class="identifier">float_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">float</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a floating point number into a <code class="computeroutput"><span class="keyword">float</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">double_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a floating point number into a <code class="computeroutput"><span class="keyword">double</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a floating point number into a <code class="computeroutput"><span class="keyword">long</span>
+ <span class="keyword">double</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">bin</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a binary integer into an <code class="computeroutput"><span class="keyword">unsigned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">oct</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse an octal integer into an <code class="computeroutput"><span class="keyword">unsigned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">hex</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a hexadecimal integer into an <code class="computeroutput"><span class="keyword">unsigned</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ushort_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse an unsigned short integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse an unsigned long integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">uint_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse an unsigned int
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">ulong_long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">unsigned</span> <span class="keyword">long</span>
+ <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse an unsigned long long
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">short_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">short</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a short integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a long integer
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">int_</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">int</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse an int
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">long_long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">long</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Parse a long long
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="char.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/operator.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/operator.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,306 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>operator</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="directive.html" title="directive">
+<link rel="next" href="action.html" title="action">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="directive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="action.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="operator">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.operator"></a><a class="link" href="operator.html" title="operator">operator</a>
+</h5></div></div></div>
+<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>
+ <code class="computeroutput"><span class="special">!</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Not predicate. Ensure that <code class="computeroutput"><span class="identifier">a</span></code>
+ does not match but don't move the iterator position
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">&</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ And predicate. Ensure that <code class="computeroutput"><span class="identifier">a</span></code>
+ matches but don't move the iterator position
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">-</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Optional. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ zero or one time
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">*</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Kleene. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ zero or more times
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="special">+</span><span class="identifier">a</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Plus. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ one or more times
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">|</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Alternative. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ or <code class="computeroutput"><span class="identifier">b</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">>></span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Sequence. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ followed by <code class="computeroutput"><span class="identifier">b</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">></span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Expect. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ followed by <code class="computeroutput"><span class="identifier">b</span></code>.
+ <code class="computeroutput"><span class="identifier">b</span></code> is expected
+ to match when <code class="computeroutput"><span class="identifier">a</span></code>
+ matches, otherwise, an <code class="computeroutput"><span class="identifier">expectation_failure</span></code>
+ is thrown.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">-</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">A</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Difference. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ but not <code class="computeroutput"><span class="identifier">b</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">||</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Sequential Or. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ or <code class="computeroutput"><span class="identifier">b</span></code> or <code class="computeroutput"><span class="identifier">a</span></code> followed by <code class="computeroutput"><span class="identifier">b</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">%</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">vector</span><span class="special"><</span><span class="identifier">A</span><span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ List. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ delimited <code class="computeroutput"><span class="identifier">b</span></code> one
+ or more times
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span> <span class="special">^</span>
+ <span class="identifier">b</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">tuple</span><span class="special"><</span></code>
+ <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">A</span><span class="special">>,</span></code>
+ <code class="computeroutput"><span class="identifier">optional</span><span class="special"><</span><span class="identifier">B</span><span class="special">></span>
+ <span class="special">></span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Permutation. Parse <code class="computeroutput"><span class="identifier">a</span></code>
+ and <code class="computeroutput"><span class="identifier">b</span></code> in any
+ order
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="directive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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="action.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/string.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/string.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,221 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>string</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../qi_parsers.html" title="Qi Parsers">
+<link rel="prev" href="numeric.html" title="numeric">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="numeric.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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" title="string">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.quick_reference.qi_parsers.string"></a><a class="link" href="string.html" title="string">string</a>
+</h5></div></div></div>
+<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>
+ <a class="link" href="../../reference/string/lit_string.html" title="lit/string"><code class="computeroutput"><span class="identifier">ch</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/string/lit_string.html" title="lit/string"><code class="computeroutput"><span class="identifier">str</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches <code class="computeroutput"><span class="identifier">str</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/string/lit_string.html" title="lit/string"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">ch</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches <code class="computeroutput"><span class="identifier">ch</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/string/lit_string.html" title="lit/string"><code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Unused</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches <code class="computeroutput"><span class="identifier">str</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/string/lit_string.html" title="lit/string"><code class="computeroutput"><span class="identifier">string</span><span class="special">(</span><span class="identifier">str</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Str</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches <code class="computeroutput"><span class="identifier">str</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="../../reference/string/symbols.html" title="symbols"><code 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></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ N/A
+ </p>
+ </td>
+<td>
+ <p>
+ Declare a symbol table, <code class="computeroutput"><span class="identifier">sym</span></code>.
+ <code class="computeroutput"><span class="identifier">Ch</span></code> is the underlying
+ char type of the symbol table keys. <code class="computeroutput"><span class="identifier">T</span></code>
+ is the data type associated with each key.
+ </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">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>
+ </td>
+<td>
+ <p>
+ N/A
+ </p>
+ </td>
+<td>
+ <p>
+ Add symbols into a symbol table, <code class="computeroutput"><span class="identifier">sym</span></code>.
+ val1 and val2 are optional data of type <code class="computeroutput"><span class="identifier">T</span></code>,
+ the data type associated with each key.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">sym</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Matches entries in the symbol table, <code class="computeroutput"><span class="identifier">sym</span></code>.
+ If successful, returns the data associated with the key
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="numeric.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_parsers.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/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-23 22:07:18 EDT (Sun, 23 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="prev" href="basics.html" title="Basics">
-<link rel="next" href="directive.html" title="Directive">
+<link rel="next" href="auxiliary/attr.html" title="attr">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,13 +20,13 @@
</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="directive.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="auxiliary/attr.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Auxiliary">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.qi.reference.auxiliary"></a><a class="link" href="auxiliary.html" title="Auxiliary">Auxiliary</a>
</h4></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 <code class="computeroutput"><span class="identifier">attr</span></code>,
@@ -34,290 +34,12 @@
<code class="computeroutput"><span class="identifier">eps</span></code>, and <code class="computeroutput"><span class="identifier">lazy</span></code> parsers.
</p>
<a name="spirit.qi.reference.auxiliary.module_header"></a><h6>
-<a name="id1131770"></a>
+<a name="id1152433"></a>
<a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.module_header">Module Header</a>
</h6>
<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" title="attr">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.auxiliary.attr"></a><a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.attr" title="attr">attr</a>
-</h5></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<code 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></code>: generates a pseudo parser not
- consuming any input
- </li></ul></div>
-<a name="spirit.qi.reference.auxiliary.attr.description"></a><h6>
-<a name="id1131875"></a>
- <a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.attr.description">Description</a>
- </h6>
-<p>
- The <code class="computeroutput"><span class="identifier">attr</span></code> parser does
- not consume any input, for this reason it always matches an empty string.
- The parser generated by <code class="computeroutput"><span class="identifier">attr</span></code>
- 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="id1131906"></a>
- <a class="link" href="auxiliary.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.qi.reference.auxiliary.attr.model_of"></a><h6>
-<a name="id1131980"></a>
- <a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.attr.model_of">Model of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">attrib</span></code></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"><code class="computeroutput"><span class="identifier">fattrib</span></code></span></dt>
-<dd><p>
- A <a class="link" href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy Argument</a>
- that evaluates to an arbitrary type.
- </p></dd>
-</dl>
-</div>
-<a name="spirit.qi.reference.auxiliary.attr.expression_semantics"></a><h6>
-<a name="id1132062"></a>
- <a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.attr.expression_semantics">Expression
- Semantics</a>
- </h6>
-<p>
- Semantics of an <code class="computeroutput"><span class="identifier">attr</span><span class="special">()</span></code> expression are fully defined by the
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a> 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>
- <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a pseudo parser exposing the current value of <code class="computeroutput"><span class="identifier">attrib</span></code> as its attribute value
- while not consuming any input at parse time.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">fattrib</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a pseudo parser exposing as its attribute the value
- returned by invoking <code class="computeroutput"><span class="identifier">fattrib</span></code>
- at parse time, while not consuming any input. See <a class="link" 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="id1132222"></a>
- <a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.attr.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Attrib</span></code>, which
- is the type of <code class="computeroutput"><span class="identifier">attrib</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">fattrib</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Attrib</span></code>, which
- is the return type of <code class="computeroutput"><span class="identifier">fattrib</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.qi.reference.auxiliary.attr.complexity"></a><h6>
-<a name="id1132367"></a>
- <a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.attr.complexity">Complexity</a>
- </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="id1132394"></a>
- <a class="link" href="auxiliary.html#spirit.qi.reference.auxiliary.attr.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">attr</span></code> 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 <code class="computeroutput"><span class="identifier">attr</span></code> 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>
@@ -330,7 +52,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="directive.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="auxiliary/attr.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary/attr.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/auxiliary/attr.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,317 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>attr</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../auxiliary.html" title="Auxiliary">
+<link rel="prev" href="../auxiliary.html" title="Auxiliary">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../auxiliary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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" title="attr">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.auxiliary.attr"></a><a class="link" href="attr.html" title="attr">attr</a>
+</h5></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code 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></code>: generates a pseudo parser not
+ consuming any input
+ </li></ul></div>
+<a name="spirit.qi.reference.auxiliary.attr.description"></a><h6>
+<a name="id1152537"></a>
+ <a class="link" href="attr.html#spirit.qi.reference.auxiliary.attr.description">Description</a>
+ </h6>
+<p>
+ The <code class="computeroutput"><span class="identifier">attr</span></code> parser does
+ not consume any input, for this reason it always matches an empty string.
+ The parser generated by <code class="computeroutput"><span class="identifier">attr</span></code>
+ 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="id1152569"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.qi.reference.auxiliary.attr.model_of"></a><h6>
+<a name="id1152643"></a>
+ <a class="link" href="attr.html#spirit.qi.reference.auxiliary.attr.model_of">Model of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../parser_concepts/parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">attrib</span></code></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"><code class="computeroutput"><span class="identifier">fattrib</span></code></span></dt>
+<dd><p>
+ A <a class="link" href="../basics.html#spirit.qi.reference.basics.lazy_argument">Lazy Argument</a>
+ that evaluates to an arbitrary type.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.auxiliary.attr.expression_semantics"></a><h6>
+<a name="id1152725"></a>
+ <a class="link" href="attr.html#spirit.qi.reference.auxiliary.attr.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ Semantics of an <code class="computeroutput"><span class="identifier">attr</span><span class="special">()</span></code> expression are fully defined by the
+ <a class="link" href="../parser_concepts/parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a> 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>
+ <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a pseudo parser exposing the current value of <code class="computeroutput"><span class="identifier">attrib</span></code> as its attribute value
+ while not consuming any input at parse time.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">fattrib</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a pseudo parser exposing as its attribute the value
+ returned by invoking <code class="computeroutput"><span class="identifier">fattrib</span></code>
+ at parse time, while not consuming any input. See <a class="link" 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="id1152884"></a>
+ <a class="link" href="attr.html#spirit.qi.reference.auxiliary.attr.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">attrib</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Attrib</span></code>, which
+ is the type of <code class="computeroutput"><span class="identifier">attrib</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">attr</span><span class="special">(</span><span class="identifier">fattrib</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Attrib</span></code>, which
+ is the return type of <code class="computeroutput"><span class="identifier">fattrib</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.auxiliary.attr.complexity"></a><h6>
+<a name="id1153029"></a>
+ <a class="link" href="attr.html#spirit.qi.reference.auxiliary.attr.complexity">Complexity</a>
+ </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="id1153057"></a>
+ <a class="link" href="attr.html#spirit.qi.reference.auxiliary.attr.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">attr</span></code> 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 <code class="computeroutput"><span class="identifier">attr</span></code> 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../auxiliary.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../auxiliary.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/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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,7 +6,7 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="parser_concepts.html" title="Parser Concepts">
+<link rel="prev" href="parser_concepts/naryparser.html" title="NaryParser">
<link rel="next" href="auxiliary.html" title="Auxiliary">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
@@ -20,14 +20,14 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Basics">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.qi.reference.basics"></a><a class="link" href="basics.html" title="Basics">Basics</a>
</h4></div></div></div>
<a name="spirit.qi.reference.basics.lazy_argument"></a><h6>
-<a name="id1129624"></a>
+<a name="id1150765"></a>
<a class="link" href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy Argument</a>
</h6>
<p>
@@ -51,7 +51,7 @@
second argument. This is done for uniformity with Semantic Actions).
</p>
<a name="spirit.qi.reference.basics.character_encoding_namespace"></a><h6>
-<a name="id1129761"></a>
+<a name="id1150901"></a>
<a class="link" href="basics.html#spirit.qi.reference.basics.character_encoding_namespace">Character
Encoding Namespace</a>
</h6>
@@ -123,7 +123,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,8 +6,8 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="auxiliary.html" title="Auxiliary">
-<link rel="next" href="string.html" title="String">
+<link rel="prev" href="auxiliary/attr.html" title="attr">
+<link rel="next" href="directive/no_case.html" title="no_case">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,13 +20,13 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="Directive">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.qi.reference.directive"></a><a class="link" href="directive.html" title="Directive"> Directive</a>
</h4></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 <code class="computeroutput"><span class="identifier">no_case</span></code>,
@@ -34,280 +34,12 @@
<code class="computeroutput"><span class="identifier">raw</span></code>, and <code class="computeroutput"><span class="identifier">skip</span></code> directives.
</p>
<a name="spirit.qi.reference.directive.module_header"></a><h6>
-<a name="id1133446"></a>
+<a name="id1154108"></a>
<a class="link" href="directive.html#spirit.qi.reference.directive.module_header">Module Header</a>
</h6>
<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" title="no_case">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.directive.no_case"></a><a class="link" href="directive.html#spirit.qi.reference.directive.no_case" title="no_case"> no_case</a>
-</h5></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<code 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></code>: 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="id1133550"></a>
- <a class="link" href="directive.html#spirit.qi.reference.directive.no_case.description">Description</a>
- </h6>
-<p>
- The <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>
- 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="id1133578"></a>
- <a class="link" href="directive.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.qi.reference.directive.no_case.model_of"></a><h6>
-<a name="id1133652"></a>
- <a class="link" 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" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
-<dd><p>
- A arbitrary complex parser expression embedded inside the <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>
- directive.
- </p></dd>
-</dl>
-</div>
-<a name="spirit.qi.reference.directive.no_case.expression_semantics"></a><h6>
-<a name="id1133714"></a>
- <a class="link" href="directive.html#spirit.qi.reference.directive.no_case.expression_semantics">Expression
- Semantics</a>
- </h6>
-<p>
- The <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>
- 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 <code class="computeroutput"><span class="identifier">tag</span><span class="special">::</span><span class="identifier">no_case</span></code>)
- to the <code class="computeroutput"><span class="identifier">Modifier</span></code> template
- parameter used while tranforming the <code class="computeroutput"><span class="identifier">proto</span><span class="special">::</span><span class="identifier">expr</span></code>
- 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>
- <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">p</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- Force <code class="computeroutput"><span class="identifier">p</span></code> 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="id1134226"></a>
- <a class="link" href="directive.html#spirit.qi.reference.directive.no_case.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">A</span></code>, 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="id1134314"></a>
- <a class="link" href="directive.html#spirit.qi.reference.directive.no_case.complexity">Complexity</a>
- </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="id1134338"></a>
- <a class="link" href="directive.html#spirit.qi.reference.directive.no_case.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>:
- </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 <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code> in conjunction with a symbol table
- (see <a class="link" href="string.html#spirit.qi.reference.string.symbols" title="symbols"><code 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></code></a>
- 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>
@@ -320,7 +52,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/directive/no_case.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,307 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>no_case</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../directive.html" title="Directive">
+<link rel="prev" href="../directive.html" title="Directive">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../directive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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" title="no_case">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.directive.no_case"></a><a class="link" href="no_case.html" title="no_case"> no_case</a>
+</h5></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code 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></code>: 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="id1154213"></a>
+ <a class="link" href="no_case.html#spirit.qi.reference.directive.no_case.description">Description</a>
+ </h6>
+<p>
+ The <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>
+ 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="id1154240"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.qi.reference.directive.no_case.model_of"></a><h6>
+<a name="id1154315"></a>
+ <a class="link" href="no_case.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" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
+<dd><p>
+ A arbitrary complex parser expression embedded inside the <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>
+ directive.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.directive.no_case.expression_semantics"></a><h6>
+<a name="id1154377"></a>
+ <a class="link" href="no_case.html#spirit.qi.reference.directive.no_case.expression_semantics">Expression
+ Semantics</a>
+ </h6>
+<p>
+ The <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>
+ 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 <code class="computeroutput"><span class="identifier">tag</span><span class="special">::</span><span class="identifier">no_case</span></code>)
+ to the <code class="computeroutput"><span class="identifier">Modifier</span></code> template
+ parameter used while tranforming the <code class="computeroutput"><span class="identifier">proto</span><span class="special">::</span><span class="identifier">expr</span></code>
+ 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>
+ <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">p</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Force <code class="computeroutput"><span class="identifier">p</span></code> 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="id1154888"></a>
+ <a class="link" href="no_case.html#spirit.qi.reference.directive.no_case.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">A</span></code>, 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="id1154977"></a>
+ <a class="link" href="no_case.html#spirit.qi.reference.directive.no_case.complexity">Complexity</a>
+ </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="id1155001"></a>
+ <a class="link" href="no_case.html#spirit.qi.reference.directive.no_case.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code>:
+ </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 <code class="computeroutput"><span class="identifier">no_case</span><span class="special">[]</span></code> in conjunction with a symbol table
+ (see <a class="link" href="../string/symbols.html" title="symbols"><code 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></code></a>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../directive.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directive.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/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-23 22:07:18 EDT (Sun, 23 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="prev" href="../reference.html" title="Reference">
-<link rel="next" href="basics.html" title="Basics">
+<link rel="next" href="parser_concepts/parser.html" title="Parser">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,18 +20,18 @@
</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="basics.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="parser_concepts/parser.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="Parser Concepts">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.qi.reference.parser_concepts"></a><a class="link" href="parser_concepts.html" title="Parser Concepts">Parser Concepts</a>
</h4></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>
@@ -44,858 +44,6 @@
<p>
The following sections provide details on these concepts.
</p>
-<div class="section" title="Parser">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.parser_concepts.parser"></a><a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser">Parser</a>
-</h5></div></div></div>
-<a name="spirit.qi.reference.parser_concepts.parser.description"></a><h6>
-<a name="id1126631"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser.description">Description</a>
- </h6>
-<p>
- The <span class="emphasis"><em>Parser</em></span> is the most fundamental concept. A Parser
- has a member function, <code class="computeroutput"><span class="identifier">parse</span></code>,
- that accepts a first-last <code class="computeroutput"><span class="identifier">ForwardIterator</span></code>
- pair and returns bool as its result. The iterators delimit the data being
- parsed. The Parser's <code class="computeroutput"><span class="identifier">parse</span></code>
- member function returns <code class="computeroutput"><span class="keyword">true</span></code>
- 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" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
-<dd><p>
- A <code class="computeroutput"><span class="identifier">Parser</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></span></dt>
-<dd><p>
- A <code class="computeroutput"><span class="identifier">Parser</span></code> type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Iter</span></code></span></dt>
-<dd><p>
- a <code class="computeroutput"><span class="identifier">ForwardIterator</span></code>
- type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code>,
- <code class="computeroutput"><span class="identifier">l</span></code></span></dt>
-<dd><p>
- <code class="computeroutput"><span class="identifier">ForwardIterator</span></code>.
- first/last iterator pair.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Context</span></code></span></dt>
-<dd><p>
- The parser's Context type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">context</span></code></span></dt>
-<dd><p>
- The parser's Context, or <code class="computeroutput"><span class="identifier">unused</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">skip</span></code></span></dt>
-<dd><p>
- A skip Parser, or <code class="computeroutput"><span class="identifier">unused</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">attrib</span></code></span></dt>
-<dd><p>
- A Compatible Attribute, or <code class="computeroutput"><span class="identifier">unused</span></code>.
- </p></dd>
-</dl>
-</div>
-<a name="spirit.qi.reference.parser_concepts.parser.valid_expressions"></a><h6>
-<a name="id1126894"></a>
- <a class="link" 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, <code class="computeroutput"><span class="identifier">p</span></code>,
- how <code class="computeroutput"><span class="identifier">skip</span></code> and <code class="computeroutput"><span class="identifier">attrib</span></code> are handled by <code class="computeroutput"><span class="identifier">p</span></code>, are left unspecified in the base
- <code class="computeroutput"><span class="identifier">Parser</span></code> 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 <code class="computeroutput"><span class="identifier">f</span></code>.
- Return <code class="computeroutput"><span class="keyword">true</span></code> if successful,
- otherwise return <code class="computeroutput"><span class="keyword">false</span></code>.
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">bool</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Get information about a Parser.
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">info</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.qi.reference.parser_concepts.parser.type_expressions"></a><h6>
-<a name="id1127161"></a>
- <a class="link" 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- The Parser's expected attribute.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
- is a Parser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1127359"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser.postcondition">Postcondition</a>
- </h6>
-<p>
- Upon return from <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">parse</span></code> the following post conditions
- should hold:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
- On a successful match, <code class="computeroutput"><span class="identifier">f</span></code>
- is positioned one past the first non-matching character/token.
- </li>
-<li class="listitem">
- On a failed match, if a <code class="computeroutput"><span class="identifier">skip</span></code>
- parser is <code class="computeroutput"><span class="identifier">unused</span></code>,
- <code class="computeroutput"><span class="identifier">f</span></code> is restored to its
- original position prior to entry.
- </li>
-<li class="listitem">
- On a failed match, if a <code class="computeroutput"><span class="identifier">skip</span></code>
- parser is not <code class="computeroutput"><span class="identifier">unused</span></code>,
- <code class="computeroutput"><span class="identifier">f</span></code> is positioned one
- past the first character/token not matching <code class="computeroutput"><span class="identifier">skip</span></code>.
- </li>
-<li class="listitem">
- On a failed match, <code class="computeroutput"><span class="identifier">attrib</span></code>
- is left untouched.
- </li>
-<li class="listitem">
- No post-skips: trailing <code class="computeroutput"><span class="identifier">skip</span></code>
- characters/tokens will not be skipped.
- </li>
-</ul></div>
-<a name="spirit.qi.reference.parser_concepts.parser.models"></a><h6>
-<a name="id1127487"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser.models">Models</a>
- </h6>
-<p>
- All parsers in Spirit.Qi are models of the <span class="emphasis"><em>Parser</em></span>
- concept.
- </p>
-</div>
-<div class="section" title="PrimitiveParser">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.parser_concepts.primitiveparser"></a><a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser" title="PrimitiveParser">PrimitiveParser</a>
-</h5></div></div></div>
-<a name="spirit.qi.reference.parser_concepts.primitiveparser.description"></a><h6>
-<a name="id1127521"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser.description">Description</a>
- </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="id1127544"></a>
- <a class="link" 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>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<a name="spirit.qi.reference.parser_concepts.primitiveparser.pre_skip"></a><h6>
-<a name="id1127654"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser.pre_skip">Pre-skip</a>
- </h6>
-<p>
- Upon entry to the <code class="computeroutput"><span class="identifier">parse</span></code>
- member function, a PrimitiveParser is required to do a pre-skip. Leading
- <code class="computeroutput"><span class="identifier">skip</span></code> 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 <code class="computeroutput"><span class="identifier">qi</span><span class="special">::</span><span class="identifier">skip_over</span></code>:
- </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="id1127745"></a>
- <a class="link" 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>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>,
- is a PrimitiveParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1127882"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser.models">Models</a>
- </h6>
-<p>
- <span class="bold"><strong>FIXME</strong></span> Add links to <span class="emphasis"><em>PrimitiveParser</em></span>
- models here.
- </p>
-</div>
-<div class="section" title="UnaryParser">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.parser_concepts.unaryparser"></a><a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser" title="UnaryParser">UnaryParser</a>
-</h5></div></div></div>
-<a name="spirit.qi.reference.parser_concepts.unaryparser.description"></a><h6>
-<a name="id1127922"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser.description">Description</a>
- </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="id1127948"></a>
- <a class="link" 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>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
-<dd><p>
- A UnaryParser.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></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="id1128027"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser.valid_expressions">Valid
- Expressions</a>
- </h6>
-<p>
- In addition to the requirements defined in <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>, 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>
- <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">subject</span></code>
- </p>
- </td>
-<td>
- <p>
- Subject parser.
- </p>
- </td>
-<td>
- <p>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<a name="spirit.qi.reference.parser_concepts.unaryparser.type_expressions"></a><h6>
-<a name="id1128141"></a>
- <a class="link" 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>
- <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">subject_type</span></code>
- </p>
- </td>
-<td>
- <p>
- The subject parser type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
- is a UnaryParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1128309"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser.invariants">Invariants</a>
- </h6>
-<p>
- For any UnaryParser, <code class="computeroutput"><span class="identifier">P</span></code>,
- the following invariant always holds:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li></ul></div>
-<a name="spirit.qi.reference.parser_concepts.unaryparser.models"></a><h6>
-<a name="id1128394"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.unaryparser.models">Models</a>
- </h6>
-<p>
- <span class="bold"><strong>FIXME</strong></span> Add links to models of UnaryParser
- concept
- </p>
-</div>
-<div class="section" title="BinaryParser">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.parser_concepts.binaryparser"></a><a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser" title="BinaryParser">BinaryParser</a>
-</h5></div></div></div>
-<a name="spirit.qi.reference.parser_concepts.binaryparser.description"></a><h6>
-<a name="id1128429"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser.description">Description</a>
- </h6>
-<p>
- <span class="emphasis"><em>BinaryParser</em></span> is a composite parser that has a two
- subjects, <code class="computeroutput"><span class="identifier">left</span></code> and <code class="computeroutput"><span class="identifier">right</span></code>. The BinaryParser allows its
- subjects to be treated in the same way as a single instance of a <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- following the Composite Design Pattern.
- </p>
-<a name="spirit.qi.reference.parser_concepts.binaryparser.refinement_of"></a><h6>
-<a name="id1128480"></a>
- <a class="link" 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>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
-<dd><p>
- A BinaryParser.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></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="id1128560"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser.valid_expressions">Valid
- Expressions</a>
- </h6>
-<p>
- In addition to the requirements defined in <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>, 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>
- <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">left</span></code>
- </p>
- </td>
-<td>
- <p>
- Left parser.
- </p>
- </td>
-<td>
- <p>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">right</span></code>
- </p>
- </td>
-<td>
- <p>
- Right parser.
- </p>
- </td>
-<td>
- <p>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.qi.reference.parser_concepts.binaryparser.type_expressions"></a><h6>
-<a name="id1128720"></a>
- <a class="link" 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>
- <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">left_type</span></code>
- </p>
- </td>
-<td>
- <p>
- The left parser type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">right_type</span></code>
- </p>
- </td>
-<td>
- <p>
- The right parser type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
- is a BinaryParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1128922"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser.invariants">Invariants</a>
- </h6>
-<p>
- For any BinaryParser, <code class="computeroutput"><span class="identifier">P</span></code>,
- the following invariants always hold:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li>
-<li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li>
-</ul></div>
-<a name="spirit.qi.reference.parser_concepts.binaryparser.models"></a><h6>
-<a name="id1129061"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.binaryparser.models">Models</a>
- </h6>
-<p>
- <span class="bold"><strong>FIXME</strong></span> Add links to models of BinaryParser
- concept
- </p>
-</div>
-<div class="section" title="NaryParser">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.parser_concepts.naryparser"></a><a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser" title="NaryParser">NaryParser</a>
-</h5></div></div></div>
-<a name="spirit.qi.reference.parser_concepts.naryparser.description"></a><h6>
-<a name="id1129096"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser.description">Description</a>
- </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 <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a> following the Composite
- Design Pattern.
- </p>
-<a name="spirit.qi.reference.parser_concepts.naryparser.refinement_of"></a><h6>
-<a name="id1129132"></a>
- <a class="link" 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>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
-<dd><p>
- A NaryParser.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></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="id1129211"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser.valid_expressions">Valid
- Expressions</a>
- </h6>
-<p>
- In addition to the requirements defined in <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>, 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>
- <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">elements</span></code>
- </p>
- </td>
-<td>
- <p>
- The tuple of elements.
- </p>
- </td>
-<td>
- <p>
- A Fusion
- Sequence of <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.parser" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a> types.
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<a name="spirit.qi.reference.parser_concepts.naryparser.type_expressions"></a><h6>
-<a name="id1129334"></a>
- <a class="link" 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>
- <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">elements_type</span></code>
- </p>
- </td>
-<td>
- <p>
- Elements tuple type.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
- if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
- is a NaryParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
- 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="id1129505"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser.invariants">Invariants</a>
- </h6>
-<p>
- For each element, <code class="computeroutput"><span class="identifier">E</span></code>,
- in any NaryParser, <code class="computeroutput"><span class="identifier">P</span></code>,
- the following invariant always holds:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
-<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
-</li></ul></div>
-<a name="spirit.qi.reference.parser_concepts.naryparser.models"></a><h6>
-<a name="id1129590"></a>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.naryparser.models">Models</a>
- </h6>
-<p>
- <span class="bold"><strong>FIXME</strong></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>
@@ -908,7 +56,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="basics.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="parser_concepts/parser.html"><img src="../../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/binaryparser.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/binaryparser.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,239 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>BinaryParser</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../parser_concepts.html" title="Parser Concepts">
+<link rel="prev" href="unaryparser.html" title="UnaryParser">
+<link rel="next" href="naryparser.html" title="NaryParser">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unaryparser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="naryparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="BinaryParser">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.binaryparser"></a><a class="link" href="binaryparser.html" title="BinaryParser">BinaryParser</a>
+</h5></div></div></div>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.description"></a><h6>
+<a name="id1149569"></a>
+ <a class="link" href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.description">Description</a>
+ </h6>
+<p>
+ <span class="emphasis"><em>BinaryParser</em></span> is a composite parser that has a two
+ subjects, <code class="computeroutput"><span class="identifier">left</span></code> and <code class="computeroutput"><span class="identifier">right</span></code>. The BinaryParser allows its
+ subjects to be treated in the same way as a single instance of a <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ following the Composite Design Pattern.
+ </p>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.refinement_of"></a><h6>
+<a name="id1149621"></a>
+ <a class="link" href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
+<dd><p>
+ A BinaryParser.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></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="id1149700"></a>
+ <a class="link" href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>, 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>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">left</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Left parser.
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">right</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Right parser.
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.type_expressions"></a><h6>
+<a name="id1149861"></a>
+ <a class="link" href="binaryparser.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>
+ <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">left_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The left parser type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">right_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The right parser type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
+ is a BinaryParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1150063"></a>
+ <a class="link" href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.invariants">Invariants</a>
+ </h6>
+<p>
+ For any BinaryParser, <code class="computeroutput"><span class="identifier">P</span></code>,
+ the following invariants always hold:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li>
+<li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li>
+</ul></div>
+<a name="spirit.qi.reference.parser_concepts.binaryparser.models"></a><h6>
+<a name="id1150202"></a>
+ <a class="link" href="binaryparser.html#spirit.qi.reference.parser_concepts.binaryparser.models">Models</a>
+ </h6>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add links to models of BinaryParser
+ concept
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="unaryparser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="naryparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/naryparser.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/naryparser.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,205 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>NaryParser</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../parser_concepts.html" title="Parser Concepts">
+<link rel="prev" href="binaryparser.html" title="BinaryParser">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binaryparser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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" title="NaryParser">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.naryparser"></a><a class="link" href="naryparser.html" title="NaryParser">NaryParser</a>
+</h5></div></div></div>
+<a name="spirit.qi.reference.parser_concepts.naryparser.description"></a><h6>
+<a name="id1150237"></a>
+ <a class="link" href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.description">Description</a>
+ </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 <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a> following the Composite
+ Design Pattern.
+ </p>
+<a name="spirit.qi.reference.parser_concepts.naryparser.refinement_of"></a><h6>
+<a name="id1150273"></a>
+ <a class="link" href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
+<dd><p>
+ A NaryParser.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></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="id1150352"></a>
+ <a class="link" href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>, 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>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">elements</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The tuple of elements.
+ </p>
+ </td>
+<td>
+ <p>
+ A Fusion
+ Sequence of <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a> types.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.naryparser.type_expressions"></a><h6>
+<a name="id1150474"></a>
+ <a class="link" href="naryparser.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>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">elements_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Elements tuple type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
+ is a NaryParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1150646"></a>
+ <a class="link" href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.invariants">Invariants</a>
+ </h6>
+<p>
+ For each element, <code class="computeroutput"><span class="identifier">E</span></code>,
+ in any NaryParser, <code class="computeroutput"><span class="identifier">P</span></code>,
+ the following invariant always holds:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li></ul></div>
+<a name="spirit.qi.reference.parser_concepts.naryparser.models"></a><h6>
+<a name="id1150731"></a>
+ <a class="link" href="naryparser.html#spirit.qi.reference.parser_concepts.naryparser.models">Models</a>
+ </h6>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add links to models of NaryParser
+ concept
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="binaryparser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/parser.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/parser.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,274 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Parser</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../parser_concepts.html" title="Parser Concepts">
+<link rel="prev" href="../parser_concepts.html" title="Parser Concepts">
+<link rel="next" href="primitiveparser.html" title="PrimitiveParser">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../parser_concepts.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="primitiveparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="Parser">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.parser"></a><a class="link" href="parser.html" title="Parser">Parser</a>
+</h5></div></div></div>
+<a name="spirit.qi.reference.parser_concepts.parser.description"></a><h6>
+<a name="id1147840"></a>
+ <a class="link" href="parser.html#spirit.qi.reference.parser_concepts.parser.description">Description</a>
+ </h6>
+<p>
+ The <span class="emphasis"><em>Parser</em></span> is the most fundamental concept. A Parser
+ has a member function, <code class="computeroutput"><span class="identifier">parse</span></code>,
+ that accepts a first-last <code class="computeroutput"><span class="identifier">ForwardIterator</span></code>
+ pair and returns bool as its result. The iterators delimit the data being
+ parsed. The Parser's <code class="computeroutput"><span class="identifier">parse</span></code>
+ member function returns <code class="computeroutput"><span class="keyword">true</span></code>
+ 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" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
+<dd><p>
+ A <code class="computeroutput"><span class="identifier">Parser</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></span></dt>
+<dd><p>
+ A <code class="computeroutput"><span class="identifier">Parser</span></code> type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Iter</span></code></span></dt>
+<dd><p>
+ a <code class="computeroutput"><span class="identifier">ForwardIterator</span></code>
+ type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code>,
+ <code class="computeroutput"><span class="identifier">l</span></code></span></dt>
+<dd><p>
+ <code class="computeroutput"><span class="identifier">ForwardIterator</span></code>.
+ first/last iterator pair.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Context</span></code></span></dt>
+<dd><p>
+ The parser's Context type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">context</span></code></span></dt>
+<dd><p>
+ The parser's Context, or <code class="computeroutput"><span class="identifier">unused</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">skip</span></code></span></dt>
+<dd><p>
+ A skip Parser, or <code class="computeroutput"><span class="identifier">unused</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">attrib</span></code></span></dt>
+<dd><p>
+ A Compatible Attribute, or <code class="computeroutput"><span class="identifier">unused</span></code>.
+ </p></dd>
+</dl>
+</div>
+<a name="spirit.qi.reference.parser_concepts.parser.valid_expressions"></a><h6>
+<a name="id1148103"></a>
+ <a class="link" href="parser.html#spirit.qi.reference.parser_concepts.parser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In the expressions below, the behavior of the parser, <code class="computeroutput"><span class="identifier">p</span></code>,
+ how <code class="computeroutput"><span class="identifier">skip</span></code> and <code class="computeroutput"><span class="identifier">attrib</span></code> are handled by <code class="computeroutput"><span class="identifier">p</span></code>, are left unspecified in the base
+ <code class="computeroutput"><span class="identifier">Parser</span></code> 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 <code class="computeroutput"><span class="identifier">f</span></code>.
+ Return <code class="computeroutput"><span class="keyword">true</span></code> if successful,
+ otherwise return <code class="computeroutput"><span class="keyword">false</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">bool</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Get information about a Parser.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">info</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.parser.type_expressions"></a><h6>
+<a name="id1148370"></a>
+ <a class="link" href="parser.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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The Parser's expected attribute.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
+ is a Parser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1148568"></a>
+ <a class="link" href="parser.html#spirit.qi.reference.parser_concepts.parser.postcondition">Postcondition</a>
+ </h6>
+<p>
+ Upon return from <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">parse</span></code> the following post conditions
+ should hold:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+ On a successful match, <code class="computeroutput"><span class="identifier">f</span></code>
+ is positioned one past the first non-matching character/token.
+ </li>
+<li class="listitem">
+ On a failed match, if a <code class="computeroutput"><span class="identifier">skip</span></code>
+ parser is <code class="computeroutput"><span class="identifier">unused</span></code>,
+ <code class="computeroutput"><span class="identifier">f</span></code> is restored to its
+ original position prior to entry.
+ </li>
+<li class="listitem">
+ On a failed match, if a <code class="computeroutput"><span class="identifier">skip</span></code>
+ parser is not <code class="computeroutput"><span class="identifier">unused</span></code>,
+ <code class="computeroutput"><span class="identifier">f</span></code> is positioned one
+ past the first character/token not matching <code class="computeroutput"><span class="identifier">skip</span></code>.
+ </li>
+<li class="listitem">
+ On a failed match, <code class="computeroutput"><span class="identifier">attrib</span></code>
+ is left untouched.
+ </li>
+<li class="listitem">
+ No post-skips: trailing <code class="computeroutput"><span class="identifier">skip</span></code>
+ characters/tokens will not be skipped.
+ </li>
+</ul></div>
+<a name="spirit.qi.reference.parser_concepts.parser.models"></a><h6>
+<a name="id1148695"></a>
+ <a class="link" href="parser.html#spirit.qi.reference.parser_concepts.parser.models">Models</a>
+ </h6>
+<p>
+ All parsers in Spirit.Qi are models of the <span class="emphasis"><em>Parser</em></span>
+ concept.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../parser_concepts.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="primitiveparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,127 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>PrimitiveParser</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../parser_concepts.html" title="Parser Concepts">
+<link rel="prev" href="parser.html" title="Parser">
+<link rel="next" href="unaryparser.html" title="UnaryParser">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="parser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="unaryparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="PrimitiveParser">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.primitiveparser"></a><a class="link" href="primitiveparser.html" title="PrimitiveParser">PrimitiveParser</a>
+</h5></div></div></div>
+<a name="spirit.qi.reference.parser_concepts.primitiveparser.description"></a><h6>
+<a name="id1148730"></a>
+ <a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.description">Description</a>
+ </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="id1148753"></a>
+ <a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<a name="spirit.qi.reference.parser_concepts.primitiveparser.pre_skip"></a><h6>
+<a name="id1148794"></a>
+ <a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.pre_skip">Pre-skip</a>
+ </h6>
+<p>
+ Upon entry to the <code class="computeroutput"><span class="identifier">parse</span></code>
+ member function, a PrimitiveParser is required to do a pre-skip. Leading
+ <code class="computeroutput"><span class="identifier">skip</span></code> 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 <code class="computeroutput"><span class="identifier">qi</span><span class="special">::</span><span class="identifier">skip_over</span></code>:
+ </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="id1148885"></a>
+ <a class="link" href="primitiveparser.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>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>,
+ is a PrimitiveParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1149022"></a>
+ <a class="link" href="primitiveparser.html#spirit.qi.reference.parser_concepts.primitiveparser.models">Models</a>
+ </h6>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add links to <span class="emphasis"><em>PrimitiveParser</em></span>
+ models here.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="parser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="unaryparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/unaryparser.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/parser_concepts/unaryparser.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,202 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>UnaryParser</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../parser_concepts.html" title="Parser Concepts">
+<link rel="prev" href="primitiveparser.html" title="PrimitiveParser">
+<link rel="next" href="binaryparser.html" title="BinaryParser">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="primitiveparser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="binaryparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="UnaryParser">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.parser_concepts.unaryparser"></a><a class="link" href="unaryparser.html" title="UnaryParser">UnaryParser</a>
+</h5></div></div></div>
+<a name="spirit.qi.reference.parser_concepts.unaryparser.description"></a><h6>
+<a name="id1149063"></a>
+ <a class="link" href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.description">Description</a>
+ </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="id1149088"></a>
+ <a class="link" href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.refinement_of">Refinement
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">p</span></code></span></dt>
+<dd><p>
+ A UnaryParser.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">P</span></code></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="id1149167"></a>
+ <a class="link" href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.valid_expressions">Valid
+ Expressions</a>
+ </h6>
+<p>
+ In addition to the requirements defined in <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>, 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>
+ <code class="computeroutput"><span class="identifier">p</span><span class="special">.</span><span class="identifier">subject</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Subject parser.
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="parser.html" title="Parser"><code class="computeroutput"><span class="identifier">Parser</span></code></a>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<a name="spirit.qi.reference.parser_concepts.unaryparser.type_expressions"></a><h6>
+<a name="id1149281"></a>
+ <a class="link" href="unaryparser.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>
+ <code class="computeroutput"><span class="identifier">P</span><span class="special">::</span><span class="identifier">subject_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The subject parser type.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Metafunction that evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+ if a certain type, <code class="computeroutput"><span class="identifier">P</span></code>
+ is a UnaryParser, <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">false_</span></code>
+ 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="id1149449"></a>
+ <a class="link" href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.invariants">Invariants</a>
+ </h6>
+<p>
+ For any UnaryParser, <code class="computeroutput"><span class="identifier">P</span></code>,
+ the following invariant always holds:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
+<code 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></code> evaluates to <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">true_</span></code>
+</li></ul></div>
+<a name="spirit.qi.reference.parser_concepts.unaryparser.models"></a><h6>
+<a name="id1149535"></a>
+ <a class="link" href="unaryparser.html#spirit.qi.reference.parser_concepts.unaryparser.models">Models</a>
+ </h6>
+<p>
+ <span class="bold"><strong>FIXME</strong></span> Add links to models of UnaryParser
+ concept
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="primitiveparser.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../parser_concepts.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="binaryparser.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -6,8 +6,8 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
<link rel="home" href="../../../index.html" title="Spirit 2.1">
<link rel="up" href="../reference.html" title="Reference">
-<link rel="prev" href="directive.html" title="Directive">
-<link rel="next" href="../../karma.html" title="Karma - Writing Generators">
+<link rel="prev" href="directive/no_case.html" title="no_case">
+<link rel="next" href="string/lit_string.html" title="lit/string">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
@@ -20,966 +20,27 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
<div class="section" title="String">
<div class="titlepage"><div><div><h4 class="title">
<a name="spirit.qi.reference.string"></a><a class="link" href="string.html" title="String">String</a>
</h4></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><h6>
-<a name="id1135448"></a>
+<a name="id1156111"></a>
<a class="link" href="string.html#spirit.qi.reference.string.module_header">Module Header</a>
</h6>
<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" title="lit/string">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.string.lit_string"></a><a class="link" href="string.html#spirit.qi.reference.string.lit_string" title="lit/string">lit/string</a>
-</h5></div></div></div>
-<div class="itemizedlist"><ul class="itemizedlist" type="disc">
-<li class="listitem">
-<code 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></code>: generates a string parser (Same
- as <code 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></code>)
- </li>
-<li class="listitem">
-<code class="computeroutput"><span class="identifier">NS</span><span class="special">::</span><span class="identifier">string</span></code>: generates a string parser
- for the character encoding. <code class="computeroutput"><span class="identifier">NS</span></code>
- is a <a class="link" 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="id1135612"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.lit_string.description">Description</a>
- </h6>
-<p>
- The lit/string parser matches a string of characters. The lit/string
- parser is an implicit lexeme: the <code class="computeroutput"><span class="identifier">skip</span></code>
- parser is not applied in between characters of the string.
- </p>
-<a name="spirit.qi.reference.string.lit_string.header"></a><h6>
-<a name="id1135636"></a>
- <a class="link" href="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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.qi.reference.string.lit_string.model_of"></a><h6>
-<a name="id1135710"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.lit_string.model_of">Model
- of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt>
-<dd><p>
- A literal string, e.g. "Hello", or a pointer/reference
- to a null-terminated array of characters or a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">fs</span></code></span></dt>
-<dd><p>
- A <a class="link" href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy Argument</a>
- that evaluates to a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>
- or a pointer/reference to a null-terminated array of characters.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
-<dd><p>
- A <a class="link" 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="id1135846"></a>
- <a class="link" 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 <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">fs</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>,
- returned by invoking <code class="computeroutput"><span class="identifier">fs</span></code>
- at parse time. See <a class="link" href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
- Argument</a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>,
- returned by invoking <code class="computeroutput"><span class="identifier">fs</span></code>
- at parse time. See <a class="link" href="basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
- Argument</a>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>,
- returned by invoking <code class="computeroutput"><span class="identifier">fs</span></code>
- at parse time. See <a class="link" 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="id1137852"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.lit_string.attributes">Attributes</a>
- </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>
- <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- where <code class="computeroutput"><span class="identifier">T</span></code> is the
- underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">fs</span></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- where <code class="computeroutput"><span class="identifier">T</span></code> is the
- underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- where <code class="computeroutput"><span class="identifier">T</span></code> is the
- underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- <code 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></code>
- where <code class="computeroutput"><span class="identifier">T</span></code> is the
- underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.qi.reference.string.lit_string.complexity"></a><h6>
-<a name="id1138278"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.lit_string.complexity">Complexity</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- O(N)
- </p>
-<p>
- </p>
-</blockquote></div>
-<p>
- where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1138313"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.lit_string.example">Example</a>
- </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 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
- </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" title="symbols">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="spirit.qi.reference.string.symbols"></a><a class="link" href="string.html#spirit.qi.reference.string.symbols" title="symbols">symbols</a>
-</h5></div></div></div>
-<a name="spirit.qi.reference.string.symbols.description"></a><h6>
-<a name="id1139424"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.symbols.description">Description</a>
- </h6>
-<p>
- This class <code class="computeroutput"><span class="identifier">symbols</span></code> implements
- a symbol table: an associative container (or map) of key-value pairs
- where the keys are strings. The <code class="computeroutput"><span class="identifier">symbols</span></code>
- 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="id1139459"></a>
- <a class="link" href="string.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>
-</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 <a class="link" href="../../structure/include.html" title="Include">Include Structure</a>.
- </p>
-<a name="spirit.qi.reference.string.symbols.synopsis"></a><h6>
-<a name="id1139533"></a>
- <a class="link" href="string.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="id1139598"></a>
- <a class="link" 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>
- <code class="computeroutput"><span class="identifier">Char</span></code>
- </p>
- </td>
-<td>
- <p>
- The character type of the symbol strings.
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="keyword">char</span></code>
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">T</span></code>
- </p>
- </td>
-<td>
- <p>
- The data type associated with each symbol.
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">unused_type</span></code>
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.qi.reference.string.symbols.model_of"></a><h6>
-<a name="id1139725"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.symbols.model_of">Model of</a>
- </h6>
-<div class="blockquote"><blockquote class="blockquote">
-<p>
- </p>
-<p>
- <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>
- </p>
-<p>
- </p>
-</blockquote></div>
-<div class="variablelist" title="Notation">
-<p class="title"><b>Notation</b></p>
-<dl>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Sym</span></code></span></dt>
-<dd><p>
- A <code class="computeroutput"><span class="identifier">symbols</span></code> type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">Char</span></code></span></dt>
-<dd><p>
- A character type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">T</span></code></span></dt>
-<dd><p>
- A data type.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">sym</span></code></span></dt>
-<dd><p>
- A <code class="computeroutput"><span class="identifier">symbols</span></code> object.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">sym2</span></code></span></dt>
-<dd><p>
- Another <code class="computeroutput"><span class="identifier">symbols</span></code> object.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">sseq</span></code></span></dt>
-<dd><p>
- An STL container
- of strings.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">dseq</span></code></span></dt>
-<dd><p>
- An STL container
- of data with <code class="computeroutput"><span class="identifier">value_type</span></code>
- <code class="computeroutput"><span class="identifier">T</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code></span></dt>
-<dd><p>
- A literal string, e.g. "Hello", or a pointer/reference
- to a null-terminated array of characters or a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">d1</span></code>...<code class="computeroutput"><span class="identifier">dN</span></code></span></dt>
-<dd><p>
- Objects of type <code class="computeroutput"><span class="identifier">T</span></code>.
- </p></dd>
-<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></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="id1141394"></a>
- <a class="link" 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 <a class="link" href="parser_concepts.html#spirit.qi.reference.parser_concepts.primitiveparser" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>.
- </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>
- <code class="computeroutput"><span class="identifier">Sym</span><span class="special">()</span></code>
- </p>
- </td>
-<td>
- <p>
- Construct an empty symbols.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sym</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Copy construct a symbols from <code class="computeroutput"><span class="identifier">sym2</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sseq</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Construct symbols from <code class="computeroutput"><span class="identifier">sseq</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sseq</span><span class="special">)</span></code>
- </p>
- </td>
-<td>
- <p>
- Construct symbols from <code class="computeroutput"><span class="identifier">sseq</span></code>
- and <code class="computeroutput"><span class="identifier">dseq</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">sym</span> <span class="special">=</span>
- <span class="identifier">sym</span></code>
- </p>
- </td>
-<td>
- <p>
- Assign <code class="computeroutput"><span class="identifier">sym2</span></code> to
- <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Assigns one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) to <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Adds one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) to <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Adds one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) to <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Adds one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) with associated data (<code class="computeroutput"><span class="identifier">d1</span></code>...<code class="computeroutput"><span class="identifier">dN</span></code>)
- to <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Remove one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) from <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Remove one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) from <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">clear</span><span class="special">()</span></code>
- </p>
- </td>
-<td>
- <p>
- Erase all of the symbols in <code class="computeroutput"><span class="identifier">sym</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Returns a reference to the object associated with symbol, <code class="computeroutput"><span class="identifier">s</span></code>. If <code class="computeroutput"><span class="identifier">sym</span></code>
- does not already contain such an object, <code class="computeroutput"><span class="identifier">at</span></code>
- inserts the default object <code class="computeroutput"><span class="identifier">T</span><span class="special">()</span></code>.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- Returns a pointer to the object associated with symbol, <code class="computeroutput"><span class="identifier">s</span></code>. If <code class="computeroutput"><span class="identifier">sym</span></code>
- does not already contain such an object, <code class="computeroutput"><span class="identifier">find</span></code>
- returns a null pointer.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code 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></code>
- </p>
- </td>
-<td>
- <p>
- For each symbol in <code class="computeroutput"><span class="identifier">sym</span></code>,
- <code class="computeroutput"><span class="identifier">s</span></code>, a <code 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></code>
- with associated data, <code class="computeroutput"><span class="identifier">d</span></code>,
- an object of type <code class="computeroutput"><span class="identifier">T</span></code>,
- invoke <code 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></code>.
- </p>
- </td>
-</tr>
-</tbody>
-</table></div>
-<a name="spirit.qi.reference.string.symbols.attributes"></a><h6>
-<a name="id1142458"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.symbols.attributes">Attributes</a>
- </h6>
-<p>
- The attribute of <code 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></code> is <code class="computeroutput"><span class="identifier">T</span></code>.
- </p>
-<a name="spirit.qi.reference.string.symbols.example"></a><h6>
-<a name="id1142509"></a>
- <a class="link" href="string.html#spirit.qi.reference.string.symbols.example">Example</a>
- </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 <a class="link" href="directive.html#spirit.qi.reference.directive.no_case" title="no_case"><code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">no_case</span></code>
- 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>
@@ -992,7 +53,7 @@
</tr></table>
<hr>
<div class="spirit-nav">
-<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>
+<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>
</div>
</body>
</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/string/lit_string.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/string/lit_string.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,452 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>lit/string</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../string.html" title="String">
+<link rel="prev" href="../string.html" title="String">
+<link rel="next" href="symbols.html" title="symbols">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../string.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="symbols.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" title="lit/string">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.string.lit_string"></a><a class="link" href="lit_string.html" title="lit/string">lit/string</a>
+</h5></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" type="disc">
+<li class="listitem">
+<code 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></code>: generates a string parser (Same
+ as <code 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></code>)
+ </li>
+<li class="listitem">
+<code class="computeroutput"><span class="identifier">NS</span><span class="special">::</span><span class="identifier">string</span></code>: generates a string parser
+ for the character encoding. <code class="computeroutput"><span class="identifier">NS</span></code>
+ is a <a class="link" 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="id1156274"></a>
+ <a class="link" href="lit_string.html#spirit.qi.reference.string.lit_string.description">Description</a>
+ </h6>
+<p>
+ The lit/string parser matches a string of characters. The lit/string
+ parser is an implicit lexeme: the <code class="computeroutput"><span class="identifier">skip</span></code>
+ parser is not applied in between characters of the string.
+ </p>
+<a name="spirit.qi.reference.string.lit_string.header"></a><h6>
+<a name="id1156298"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.qi.reference.string.lit_string.model_of"></a><h6>
+<a name="id1156373"></a>
+ <a class="link" href="lit_string.html#spirit.qi.reference.string.lit_string.model_of">Model
+ of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">s</span></code></span></dt>
+<dd><p>
+ A literal string, e.g. "Hello", or a pointer/reference
+ to a null-terminated array of characters or a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">fs</span></code></span></dt>
+<dd><p>
+ A <a class="link" href="../basics.html#spirit.qi.reference.basics.lazy_argument">Lazy Argument</a>
+ that evaluates to a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>
+ or a pointer/reference to a null-terminated array of characters.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">ns</span></code></span></dt>
+<dd><p>
+ A <a class="link" 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="id1156508"></a>
+ <a class="link" href="lit_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 <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fs</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>,
+ returned by invoking <code class="computeroutput"><span class="identifier">fs</span></code>
+ at parse time. See <a class="link" href="../basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
+ Argument</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>,
+ returned by invoking <code class="computeroutput"><span class="identifier">fs</span></code>
+ at parse time. See <a class="link" href="../basics.html#spirit.qi.reference.basics.lazy_argument">Lazy
+ Argument</a>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate a string parser from a string, <code class="computeroutput"><span class="identifier">s</span></code>,
+ returned by invoking <code class="computeroutput"><span class="identifier">fs</span></code>
+ at parse time. See <a class="link" 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="id1157969"></a>
+ <a class="link" href="lit_string.html#spirit.qi.reference.string.lit_string.attributes">Attributes</a>
+ </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>
+ <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">s</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ where <code class="computeroutput"><span class="identifier">T</span></code> is the
+ underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fs</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ where <code class="computeroutput"><span class="identifier">T</span></code> is the
+ underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="identifier">fs</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ where <code class="computeroutput"><span class="identifier">T</span></code> is the
+ underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code 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></code>
+ where <code class="computeroutput"><span class="identifier">T</span></code> is the
+ underlying character type of <code class="computeroutput"><span class="identifier">s</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.string.lit_string.complexity"></a><h6>
+<a name="id1158395"></a>
+ <a class="link" href="lit_string.html#spirit.qi.reference.string.lit_string.complexity">Complexity</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ O(N)
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<p>
+ where <code class="computeroutput"><span class="identifier">N</span></code> 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="id1158429"></a>
+ <a class="link" href="lit_string.html#spirit.qi.reference.string.lit_string.example">Example</a>
+ </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 <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code>
+ </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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../string.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="symbols.html"><img src="../../../../../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: trunk/libs/spirit/doc/html/spirit/qi/reference/string/symbols.html
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/string/symbols.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -0,0 +1,565 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>symbols</title>
+<link rel="stylesheet" href="../../../../../../../../doc/html/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
+<link rel="home" href="../../../../index.html" title="Spirit 2.1">
+<link rel="up" href="../string.html" title="String">
+<link rel="prev" href="lit_string.html" title="lit/string">
+<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>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lit_string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../string.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" title="symbols">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="spirit.qi.reference.string.symbols"></a><a class="link" href="symbols.html" title="symbols">symbols</a>
+</h5></div></div></div>
+<a name="spirit.qi.reference.string.symbols.description"></a><h6>
+<a name="id1159541"></a>
+ <a class="link" href="symbols.html#spirit.qi.reference.string.symbols.description">Description</a>
+ </h6>
+<p>
+ This class <code class="computeroutput"><span class="identifier">symbols</span></code> implements
+ a symbol table: an associative container (or map) of key-value pairs
+ where the keys are strings. The <code class="computeroutput"><span class="identifier">symbols</span></code>
+ 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="id1159575"></a>
+ <a class="link" 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>
+</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 <a class="link" href="../../../structure/include.html" title="Include">Include Structure</a>.
+ </p>
+<a name="spirit.qi.reference.string.symbols.synopsis"></a><h6>
+<a name="id1159650"></a>
+ <a class="link" 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="id1159715"></a>
+ <a class="link" href="symbols.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>
+ <code class="computeroutput"><span class="identifier">Char</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The character type of the symbol strings.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">char</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">T</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The data type associated with each symbol.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">unused_type</span></code>
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.string.symbols.model_of"></a><h6>
+<a name="id1159842"></a>
+ <a class="link" href="symbols.html#spirit.qi.reference.string.symbols.model_of">Model of</a>
+ </h6>
+<div class="blockquote"><blockquote class="blockquote">
+<p>
+ </p>
+<p>
+ <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>
+ </p>
+<p>
+ </p>
+</blockquote></div>
+<div class="variablelist" title="Notation">
+<p class="title"><b>Notation</b></p>
+<dl>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Sym</span></code></span></dt>
+<dd><p>
+ A <code class="computeroutput"><span class="identifier">symbols</span></code> type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Char</span></code></span></dt>
+<dd><p>
+ A character type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">T</span></code></span></dt>
+<dd><p>
+ A data type.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">sym</span></code></span></dt>
+<dd><p>
+ A <code class="computeroutput"><span class="identifier">symbols</span></code> object.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">sym2</span></code></span></dt>
+<dd><p>
+ Another <code class="computeroutput"><span class="identifier">symbols</span></code> object.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">sseq</span></code></span></dt>
+<dd><p>
+ An STL container
+ of strings.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">dseq</span></code></span></dt>
+<dd><p>
+ An STL container
+ of data with <code class="computeroutput"><span class="identifier">value_type</span></code>
+ <code class="computeroutput"><span class="identifier">T</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code></span></dt>
+<dd><p>
+ A literal string, e.g. "Hello", or a pointer/reference
+ to a null-terminated array of characters or a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">d1</span></code>...<code class="computeroutput"><span class="identifier">dN</span></code></span></dt>
+<dd><p>
+ Objects of type <code class="computeroutput"><span class="identifier">T</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">f</span></code></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="id1162056"></a>
+ <a class="link" href="symbols.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 <a class="link" href="../parser_concepts/primitiveparser.html" title="PrimitiveParser"><code class="computeroutput"><span class="identifier">PrimitiveParser</span></code></a>.
+ </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>
+ <code class="computeroutput"><span class="identifier">Sym</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Construct an empty symbols.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sym</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Copy construct a symbols from <code class="computeroutput"><span class="identifier">sym2</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sseq</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Construct symbols from <code class="computeroutput"><span class="identifier">sseq</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Sym</span><span class="special">(</span><span class="identifier">sseq</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Construct symbols from <code class="computeroutput"><span class="identifier">sseq</span></code>
+ and <code class="computeroutput"><span class="identifier">dseq</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">sym</span> <span class="special">=</span>
+ <span class="identifier">sym</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Assign <code class="computeroutput"><span class="identifier">sym2</span></code> to
+ <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Assigns one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) to <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Adds one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) to <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Adds one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) to <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Adds one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) with associated data (<code class="computeroutput"><span class="identifier">d1</span></code>...<code class="computeroutput"><span class="identifier">dN</span></code>)
+ to <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Remove one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) from <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Remove one or more symbols (<code class="computeroutput"><span class="identifier">s1</span></code>...<code class="computeroutput"><span class="identifier">sN</span></code>) from <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">sym</span><span class="special">.</span><span class="identifier">clear</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Erase all of the symbols in <code class="computeroutput"><span class="identifier">sym</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a reference to the object associated with symbol, <code class="computeroutput"><span class="identifier">s</span></code>. If <code class="computeroutput"><span class="identifier">sym</span></code>
+ does not already contain such an object, <code class="computeroutput"><span class="identifier">at</span></code>
+ inserts the default object <code class="computeroutput"><span class="identifier">T</span><span class="special">()</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a pointer to the object associated with symbol, <code class="computeroutput"><span class="identifier">s</span></code>. If <code class="computeroutput"><span class="identifier">sym</span></code>
+ does not already contain such an object, <code class="computeroutput"><span class="identifier">find</span></code>
+ returns a null pointer.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code 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></code>
+ </p>
+ </td>
+<td>
+ <p>
+ For each symbol in <code class="computeroutput"><span class="identifier">sym</span></code>,
+ <code class="computeroutput"><span class="identifier">s</span></code>, a <code 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></code>
+ with associated data, <code class="computeroutput"><span class="identifier">d</span></code>,
+ an object of type <code class="computeroutput"><span class="identifier">T</span></code>,
+ invoke <code 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></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<a name="spirit.qi.reference.string.symbols.attributes"></a><h6>
+<a name="id1163121"></a>
+ <a class="link" href="symbols.html#spirit.qi.reference.string.symbols.attributes">Attributes</a>
+ </h6>
+<p>
+ The attribute of <code 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></code> is <code class="computeroutput"><span class="identifier">T</span></code>.
+ </p>
+<a name="spirit.qi.reference.string.symbols.example"></a><h6>
+<a name="id1163171"></a>
+ <a class="link" href="symbols.html#spirit.qi.reference.string.symbols.example">Example</a>
+ </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 <a class="link" href="../directive/no_case.html" title="no_case"><code class="computeroutput"><span class="identifier">no_case</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></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 <code class="computeroutput"><span class="identifier">no_case</span></code>
+ 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>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2001-2009 Joel
+ de Guzman, Hartmut Kaiser<p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="lit_string.html"><img src="../../../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../string.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/tutorials/employee___parsing_into_structs.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/tutorials/employee___parsing_into_structs.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/tutorials/employee___parsing_into_structs.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -179,7 +179,7 @@
has a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span></code> attribute.
</p>
<a name="spirit.qi.tutorials.employee___parsing_into_structs.lexeme"></a><h6>
-<a name="id1103450"></a>
+<a name="id1124384"></a>
<a class="link" href="employee___parsing_into_structs.html#spirit.qi.tutorials.employee___parsing_into_structs.lexeme">Lexeme</a>
</h6>
<pre class="programlisting"><span class="identifier">lexeme</span><span class="special">[</span><span class="char">'"'</span> <span class="special">>></span> <span class="special">+(</span><span class="identifier">char_</span> <span class="special">-</span> <span class="char">'"'</span><span class="special">)</span> <span class="special">>></span> <span class="char">'"'</span><span class="special">];</span>
@@ -196,7 +196,7 @@
a double quote.
</p>
<a name="spirit.qi.tutorials.employee___parsing_into_structs.difference"></a><h6>
-<a name="id1103563"></a>
+<a name="id1124496"></a>
<a class="link" href="employee___parsing_into_structs.html#spirit.qi.tutorials.employee___parsing_into_structs.difference">Difference</a>
</h6>
<p>
@@ -215,7 +215,7 @@
is just <code class="computeroutput"><span class="keyword">char</span></code>.
</p>
<a name="spirit.qi.tutorials.employee___parsing_into_structs.plus"></a><h6>
-<a name="id1103671"></a>
+<a name="id1124604"></a>
<a class="link" href="employee___parsing_into_structs.html#spirit.qi.tutorials.employee___parsing_into_structs.plus">Plus</a>
</h6>
<pre class="programlisting"><span class="special">+</span><span class="identifier">a</span>
@@ -234,7 +234,7 @@
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">char</span><span class="special">></span>
</pre>
<a name="spirit.qi.tutorials.employee___parsing_into_structs.sequence_attribute"></a><h6>
-<a name="id1103797"></a>
+<a name="id1124730"></a>
<a class="link" href="employee___parsing_into_structs.html#spirit.qi.tutorials.employee___parsing_into_structs.sequence_attribute">Sequence
Attribute</a>
</h6>
@@ -275,7 +275,7 @@
</p></td></tr>
</table></div>
<a name="spirit.qi.tutorials.employee___parsing_into_structs.attribute_collapsing"></a><h6>
-<a name="id1104019"></a>
+<a name="id1124952"></a>
<a class="link" href="employee___parsing_into_structs.html#spirit.qi.tutorials.employee___parsing_into_structs.attribute_collapsing">Attribute
Collapsing</a>
</h6>
@@ -307,7 +307,7 @@
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">char</span><span class="special">></span>
</pre>
<a name="spirit.qi.tutorials.employee___parsing_into_structs.auto_rules"></a><h6>
-<a name="id1104258"></a>
+<a name="id1125191"></a>
<a class="link" href="employee___parsing_into_structs.html#spirit.qi.tutorials.employee___parsing_into_structs.auto_rules">Auto
Rules</a>
</h6>
@@ -345,7 +345,7 @@
directly into the rule's attribute, in-situ.
</p>
<a name="spirit.qi.tutorials.employee___parsing_into_structs.finally"></a><h6>
-<a name="id1104577"></a>
+<a name="id1125510"></a>
<a class="link" href="employee___parsing_into_structs.html#spirit.qi.tutorials.employee___parsing_into_structs.finally">Finally</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___asts_.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___asts_.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___asts_.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -69,7 +69,7 @@
for testing purposes. "4.toyxml" has an error in it.
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.first_cut"></a><h6>
-<a name="id1105639"></a>
+<a name="id1126302"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.first_cut">First Cut</a>
</h6>
<p>
@@ -145,7 +145,7 @@
by the placeholder <code class="computeroutput"><span class="identifier">_val</span></code>).
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.alternates"></a><h6>
-<a name="id1106820"></a>
+<a name="id1127483"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.alternates">Alternates</a>
</h6>
<pre class="programlisting"><span class="identifier">rule</span><span class="special"><</span><span class="identifier">Iterator</span><span class="special">,</span> <span class="identifier">mini_xml_node</span><span class="special">(),</span> <span class="identifier">space_type</span><span class="special">></span> <span class="identifier">node</span><span class="special">;</span>
@@ -175,7 +175,7 @@
<span class="special">;</span>
</pre>
<a name="spirit.qi.tutorials.mini_xml___asts_.not_predicate"></a><h6>
-<a name="id1107148"></a>
+<a name="id1127810"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.not_predicate">Not
Predicate</a>
</h6>
@@ -202,7 +202,7 @@
at this point.
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.inherited_attribute"></a><h6>
-<a name="id1108950"></a>
+<a name="id1129612"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.inherited_attribute">Inherited
Attribute</a>
</h6>
@@ -228,7 +228,7 @@
<code class="computeroutput"><span class="identifier">_r3</span></code>, etc. if you have more).
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.a_lazy_lit"></a><h6>
-<a name="id1109144"></a>
+<a name="id1129807"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.a_lazy_lit">A Lazy
Lit</a>
</h6>
@@ -262,7 +262,7 @@
accessors, provided by Phoenix.
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.how_it_all_works"></a><h6>
-<a name="id1109475"></a>
+<a name="id1130138"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.how_it_all_works">How
it all works</a>
</h6>
@@ -309,7 +309,7 @@
as <code class="computeroutput"><span class="identifier">_r1</span></code>.
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.the_structures"></a><h6>
-<a name="id1109772"></a>
+<a name="id1130434"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.the_structures">The
Structures</a>
</h6>
@@ -342,7 +342,7 @@
<p>
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.of_alternates_and_variants"></a><h6>
-<a name="id1109967"></a>
+<a name="id1130630"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.of_alternates_and_variants">Of
Alternates and Variants</a>
</h6>
@@ -369,7 +369,7 @@
of <code class="computeroutput"><span class="identifier">a</span></code> and <code class="computeroutput"><span class="identifier">B</span></code> is the attribute of <code class="computeroutput"><span class="identifier">b</span></code>.
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.adapting_structs_again"></a><h6>
-<a name="id1110132"></a>
+<a name="id1130794"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.adapting_structs_again">Adapting
structs again</a>
</h6>
@@ -395,7 +395,7 @@
<p>
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.one_more_take"></a><h6>
-<a name="id1110272"></a>
+<a name="id1130935"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.one_more_take">One
More Take</a>
</h6>
@@ -464,7 +464,7 @@
in the <code class="computeroutput"><span class="identifier">xml</span></code> rule:
</p>
<a name="spirit.qi.tutorials.mini_xml___asts_.local_variables"></a><h6>
-<a name="id1111734"></a>
+<a name="id1132397"></a>
<a class="link" href="mini_xml___asts_.html#spirit.qi.tutorials.mini_xml___asts_.local_variables">Local
Variables</a>
</h6>
Modified: trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___error_handling.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___error_handling.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/tutorials/mini_xml___error_handling.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -44,7 +44,7 @@
What's new?
</p>
<a name="spirit.qi.tutorials.mini_xml___error_handling.readable_names"></a><h6>
-<a name="id1112039"></a>
+<a name="id1132702"></a>
<a class="link" href="mini_xml___error_handling.html#spirit.qi.tutorials.mini_xml___error_handling.readable_names">Readable
Names</a>
</h6>
@@ -63,7 +63,7 @@
<span class="identifier">end_tag</span><span class="special">.</span><span class="identifier">name</span><span class="special">(</span><span class="string">"end_tag"</span><span class="special">);</span>
</pre>
<a name="spirit.qi.tutorials.mini_xml___error_handling.on_error"></a><h6>
-<a name="id1112219"></a>
+<a name="id1132882"></a>
<a class="link" href="mini_xml___error_handling.html#spirit.qi.tutorials.mini_xml___error_handling.on_error">On
Error</a>
</h6>
@@ -241,7 +241,7 @@
</tbody>
</table></div>
<a name="spirit.qi.tutorials.mini_xml___error_handling.expectation_points"></a><h6>
-<a name="id1112728"></a>
+<a name="id1133391"></a>
<a class="link" href="mini_xml___error_handling.html#spirit.qi.tutorials.mini_xml___error_handling.expectation_points">Expectation
Points</a>
</h6>
Modified: trunk/libs/spirit/doc/html/spirit/qi/tutorials/quick_start.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/tutorials/quick_start.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/tutorials/quick_start.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -27,7 +27,7 @@
<a name="spirit.qi.tutorials.quick_start"></a><a class="link" href="quick_start.html" title="Quick Start">Quick Start</a>
</h4></div></div></div>
<a name="spirit.qi.tutorials.quick_start.why_would_you_want_to_use_spirit_qi_"></a><h6>
-<a name="id1090349"></a>
+<a name="id1110965"></a>
<a class="link" href="quick_start.html#spirit.qi.tutorials.quick_start.why_would_you_want_to_use_spirit_qi_">Why
would you want to use Spirit.Qi?</a>
</h6>
Modified: trunk/libs/spirit/doc/html/spirit/qi/tutorials/roman_numerals.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/tutorials/roman_numerals.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/tutorials/roman_numerals.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -41,7 +41,7 @@
</li>
</ul></div>
<a name="spirit.qi.tutorials.roman_numerals.symbol_table"></a><h6>
-<a name="id1098163"></a>
+<a name="id1118271"></a>
<a class="link" href="roman_numerals.html#spirit.qi.tutorials.roman_numerals.symbol_table">Symbol
Table</a>
</h6>
@@ -173,7 +173,7 @@
They are all parsers.
</p>
<a name="spirit.qi.tutorials.roman_numerals.rules"></a><h6>
-<a name="id1099480"></a>
+<a name="id1120429"></a>
<a class="link" href="roman_numerals.html#spirit.qi.tutorials.roman_numerals.rules">Rules</a>
</h6>
<p>
@@ -253,7 +253,7 @@
<pre class="programlisting"><span class="identifier">r</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>
</pre>
<a name="spirit.qi.tutorials.roman_numerals.grammars"></a><h6>
-<a name="id1099873"></a>
+<a name="id1120821"></a>
<a class="link" href="roman_numerals.html#spirit.qi.tutorials.roman_numerals.grammars">Grammars</a>
</h6>
<p>
@@ -358,7 +358,7 @@
</li>
</ul></div>
<a name="spirit.qi.tutorials.roman_numerals.let_s_parse_"></a><h6>
-<a name="id1100600"></a>
+<a name="id1121548"></a>
<a class="link" href="roman_numerals.html#spirit.qi.tutorials.roman_numerals.let_s_parse_">Let's Parse!</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/tutorials/semantic_actions.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/tutorials/semantic_actions.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/tutorials/semantic_actions.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -233,7 +233,7 @@
The examples above can be found here: ../../example/qi/actions.cpp
</p>
<a name="spirit.qi.tutorials.semantic_actions.phoenix"></a><h6>
-<a name="id1093632"></a>
+<a name="id1114544"></a>
<a class="link" href="semantic_actions.html#spirit.qi.tutorials.semantic_actions.phoenix">Phoenix</a>
</h6>
<p>
Modified: trunk/libs/spirit/doc/html/spirit/qi/tutorials/warming_up.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/tutorials/warming_up.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/tutorials/warming_up.html 2009-08-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -31,7 +31,7 @@
on how to build parsers from the simplest parser, building up as we go.
</p>
<a name="spirit.qi.tutorials.warming_up.trivial_example__1_parsing_a_number"></a><h6>
-<a name="id1090394"></a>
+<a name="id1111010"></a>
<a class="link" href="warming_up.html#spirit.qi.tutorials.warming_up.trivial_example__1_parsing_a_number">Trivial
Example #1 Parsing a number</a>
</h6>
@@ -46,7 +46,7 @@
parsers and consistent naming conventions help you keep from going insane!
</p>
<a name="spirit.qi.tutorials.warming_up.trivial_example__2_parsing_two_numbers"></a><h6>
-<a name="id1090423"></a>
+<a name="id1111039"></a>
<a class="link" href="warming_up.html#spirit.qi.tutorials.warming_up.trivial_example__2_parsing_two_numbers">Trivial
Example #2 Parsing two numbers</a>
</h6>
@@ -79,7 +79,7 @@
</p></td></tr>
</table></div>
<a name="spirit.qi.tutorials.warming_up.trivial_example__3_parsing_one_or_more_numbers"></a><h6>
-<a name="id1090484"></a>
+<a name="id1111100"></a>
<a class="link" href="warming_up.html#spirit.qi.tutorials.warming_up.trivial_example__3_parsing_one_or_more_numbers">Trivial
Example #3 Parsing one or more numbers</a>
</h6>
@@ -103,7 +103,7 @@
in most places.
</p>
<a name="spirit.qi.tutorials.warming_up.trivial_example__4_parsing_a_comma_delimited_list_of_numbers"></a><h6>
-<a name="id1090529"></a>
+<a name="id1111145"></a>
<a class="link" href="warming_up.html#spirit.qi.tutorials.warming_up.trivial_example__4_parsing_a_comma_delimited_list_of_numbers">Trivial
Example #4 Parsing a comma-delimited list of numbers</a>
</h6>
@@ -126,7 +126,7 @@
star encloses the complete expression above.
</p>
<a name="spirit.qi.tutorials.warming_up.let_s_parse_"></a><h6>
-<a name="id1090660"></a>
+<a name="id1111276"></a>
<a class="link" href="warming_up.html#spirit.qi.tutorials.warming_up.let_s_parse_">Let's Parse!</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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -61,7 +61,7 @@
iterator was created.
</p>
<a name="spirit.support.multi_pass.using_the_multi_pass"></a><h5>
-<a name="id1279611"></a>
+<a name="id1300514"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.using_the_multi_pass">Using the
multi_pass</a>
</h5>
@@ -209,7 +209,7 @@
<p>
</p>
<a name="spirit.support.multi_pass.using_the_flush_multi_pass_parser"></a><h5>
-<a name="id1280953"></a>
+<a name="id1302017"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.using_the_flush_multi_pass_parser">Using
the flush_multi_pass parser</a>
</h5>
@@ -231,7 +231,7 @@
thrown.
</p>
<a name="spirit.support.multi_pass.the_multi_pass_policies"></a><h5>
-<a name="id1281047"></a>
+<a name="id1302110"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.the_multi_pass_policies">The multi_pass
Policies</a>
</h5>
@@ -272,7 +272,7 @@
the functionality groups:
</p>
<div class="table">
-<a name="id1281152"></a><p class="title"><b>Table 13. Policies needed for default_policy template</b></p>
+<a name="id1302216"></a><p class="title"><b>Table 13. Policies needed for default_policy template</b></p>
<div class="table-contents"><table class="table" summary="Policies needed for default_policy template">
<colgroup>
<col>
@@ -355,7 +355,7 @@
implementations.
</p>
<a name="spirit.support.multi_pass.predefined_policies"></a><h5>
-<a name="id1281344"></a>
+<a name="id1302408"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.predefined_policies">Predefined
policies</a>
</h5>
@@ -364,7 +364,7 @@
policies are defined in the namespace <code 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></code>.
</p>
<div class="table">
-<a name="id1281386"></a><p class="title"><b>Table 14. Predefined policy classes</b></p>
+<a name="id1302450"></a><p class="title"><b>Table 14. Predefined policy classes</b></p>
<div class="table-contents"><table class="table" summary="Predefined policy classes">
<colgroup>
<col>
@@ -601,7 +601,7 @@
</table></div>
</div>
<br class="table-break"><a name="spirit.support.multi_pass.combinations__how_to_specify_your_own_custom_multi_pass"></a><h5>
-<a name="id1283376"></a>
+<a name="id1304976"></a>
<a class="link" 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>
</h5>
@@ -647,7 +647,7 @@
behaviors while wrapping an <code 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></code>.
</p>
<a name="spirit.support.multi_pass.dealing_with_constant_look_ahead"></a><h5>
-<a name="id1283798"></a>
+<a name="id1305399"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.dealing_with_constant_look_ahead">Dealing
with constant look ahead</a>
</h5>
@@ -666,7 +666,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><h5>
-<a name="id1283930"></a>
+<a name="id1305531"></a>
<a class="link" 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 <code class="computeroutput"><span class="identifier">functor_input</span></code>
InputPolicy</a>
@@ -725,7 +725,7 @@
<span class="special">}</span>
</pre>
<a name="spirit.support.multi_pass.how_to_write_policies_for_use_with_multi_pass"></a><h5>
-<a name="id1284517"></a>
+<a name="id1306117"></a>
<a class="link" 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>
</h5>
@@ -742,7 +742,7 @@
copies of a particular <code class="computeroutput"><span class="identifier">multi_pass</span></code>.
</p>
<a name="spirit.support.multi_pass.inputpolicy"></a><h5>
-<a name="id1284591"></a>
+<a name="id1306192"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.inputpolicy">InputPolicy</a>
</h5>
<p>
@@ -838,7 +838,7 @@
constructor of <code class="computeroutput"><span class="identifier">shared</span></code>.
</p>
<a name="spirit.support.multi_pass.ownershippolicy"></a><h5>
-<a name="id1286091"></a>
+<a name="id1307072"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.ownershippolicy">OwnershipPolicy</a>
</h5>
<p>
@@ -905,7 +905,7 @@
constructor of <code class="computeroutput"><span class="identifier">shared</span></code>.
</p>
<a name="spirit.support.multi_pass.checkingpolicy"></a><h5>
-<a name="id1286625"></a>
+<a name="id1307606"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.checkingpolicy">CheckingPolicy</a>
</h5>
<p>
@@ -964,7 +964,7 @@
constructor of <code class="computeroutput"><span class="identifier">shared</span></code>.
</p>
<a name="spirit.support.multi_pass.storagepolicy"></a><h5>
-<a name="id1287076"></a>
+<a name="id1308057"></a>
<a class="link" href="multi_pass.html#spirit.support.multi_pass.storagepolicy">StoragePolicy</a>
</h5>
<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-23 22:07:18 EDT (Sun, 23 Aug 2009)
@@ -27,7 +27,7 @@
<a name="spirit.what_s_new"></a><a class="link" href="what_s_new.html" title="What's New">What's New</a>
</h2></div></div></div>
<a name="spirit.what_s_new.spirit_classic"></a><h4>
-<a name="id1080254"></a>
+<a name="id1101182"></a>
<a class="link" href="what_s_new.html#spirit.what_s_new.spirit_classic">Spirit Classic</a>
</h4>
<p>
@@ -66,11 +66,11 @@
for existing applications.
</p>
<a name="spirit.what_s_new.spirit_v2_1"></a><h4>
-<a name="id1080445"></a>
+<a name="id1101372"></a>
<a class="link" href="what_s_new.html#spirit.what_s_new.spirit_v2_1">Spirit V2.1</a>
</h4>
<a name="spirit.what_s_new.what_s_changed_in__emphasis_spirit_qi__emphasis__and__emphasis_spirit_karma__emphasis__from_v2_0__boost_v1_37_0__to_2_x__boost_v1_41_0_"></a><h4>
-<a name="id1080458"></a>
+<a name="id1101386"></a>
<a class="link" href="what_s_new.html#spirit.what_s_new.what_s_changed_in__emphasis_spirit_qi__emphasis__and__emphasis_spirit_karma__emphasis__from_v2_0__boost_v1_37_0__to_2_x__boost_v1_41_0_">What's
changed in <span class="emphasis"><em>Spirit.Qi</em></span> and <span class="emphasis"><em>Spirit.Karma</em></span>
from V2.0 (Boost V1.37.0) to 2.x (Boost V1.41.0)</a>
@@ -152,11 +152,11 @@
</li>
<li class="listitem">
Added <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">omit</span><span class="special">[]</span></code>
- directive (see <a class="link" href="karma/reference/directive.html#spirit.karma.reference.directive.omit" title="Consume Attribute (omit[])"><code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>)
+ directive (see <a class="link" href="karma/reference/directive/omit.html" title="Consume Attribute (omit[])"><code class="computeroutput"><span class="identifier">omit</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>)
</li>
<li class="listitem">
Added <code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">buffer</span><span class="special">[]</span></code>
- directive (see <a class="link" href="karma/reference/directive.html#spirit.karma.reference.directive.buffer" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>)
+ directive (see <a class="link" href="karma/reference/directive/buffer.html" title="Temporary Output Buffering (buffer[])"><code class="computeroutput"><span class="identifier">buffer</span><span class="special">[</span><span class="identifier">a</span><span class="special">]</span></code></a>)
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">delimit</span><span class="special">[]</span></code>
@@ -172,7 +172,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 class="link" href="karma/reference/numeric.html#spirit.karma.reference.numeric.signed_int" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">int_</span></code></a>.
+ <a class="link" href="karma/reference/numeric/signed_int.html" title="Signed Integer Number Generators"><code class="computeroutput"><span class="identifier">int_</span></code></a>.
</li>
<li class="listitem">
<code class="computeroutput"><span class="identifier">karma</span><span class="special">::</span><span class="identifier">lit</span><span class="special">()</span></code> can
@@ -189,7 +189,7 @@
</li>
</ul></div>
<a name="spirit.what_s_new.what_s_changed_in__emphasis_spirit_lex__emphasis__from_v2_0__boost_v1_37_0__to_2_x__boost_v1_41_0_"></a><h4>
-<a name="id1084886"></a>
+<a name="id1105502"></a>
<a class="link" href="what_s_new.html#spirit.what_s_new.what_s_changed_in__emphasis_spirit_lex__emphasis__from_v2_0__boost_v1_37_0__to_2_x__boost_v1_41_0_">What's
changed in <span class="emphasis"><em>Spirit.Lex</em></span> from V2.0 (Boost V1.37.0) to 2.x
(Boost V1.41.0)</a>
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