diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /libs/spirit/repository | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'libs/spirit/repository')
28 files changed, 385 insertions, 242 deletions
diff --git a/libs/spirit/repository/doc/html/index.html b/libs/spirit/repository/doc/html/index.html index 693ce1fce0..476cd550e3 100644 --- a/libs/spirit/repository/doc/html/index.html +++ b/libs/spirit/repository/doc/html/index.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Spirit Repository 0.2</title> <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="index.html" title="Spirit Repository 0.2"> <link rel="next" href="spirit_repository/preface.html" title="Preface"> </head> @@ -43,7 +43,7 @@ </div> <div class="toc"> <p><b>Table of Contents</b></p> -<dl> +<dl class="toc"> <dt><span class="section"><a href="spirit_repository/preface.html">Preface</a></span></dt> <dt><span class="section"><a href="spirit_repository/what_s_new.html">What's New</a></span></dt> <dd><dl><dt><span class="section"><a href="spirit_repository/what_s_new/spirit_2_5_1.html">Spirit V2.5.1</a></span></dt></dl></dd> @@ -94,7 +94,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 15, 2012 at 23:36:26 GMT</small></p></td> +<td align="left"><p><small>Last revised: October 30, 2014 at 10:13:43 GMT</small></p></td> <td align="right"><div class="copyright-footer"></div></td> </tr></table> <hr> diff --git a/libs/spirit/repository/doc/html/spirit_repository/acknowledgments.html b/libs/spirit/repository/doc/html/spirit_repository/acknowledgments.html index 7ad03b36bc..2f7f3cb904 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/acknowledgments.html +++ b/libs/spirit/repository/doc/html/spirit_repository/acknowledgments.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Acknowledgments</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../index.html" title="Spirit Repository 0.2"> <link rel="prev" href="karma_components/nonterminal/subrule.html" title="Karma subrules"> diff --git a/libs/spirit/repository/doc/html/spirit_repository/karma_components.html b/libs/spirit/repository/doc/html/spirit_repository/karma_components.html index 5b1a65c7d6..c66f95146c 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/karma_components.html +++ b/libs/spirit/repository/doc/html/spirit_repository/karma_components.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Karma Components</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../index.html" title="Spirit Repository 0.2"> <link rel="prev" href="qi_components/operators/keyword_list.html" title="Keyword List Operator"> @@ -26,7 +26,7 @@ <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="spirit_repository.karma_components"></a><a class="link" href="karma_components.html" title="Karma Components">Karma Components</a> </h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="karma_components/directives.html">Karma Generator Directives</a></span></dt> <dd><dl><dt><span class="section"><a href="karma_components/directives/karma_confix_generator.html">Karma diff --git a/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html b/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html index 13d5e5f879..45a4a67112 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html +++ b/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Karma Generator Directives</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../karma_components.html" title="Karma Components"> <link rel="prev" href="../karma_components.html" title="Karma Components"> @@ -27,7 +27,7 @@ <a name="spirit_repository.karma_components.directives"></a><a class="link" href="directives.html" title="Karma Generator Directives">Karma Generator Directives</a> </h3></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="directives/karma_confix_generator.html">Karma +<div class="toc"><dl class="toc"><dt><span class="section"><a href="directives/karma_confix_generator.html">Karma Confix Generator</a></span></dt></dl></div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> diff --git a/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html b/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html index 82c20de684..b5149d7ac0 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html +++ b/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Karma Confix Generator</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../directives.html" title="Karma Generator Directives"> <link rel="prev" href="../directives.html" title="Karma Generator Directives"> @@ -29,7 +29,7 @@ </h4></div></div></div> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h0"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.description"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.description">Description</a> + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.description"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.description">Description</a> </h6> <p> The <span class="emphasis"><em>Spirit.Karma</em></span> <code class="computeroutput"><span class="identifier">confix</span></code> @@ -94,20 +94,20 @@ </p> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h1"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.header"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.header">Header</a> + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.header"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/karma/directive/confix.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h2"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.synopsis"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.synopsis">Synopsis</a> + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.synopsis"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.synopsis">Synopsis</a> </h6> <pre class="programlisting"><span class="identifier">confix</span><span class="special">(</span><span class="identifier">prefix</span><span class="special">,</span> <span class="identifier">suffix</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span> </pre> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h3"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.parameters"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.parameters">Parameters</a> + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.parameters"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.parameters">Parameters</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -176,7 +176,7 @@ </p> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h4"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.attribute"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.attribute">Attribute</a> + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.attribute"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.attribute">Attribute</a> </h6> <p> The <code class="computeroutput"><span class="identifier">confix</span></code> component exposes @@ -203,7 +203,7 @@ </table></div> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h5"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.example"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.example">Example</a> + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.example"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.example">Example</a> </h6> <p> The following example shows simple use cases of the <code class="computeroutput"><span class="identifier">confix</span></code> @@ -212,7 +212,7 @@ </p> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h6"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.prerequisites"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.prerequisites">Prerequisites</a> + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.prerequisites"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.prerequisites">Prerequisites</a> </h6> <p> In addition to the main header file needed to include the core components @@ -240,7 +240,7 @@ </p> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h7"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles">Generating + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles">Generating Different Comment Styles</a> </h6> <p> @@ -282,7 +282,7 @@ </p> <h6> <a name="spirit_repository.karma_components.directives.karma_confix_generator.h8"></a> - <span><a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype">Generating + <span class="phrase"><a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype"></a></span><a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype">Generating a Function Prototype</a> </h6> <p> diff --git a/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html b/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html index 511203a5cb..b6777cbaaa 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html +++ b/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Karma Generator Non-terminals</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../karma_components.html" title="Karma Components"> <link rel="prev" href="directives/karma_confix_generator.html" title="Karma Confix Generator"> @@ -27,7 +27,7 @@ <a name="spirit_repository.karma_components.nonterminal"></a><a class="link" href="nonterminal.html" title="Karma Generator Non-terminals">Karma Generator Non-terminals</a> </h3></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="nonterminal/subrule.html">Karma +<div class="toc"><dl class="toc"><dt><span class="section"><a href="nonterminal/subrule.html">Karma subrules</a></span></dt></dl></div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> diff --git a/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html b/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html index bf90b32d11..0f66f7602d 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html +++ b/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Karma subrules</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../nonterminal.html" title="Karma Generator Non-terminals"> <link rel="prev" href="../nonterminal.html" title="Karma Generator Non-terminals"> @@ -29,7 +29,7 @@ </h4></div></div></div> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h0"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.description"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.description">Description</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.description"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.description">Description</a> </h6> <p> The <span class="emphasis"><em>Spirit.Karma</em></span> <code class="computeroutput"><span class="identifier">subrule</span></code> @@ -48,7 +48,7 @@ <p> The weaknesses of subrules are: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> subrules can only be defined and used within the same generator expression. A subrule cannot be defined at one location, and then used in another @@ -86,21 +86,21 @@ </p> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h1"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.header"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.header">Header</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.header"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/karma/nonterminal/subrule.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h2"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_">Synopsis + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_">Synopsis (declaration)</a> </h6> <pre class="programlisting"><span class="identifier">subrule</span><span class="special"><</span><span class="identifier">ID</span><span class="special">,</span> <span class="identifier">A1</span><span class="special">,</span> <span class="identifier">A2</span><span class="special">></span> <span class="identifier">sr</span><span class="special">(</span><span class="identifier">name</span><span class="special">);</span> </pre> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h3"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_">Parameters + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_">Parameters (declaration)</a> </h6> <div class="informaltable"><table class="table"> @@ -170,7 +170,7 @@ </table></div> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h4"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_">Synopsis + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_">Synopsis (usage)</a> </h6> <p> @@ -199,7 +199,7 @@ </pre> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h5"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.parameters__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__usage_">Parameters + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.parameters__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__usage_">Parameters (usage)</a> </h6> <div class="informaltable"><table class="table"> @@ -323,7 +323,7 @@ </table></div> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h6"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.groups"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.groups">Groups</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.groups"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.groups">Groups</a> </h6> <p> A subrule group (a set of subrule definitions) is a generator, which can @@ -368,13 +368,13 @@ </pre> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h7"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.attributes"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.attributes">Attributes</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.attributes"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.attributes">Attributes</a> </h6> <p> A subrule has the same behavior as a rule with respect to attributes. In particular: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> the type of its synthesized attribute is the one specified in the subrule's signature, if any. Otherwise it is <code class="computeroutput"><span class="identifier">unused_type</span></code>. @@ -397,7 +397,7 @@ </ul></div> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h8"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.locals"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.locals">Locals</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.locals"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.locals">Locals</a> </h6> <p> A subrule has the same behavior as a rule with respect to locals. In particular, @@ -407,7 +407,7 @@ </p> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h9"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.example"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.example">Example</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.example"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.example">Example</a> </h6> <p> Some includes: @@ -470,7 +470,7 @@ </p> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h10"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.performance"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.performance">Performance</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.performance"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.performance">Performance</a> </h6> <p> For comparison of run-time and compile-time performance when using subrules, @@ -481,7 +481,7 @@ </p> <h6> <a name="spirit_repository.karma_components.nonterminal.subrule.h11"></a> - <span><a name="spirit_repository.karma_components.nonterminal.subrule.notes"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.notes">Notes</a> + <span class="phrase"><a name="spirit_repository.karma_components.nonterminal.subrule.notes"></a></span><a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.notes">Notes</a> </h6> <p> Subrules push the C++ compiler hard. A group of subrules is a single C++ diff --git a/libs/spirit/repository/doc/html/spirit_repository/preface.html b/libs/spirit/repository/doc/html/spirit_repository/preface.html index beaa62b504..07b2051761 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/preface.html +++ b/libs/spirit/repository/doc/html/spirit_repository/preface.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Preface</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../index.html" title="Spirit Repository 0.2"> <link rel="prev" href="../index.html" title="Spirit Repository 0.2"> @@ -28,7 +28,7 @@ </h2></div></div></div> <h4> <a name="spirit_repository.preface.h0"></a> - <span><a name="spirit_repository.preface.the_spirit_repository"></a></span><a class="link" href="preface.html#spirit_repository.preface.the_spirit_repository">The + <span class="phrase"><a name="spirit_repository.preface.the_spirit_repository"></a></span><a class="link" href="preface.html#spirit_repository.preface.the_spirit_repository">The Spirit Repository</a> </h4> <p> @@ -78,7 +78,7 @@ </p> <h4> <a name="spirit_repository.preface.h1"></a> - <span><a name="spirit_repository.preface.how_to_use_this_manual"></a></span><a class="link" href="preface.html#spirit_repository.preface.how_to_use_this_manual">How + <span class="phrase"><a name="spirit_repository.preface.how_to_use_this_manual"></a></span><a class="link" href="preface.html#spirit_repository.preface.how_to_use_this_manual">How to use this manual</a> </h4> <p> @@ -209,7 +209,7 @@ </p> <h4> <a name="spirit_repository.preface.h2"></a> - <span><a name="spirit_repository.preface.support"></a></span><a class="link" href="preface.html#spirit_repository.preface.support">Support</a> + <span class="phrase"><a name="spirit_repository.preface.support"></a></span><a class="link" href="preface.html#spirit_repository.preface.support">Support</a> </h4> <p> Please direct all questions to Spirit's mailing list. You can subscribe to diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components.html index bcd1bc9f59..9a9c644b69 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Components</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../index.html" title="Spirit Repository 0.2"> <link rel="prev" href="what_s_new/spirit_2_5_1.html" title="Spirit V2.5.1"> @@ -26,7 +26,7 @@ <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="spirit_repository.qi_components"></a><a class="link" href="qi_components.html" title="Qi Components">Qi Components</a> </h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="qi_components/primitive.html">Qi Parser Primitives</a></span></dt> <dd><dl> diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html index d82fbc5de0..7afbd0af8b 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Parser Directives</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../qi_components.html" title="Qi Components"> <link rel="prev" href="primitive/flush_multi_pass.html" title="Qi flush_multi_pass parser"> @@ -27,7 +27,7 @@ <a name="spirit_repository.qi_components.directives"></a><a class="link" href="directives.html" title="Qi Parser Directives">Qi Parser Directives</a> </h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="directives/confix.html">Qi Confix Parser Directive</a></span></dt> <dt><span class="section"><a href="directives/distinct.html">Qi diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html index 7eb65dd5e1..89df633cd0 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Confix Parser Directive</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../directives.html" title="Qi Parser Directives"> <link rel="prev" href="../directives.html" title="Qi Parser Directives"> @@ -29,7 +29,7 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.directives.confix.h0"></a> - <span><a name="spirit_repository.qi_components.directives.confix.description"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.description"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.description">Description</a> </h6> <p> The <span class="emphasis"><em>Spirit.Qi</em></span> <code class="computeroutput"><span class="identifier">confix</span></code> @@ -96,20 +96,20 @@ </table></div> <h6> <a name="spirit_repository.qi_components.directives.confix.h1"></a> - <span><a name="spirit_repository.qi_components.directives.confix.header"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.header"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/directive/confix.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.qi_components.directives.confix.h2"></a> - <span><a name="spirit_repository.qi_components.directives.confix.synopsis"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.synopsis">Synopsis</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.synopsis"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.synopsis">Synopsis</a> </h6> <pre class="programlisting"><span class="identifier">confix</span><span class="special">(</span><span class="identifier">prefix</span><span class="special">,</span> <span class="identifier">suffix</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span> </pre> <h6> <a name="spirit_repository.qi_components.directives.confix.h3"></a> - <span><a name="spirit_repository.qi_components.directives.confix.parameters"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parameters">Parameters</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.parameters"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parameters">Parameters</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -173,7 +173,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.confix.h4"></a> - <span><a name="spirit_repository.qi_components.directives.confix.attribute"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.attribute">Attribute</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.attribute"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.attribute">Attribute</a> </h6> <p> The <code class="computeroutput"><span class="identifier">confix</span></code> directive exposes @@ -199,7 +199,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.directives.confix.h5"></a> - <span><a name="spirit_repository.qi_components.directives.confix.example"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.example"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.example">Example</a> </h6> <p> The following example shows simple use cases of the <code class="computeroutput"><span class="identifier">confix</span></code> @@ -209,7 +209,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.confix.h6"></a> - <span><a name="spirit_repository.qi_components.directives.confix.prerequisites"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.prerequisites">Prerequisites</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.prerequisites"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.prerequisites">Prerequisites</a> </h6> <p> In addition to the main header file needed to include the core components @@ -242,7 +242,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.confix.h7"></a> - <span><a name="spirit_repository.qi_components.directives.confix.parsing_different_comment_styles"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_different_comment_styles">Parsing + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.parsing_different_comment_styles"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_different_comment_styles">Parsing Different Comment Styles</a> </h6> <p> @@ -292,7 +292,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.confix.h8"></a> - <span><a name="spirit_repository.qi_components.directives.confix.parsing_tagged_data"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_tagged_data">Parsing + <span class="phrase"><a name="spirit_repository.qi_components.directives.confix.parsing_tagged_data"></a></span><a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_tagged_data">Parsing Tagged Data</a> </h6> <p> diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html index d79269f778..c378782563 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Distinct Parser Directive</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../directives.html" title="Qi Parser Directives"> <link rel="prev" href="confix.html" title="Qi Confix Parser Directive"> @@ -29,7 +29,7 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.directives.distinct.h0"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.description"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.description"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.description">Description</a> </h6> <p> The <span class="emphasis"><em>Spirit.Qi</em></span> <code class="computeroutput"><span class="identifier">distinct</span></code> @@ -140,20 +140,20 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.distinct.h1"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.header"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.header"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/directive/distinct.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_distinct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.qi_components.directives.distinct.h2"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.synopsis"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.synopsis">Synopsis</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.synopsis"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.synopsis">Synopsis</a> </h6> <pre class="programlisting"><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">tail</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span> </pre> <h6> <a name="spirit_repository.qi_components.directives.distinct.h3"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.parameters"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.parameters">Parameters</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.parameters"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.parameters">Parameters</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -206,7 +206,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.distinct.h4"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.attribute"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.attribute">Attribute</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.attribute"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.attribute">Attribute</a> </h6> <p> The <code class="computeroutput"><span class="identifier">distinct</span></code> component @@ -220,7 +220,7 @@ </pre> <h6> <a name="spirit_repository.qi_components.directives.distinct.h5"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.example"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.example"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.example">Example</a> </h6> <p> The following example shows simple use cases of the <code class="computeroutput"><span class="identifier">distinct</span></code> @@ -228,7 +228,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.distinct.h6"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.prerequisites"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.prerequisites">Prerequisites</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.prerequisites"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.prerequisites">Prerequisites</a> </h6> <p> In addition to the main header file needed to include the core components @@ -255,7 +255,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.distinct.h7"></a> - <span><a name="spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords">Using + <span class="phrase"><a name="spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords"></a></span><a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords">Using The Distinct Directive to Match keywords</a> </h6> <p> diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/kwd.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/kwd.html index 16224739f7..6ee3c14696 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/kwd.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/kwd.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Keyword Parser Directive</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../directives.html" title="Qi Parser Directives"> <link rel="prev" href="distinct.html" title="Qi Distinct Parser Directive"> @@ -29,11 +29,13 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.directives.kwd.h0"></a> - <span><a name="spirit_repository.qi_components.directives.kwd.description"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.kwd.description"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.description">Description</a> </h6> <p> - The <code class="computeroutput"><span class="identifier">kwd</span><span class="special">[]</span></code> - and <code class="computeroutput"><span class="identifier">ikwd</span><span class="special">[]</span></code> + The <code class="computeroutput"><span class="identifier">kwd</span><span class="special">[]</span></code>, + <code class="computeroutput"><span class="identifier">dkwd</span><span class="special">[]</span></code> + and <code class="computeroutput"><span class="identifier">ikwd</span><span class="special">[]</span></code>, + <code class="computeroutput"><span class="identifier">idkwd</span><span class="special">[]</span></code> provide a powerful and flexible mechanism for parsing keyword based input. It works in conjuction with the / operator to create an effective keyword parsing loop. The keyword parsing loop doesn't require the keywords to @@ -47,20 +49,37 @@ It should be prefered not to mix the kwd and ikwd directives. </p> <p> + The dkwd and idkwd provide a mechanism to pase distinct keywords. These + directives require that the skipper successeds parsing input right after + the keyword part. + </p> +<p> + dkwd("keyword1")<span class="emphasis"><em>='>>int_</em></span> + </p> +<p> + is equivalent to: + </p> +<p> + lit("keyword1") >> skipper+ >> '=' >> int_ + </p> +<p> + All the keyword directives can be mixed inside a keyword list. + </p> +<p> The kwd directive is very similar to the repeat directive in that it enables to enforce keyword occurence constraints but also provides very interesting speed improvement over the pure EBNF syntax or the Nabialek-Trick. </p> <h6> <a name="spirit_repository.qi_components.directives.kwd.h1"></a> - <span><a name="spirit_repository.qi_components.directives.kwd.header"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.kwd.header"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/directive/kwd.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_kwd</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.qi_components.directives.kwd.h2"></a> - <span><a name="spirit_repository.qi_components.directives.kwd.synopsis"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.synopsis">Synopsis</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.kwd.synopsis"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.synopsis">Synopsis</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -144,11 +163,12 @@ </tbody> </table></div> <p> - For non case sensitive keywords use the ikwd directive. + For non case sensitive keywords use the ikwd directive. If distinct keyword + parsing is required, use the dkwd and idkwd directive instead. </p> <h6> <a name="spirit_repository.qi_components.directives.kwd.h3"></a> - <span><a name="spirit_repository.qi_components.directives.kwd.parameters"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.parameters">Parameters</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.kwd.parameters"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.parameters">Parameters</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -234,11 +254,12 @@ </tbody> </table></div> <p> - All three parameters can be arbitrarily complex parsers themselves. + The keyword as well as the subject parameters can be any valid spirit parser. + The parameter n, min and max are integer constants. </p> <h6> <a name="spirit_repository.qi_components.directives.kwd.h4"></a> - <span><a name="spirit_repository.qi_components.directives.kwd.attributes"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.attributes">Attributes</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.kwd.attributes"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.attributes">Attributes</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -324,7 +345,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.directives.kwd.h5"></a> - <span><a name="spirit_repository.qi_components.directives.kwd.complexity"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.complexity">Complexity</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.kwd.complexity"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.complexity">Complexity</a> </h6> <div class="blockquote"><blockquote class="blockquote"> <p> @@ -333,8 +354,9 @@ itself is O(N), where N is the number of repetitions executed. </p> <p> - The complexity of the keyword list itself determined by the complexity - of the internal TST contents : + In the case where all the keywords are strings, the complexity of the + keyword list itself determined by the complexity of the internal TST + contents : </p> <p> O(log n+k) @@ -342,10 +364,14 @@ <p> Where k is the length of the string to be searched in a TST with n strings. </p> +<p> + When the keywords used are complex parsers, then the complexity is the + sum of the sub parser complexities. + </p> </blockquote></div> <h6> <a name="spirit_repository.qi_components.directives.kwd.h6"></a> - <span><a name="spirit_repository.qi_components.directives.kwd.example"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.kwd.example"></a></span><a class="link" href="kwd.html#spirit_repository.qi_components.directives.kwd.example">Example</a> </h6> <p> Please refer to keyword_list. diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/seek.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/seek.html index f4d23870da..ed6db2294b 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/seek.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/seek.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Seek Parser Directive</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../directives.html" title="Qi Parser Directives"> <link rel="prev" href="kwd.html" title="Qi Keyword Parser Directive"> @@ -29,16 +29,15 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.directives.seek.h0"></a> - <span><a name="spirit_repository.qi_components.directives.seek.description"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.description"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.description">Description</a> </h6> <p> The <code class="computeroutput"><span class="identifier">seek</span><span class="special">[]</span></code> - parser-directive skips all input until the subject parser matches. On failure, - the current position is the end of the input. + parser-directive skips all input until the subject parser matches. </p> <h6> <a name="spirit_repository.qi_components.directives.seek.h1"></a> - <span><a name="spirit_repository.qi_components.directives.seek.header"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.header"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/directive/seek.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_seek</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> @@ -49,7 +48,7 @@ </p> <h6> <a name="spirit_repository.qi_components.directives.seek.h2"></a> - <span><a name="spirit_repository.qi_components.directives.seek.namespace"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.namespace">Namespace</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.namespace"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.namespace">Namespace</a> </h6> <div class="informaltable"><table class="table"> <colgroup><col></colgroup> @@ -66,7 +65,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.directives.seek.h3"></a> - <span><a name="spirit_repository.qi_components.directives.seek.model_of"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.model_of">Model + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.model_of"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.model_of">Model of</a> </h6> <div class="blockquote"><blockquote class="blockquote"><p> @@ -74,7 +73,7 @@ </p></blockquote></div> <div class="variablelist"> <p class="title"><b>Notation</b></p> -<dl> +<dl class="variablelist"> <dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt> <dd><p> A <a href="../../../../../../doc/html/spirit/qi/reference/parser_concepts/parser.html" target="_top"><code class="computeroutput"><span class="identifier">Parser</span></code></a>. @@ -83,7 +82,7 @@ </div> <h6> <a name="spirit_repository.qi_components.directives.seek.h4"></a> - <span><a name="spirit_repository.qi_components.directives.seek.expression_semantics"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.expression_semantics">Expression + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.expression_semantics"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.expression_semantics">Expression Semantics</a> </h6> <p> @@ -123,7 +122,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.directives.seek.h5"></a> - <span><a name="spirit_repository.qi_components.directives.seek.attributes"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.attributes">Attributes</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.attributes"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.attributes">Attributes</a> </h6> <p> See <a href="../../../../../../doc/html/spirit/qi/quick_reference/compound_attribute_rules.html#spirit.qi.quick_reference.compound_attribute_rules.notation" target="_top">Compound @@ -164,7 +163,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.directives.seek.h6"></a> - <span><a name="spirit_repository.qi_components.directives.seek.complexity"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.complexity">Complexity</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.complexity"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.complexity">Complexity</a> </h6> <div class="blockquote"><blockquote class="blockquote"><p> The overall complexity is defined by the complexity of its subject parser. @@ -196,7 +195,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.directives.seek.h7"></a> - <span><a name="spirit_repository.qi_components.directives.seek.example"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.directives.seek.example"></a></span><a class="link" href="seek.html#spirit_repository.qi_components.directives.seek.example">Example</a> </h6> <p> The following example shows a simple use case of the <code class="computeroutput"><span class="identifier">seek</span><span class="special">[]</span></code> directive, parsing C-style comment. (For diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html index 9fb912e466..f50febe02c 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Parser Non-terminals</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../qi_components.html" title="Qi Components"> <link rel="prev" href="directives/seek.html" title="Qi Seek Parser Directive"> @@ -27,7 +27,7 @@ <a name="spirit_repository.qi_components.nonterminal"></a><a class="link" href="nonterminal.html" title="Qi Parser Non-terminals">Qi Parser Non-terminals</a> </h3></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="nonterminal/subrule.html">Qi +<div class="toc"><dl class="toc"><dt><span class="section"><a href="nonterminal/subrule.html">Qi subrules</a></span></dt></dl></div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html index d21f182115..8e734d661c 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi subrules</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../nonterminal.html" title="Qi Parser Non-terminals"> <link rel="prev" href="../nonterminal.html" title="Qi Parser Non-terminals"> @@ -29,7 +29,7 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h0"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.description"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.description"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.description">Description</a> </h6> <p> The <span class="emphasis"><em>Spirit.Qi</em></span> <code class="computeroutput"><span class="identifier">subrule</span></code> @@ -48,7 +48,7 @@ <p> The weaknesses of subrules are: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> subrules can only be defined and used within the same parser expression. A subrule cannot be defined at one location, and then used in another @@ -97,21 +97,21 @@ </p> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h1"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.header"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.header"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/nonterminal/subrule.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h2"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_">Synopsis + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_">Synopsis (declaration)</a> </h6> <pre class="programlisting"><span class="identifier">subrule</span><span class="special"><</span><span class="identifier">ID</span><span class="special">,</span> <span class="identifier">A1</span><span class="special">,</span> <span class="identifier">A2</span><span class="special">></span> <span class="identifier">sr</span><span class="special">(</span><span class="identifier">name</span><span class="special">);</span> </pre> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h3"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_">Parameters + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_">Parameters (declaration)</a> </h6> <div class="informaltable"><table class="table"> @@ -181,7 +181,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h4"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_">Synopsis + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_">Synopsis (usage)</a> </h6> <p> @@ -210,7 +210,7 @@ </pre> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h5"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.parameters__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__usage_">Parameters + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.parameters__usage_"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__usage_">Parameters (usage)</a> </h6> <div class="informaltable"><table class="table"> @@ -334,7 +334,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h6"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.groups"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.groups">Groups</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.groups"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.groups">Groups</a> </h6> <p> A subrule group (a set of subrule definitions) is a parser, which can be @@ -379,13 +379,13 @@ </pre> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h7"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.attributes"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.attributes">Attributes</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.attributes"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.attributes">Attributes</a> </h6> <p> A subrule has the same behavior as a rule with respect to attributes. In particular: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> the type of its synthesized attribute is the one specified in the subrule's signature, if any. Otherwise it is <code class="computeroutput"><span class="identifier">unused_type</span></code>. @@ -408,7 +408,7 @@ </ul></div> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h8"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.locals"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.locals">Locals</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.locals"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.locals">Locals</a> </h6> <p> A subrule has the same behavior as a rule with respect to locals. In particular, @@ -418,7 +418,7 @@ </p> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h9"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.example"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.example"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.example">Example</a> </h6> <p> Some includes: @@ -503,7 +503,7 @@ </p> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h10"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.performance"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.performance">Performance</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.performance"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.performance">Performance</a> </h6> <p> This table compares run-time and compile-time performance when converting @@ -742,7 +742,7 @@ <br class="table-break"><p> The columns are: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <span class="bold"><strong>Speed (run-time)</strong></span>: speed-up of the parser resulting from the use of subrules (higher is better). @@ -758,7 +758,7 @@ </ul></div> <h6> <a name="spirit_repository.qi_components.nonterminal.subrule.h11"></a> - <span><a name="spirit_repository.qi_components.nonterminal.subrule.notes"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.notes">Notes</a> + <span class="phrase"><a name="spirit_repository.qi_components.nonterminal.subrule.notes"></a></span><a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.notes">Notes</a> </h6> <p> Subrules push the C++ compiler hard. A group of subrules is a single C++ diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators.html index d63f6c7c32..dcd1c49e9b 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Parser Operators</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../qi_components.html" title="Qi Components"> <link rel="prev" href="nonterminal/subrule.html" title="Qi subrules"> @@ -27,7 +27,7 @@ <a name="spirit_repository.qi_components.operators"></a><a class="link" href="operators.html" title="Qi Parser Operators">Qi Parser Operators</a> </h3></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="operators/keyword_list.html">Keyword +<div class="toc"><dl class="toc"><dt><span class="section"><a href="operators/keyword_list.html">Keyword List Operator</a></span></dt></dl></div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/keyword_list.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/keyword_list.html index f4568b6b81..182ea84215 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/keyword_list.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/keyword_list.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Keyword List Operator</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../operators.html" title="Qi Parser Operators"> <link rel="prev" href="../operators.html" title="Qi Parser Operators"> @@ -29,29 +29,30 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.operators.keyword_list.h0"></a> - <span><a name="spirit_repository.qi_components.operators.keyword_list.description"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.operators.keyword_list.description"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.description">Description</a> </h6> <p> The keyword list operator, <code class="computeroutput"><span class="identifier">kwd</span><span class="special">(</span><span class="string">"k1"</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]</span> <span class="special">/</span> <span class="identifier">kwd</span><span class="special">(</span><span class="string">"k2"</span><span class="special">)[</span><span class="identifier">b</span><span class="special">]</span></code>, - works tightly with the kwd, ikwd directives to effeciently match keyword - lists. As long as one of the keywords specified through the kwd or ikwd - directive matches, the keyword will be immediatly followed by the the keyword's - associated subject parser. The parser will continue parsing input as long - as the one of the keywords and it's associated parser succeed. Writing - : (kwd("k1")[a] / kwd("k2")[b] / ... ) is equivalent - to: *( "k1" > a | "k2" > b ... ). + works tightly with the kwd, ikwd, dkwd and idkwd directives to effeciently + match keyword lists. As long as one of the keywords specified through the + kwd, ikwd, dkwd or idkwd directive matches, the keyword will be immediatly + followed by the keyword's associated subject parser. The parser will continue + parsing input as long as the one of the keywords and it's associated parser + succeed. Writing : (kwd("k1")[a] / kwd("k2")[b] / ... + ) is equivalent to: *( "k1" > a | "k2" > b ... + ). </p> <h6> <a name="spirit_repository.qi_components.operators.keyword_list.h1"></a> - <span><a name="spirit_repository.qi_components.operators.keyword_list.header"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.operators.keyword_list.header"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/operator/keywords.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_keywords</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.qi_components.operators.keyword_list.h2"></a> - <span><a name="spirit_repository.qi_components.operators.keyword_list.expression_semantics"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.expression_semantics">Expression + <span class="phrase"><a name="spirit_repository.qi_components.operators.keyword_list.expression_semantics"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.expression_semantics">Expression Semantics</a> </h6> <div class="informaltable"><table class="table"> @@ -94,7 +95,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.operators.keyword_list.h3"></a> - <span><a name="spirit_repository.qi_components.operators.keyword_list.attributes"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.attributes">Attributes</a> + <span class="phrase"><a name="spirit_repository.qi_components.operators.keyword_list.attributes"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.attributes">Attributes</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -140,14 +141,15 @@ <th align="left">Note</th> </tr> <tr><td align="left" valign="top"><p> - The keyword list parser works tightly with the kwd and ikwd directives - and can't be used without it. A compile time error will warn you of any - mistakes. This parser collects all the kwd directives and extracts the - keyword literals from the directives to internaly build a Ternary Search - Tree (TST) to effectively parse the keywords. Because you we can't mix - character types inside a TST you must take care not to mix wide strings - with normal strings in the keyword you supply to a keyword list. Should - it happen the compiler will trap the mistake for you. + The keyword list parser works tightly with the kwd, ikwd, dkwd and idkwd + directives and can't be used without it. A compile time error will warn + you of any mistakes. This parser collects all the kwd directives and + extracts the keyword literals or parsers from the directives to internaly + build a Ternary Search Tree (TST) and permutation loop (for complex parsers) + to effectively parse the keywords. Because you can't mix character types + inside a TST you must take care not to mix wide strings with normal strings + in the keywords you supply to a keyword list. Should it happen the compiler + will trap the mistake for you. </p></td></tr> </table></div> <div class="note"><table border="0" summary="Note"> @@ -158,7 +160,7 @@ <tr><td align="left" valign="top"><p> The kwd directive also works a bit like the repeat directive and can be used to formulate additional contraints on the number of times a keyword - can occur while parsing a keyword list. + can or must occur while parsing a keyword list. </p></td></tr> </table></div> <div class="note"><table border="0" summary="Note"> @@ -167,30 +169,21 @@ <th align="left">Note</th> </tr> <tr><td align="left" valign="top"><p> - The kwd and ikwd directives can be mixed inside a keyword list. This - has however a small overhead and should be avoided when possible. + The kwd, dkwd and ikwd, idkwd directives can be mixed inside a keyword + list. This has however a small overhead and should be avoided when possible. </p></td></tr> </table></div> <h6> <a name="spirit_repository.qi_components.operators.keyword_list.h4"></a> - <span><a name="spirit_repository.qi_components.operators.keyword_list.complexity"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.complexity">Complexity</a> + <span class="phrase"><a name="spirit_repository.qi_components.operators.keyword_list.complexity"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.complexity">Complexity</a> </h6> -<div class="blockquote"><blockquote class="blockquote"> -<p> +<div class="blockquote"><blockquote class="blockquote"><p> The overall complexity of the keyword list parser is defined by the sum - of the complexities of its elements. The complexity of the keyword list - itself is determined by the complexity of the internal TST contents : - </p> -<p> - O(log n+k) - </p> -<p> - Where k is the length of the string to be searched in a TST with n strings. - </p> -</blockquote></div> + of the complexities of its elements. + </p></blockquote></div> <h6> <a name="spirit_repository.qi_components.operators.keyword_list.h5"></a> - <span><a name="spirit_repository.qi_components.operators.keyword_list.example"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.operators.keyword_list.example"></a></span><a class="link" href="keyword_list.html#spirit_repository.qi_components.operators.keyword_list.example">Example</a> </h6> <div class="note"><table border="0" summary="Note"> <tr> diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html index e0eae41fc7..585b066e58 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi Parser Primitives</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../qi_components.html" title="Qi Components"> <link rel="prev" href="../qi_components.html" title="Qi Components"> @@ -27,7 +27,7 @@ <a name="spirit_repository.qi_components.primitive"></a><a class="link" href="primitive.html" title="Qi Parser Primitives">Qi Parser Primitives</a> </h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="primitive/advance.html">Qi advance Parser</a></span></dt> <dt><span class="section"><a href="primitive/flush_multi_pass.html">Qi diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html index d445a33a38..4bcc1b7ba4 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi advance Parser</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../primitive.html" title="Qi Parser Primitives"> <link rel="prev" href="../primitive.html" title="Qi Parser Primitives"> @@ -29,7 +29,7 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.primitive.advance.h0"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.description"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.description"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.description">Description</a> </h6> <p> The <span class="emphasis"><em>Spirit.Qi</em></span> <code class="computeroutput"><span class="identifier">advance</span></code> @@ -67,20 +67,20 @@ </pre> <h6> <a name="spirit_repository.qi_components.primitive.advance.h1"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.header"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.header"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/primitive/advance.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.qi_components.primitive.advance.h2"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.synopsis"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.synopsis">Synopsis</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.synopsis"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.synopsis">Synopsis</a> </h6> <pre class="programlisting"><span class="identifier">advance</span><span class="special">(</span><span class="identifier">distance</span><span class="special">)</span> </pre> <h6> <a name="spirit_repository.qi_components.primitive.advance.h3"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.parameters"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parameters">Parameters</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.parameters"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parameters">Parameters</a> </h6> <div class="informaltable"><table class="table"> <colgroup> @@ -114,7 +114,7 @@ </table></div> <h6> <a name="spirit_repository.qi_components.primitive.advance.h4"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.attribute"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.attribute">Attribute</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.attribute"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.attribute">Attribute</a> </h6> <p> The <code class="computeroutput"><span class="identifier">advance</span></code> component exposes @@ -124,7 +124,7 @@ </pre> <h6> <a name="spirit_repository.qi_components.primitive.advance.h5"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.example"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.example"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.example">Example</a> </h6> <p> The following example shows simple use cases of the <code class="computeroutput"><span class="identifier">advance</span></code> @@ -133,7 +133,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.advance.h6"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.prerequisites"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.prerequisites">Prerequisites</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.prerequisites"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.prerequisites">Prerequisites</a> </h6> <p> In addition to the main header file needed to include the core components @@ -161,7 +161,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.advance.h7"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.setting_up_the_grammar"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.setting_up_the_grammar">Setting + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.setting_up_the_grammar"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.setting_up_the_grammar">Setting up the Grammar</a> </h6> <p> @@ -204,7 +204,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.advance.h8"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data">Parsing + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data">Parsing a Correctly-delimited String of Data</a> </h6> <p> @@ -242,7 +242,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.advance.h9"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation">Parsing + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation">Parsing the Alternative Representation</a> </h6> <p> @@ -280,7 +280,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.advance.h10"></a> - <span><a name="spirit_repository.qi_components.primitive.advance.notes"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.notes">Notes</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.advance.notes"></a></span><a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.notes">Notes</a> </h6> <p> The <code class="computeroutput"><span class="identifier">advance</span></code> parser component diff --git a/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html b/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html index e87a0a8afe..68994cc1f4 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html +++ b/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Qi flush_multi_pass parser</title> <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../primitive.html" title="Qi Parser Primitives"> <link rel="prev" href="advance.html" title="Qi advance Parser"> @@ -29,7 +29,7 @@ </h4></div></div></div> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h0"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.description"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.description">Description</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.description"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.description">Description</a> </h6> <p> The <span class="emphasis"><em>Spirit.Qi</em></span> <code class="computeroutput"><span class="identifier">flush_multi_pass</span></code> @@ -54,20 +54,20 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h1"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.header"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.header">Header</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.header"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.header">Header</a> </h6> <pre class="programlisting"><span class="comment">// forwards to <boost/spirit/repository/home/qi/primitive/flush_multi_pass.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">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_flush_multi_pass</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> </pre> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h2"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.synopsis"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.synopsis">Synopsis</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.synopsis"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.synopsis">Synopsis</a> </h6> <pre class="programlisting"><span class="identifier">flush_multi_pass</span> </pre> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h3"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.parameters"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.parameters">Parameters</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.parameters"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.parameters">Parameters</a> </h6> <p> The <code class="computeroutput"><span class="identifier">flush_multi_pass</span></code> does @@ -75,7 +75,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h4"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.attribute"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.attribute">Attribute</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.attribute"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.attribute">Attribute</a> </h6> <p> The <code class="computeroutput"><span class="identifier">flush_multi_pass</span></code> component @@ -85,7 +85,7 @@ </pre> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h5"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.example"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.example">Example</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.example"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.example">Example</a> </h6> <p> The following example shows a simple use case of the <code class="computeroutput"><span class="identifier">flush_multi_pass</span></code> @@ -97,7 +97,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h6"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites">Prerequisites</a> + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites">Prerequisites</a> </h6> <p> In addition to the main header file needed to include the core components @@ -124,7 +124,7 @@ </p> <h6> <a name="spirit_repository.qi_components.primitive.flush_multi_pass.h7"></a> - <span><a name="spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer">Clearing + <span class="phrase"><a name="spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer"></a></span><a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer">Clearing the internal buffer</a> </h6> <p> diff --git a/libs/spirit/repository/doc/html/spirit_repository/what_s_new.html b/libs/spirit/repository/doc/html/spirit_repository/what_s_new.html index d8c65c3b4d..16a53167d2 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/what_s_new.html +++ b/libs/spirit/repository/doc/html/spirit_repository/what_s_new.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>What's New</title> <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../index.html" title="Spirit Repository 0.2"> <link rel="prev" href="preface.html" title="Preface"> @@ -26,7 +26,7 @@ <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="spirit_repository.what_s_new"></a><a class="link" href="what_s_new.html" title="What's New">What's New</a> </h2></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="what_s_new/spirit_2_5_1.html">Spirit V2.5.1</a></span></dt></dl></div> +<div class="toc"><dl class="toc"><dt><span class="section"><a href="what_s_new/spirit_2_5_1.html">Spirit V2.5.1</a></span></dt></dl></div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> diff --git a/libs/spirit/repository/doc/html/spirit_repository/what_s_new/spirit_2_5_1.html b/libs/spirit/repository/doc/html/spirit_repository/what_s_new/spirit_2_5_1.html index 00c1342394..de4dcbdd67 100644 --- a/libs/spirit/repository/doc/html/spirit_repository/what_s_new/spirit_2_5_1.html +++ b/libs/spirit/repository/doc/html/spirit_repository/what_s_new/spirit_2_5_1.html @@ -3,7 +3,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Spirit V2.5.1</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../../index.html" title="Spirit Repository 0.2"> <link rel="up" href="../what_s_new.html" title="What's New"> <link rel="prev" href="../what_s_new.html" title="What's New"> @@ -31,10 +31,10 @@ </p> <h5> <a name="spirit_repository.what_s_new.spirit_2_5_1.h0"></a> - <span><a name="spirit_repository.what_s_new.spirit_2_5_1.new_features_in_qi"></a></span><a class="link" href="spirit_2_5_1.html#spirit_repository.what_s_new.spirit_2_5_1.new_features_in_qi">New + <span class="phrase"><a name="spirit_repository.what_s_new.spirit_2_5_1.new_features_in_qi"></a></span><a class="link" href="spirit_2_5_1.html#spirit_repository.what_s_new.spirit_2_5_1.new_features_in_qi">New Features in Qi</a> </h5> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> Added the <span class="emphasis"><em>Spirit.Qi</em></span> directive <a class="link" href="../qi_components/directives/seek.html" title="Qi Seek Parser Directive"><code class="computeroutput"><span class="identifier">seek</span><span class="special">[]</span></code></a> enabling skipping over the input, getting to the interested portion. </li></ul></div> diff --git a/libs/spirit/repository/doc/qi/keywords.qbk b/libs/spirit/repository/doc/qi/keywords.qbk index 4b7c0cbd1c..476bd272e4 100644 --- a/libs/spirit/repository/doc/qi/keywords.qbk +++ b/libs/spirit/repository/doc/qi/keywords.qbk @@ -11,9 +11,9 @@ [heading Description] -The keyword list operator, `kwd("k1")[a] / kwd("k2")[b]`, works tightly with the kwd, ikwd directives -to effeciently match keyword lists. As long as one of the keywords specified through the kwd or ikwd directive -matches, the keyword will be immediatly followed by the the keyword's associated subject parser. +The keyword list operator, `kwd("k1")[a] / kwd("k2")[b]`, works tightly with the kwd, ikwd, dkwd and idkwd directives +to effeciently match keyword lists. As long as one of the keywords specified through the kwd, ikwd, dkwd or idkwd directive +matches, the keyword will be immediatly followed by the keyword's associated subject parser. The parser will continue parsing input as long as the one of the keywords and it's associated parser succeed. Writing : (kwd("k1")[a] / kwd("k2")[b] / ... ) @@ -47,31 +47,27 @@ a: Unused, b: Unused --> (kwd(k1)[a] / kwd(k2)[b]): Unused a: A, b: A -->(kwd(k1)[a] / kwd(k2)[b]): tuple<A, A>``]] ] -[note The keyword list parser works tightly with the kwd and ikwd directives +[note The keyword list parser works tightly with the kwd, ikwd, dkwd and idkwd directives and can't be used without it. A compile time error will warn you of any mistakes. This parser collects all the kwd directives and - extracts the keyword literals from the directives to internaly - build a Ternary Search Tree (TST) to effectively parse the keywords. - Because you we can't mix character types inside a TST you must take - care not to mix wide strings with normal strings in the keyword you supply + extracts the keyword literals or parsers from the directives to internaly + build a Ternary Search Tree (TST) and permutation loop (for complex parsers) + to effectively parse the keywords. + Because you can't mix character types inside a TST you must take + care not to mix wide strings with normal strings in the keywords you supply to a keyword list. Should it happen the compiler will trap the mistake for you.] [note The kwd directive also works a bit like the repeat directive and can be used to formulate additional contraints on the number of - times a keyword can occur while parsing a keyword list.] + times a keyword can or must occur while parsing a keyword list.] -[note The kwd and ikwd directives can be mixed inside a keyword list. This has +[note The kwd, dkwd and ikwd, idkwd directives can be mixed inside a keyword list. This has however a small overhead and should be avoided when possible.] [heading Complexity] [:The overall complexity of the keyword list parser is defined by the -sum of the complexities of its elements. The complexity of the -keyword list itself is determined by the complexity of the internal TST contents : - -O(log n+k) - -Where k is the length of the string to be searched in a TST with n strings.] +sum of the complexities of its elements.] [heading Example] diff --git a/libs/spirit/repository/doc/qi/kwd.qbk b/libs/spirit/repository/doc/qi/kwd.qbk index 016ae2270c..059c9e45e0 100644 --- a/libs/spirit/repository/doc/qi/kwd.qbk +++ b/libs/spirit/repository/doc/qi/kwd.qbk @@ -1,7 +1,7 @@ [/============================================================================== - Copyright (C) 2001-2011 Joel de Guzman - Copyright (C) 2001-2011 Hartmut Kaiser - Copyright (C) 2011 Thomas Bernard + Copyright (C) 2001-2012 Joel de Guzman + Copyright (C) 2001-2012 Hartmut Kaiser + Copyright (C) 2011-2012 Thomas Bernard 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) @@ -11,7 +11,7 @@ [heading Description] -The `kwd[]` and `ikwd[]` provide a powerful and flexible mechanism for parsing keyword +The `kwd[]`, `dkwd[]` and `ikwd[]`, `idkwd[]` provide a powerful and flexible mechanism for parsing keyword based input. It works in conjuction with the / operator to create an effective keyword parsing loop. The keyword parsing loop doesn't require the keywords to appear in a defined order in the input but also provides the possibility @@ -22,6 +22,17 @@ direcive is case insensitive. You can mix the kwd and ikwd directives inside a s keywords, but be aware that this has a small overhead. It should be prefered not to mix the kwd and ikwd directives. +The dkwd and idkwd provide a mechanism to pase distinct keywords. These directives require +that the skipper successeds parsing input right after the keyword part. + +dkwd("keyword1")['='>>int_] + +is equivalent to: + +lit("keyword1") >> skipper+ >> '=' >> int_ + +All the keyword directives can be mixed inside a keyword list. + The kwd directive is very similar to the repeat directive in that it enables to enforce keyword occurence constraints but also provides very interesting speed improvement over the pure EBNF syntax or the Nabialek-Trick. @@ -42,6 +53,7 @@ over the pure EBNF syntax or the Nabialek-Trick. ] For non case sensitive keywords use the ikwd directive. +If distinct keyword parsing is required, use the dkwd and idkwd directive instead. [heading Parameters] @@ -54,8 +66,8 @@ For non case sensitive keywords use the ikwd directive. [[`max`] [Int representing the maximum number of times the keyword must be repeated.]] ] -All three parameters can be arbitrarily complex parsers themselves. - +The keyword as well as the subject parameters can be any valid spirit parser. +The parameter n, min and max are integer constants. [heading Attributes] @@ -81,11 +93,14 @@ a: Unused --> kwd(k1,min, inf)[a]: Unused``]] parser. The complexity of the keyword list construct `kwd` itself is O(N), where N is the number of repetitions executed. -The complexity of the keyword list itself determined by the complexity of the internal TST contents : +In the case where all the keywords are strings, the complexity of the keyword list itself determined by the complexity of the internal TST contents : O(log n+k) Where k is the length of the string to be searched in a TST with n strings. + +When the keywords used are complex parsers, then the complexity is the sum of the sub parser complexities. + ] [heading Example] diff --git a/libs/spirit/repository/doc/qi/seek.qbk b/libs/spirit/repository/doc/qi/seek.qbk index 70fda9561e..1b85db666e 100644 --- a/libs/spirit/repository/doc/qi/seek.qbk +++ b/libs/spirit/repository/doc/qi/seek.qbk @@ -12,7 +12,6 @@ [heading Description] The `seek[]` parser-directive skips all input until the subject parser matches. -On failure, the current position is the end of the input. [heading Header] diff --git a/libs/spirit/repository/test/Jamfile b/libs/spirit/repository/test/Jamfile index 1f38c45874..9f9e089542 100644 --- a/libs/spirit/repository/test/Jamfile +++ b/libs/spirit/repository/test/Jamfile @@ -9,7 +9,7 @@ project spirit_v2_repository/test : requirements <include>. - <toolset>gcc:<cxxflags>-ftemplate-depth-300 <linkflags>-lrt + <toolset>gcc:<cxxflags>-ftemplate-depth-300 <toolset>darwin:<cxxflags>-ftemplate-depth-300 : : diff --git a/libs/spirit/repository/test/qi/keywords.cpp b/libs/spirit/repository/test/qi/keywords.cpp index fb04f16ff4..eb224d6556 100644 --- a/libs/spirit/repository/test/qi/keywords.cpp +++ b/libs/spirit/repository/test/qi/keywords.cpp @@ -17,6 +17,7 @@ #include <boost/spirit/include/qi_numeric.hpp> #include <boost/spirit/include/qi_directive.hpp> #include <boost/spirit/include/qi_action.hpp> +#include <boost/spirit/include/qi_nonterminal.hpp> #include <boost/spirit/include/support_argument.hpp> #include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/include/phoenix_operator.hpp> @@ -30,20 +31,20 @@ struct x_attr { - + }; -namespace boost { namespace spirit { namespace traits +namespace boost { namespace spirit { namespace traits { - - + + template <> struct container_value<x_attr> { typedef char type; // value type of container }; - + template <> struct push_back_container<x_attr, char> { @@ -53,7 +54,7 @@ namespace boost { namespace spirit { namespace traits return true; } }; -}}} +}}} int main() @@ -64,6 +65,7 @@ main() using namespace boost::spirit::ascii; using boost::spirit::repository::kwd; using boost::spirit::repository::ikwd; + using boost::spirit::repository::dkwd; using boost::spirit::qi::inf; using boost::spirit::qi::omit; using boost::spirit::qi::int_; @@ -71,48 +73,57 @@ main() using boost::spirit::qi::_1; using boost::spirit::qi::lexeme; + { - + // no constraints boost::fusion::vector<char,char,int> data; - BOOST_TEST( test_attr("c=1 a=a", kwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], data, space)); - BOOST_TEST( test("a=a c=1", kwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST( test_attr("c=1 a=a", kwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], data, space)); + BOOST_TEST( boost::fusion::at_c<0>(data) == 'a' ); + BOOST_TEST( boost::fusion::at_c<1>(data) == 0 ); + BOOST_TEST( boost::fusion::at_c<2>(data) == 1 ); + + BOOST_TEST( test("a=a c=1", kwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + + BOOST_TEST( test("", kwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); // Exact - BOOST_TEST(test("a=a b=b c=1", kwd("a",1)[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); - BOOST_TEST(test("a=a b=c b=e c=1", kwd("a",1)[ '=' > char_] / kwd("b",2)[ '=' > char_] / kwd("c")['=' > int_], space)); - BOOST_TEST(!test("b=c b=e c=1", kwd("a",1)[ '=' > char_] / kwd("b",2)[ '=' > char_] / kwd("c")['=' > int_], space)); - - // Min - Max - BOOST_TEST(test("a=f b=c b=e c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,2)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); - BOOST_TEST(!test("b=c b=e c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,1)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); - BOOST_TEST(test("a=g a=f b=c b=e c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,2)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); - BOOST_TEST(!test("a=f a=e b=c b=e a=p c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,1)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); + BOOST_TEST(test("a=a b=b c=1", kwd("a",1)[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST(test("a=a b=c b=e c=1", kwd("a",1)[ '=' > char_] / kwd("b",2)[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST(!test("b=c b=e c=1", kwd("a",1)[ '=' > char_] / kwd("b",2)[ '=' > char_] / kwd("c")['=' > int_], space)); + + // Min - Max + BOOST_TEST(test("a=f b=c b=e c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,2)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); + BOOST_TEST(!test("b=c b=e c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,1)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); + BOOST_TEST(test("a=g a=f b=c b=e c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,2)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); + BOOST_TEST(!test("a=f a=e b=c b=e a=p c=1", kwd("a",1,2)[ '=' > char_] / kwd("b",0,1)[ '=' > char_] / kwd("c",1,2)['=' > int_], space)); // Min - inf - BOOST_TEST(test("a=f b=c b=e c=1", kwd("a",1,inf)[ '=' > char_] / kwd("b",0,inf)[ '=' > char_] / kwd("c",1,inf)['=' > int_], space )); - BOOST_TEST(!test("b=c b=e c=1", kwd("a",1,inf)[ '=' > char_] / kwd("b",0,inf)[ '=' > char_] / kwd("c",1,inf)['=' > int_], space )); - BOOST_TEST(test("a=f a=f a=g b=c b=e c=1 a=e", kwd("a",1,inf)[ '=' > char_] / kwd("b",0,inf)[ '=' > char_] / kwd("c",1,inf)['=' > int_], space )); + BOOST_TEST(test("a=f b=c b=e c=1", kwd("a",1,inf)[ '=' > char_] / kwd("b",0,inf)[ '=' > char_] / kwd("c",1,inf)['=' > int_], space )); + BOOST_TEST(!test("b=c b=e c=1", kwd("a",1,inf)[ '=' > char_] / kwd("b",0,inf)[ '=' > char_] / kwd("c",1,inf)['=' > int_], space )); + BOOST_TEST(test("a=f a=f a=g b=c b=e c=1 a=e", kwd("a",1,inf)[ '=' > char_] / kwd("b",0,inf)[ '=' > char_] / kwd("c",1,inf)['=' > int_], space )); } { // Single keyword, empty string - BOOST_TEST(test(" ", kwd("aad")[char_],space)); - BOOST_TEST(test("aad E ", kwd("aad")[char_],space)); - //BOOST_TEST(test("AaD E ", ikwd("aad")[char_],space)); - + BOOST_TEST(test(" ", kwd("aad")[char_],space)); + // Single keyword + BOOST_TEST(test("aad E ", kwd("aad")[char_],space)); + // Single no case keyword + BOOST_TEST(test("AaD E ", ikwd("aad")[char_],space)); + } - + { // Vector container boost::fusion::vector<std::vector<int>,std::vector<int>,std::vector<int> > data; - BOOST_TEST(test_attr(" a=1 b=2 b=5 c=3",kwd("a")[ '=' > int_] / kwd("b")[ '=' > int_] / kwd("c")['=' > int_] , data, space) - && (boost::fusion::at_c<0>(data).size()==1) + BOOST_TEST(test_attr(" a=1 b=2 b=5 c=3",kwd("a")[ '=' > int_] / kwd("b")[ '=' > int_] / kwd("c")['=' > int_] , data, space) + && (boost::fusion::at_c<0>(data).size()==1) && (boost::fusion::at_c<0>(data)[0]==1) - + &&(boost::fusion::at_c<1>(data).size()==2) &&(boost::fusion::at_c<1>(data)[0]==2) &&(boost::fusion::at_c<1>(data)[1]==5) - + &&(boost::fusion::at_c<2>(data).size()==1) &&(boost::fusion::at_c<2>(data)[0]==3) ); @@ -120,35 +131,139 @@ main() { // no_case test - BOOST_TEST( test("B=a c=1 a=E", no_case[kwd("a")[ "=E" ] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_]], space)); - BOOST_TEST( test("B=a c=1 a=e", no_case[kwd("a")[ "=E" ] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_]], space)); - BOOST_TEST( !test("B=a c=1 A=E", no_case[kwd("a")[ '=' > char_]] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); - BOOST_TEST( test("b=a c=1 A=E", no_case[kwd("a")[ '=' > char_]] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); - BOOST_TEST( !test("A=a c=1 a=E", kwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); - BOOST_TEST( test("A=a c=1 a=E", ikwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); - BOOST_TEST( !test("A=a C=1 a=E", ikwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST( test("B=a c=1 a=E", no_case[kwd("a")[ "=E" ] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_]], space)); + BOOST_TEST( test("B=a c=1 a=e", no_case[kwd("a")[ "=E" ] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_]], space)); + BOOST_TEST( !test("B=a c=1 A=E", no_case[kwd("a")[ '=' > char_]] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST( test("b=a c=1 A=E", no_case[kwd("a")[ '=' > char_]] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST( !test("A=a c=1 a=E", kwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST( test("A=a c=1 a=E", ikwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST( !test("A=a C=1 a=E", ikwd("a")[ '=' > char_] / kwd("b")[ '=' > char_] / kwd("c")['=' > int_], space)); + } + + { + // iterator restoration + BOOST_TEST( test("a=a c=1 ba=d", (kwd("a")[ '=' > char_] / kwd("b")[ '=' > int_] / kwd("c")['=' > int_] ) > lit("ba=") > char_, space)); + BOOST_TEST( test("A=a c=1 ba=d", (ikwd("a")[ '=' > char_] / kwd("b")[ '=' > int_] / kwd("c")['=' > int_] ) > lit("ba=") > char_, space)); + } + + { // actions + namespace phx = boost::phoenix; + + std::vector<int> v; + BOOST_TEST(test("b=2 c=4", kwd("b")['=' > int_][phx::ref(v)=_1] / kwd("c")[ '=' > int_ ],space) && + v[0] == 2 ); + } + + + { + // no constraints + boost::fusion::vector<char,char,int> data; + BOOST_TEST( test_attr("c,1,2=1 2,b=a", kwd( char_ >> lit(',') >> int_ )[ '=' >> char_] / kwd(int_ >> lit(',') >> char_)[ '=' >> char_] / kwd(char_ >> lit(',') >> int_ >> lit(',') >> int_)['=' >> int_], data, space)); + BOOST_TEST( boost::fusion::at_c<0>(data) == 0 ); + BOOST_TEST( boost::fusion::at_c<1>(data) == 'a'); + BOOST_TEST( boost::fusion::at_c<2>(data) == 1 ); + + BOOST_TEST( test("2,b=a c,1,2=1", kwd( char_ >> ',' >> int_ )[ '=' >> char_] / kwd(int_ >> ',' >> char_)[ '=' >> char_] / kwd(char_ >> ',' >> int_ >> ',' >> int_)['=' >> int_], space)); + + BOOST_TEST( test("", kwd( char_ >> ',' >> int_ )[ '=' >> char_] / kwd(int_ >> ',' >> char_)[ '=' >> char_] / kwd(char_ >> ',' >> int_ >> ',' >> int_)['=' >> int_], space)); + + // Exact + BOOST_TEST(test("7a=a 5b=b 2c=1", kwd(int_ >> lit('a'),1)[ '=' >> char_] / kwd(int_ >> lit('b'))[ '=' >> char_] / kwd(int_ >> lit('c'))['=' >> int_], space)); + BOOST_TEST(test("7a=a 3b=d 5b=b 2c=1", kwd(int_ >> lit('a'),1)[ '=' >> char_] / kwd(int_ >> lit('b'),2)[ '=' >> char_] / kwd(int_ >>'c')['=' >> int_], space)); + BOOST_TEST(!test("7a=a 5b=b 2c=1", kwd(int_ >> lit('a'),1)[ '=' >> char_] / kwd(int_ >> lit('b'),2)[ '=' >> char_] / kwd(int_ >>'c')['=' >> int_], space)); + + // Min - Max + BOOST_TEST(test("6a=f 2b=c 3b=e 1c=1", kwd(int_ >> "a",1,2)[ '=' >> char_] / kwd(int_ >> "b",0,2)[ '=' >> char_] / kwd(int_ >> "c",1,2)['=' >> int_], space)); + BOOST_TEST(!test("1b=c 6b=e 2c=1", kwd(int_ >> "a",1,2)[ '=' >> char_] / kwd(int_ >> "b",0,1)[ '=' >> char_] / kwd(int_ >> "c",1,2)['=' >> int_], space)); + BOOST_TEST(test("4a=g 7a=f 2b=c 1b=e 4c=1", kwd(int_ >> "a",1,2)[ '=' >> char_] / kwd(int_ >> "b",0,2)[ '=' >> char_] / kwd(int_ >> "c",1,2)['=' >> int_], space)); + BOOST_TEST(!test("1a=f a=e 2b=c 5b=e 6a=p 67c=1", kwd(int_ >> "a",1,2)[ '=' >> char_] / kwd(int_ >> "b",0,1)[ '=' >> char_] / kwd(int_ >> "c",1,2)['=' >> int_], space)); + + // Min - inf + BOOST_TEST(test("41a=f 44b=c 12b=e 45c=1", kwd(int_ >> "a",1,inf)[ '=' >> char_] / kwd(int_ >> "b",0,inf)[ '=' >> char_] / kwd(int_ >> "c",1,inf)['=' >> int_], space )); + BOOST_TEST(!test("31b=c 55b=e 2c=1", kwd("a",1,inf)[ '=' >> char_] / kwd("b",0,inf)[ '=' >> char_] / kwd("c",1,inf)['=' >> int_], space )); + BOOST_TEST(test("12a=f 45a=f 12a=g 1b=c 7b=e 12c=1 6a=e", kwd(int_ >> "a",1,inf)[ '=' >> char_] / kwd(int_ >> "b",0,inf)[ '=' >> char_] / kwd(int_ >> "c",1,inf)['=' >> int_], space )); + + } + + { + + // Vector container + boost::fusion::vector<std::vector<int>,std::vector<int>,std::vector<int> > data; + BOOST_TEST(test_attr(" 41a=1 4b=2 12b=5 5c=3",kwd(int_ >> "a")[ '=' >> int_] / kwd(int_ >> "b")[ '=' >> int_] / kwd(int_ >> "c")['=' >> int_] , data, space) + && (boost::fusion::at_c<0>(data).size()==1) + && (boost::fusion::at_c<0>(data)[0]==1) + + &&(boost::fusion::at_c<1>(data).size()==2) + &&(boost::fusion::at_c<1>(data)[0]==2) + &&(boost::fusion::at_c<1>(data)[1]==5) + + &&(boost::fusion::at_c<2>(data).size()==1) + &&(boost::fusion::at_c<2>(data)[0]==3) + ); + + + + } + + { + // no_case test + BOOST_TEST( test("12B=a 5c=1 1a=E", no_case[kwd(int_ >> "a")[ "=E" ] / kwd(int_ >> "b")[ '=' >> char_] / kwd(int_ >> "c")['=' >> int_]], space)); + BOOST_TEST( test("5B=a 2c=1 5a=e", no_case[kwd(int_ >> "a")[ "=E" ] / kwd(int_ >> "b")[ '=' >> char_] / kwd(int_ >> "c")['=' >> int_]], space)); + BOOST_TEST( !test("1B=a 8c=1 1A=E", no_case[kwd(int_ >> "a")[ '=' >> char_]] / kwd(int_ >> "b")[ '=' >> char_] / kwd(int_ >> "c")['=' >> int_], space)); + BOOST_TEST( test("2b=a 6c=1 5A=E", no_case[kwd(int_ >> "a")[ '=' >> char_]] / kwd(int_ >> "b")[ '=' >> char_] / kwd(int_ >> "c")['=' >> int_], space)); + BOOST_TEST( !test("1A=a 5c=1 1a=E", kwd(int_ >> "a")[ '=' >> char_] / kwd(int_ >> "b")[ '=' >> char_] / kwd(int_ >> "c")['=' >> int_], space)); + BOOST_TEST( test("A=a 23c=1 a=E", ikwd("a")[ '=' >> char_] / kwd(int_ >> "b")[ '=' >> char_] / kwd(int_ >> "c")['=' >> int_], space)); + BOOST_TEST( !test("A=a 21C=1 a=E", ikwd("a")[ '=' >> char_] / kwd(int_ >> "b")[ '=' >> char_] / kwd(int_ >> "c")['=' >> int_], space)); } - + { // iterator restoration - BOOST_TEST( test("a=a c=1 ba=d", (kwd("a")[ '=' > char_] / kwd("b")[ '=' > int_] / kwd("c")['=' > int_] ) | lit("ba=") > char_, space)); - BOOST_TEST( test("A=a c=1 ba=d", (ikwd("a")[ '=' > char_] / kwd("b")[ '=' > int_] / kwd("c")['=' > int_] ) | lit("ba=") > char_, space)); + BOOST_TEST( test("4a=a c4=1 ba=d", (kwd(int_ >> "a")[ '=' >> char_] / kwd("b" >> int_)[ '=' >> int_] / kwd("c" >> int_ )['=' >> int_] ) >> lit("ba=") >> char_, space)); } { // actions namespace phx = boost::phoenix; std::vector<int> v; - BOOST_TEST(test("b=2 c=4", kwd("b")['=' > int_][phx::ref(v)=_1] / kwd("c")[ '=' > int_ ],space) && + BOOST_TEST(test("b4=2 c1=4", kwd("b" >> int_)['=' >> int_][phx::ref(v)=_1] / kwd("c" >> int_)[ '=' >> int_ ],space) && v[0] == 2 ); } + { + // complex keyword single test + int result=0; + + BOOST_TEST( test_attr("(a,1) = 3214", kwd( '(' >> char_ >> ',' >> int_ >> ')' )['=' >> int_], result, space) ); + BOOST_TEST(result==3214); + } + { + // Mixed complex keyword loop + boost::fusion::vector<int,int,int> data; + + BOOST_TEST( test_attr("(a,1) = 3214 b += 2 hello 10 (a,2)=31", kwd( '(' >> char_ >> ',' >> int_ >> ')' )['=' >> int_] / kwd("hello")[int_] / kwd("b")["+=" >> int_], data, space) ); + BOOST_TEST( boost::fusion::at_c<0>(data) == 31); + BOOST_TEST( boost::fusion::at_c<1>(data) == 10); + BOOST_TEST( boost::fusion::at_c<2>(data) == 2); + } + + // dkwd and idkwd + { + BOOST_TEST( test("a =a", dkwd("a")[ '=' > char_] , space)); + BOOST_TEST( !test("a=a", dkwd("a")[ '=' > char_] , space)); + BOOST_TEST(test("a =a b =b c=1", dkwd("a",1)[ '=' > char_] / dkwd("b",1,2)[ '=' > char_] / kwd("c")['=' > int_], space)); + BOOST_TEST(!test("a=a b=b c =1", dkwd("a",1)[ '=' > char_] / dkwd("b",1,2)[ '=' > char_] / kwd("c")['=' > int_], space)); + + BOOST_TEST(test("a =a b =b b =d c=1", dkwd("a",1,inf)[ '=' > char_] / dkwd("b",2,inf)[ '=' > char_] / kwd("c")['=' > int_], space)); + + } + { // attribute customization - - x_attr x; + +// x_attr x; // test_attr("a = b c = d", kwd("a")['=' > char_] / kwd("c")['=' > char_], x); } - return boost::report_errors(); + + return boost::report_errors(); } |