mirror of
https://github.com/boostorg/spirit.git
synced 2026-01-19 04:42:11 +00:00
Spirit: merging Phoenix V3 support from trunk
[SVN r71244]
This commit is contained in:
@@ -84,13 +84,21 @@ overall usability.
|
||||
[*Thomas Bernard] (a.k.a. teajay) for working on the keyword parser and for
|
||||
adding explicit names to the `qi::`__qi_symbols__ component.
|
||||
|
||||
[*Robert Stewart] for his active participation on the mailing list, his
|
||||
helpful comments, examples and suggestions.
|
||||
|
||||
[*Thomas Taylor], [*Richard Crossley], [*Semen], and [*Adalberto Castelo] for
|
||||
their help in isolating problems while testing the new attribute handling code
|
||||
released with V2.5.
|
||||
|
||||
Special thanks to spirit-devel and spirit-general mailing lists for
|
||||
participating in the discussions, being early adopters of pre-release
|
||||
versions of Spirit2 from the very start and helping out in various tasks
|
||||
such as helping with support, bug tracking, benchmarking and testing,
|
||||
etc. The list include: [*Larry Evans], [*Richard Webb], [*Martin Wille],
|
||||
[*Dan Marsden], [*Cedric Venet], [*Allan Odgaard], [*Matthias
|
||||
Vallentin], [*Justinas V.D.], [*Darid Tromer].
|
||||
Vallentin], [*Justinas V.D.], [*Darid Tromer], [*Brian O'Kennedy],
|
||||
[*Aaron Graham], [*Joerg Becker].
|
||||
|
||||
[*Joao Abecasis] for his early support and involvement in Spirit2
|
||||
development and for disturbing my peace every once in a while for a
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Spirit 2.4.2</title>
|
||||
<title>Spirit 2.5</title>
|
||||
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
|
||||
<link rel="home" href="index.html" title="Spirit 2.4.2">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="index.html" title="Spirit 2.5">
|
||||
<link rel="next" href="spirit/preface.html" title="Preface">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div><h2 class="title">
|
||||
<a name="spirit"></a>Spirit 2.4.2</h2></div>
|
||||
<a name="spirit"></a>Spirit 2.5</h2></div>
|
||||
<div><div class="authorgroup">
|
||||
<div class="author"><h3 class="author">
|
||||
<span class="firstname">Joel</span> <span class="surname">de Guzman</span>
|
||||
@@ -33,7 +33,7 @@
|
||||
</div></div>
|
||||
<div><p class="copyright">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id720513"></a><p>
|
||||
<a name="id847426"></a><p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
@@ -289,12 +289,12 @@
|
||||
</div>
|
||||
<p>
|
||||
This is the documentation of the newest version of <a href="http://boost-spirit.com" target="_top">Spirit</a>
|
||||
(currently, V2.4.2). If you're looking for the documentation of Spirit's previous
|
||||
(currently, V2.5). If you're looking for the documentation of Spirit's previous
|
||||
version (formerly Spirit V1.8), see <a href="../../../../libs/spirit/classic/index.html" target="_top"><span class="emphasis"><em>Spirit.Classic</em></span></a>.
|
||||
</p>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"><p><small>Last revised: January 29, 2011 at 00:27:27 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: April 14, 2011 at 01:30:18 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -120,7 +120,7 @@ skip "" ".*qi.reference.directive\..*" qi_index
|
||||
repeat "" ".*qi.reference.directive\..*" qi_index
|
||||
inf "" ".*qi.reference.directive\..*" qi_index
|
||||
omit "" ".*qi.reference.directive\..*" qi_index
|
||||
"as<T>" "as" ".*qi.reference.directive.as" qi_index
|
||||
"as<T>" "as" ".*qi.reference.directive.as" qi_index
|
||||
as_string "" ".*qi.reference.directive.as" qi_index
|
||||
as_wstring "" ".*qi.reference.directive.as" qi_index
|
||||
hold "" ".*qi.reference.directive.hold" qi_index
|
||||
@@ -139,7 +139,7 @@ columns "" ".*karma.reference.directive\..*" karma_index
|
||||
repeat "" ".*karma.reference.directive\..*" karma_index
|
||||
inf "" ".*karma.reference.directive\..*" karma_index
|
||||
omit "" ".*karma.reference.directive\..*" karma_index
|
||||
"as<T>" "as" ".*karma.reference.directive.as" karma_index
|
||||
"as<T>" "as" ".*karma.reference.directive.as" karma_index
|
||||
as_string "" ".*karma.reference.directive.as" karma_index
|
||||
as_wstring "" ".*karma.reference.directive.as" karma_index
|
||||
|
||||
@@ -209,13 +209,13 @@ uint_generator "" ".*karma.reference.numeric\..*" karma_index
|
||||
real_generator "" ".*karma.reference.numeric\..*" karma_index
|
||||
|
||||
# parser/generator operators
|
||||
"sequence (a >> b)" "sequence" ".*qi.reference.operator.sequence.*" qi_index
|
||||
"sequence (a >> b)" "sequence" ".*qi.reference.operator.sequence.*" qi_index
|
||||
"alternative (a | b)" "alternative" ".*qi.reference.operator.alternative.*" qi_index
|
||||
"kleene (*a)" "[K|k]leene" ".*qi.reference.operator.kleene.*" qi_index
|
||||
"plus (+a)" "[P|p]lus" ".*qi.reference.operator.plus.*" qi_index
|
||||
"list (a % b)" "list" ".*qi.reference.operator.list.*" qi_index
|
||||
"optional (-a)" "optional" ".*qi.reference.operator.optional.*" qi_index
|
||||
"and-predicate (&a)" "and-predicate" ".*qi.reference.operator.and_predicate.*" qi_index
|
||||
"and-predicate (&a)" "and-predicate" ".*qi.reference.operator.and_predicate.*" qi_index
|
||||
"not-predicate (!a)" "not-predicate" ".*qi.reference.operator.not_predicate.*" qi_index
|
||||
|
||||
"expectation (a > b)" "expectation" ".*qi.reference.operator.expect.*" qi_index
|
||||
@@ -223,13 +223,13 @@ real_generator "" ".*karma.reference.numeric\..*" karma_index
|
||||
"permutation (a ^ b)" "permutation" ".*qi.reference.operator.permutation.*" qi_index
|
||||
"sequential-or (a || b)" "sequential-or" ".*qi.reference.operator.sequential_or.*" qi_index
|
||||
|
||||
"sequence (a << b)" "sequence" ".*karma.reference.operator.sequence.*" karma_index
|
||||
"sequence (a << b)" "sequence" ".*karma.reference.operator.sequence.*" karma_index
|
||||
"alternative (a | b)" "alternative" ".*karma.reference.operator.alternative.*" karma_index
|
||||
"kleene (*a)" "[K|k]leene" ".*karma.reference.operator.kleene.*" karma_index
|
||||
"plus (+a)" "[P|p]lus" ".*karma.reference.operator.plus.*" karma_index
|
||||
"list (a % b)" "list" ".*karma.reference.operator.list.*" karma_index
|
||||
"optional (-a)" "optional" ".*karma.reference.operator.optional.*" karma_index
|
||||
"and-predicate (&a)" "and-predicate" ".*karma.reference.operator.and_predicate.*" karma_index
|
||||
"and-predicate (&a)" "and-predicate" ".*karma.reference.operator.and_predicate.*" karma_index
|
||||
"not-predicate (!a)" "not-predicate" ".*karma.reference.operator.not_predicate.*" karma_index
|
||||
|
||||
# stream parsers/generators
|
||||
|
||||
@@ -91,9 +91,7 @@ types).]
|
||||
[[`T`] [The numeric base type of the
|
||||
numeric parser.] [none]]
|
||||
[[`Radix`] [The radix base. This can be
|
||||
either 2 for binary, 8 for octal,
|
||||
10 for decimal and 16 for
|
||||
hexadecimal.] [10]]
|
||||
any base from 2..10 and 16] [10]]
|
||||
[[`MinDigits`] [The minimum number of digits
|
||||
allowable.] [1]]
|
||||
[[`MaxDigits`] [The maximum number of digits
|
||||
@@ -337,9 +335,7 @@ native support for `signed long long` (64 bit) unsigned integer types).]
|
||||
[[`T`] [The numeric base type of the
|
||||
numeric parser.] [none]]
|
||||
[[`Radix`] [The radix base. This can be
|
||||
either 2 for binary, 8 for octal,
|
||||
10 for decimal and 16 for
|
||||
hexadecimal.] [10]]
|
||||
any base from 2..10 and 16] [10]]
|
||||
[[`MinDigits`] [The minimum number of digits
|
||||
allowable.] [1]]
|
||||
[[`MaxDigits`] [The maximum number of digits
|
||||
@@ -751,10 +747,10 @@ There are four `RealPolicies` predefined for immediate use:
|
||||
[table Predefined Policies
|
||||
|
||||
[[Policies] [Description]]
|
||||
[[`ureal_policies<double> >`] [Without sign.]]
|
||||
[[`real_policies<double> >`] [With sign.]]
|
||||
[[`strict_ureal_policies<double> >`] [Without sign, dot required.]]
|
||||
[[`strict_real_policies<double> >`] [With sign, dot required.]]
|
||||
[[`ureal_policies<double>`] [Without sign.]]
|
||||
[[`real_policies<double>`] [With sign.]]
|
||||
[[`strict_ureal_policies<double>`] [Without sign, dot required.]]
|
||||
[[`strict_real_policies<double>`] [With sign, dot required.]]
|
||||
]
|
||||
|
||||
[note Integers are considered a subset of real numbers, so for instance,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
[article Spirit
|
||||
[quickbook 1.5]
|
||||
[version 2.4.2]
|
||||
[version 2.5]
|
||||
[authors [de Guzman, Joel], [Kaiser, Hartmut]]
|
||||
[copyright 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 Joel de Guzman, Hartmut Kaiser]
|
||||
[/ purpose Parser and Generator Library]
|
||||
@@ -23,10 +23,12 @@
|
||||
|
||||
[/ Some links ]
|
||||
|
||||
[def __version__ V2.5]
|
||||
|
||||
[def __spirit__ [@http://boost-spirit.com Spirit]]
|
||||
[def __spirit_list__ [@http://www.nabble.com/The-Spirit-Parser-Library-f3430.html Spirit General List]]
|
||||
[def __phoenix__ [@../../phoenix/doc/html/index.html Phoenix]]
|
||||
[def __boost_phoenix__ [@../../phoenix/doc/html/index.html Boost.Phoenix]]
|
||||
[def __boost_phoenix__ [@boost:/libs/phoenix/doc/html/index.html Boost.Phoenix]]
|
||||
[def __fusion__ [@boost:/libs/fusion/doc/html/index.html Boost.Fusion]]
|
||||
[def __mpl__ [@http://www.boost.org/libs/mpl/index.html Boost.Mpl]]
|
||||
[def __stl__ [@http://www.sgi.com/tech/stl/ STL]]
|
||||
@@ -434,12 +436,12 @@ For now, I'll put my stuff here ad-hoc (JDG). $$$]
|
||||
[template qi_auto[str] [link spirit.qi.reference.auto [str]]]
|
||||
[def __create_parser__ [link spirit.qi.reference.parse_api.create_parser `create_parser`]]
|
||||
|
||||
[__parse_api__ [link spirit.qi.reference.parse_api The Parse API]]
|
||||
[def __parse_api__ [link spirit.qi.reference.parse_api The Parse API]]
|
||||
|
||||
[/ Here we go ]
|
||||
|
||||
This is the documentation of the newest version of __spirit__ (currently,
|
||||
V2.4.2). If you're looking for the documentation of Spirit's previous version
|
||||
__version__). If you're looking for the documentation of Spirit's previous version
|
||||
(formerly Spirit V1.8), see __classic__.
|
||||
|
||||
[include preface.qbk]
|
||||
|
||||
22
doc/support/line_pos_iterator.qbk
Normal file
22
doc/support/line_pos_iterator.qbk
Normal file
@@ -0,0 +1,22 @@
|
||||
[/==============================================================================
|
||||
Copyright (C) 2001-2011 Hartmut Kaiser
|
||||
Copyright (C) 2001-2011 Joel de Guzman
|
||||
Copyright (C) 2011 Bryce Lelbach
|
||||
|
||||
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)
|
||||
==============================================================================/]
|
||||
|
||||
[import ../../../../boost/spirit/home/support/iterators/line_pos_iterator.hpp]
|
||||
[/ [import ../../example/support/line_pos_iterator.cpp] ]
|
||||
|
||||
[section:line_pos_iterator The line position iterator]
|
||||
|
||||
[line_pos_iterator_class]
|
||||
|
||||
[line_pos_iterator_utilities]
|
||||
|
||||
[/ [line_pos_iterator_example] ]
|
||||
|
||||
[endsect] [/ line_pos_iterator]
|
||||
|
||||
@@ -13,6 +13,18 @@
|
||||
|
||||
[heading What's changed in __qi__ and __karma__ from V2.4.2 (Boost V1.46.0) to V2.5 (Boost V1.47.0)]
|
||||
|
||||
This version of __spirit__ now supports the new version of __boost_phoenix__ (V3),
|
||||
which has been released as part of Boost V1.47. Please note that this support
|
||||
is purely preliminary and should not be considered production quality. The
|
||||
reason why we are releasing this now is to enable people who want to use the
|
||||
new version of __boost_phoenix__ in their code to do so without any conflicts with
|
||||
existing code using __spirit__. Generally, no __spirit__ code needs to be
|
||||
changed. To activate the use of __boost_phoenix__ V3 for __spirit__ you need to
|
||||
define the following preprocessor constant for your builds (before including
|
||||
any of Spirit's include files):
|
||||
|
||||
#define BOOST_SPIRIT_USE_PHOENIX_V3 1
|
||||
|
||||
[heading New Features in Qi or Karma]
|
||||
|
||||
* Added __utree__, a generic, hierarchical, and dynamic data structure that can
|
||||
@@ -26,6 +38,7 @@
|
||||
appended. This produced invalid C++ identifiers with terminals such as
|
||||
`int_`, which resulted in generated a type `int__type` with a bogus double
|
||||
underscore that is reserved for system use in C++.
|
||||
* The numeric parsers now allow arbitrary radix from 2..10 and 16
|
||||
* The placeholder `_val` now can be used in top level semantic actions outside
|
||||
of any right hand side of a rule. Here is an example:
|
||||
``
|
||||
@@ -55,12 +68,14 @@
|
||||
a test.
|
||||
* Fixed the __qi__ __qi_attr__ parser, the __qi__ __qi_symbols__ parser, and
|
||||
the __karma__ [karma_symbols `symbols<>`] generator to properly handle
|
||||
container attributes. Those have been broken in Boost V1.46.1 (thanks to
|
||||
Aaron Graham and Joerg Becker for reporting those).
|
||||
container attributes. These were broken in Boost V1.46.1 (thanks to
|
||||
Aaron Graham and Joerg Becker for reporting the problems).
|
||||
* Fixed the __qi_stream__ parser to properly adjust the iterator of the
|
||||
underlying input stream in the case when the stream parser component was
|
||||
successful. Thanks to Brian O'Kennedy who reported the problem on
|
||||
Stackoverflow.
|
||||
* Fixed failing Karma numerics generators when used with adapted ADTs (thanks
|
||||
to Colin Rundel for reporting that problem).
|
||||
|
||||
[heading Breaking Changes]
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace client
|
||||
|
||||
struct expr
|
||||
{
|
||||
template <typename T1, typename T2>
|
||||
template <typename T1, typename T2 = void>
|
||||
struct result { typedef void type; };
|
||||
|
||||
expr(char op) : op(op) {}
|
||||
@@ -58,7 +58,7 @@ namespace client
|
||||
|
||||
struct negate_expr
|
||||
{
|
||||
template <typename T1, typename T2>
|
||||
template <typename T1, typename T2 = void>
|
||||
struct result { typedef void type; };
|
||||
|
||||
void operator()(spirit::utree& expr, spirit::utree const& rhs) const
|
||||
|
||||
@@ -42,14 +42,13 @@ namespace client
|
||||
using qi::_1;
|
||||
using ascii::space;
|
||||
using phoenix::push_back;
|
||||
using phoenix::ref;
|
||||
|
||||
bool r = phrase_parse(first, last,
|
||||
|
||||
// Begin grammar
|
||||
(
|
||||
double_[push_back(ref(v), _1)]
|
||||
>> *(',' >> double_[push_back(ref(v), _1)])
|
||||
double_[push_back(phoenix::ref(v), _1)]
|
||||
>> *(',' >> double_[push_back(phoenix::ref(v), _1)])
|
||||
)
|
||||
,
|
||||
// End grammar
|
||||
|
||||
@@ -42,13 +42,12 @@ namespace client
|
||||
using qi::_1;
|
||||
using ascii::space;
|
||||
using phoenix::push_back;
|
||||
using phoenix::ref;
|
||||
|
||||
bool r = phrase_parse(first, last,
|
||||
|
||||
// Begin grammar
|
||||
(
|
||||
double_[push_back(ref(v), _1)] % ','
|
||||
double_[push_back(phoenix::ref(v), _1)] % ','
|
||||
)
|
||||
,
|
||||
// End grammar
|
||||
|
||||
@@ -841,6 +841,7 @@ main()
|
||||
using boost::phoenix::val;
|
||||
using boost::spirit::qi::double_;
|
||||
using boost::spirit::qi::real_parser;
|
||||
using boost::spirit::qi::lit;
|
||||
//]
|
||||
|
||||
//[reference_real
|
||||
@@ -872,6 +873,7 @@ main()
|
||||
using boost::phoenix::val;
|
||||
using boost::spirit::qi::bool_;
|
||||
using boost::spirit::qi::bool_parser;
|
||||
using boost::spirit::qi::lit;
|
||||
//]
|
||||
|
||||
//[reference_bool
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
||||
<title>Spirit Repository 0.1</title>
|
||||
<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.75.0">
|
||||
<link rel="home" href="index.html" title="Spirit Repository 0.1">
|
||||
<link rel="home" href="index.html" title="Spirit Repository 0.2">
|
||||
<link rel="next" href="spirit_repository/preface.html" title="Preface">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="titlepage">
|
||||
<div>
|
||||
<div><h2 class="title">
|
||||
<a name="spirit_repository"></a>Spirit Repository 0.1</h2></div>
|
||||
<a name="spirit_repository"></a>Spirit Repository 0.2</h2></div>
|
||||
<div><div class="authorgroup">
|
||||
<div class="author"><h3 class="author">
|
||||
<span class="firstname">Joel</span> <span class="surname">de Guzman</span>
|
||||
@@ -31,9 +31,9 @@
|
||||
<span class="firstname">Hartmut</span> <span class="surname">Kaiser</span>
|
||||
</h3></div>
|
||||
</div></div>
|
||||
<div><p class="copyright">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser</p></div>
|
||||
<div><p class="copyright">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser</p></div>
|
||||
<div><div class="legalnotice">
|
||||
<a name="id834034"></a><p>
|
||||
<a name="id863156"></a><p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
@@ -62,11 +62,17 @@
|
||||
Confix Parser Directive</a></span></dt>
|
||||
<dt><span class="section"><a href="spirit_repository/qi_components/directives/distinct.html">Qi
|
||||
Distinct Parser Directive</a></span></dt>
|
||||
<dt><span class="section"><a href="spirit_repository/qi_components/directives/kwd.html">Qi
|
||||
Keyword Parser Directive </a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="spirit_repository/qi_components/nonterminal.html">Qi Parser
|
||||
Non-terminals</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="spirit_repository/qi_components/nonterminal/subrule.html">Qi
|
||||
subrules</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="spirit_repository/qi_components/operators.html">Qi Parser
|
||||
Operators</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="spirit_repository/qi_components/operators/keyword_list.html">Keyword
|
||||
List Operator</a></span></dt></dl></dd>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="spirit_repository/karma_components.html">Karma Components</a></span></dt>
|
||||
<dd><dl>
|
||||
@@ -79,11 +85,12 @@
|
||||
<dd><dl><dt><span class="section"><a href="spirit_repository/karma_components/nonterminal/subrule.html">Karma
|
||||
subrules</a></span></dt></dl></dd>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="spirit_repository/acknowledgments.html">Acknowledgments</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"><p><small>Last revised: January 27, 2011 at 01:05:40 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: March 26, 2011 at 19:23:38 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="../index.html" title="Spirit Repository 0.1">
|
||||
<link rel="up" href="../index.html" title="Spirit Repository 0.1">
|
||||
<link rel="prev" href="qi_components/nonterminal/subrule.html" title="Qi subrules">
|
||||
<link rel="prev" href="qi_components/operators/keyword_list.html" title="Keyword List Operator">
|
||||
<link rel="next" href="karma_components/directives.html" title="Karma Generator Directives">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@@ -20,7 +20,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="qi_components/nonterminal/subrule.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="qi_components/operators/keyword_list.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||
@@ -47,7 +47,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="qi_components/nonterminal/subrule.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="qi_components/operators/keyword_list.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="karma_components/directives.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<title>Karma Confix Generator</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="../../../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="../nonterminal.html" title="Karma Generator Non-terminals">
|
||||
@@ -28,7 +28,7 @@
|
||||
Confix Generator</a>
|
||||
</h4></div></div></div>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.description"></a><h6>
|
||||
<a name="id858383"></a>
|
||||
<a name="id898353"></a>
|
||||
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -93,20 +93,20 @@
|
||||
tag using a simple: <code class="computeroutput"><span class="identifier">ol</span><span class="special">[</span><span class="string">"Some text"</span><span class="special">]</span></code> (which results in <code class="computeroutput"><span class="special"><</span><span class="identifier">ol</span><span class="special">></span><span class="identifier">Some</span> <span class="identifier">text</span><span class="special"></</span><span class="identifier">ol</span><span class="special">></span></code>).
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.header"></a><h6>
|
||||
<a name="id860372"></a>
|
||||
<a name="id899318"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.synopsis"></a><h6>
|
||||
<a name="id860445"></a>
|
||||
<a name="id899392"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.parameters"></a><h6>
|
||||
<a name="id860493"></a>
|
||||
<a name="id899440"></a>
|
||||
<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">
|
||||
@@ -175,7 +175,7 @@
|
||||
All three parameters can be arbitrary complex generators themselves.
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.attribute"></a><h6>
|
||||
<a name="id860657"></a>
|
||||
<a name="id899603"></a>
|
||||
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.attribute">Attribute</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -202,7 +202,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.example"></a><h6>
|
||||
<a name="id860832"></a>
|
||||
<a name="id899778"></a>
|
||||
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.example">Example</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -211,7 +211,7 @@
|
||||
styles and a function prototype (for the full example code see here: <a href="../../../../../example/karma/confix.cpp" target="_top">confix.cpp</a>)
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.prerequisites"></a><h6>
|
||||
<a name="id860862"></a>
|
||||
<a name="id899808"></a>
|
||||
<a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.prerequisites">Prerequisites</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -241,7 +241,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles"></a><h6>
|
||||
<a name="id861098"></a>
|
||||
<a name="id900044"></a>
|
||||
<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>
|
||||
@@ -285,7 +285,7 @@
|
||||
*/</span> </code>.
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype"></a><h6>
|
||||
<a name="id861392"></a>
|
||||
<a name="id900338"></a>
|
||||
<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>
|
||||
@@ -317,7 +317,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
<title>Karma subrules</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="../../../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="../../acknowledgments.html" title="Acknowledgments">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -19,7 +20,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a>
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../acknowledgments.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
@@ -27,7 +28,7 @@
|
||||
subrules</a>
|
||||
</h4></div></div></div>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.description"></a><h6>
|
||||
<a name="id861721"></a>
|
||||
<a name="id900667"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -85,21 +86,21 @@
|
||||
parts), whereas the rest can use rules and grammars.
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.header"></a><h6>
|
||||
<a name="id861987"></a>
|
||||
<a name="id900934"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_"></a><h6>
|
||||
<a name="id862064"></a>
|
||||
<a name="id901009"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_"></a><h6>
|
||||
<a name="id862128"></a>
|
||||
<a name="id901074"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_">Parameters
|
||||
(declaration)</a>
|
||||
</h6>
|
||||
@@ -169,7 +170,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_"></a><h6>
|
||||
<a name="id862263"></a>
|
||||
<a name="id902369"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_">Synopsis
|
||||
(usage)</a>
|
||||
</h6>
|
||||
@@ -198,7 +199,7 @@
|
||||
<span class="special">)(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...)</span> <span class="comment">// Arguments to group, i.e. to start subrule srA
|
||||
</span></pre>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.parameters__usage_"></a><h6>
|
||||
<a name="id862498"></a>
|
||||
<a name="id902605"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__usage_">Parameters
|
||||
(usage)</a>
|
||||
</h6>
|
||||
@@ -322,7 +323,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.groups"></a><h6>
|
||||
<a name="id862824"></a>
|
||||
<a name="id902931"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.groups">Groups</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -367,7 +368,7 @@
|
||||
</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.attributes"></a><h6>
|
||||
<a name="id863218"></a>
|
||||
<a name="id903325"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.attributes">Attributes</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -396,7 +397,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.locals"></a><h6>
|
||||
<a name="id863306"></a>
|
||||
<a name="id903412"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.locals">Locals</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -406,7 +407,7 @@
|
||||
refer to the subrule's locals, if present.
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.example"></a><h6>
|
||||
<a name="id863342"></a>
|
||||
<a name="id903448"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.example">Example</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -472,7 +473,7 @@
|
||||
<a href="../../../../../example/karma/mini_xml_karma_sr.cpp" target="_top">../../example/karma/mini_xml_karma_sr.cpp</a>
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.performance"></a><h6>
|
||||
<a name="id864368"></a>
|
||||
<a name="id904333"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.performance">Performance</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -483,7 +484,7 @@
|
||||
subrules is very similar, so performance is very similar too).
|
||||
</p>
|
||||
<a name="spirit_repository.karma_components.nonterminal.subrule.notes"></a><h6>
|
||||
<a name="id864405"></a>
|
||||
<a name="id904370"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.notes">Notes</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -499,7 +500,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
@@ -507,7 +508,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a>
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../acknowledgments.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<title>Preface</title>
|
||||
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="../index.html" title="Spirit Repository 0.1">
|
||||
<link rel="up" href="../index.html" title="Spirit Repository 0.1">
|
||||
<link rel="prev" href="../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="qi_components.html" title="Qi Components">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@@ -27,20 +27,20 @@
|
||||
<a name="spirit_repository.preface"></a><a class="link" href="preface.html" title="Preface">Preface</a>
|
||||
</h2></div></div></div>
|
||||
<a name="spirit_repository.preface.the_spirit_repository"></a><h4>
|
||||
<a name="id834064"></a>
|
||||
<a name="id863183"></a>
|
||||
<a class="link" href="preface.html#spirit_repository.preface.the_spirit_repository">The Spirit
|
||||
Repository</a>
|
||||
</h4>
|
||||
<p>
|
||||
The <a href="http://spirit.sourceforge.net" target="_top">Spirit</a> repository is
|
||||
a community effort collecting different reusable components (primitives, directives,
|
||||
grammars, etc.) for <span class="emphasis"><em>Spirit.Qi</em></span> parsers and <span class="emphasis"><em>Spirit.Karma</em></span>
|
||||
The <a href="http://boost-spirit.com" target="_top">Spirit</a> repository is a community
|
||||
effort collecting different reusable components (primitives, directives, grammars,
|
||||
etc.) for <span class="emphasis"><em>Spirit.Qi</em></span> parsers and <span class="emphasis"><em>Spirit.Karma</em></span>
|
||||
generators. All components in the repository have been peer reviewed and/or
|
||||
discussed on the <a href="http://www.nabble.com/The-Spirit-Parser-Library-f3430.html" target="_top">Spirit
|
||||
General List</a>. The aim is to broaden the scope of the <a href="http://spirit.sourceforge.net" target="_top">Spirit</a>
|
||||
General List</a>. The aim is to broaden the scope of the <a href="http://boost-spirit.com" target="_top">Spirit</a>
|
||||
library while being able to maintain its high standards in terms of code quality,
|
||||
flexibility, and maintainability. At the same time it encourages people to
|
||||
contribute even small components as it lessens the hurdle of becoming a <a href="http://www.boost.org/" target="_top">Boost</a> and <a href="http://spirit.sourceforge.net" target="_top">Spirit</a>
|
||||
contribute even small components as it lessens the hurdle of becoming a <a href="http://www.boost.org/" target="_top">Boost</a> and <a href="http://boost-spirit.com" target="_top">Spirit</a>
|
||||
author.
|
||||
</p>
|
||||
<p>
|
||||
@@ -77,7 +77,7 @@
|
||||
core library.
|
||||
</p>
|
||||
<a name="spirit_repository.preface.how_to_use_this_manual"></a><h4>
|
||||
<a name="id834153"></a>
|
||||
<a name="id863271"></a>
|
||||
<a class="link" href="preface.html#spirit_repository.preface.how_to_use_this_manual">How to use
|
||||
this manual</a>
|
||||
</h4>
|
||||
@@ -86,7 +86,7 @@
|
||||
icons precede some text to indicate:
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id834166"></a><p class="title"><b>Table 1. Icons</b></p>
|
||||
<a name="id863285"></a><p class="title"><b>Table 1. Icons</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Icons">
|
||||
<colgroup>
|
||||
<col>
|
||||
@@ -208,14 +208,14 @@
|
||||
Tools</a>.
|
||||
</p>
|
||||
<a name="spirit_repository.preface.support"></a><h4>
|
||||
<a name="id834422"></a>
|
||||
<a name="id863540"></a>
|
||||
<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
|
||||
the <a href="http://www.nabble.com/The-Spirit-Parser-Library-f3430.html" target="_top">Spirit
|
||||
General List</a>. The mailing list has a searchable archive. A search link
|
||||
to this archive is provided in <a href="http://spirit.sourceforge.net" target="_top">Spirit</a>'s
|
||||
to this archive is provided in <a href="http://boost-spirit.com" target="_top">Spirit</a>'s
|
||||
home page. You may also read and post messages to the mailing list through
|
||||
<a href="news://news.gmane.org/gmane.comp.spirit.general" target="_top">Spirit General
|
||||
NNTP news portal</a> (thanks to <a href="http://www.gmane.org" target="_top">Gmane</a>).
|
||||
@@ -224,7 +224,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
|
||||
@@ -42,11 +42,17 @@
|
||||
Confix Parser Directive</a></span></dt>
|
||||
<dt><span class="section"><a href="qi_components/directives/distinct.html">Qi
|
||||
Distinct Parser Directive</a></span></dt>
|
||||
<dt><span class="section"><a href="qi_components/directives/kwd.html">Qi
|
||||
Keyword Parser Directive </a></span></dt>
|
||||
</dl></dd>
|
||||
<dt><span class="section"><a href="qi_components/nonterminal.html">Qi Parser
|
||||
Non-terminals</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="qi_components/nonterminal/subrule.html">Qi
|
||||
subrules</a></span></dt></dl></dd>
|
||||
<dt><span class="section"><a href="qi_components/operators.html">Qi Parser
|
||||
Operators</a></span></dt>
|
||||
<dd><dl><dt><span class="section"><a href="qi_components/operators/keyword_list.html">Keyword
|
||||
List Operator</a></span></dt></dl></dd>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
Confix Parser Directive</a></span></dt>
|
||||
<dt><span class="section"><a href="directives/distinct.html">Qi
|
||||
Distinct Parser Directive</a></span></dt>
|
||||
<dt><span class="section"><a href="directives/kwd.html">Qi
|
||||
Keyword Parser Directive </a></span></dt>
|
||||
</dl></div>
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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.75.0">
|
||||
<link rel="home" href="../../../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="distinct.html" title="Qi Distinct Parser Directive">
|
||||
@@ -28,7 +28,7 @@
|
||||
Confix Parser Directive</a>
|
||||
</h4></div></div></div>
|
||||
<a name="spirit_repository.qi_components.directives.confix.description"></a><h6>
|
||||
<a name="id847270"></a>
|
||||
<a name="id876299"></a>
|
||||
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -95,20 +95,20 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="spirit_repository.qi_components.directives.confix.header"></a><h6>
|
||||
<a name="id848044"></a>
|
||||
<a name="id878160"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.directives.confix.synopsis"></a><h6>
|
||||
<a name="id848122"></a>
|
||||
<a name="id878238"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.directives.confix.parameters"></a><h6>
|
||||
<a name="id848175"></a>
|
||||
<a name="id878291"></a>
|
||||
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parameters">Parameters</a>
|
||||
</h6>
|
||||
<div class="informaltable"><table class="table">
|
||||
@@ -172,7 +172,7 @@
|
||||
All three parameters can be arbitrarily complex parsers themselves.
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.confix.attribute"></a><h6>
|
||||
<a name="id848321"></a>
|
||||
<a name="id878437"></a>
|
||||
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.attribute">Attribute</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -198,7 +198,7 @@
|
||||
</p></td></tr>
|
||||
</table></div>
|
||||
<a name="spirit_repository.qi_components.directives.confix.example"></a><h6>
|
||||
<a name="id848559"></a>
|
||||
<a name="id878675"></a>
|
||||
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.example">Example</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -208,7 +208,7 @@
|
||||
see <a href="../../../../../example/qi/confix.cpp" target="_top">confix.cpp</a>)
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.confix.prerequisites"></a><h6>
|
||||
<a name="id848594"></a>
|
||||
<a name="id878710"></a>
|
||||
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.prerequisites">Prerequisites</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -243,7 +243,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.confix.parsing_different_comment_styles"></a><h6>
|
||||
<a name="id849004"></a>
|
||||
<a name="id879120"></a>
|
||||
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_different_comment_styles">Parsing
|
||||
Different Comment Styles</a>
|
||||
</h6>
|
||||
@@ -295,7 +295,7 @@
|
||||
This is a comment */</span> </code>".
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.confix.parsing_tagged_data"></a><h6>
|
||||
<a name="id849575"></a>
|
||||
<a name="id879691"></a>
|
||||
<a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_tagged_data">Parsing
|
||||
Tagged Data</a>
|
||||
</h6>
|
||||
@@ -324,7 +324,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<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.75.0">
|
||||
<link rel="home" href="../../../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="../nonterminal.html" title="Qi Parser Non-terminals">
|
||||
<link rel="next" href="kwd.html" title="Qi Keyword Parser Directive">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -20,7 +20,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="kwd.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
@@ -28,7 +28,7 @@
|
||||
Distinct Parser Directive</a>
|
||||
</h4></div></div></div>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.description"></a><h6>
|
||||
<a name="id849924"></a>
|
||||
<a name="id880040"></a>
|
||||
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -140,20 +140,20 @@
|
||||
above.
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.header"></a><h6>
|
||||
<a name="id851159"></a>
|
||||
<a name="id881275"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.synopsis"></a><h6>
|
||||
<a name="id851237"></a>
|
||||
<a name="id881353"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.parameters"></a><h6>
|
||||
<a name="id851281"></a>
|
||||
<a name="id881397"></a>
|
||||
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.parameters">Parameters</a>
|
||||
</h6>
|
||||
<div class="informaltable"><table class="table">
|
||||
@@ -206,7 +206,7 @@
|
||||
All two parameters can be arbitrary complex parsers themselves.
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.attribute"></a><h6>
|
||||
<a name="id851388"></a>
|
||||
<a name="id881504"></a>
|
||||
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.attribute">Attribute</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -220,7 +220,7 @@
|
||||
<pre class="programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--></span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">b</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
|
||||
</pre>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.example"></a><h6>
|
||||
<a name="id851505"></a>
|
||||
<a name="id881621"></a>
|
||||
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.example">Example</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -228,7 +228,7 @@
|
||||
parser. <a href="../../../../../example/qi/distinct.cpp" target="_top">distinct.cpp</a>)
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.prerequisites"></a><h6>
|
||||
<a name="id851538"></a>
|
||||
<a name="id881654"></a>
|
||||
<a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.prerequisites">Prerequisites</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -257,7 +257,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords"></a><h6>
|
||||
<a name="id851774"></a>
|
||||
<a name="id881890"></a>
|
||||
<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>
|
||||
@@ -317,7 +317,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
@@ -325,7 +325,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="confix.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../directives.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="kwd.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="../../index.html" title="Spirit Repository 0.1">
|
||||
<link rel="up" href="../qi_components.html" title="Qi Components">
|
||||
<link rel="prev" href="directives/distinct.html" title="Qi Distinct Parser Directive">
|
||||
<link rel="prev" href="directives/kwd.html" title="Qi Keyword Parser Directive">
|
||||
<link rel="next" href="nonterminal/subrule.html" title="Qi subrules">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@@ -20,7 +20,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="directives/distinct.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="directives/kwd.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h3 class="title">
|
||||
@@ -40,7 +40,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="directives/distinct.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="directives/kwd.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../qi_components.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nonterminal/subrule.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<title>Qi subrules</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="../../../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="../../karma_components.html" title="Karma Components">
|
||||
<link rel="next" href="../operators.html" title="Qi Parser Operators">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table cellpadding="2" width="100%"><tr>
|
||||
@@ -20,7 +20,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../karma_components.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../operators.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="titlepage"><div><div><h4 class="title">
|
||||
@@ -28,7 +28,7 @@
|
||||
subrules</a>
|
||||
</h4></div></div></div>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.description"></a><h6>
|
||||
<a name="id854341"></a>
|
||||
<a name="id890393"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -97,21 +97,21 @@
|
||||
most performance-critical parts), whereas the rest can use rules and grammars.
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.header"></a><h6>
|
||||
<a name="id854732"></a>
|
||||
<a name="id891331"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_"></a><h6>
|
||||
<a name="id854808"></a>
|
||||
<a name="id891406"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_"></a><h6>
|
||||
<a name="id854872"></a>
|
||||
<a name="id891471"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_">Parameters
|
||||
(declaration)</a>
|
||||
</h6>
|
||||
@@ -181,7 +181,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_"></a><h6>
|
||||
<a name="id855007"></a>
|
||||
<a name="id891606"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_">Synopsis
|
||||
(usage)</a>
|
||||
</h6>
|
||||
@@ -210,7 +210,7 @@
|
||||
<span class="special">)(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...)</span> <span class="comment">// Arguments to group, i.e. to start subrule srA
|
||||
</span></pre>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.parameters__usage_"></a><h6>
|
||||
<a name="id855242"></a>
|
||||
<a name="id891841"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__usage_">Parameters
|
||||
(usage)</a>
|
||||
</h6>
|
||||
@@ -334,7 +334,7 @@
|
||||
</tbody>
|
||||
</table></div>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.groups"></a><h6>
|
||||
<a name="id855567"></a>
|
||||
<a name="id892166"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.groups">Groups</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -379,7 +379,7 @@
|
||||
</span><span class="special">;</span>
|
||||
</pre>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.attributes"></a><h6>
|
||||
<a name="id855968"></a>
|
||||
<a name="id892567"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.attributes">Attributes</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -408,7 +408,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.locals"></a><h6>
|
||||
<a name="id856605"></a>
|
||||
<a name="id892657"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.locals">Locals</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -418,7 +418,7 @@
|
||||
refer to the subrule's locals, if present.
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.example"></a><h6>
|
||||
<a name="id856641"></a>
|
||||
<a name="id892693"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.example">Example</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -506,7 +506,7 @@
|
||||
<a href="../../../../../example/qi/mini_xml2_sr.cpp" target="_top">../../example/qi/mini_xml2_sr.cpp</a>
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.performance"></a><h6>
|
||||
<a name="id857901"></a>
|
||||
<a name="id895182"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.performance">Performance</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -514,7 +514,7 @@
|
||||
examples to subrules, with various compilers.
|
||||
</p>
|
||||
<div class="table">
|
||||
<a name="id857916"></a><p class="title"><b>Table 2. Subrules performance</b></p>
|
||||
<a name="id895198"></a><p class="title"><b>Table 2. Subrules performance</b></p>
|
||||
<div class="table-contents"><table class="table" summary="Subrules performance">
|
||||
<colgroup>
|
||||
<col>
|
||||
@@ -761,7 +761,7 @@
|
||||
</li>
|
||||
</ul></div>
|
||||
<a name="spirit_repository.qi_components.nonterminal.subrule.notes"></a><h6>
|
||||
<a name="id858309"></a>
|
||||
<a name="id895590"></a>
|
||||
<a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.notes">Notes</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -777,7 +777,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
@@ -785,7 +785,7 @@
|
||||
</tr></table>
|
||||
<hr>
|
||||
<div class="spirit-nav">
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../karma_components.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
<a accesskey="p" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../nonterminal.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../operators.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<title>Qi advance Parser</title>
|
||||
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
|
||||
<link rel="home" href="../../../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="flush_multi_pass.html" title="Qi flush_multi_pass parser">
|
||||
@@ -28,7 +28,7 @@
|
||||
advance Parser</a>
|
||||
</h4></div></div></div>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.description"></a><h6>
|
||||
<a name="id834496"></a>
|
||||
<a name="id863615"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -45,7 +45,7 @@
|
||||
unnecessary, as in the case where large binary objects are being parsed.
|
||||
Take, for example, the following binary data:
|
||||
</p>
|
||||
<pre class="programlisting"><span class="number">00</span> <span class="number">00</span> <span class="number">00</span> <span class="number">01</span> <span class="number">77</span> <span class="identifier">fc</span> <span class="identifier">b4</span> <span class="number">51</span> <span class="number">0</span><span class="identifier">a</span> <span class="identifier">b3</span> <span class="identifier">b7</span> <span class="special">...</span> <span class="error">1</span><span class="identifier">e</span> <span class="number">60</span> <span class="number">70</span> <span class="identifier">b6</span> <span class="number">00</span> <span class="number">00</span> <span class="number">01</span> <span class="number">00</span>
|
||||
<pre class="programlisting">00 00 00 01 77 fc b4 51 0a b3 b7 ... 1e 60 70 b6 00 00 01 00
|
||||
</pre>
|
||||
<p>
|
||||
If the first 4 bytes are a little-endian 32-bit integer describing the
|
||||
@@ -66,20 +66,20 @@
|
||||
<pre class="programlisting"><span class="identifier">little_dword</span><span class="special">[</span><span class="identifier">_a</span> <span class="special">=</span> <span class="identifier">_1</span><span class="special">]</span> <span class="special">>></span> <span class="identifier">advance</span><span class="special">(</span><span class="identifier">_a</span><span class="special">)</span> <span class="special">>></span> <span class="identifier">little_dword</span><span class="special">...</span>
|
||||
</pre>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.header"></a><h6>
|
||||
<a name="id842573"></a>
|
||||
<a name="id871597"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.synopsis"></a><h6>
|
||||
<a name="id842651"></a>
|
||||
<a name="id871675"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.parameters"></a><h6>
|
||||
<a name="id842688"></a>
|
||||
<a name="id871712"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parameters">Parameters</a>
|
||||
</h6>
|
||||
<div class="informaltable"><table class="table">
|
||||
@@ -113,7 +113,7 @@
|
||||
</tr></tbody>
|
||||
</table></div>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.attribute"></a><h6>
|
||||
<a name="id842759"></a>
|
||||
<a name="id871783"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.attribute">Attribute</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -123,7 +123,7 @@
|
||||
<pre class="programlisting"><span class="identifier">advance</span> <span class="special">--></span> <span class="identifier">unused</span>
|
||||
</pre>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.example"></a><h6>
|
||||
<a name="id842813"></a>
|
||||
<a name="id871837"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.example">Example</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -132,7 +132,7 @@
|
||||
binary data (for the full example code see <a href="../../../../../example/qi/advance.cpp" target="_top">advance.cpp</a>)
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.prerequisites"></a><h6>
|
||||
<a name="id842848"></a>
|
||||
<a name="id871872"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.prerequisites">Prerequisites</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -162,7 +162,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.setting_up_the_grammar"></a><h6>
|
||||
<a name="id843119"></a>
|
||||
<a name="id872143"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.setting_up_the_grammar">Setting
|
||||
up the Grammar</a>
|
||||
</h6>
|
||||
@@ -206,7 +206,7 @@
|
||||
descend into alternatives.
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data"></a><h6>
|
||||
<a name="id843574"></a>
|
||||
<a name="id872598"></a>
|
||||
<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>
|
||||
@@ -245,7 +245,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation"></a><h6>
|
||||
<a name="id844258"></a>
|
||||
<a name="id873282"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation">Parsing
|
||||
the Alternative Representation</a>
|
||||
</h6>
|
||||
@@ -284,7 +284,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.advance.notes"></a><h6>
|
||||
<a name="id846009"></a>
|
||||
<a name="id875038"></a>
|
||||
<a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.notes">Notes</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -295,7 +295,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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.75.0">
|
||||
<link rel="home" href="../../../index.html" title="Spirit Repository 0.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">
|
||||
<link rel="next" href="../directives.html" title="Qi Parser Directives">
|
||||
@@ -28,7 +28,7 @@
|
||||
flush_multi_pass parser</a>
|
||||
</h4></div></div></div>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.description"></a><h6>
|
||||
<a name="id846049"></a>
|
||||
<a name="id875078"></a>
|
||||
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.description">Description</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -53,20 +53,20 @@
|
||||
<code class="computeroutput"><span class="identifier">eps</span></code>).
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.header"></a><h6>
|
||||
<a name="id846157"></a>
|
||||
<a name="id875186"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.synopsis"></a><h6>
|
||||
<a name="id846230"></a>
|
||||
<a name="id875259"></a>
|
||||
<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>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.parameters"></a><h6>
|
||||
<a name="id846252"></a>
|
||||
<a name="id875280"></a>
|
||||
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.parameters">Parameters</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -74,7 +74,7 @@
|
||||
not require any parameters.
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.attribute"></a><h6>
|
||||
<a name="id846276"></a>
|
||||
<a name="id875304"></a>
|
||||
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.attribute">Attribute</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -84,7 +84,7 @@
|
||||
<pre class="programlisting"><span class="identifier">flush_multi_pass</span> <span class="special">--></span> <span class="identifier">unused</span>
|
||||
</pre>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.example"></a><h6>
|
||||
<a name="id846325"></a>
|
||||
<a name="id875354"></a>
|
||||
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.example">Example</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -96,7 +96,7 @@
|
||||
a function prototype (for the full example code see here: <a href="../../../../../example/qi/flush_multi_pass.cpp" target="_top">flush_multi_pass.cpp</a>)
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites"></a><h6>
|
||||
<a name="id846357"></a>
|
||||
<a name="id875386"></a>
|
||||
<a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites">Prerequisites</a>
|
||||
</h6>
|
||||
<p>
|
||||
@@ -125,7 +125,7 @@
|
||||
<p>
|
||||
</p>
|
||||
<a name="spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer"></a><h6>
|
||||
<a name="id846566"></a>
|
||||
<a name="id875595"></a>
|
||||
<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>
|
||||
@@ -193,7 +193,7 @@
|
||||
</div>
|
||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||
<td align="left"></td>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2010 Joel de Guzman, Hartmut Kaiser<p>
|
||||
<td align="right"><div class="copyright-footer">Copyright © 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||
</p>
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
[def __qi_advance__ [link spirit_repository.qi_components.primitive.advance `advance`]]
|
||||
[def __qi_subrule__ [link spirit_repository.qi_components.nonterminal.subrule `subrule`]]
|
||||
[def __qi_confix__ [link spirit_repository.qi_components.directives.confix `confix`]]
|
||||
[def __qi_keywords__ [link spirit_repository.qi_components.operators.keyword_list keyword_list]]
|
||||
[def __qi_keywords_list__ [link spirit_repository.qi_components.directives.kwd `kwd()[]`]]
|
||||
|
||||
[def __karma_subrule__ [link spirit_repository.karma_components.nonterminal.subrule `subrule`]]
|
||||
|
||||
|
||||
72
test/Jamfile
72
test/Jamfile
@@ -7,6 +7,24 @@
|
||||
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
#==============================================================================
|
||||
|
||||
# bring in rules for testing
|
||||
import testing ;
|
||||
import modules ;
|
||||
import feature ;
|
||||
|
||||
###############################################################################
|
||||
# new feature definition allowing to switch between Phoenix V2 and V3 tests
|
||||
feature.feature phoenix_v3
|
||||
: off on
|
||||
: composite propagated
|
||||
;
|
||||
|
||||
feature.compose <phoenix_v3>on
|
||||
: <define>BOOST_SPIRIT_USE_PHOENIX_V3=1
|
||||
;
|
||||
|
||||
###############################################################################
|
||||
project spirit_v2x/test
|
||||
: requirements
|
||||
<include>.
|
||||
@@ -16,10 +34,32 @@ project spirit_v2x/test
|
||||
:
|
||||
;
|
||||
|
||||
path-constant LEX_DIR : $(BOOST_ROOT)/libs/spirit/test/lex ;
|
||||
v2_tests = ;
|
||||
v3_tests = ;
|
||||
|
||||
# bring in rules for testing
|
||||
import testing ;
|
||||
rule run ( sources + : args * : input-files * : requirements * : target-name ? : default-build * )
|
||||
{
|
||||
target-name ?= $(sources[1]:D=:S=) ;
|
||||
v2_tests += [ testing.run $(sources) : $(args) : $(input-files) : $(requirements) : $(target-name)-p2 : $(default-build) ] ;
|
||||
v3_tests += [ testing.run $(sources) : $(args) : $(input-files) : $(requirements) <phoenix_v3>on : $(target-name)-p3 : $(default-build) ] ;
|
||||
}
|
||||
|
||||
rule compile ( sources + : requirements * : target-name ? )
|
||||
{
|
||||
target-name ?= $(sources[1]:D=:S=) ;
|
||||
v2_tests += [ testing.compile $(sources) : $(requirements) : $(target-name)-p2 ] ;
|
||||
v3_tests += [ testing.compile $(sources) : $(requirements) <phoenix_v3>on : $(target-name)-p3 ] ;
|
||||
}
|
||||
|
||||
rule compile-fail ( sources + : requirements * : target-name ? )
|
||||
{
|
||||
target-name ?= $(sources[1]:D=:S=) ;
|
||||
v2_tests += [ testing.compile-fail $(sources) : $(requirements) : $(target-name)-p2 ] ;
|
||||
v3_tests += [ testing.compile-fail $(sources) : $(requirements) <phoenix_v3>on : $(target-name)-p3 ] ;
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
path-constant LEX_DIR : $(BOOST_ROOT)/libs/spirit/test/lex ;
|
||||
|
||||
{
|
||||
###########################################################################
|
||||
@@ -201,6 +241,7 @@ import testing ;
|
||||
[ run karma/regression_semantic_action_attribute.cpp : : : : karma_regression_semantic_action_attribute ]
|
||||
[ run karma/regression_real_scientific.cpp : : : : karma_regression_real_scientific ]
|
||||
[ compile karma/regression_const_real_policies.cpp : : regression_const_real_policies ]
|
||||
[ run karma/regression_numerics_adapt_adt.cpp : : : : karma_regression_numerics_adapt_adt ]
|
||||
|
||||
;
|
||||
|
||||
@@ -230,9 +271,15 @@ import testing ;
|
||||
[ run lex/regression_basic_lexer.cpp : : : : lex_regression_basic_lexer ]
|
||||
[ run lex/regression_matlib_dynamic.cpp : : : : lex_regression_matlib_dynamic ]
|
||||
[ run lex/regression_matlib_generate.cpp : $(LEX_DIR)/matlib_static.h : : : lex_regression_matlib_generate ]
|
||||
[ run lex/regression_matlib_static.cpp : : : <dependency>.//lex_regression_matlib_generate : lex_regression_matlib_static ]
|
||||
[ run lex/regression_matlib_static.cpp : : :
|
||||
<phoenix_v3>on:<dependency>.//lex_regression_matlib_generate-p3
|
||||
<phoenix_v3>off:<dependency>.//lex_regression_matlib_generate-p2
|
||||
: lex_regression_matlib_static ]
|
||||
[ run lex/regression_matlib_generate_switch.cpp : $(LEX_DIR)/matlib_static_switch.h : : : lex_regression_matlib_generate_switch ]
|
||||
[ run lex/regression_matlib_switch.cpp : : : <dependency>.//lex_regression_matlib_generate_switch : lex_regression_matlib_switch ]
|
||||
[ run lex/regression_matlib_switch.cpp : : :
|
||||
<phoenix_v3>on:<dependency>.//lex_regression_matlib_generate_switch-p3
|
||||
<phoenix_v3>off:<dependency>.//lex_regression_matlib_generate_switch-p2
|
||||
: lex_regression_matlib_switch ]
|
||||
[ run lex/regression_word_count.cpp : : : : lex_regression_word_count ]
|
||||
[ run lex/regression_syntax_error.cpp : : : : lex_regression_syntax_error ]
|
||||
[ run lex/regression_wide.cpp : : : : lex_regression_wide ]
|
||||
@@ -262,3 +309,18 @@ import testing ;
|
||||
;
|
||||
}
|
||||
|
||||
# use this alias to build Spirit against Phoenix V2
|
||||
alias test_using_phoenix_v2 : $(v2_tests) ;
|
||||
|
||||
# use this alias to build Spirit against Phoenix V3
|
||||
alias test_using_phoenix_v3 : $(v3_tests) ;
|
||||
|
||||
# We keep both aliases non-explicit to invoke tests for Phoenix V2 and V3
|
||||
# while running the regerssion tests.
|
||||
#
|
||||
# If you want to avoid running tests for both Phoenix V2 and V3 by default
|
||||
# then simply uncomment the following 'explicit' command. If no target is
|
||||
# specified, only the V2 tests will be run.
|
||||
#
|
||||
# explicit test_using_phoenix_v2 test_using_phoenix_v3 ;
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/spirit/include/phoenix_limits.hpp>
|
||||
|
||||
#include <boost/fusion/include/struct.hpp>
|
||||
#include <boost/fusion/include/nview.hpp>
|
||||
|
||||
|
||||
61
test/karma/regression_numerics_adapt_adt.cpp
Normal file
61
test/karma/regression_numerics_adapt_adt.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
// Copyright (c) 2001-2011 Hartmut Kaiser
|
||||
// Copyright (c) 2011 Colin Rundel
|
||||
//
|
||||
// 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)
|
||||
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/fusion/include/adapt_adt.hpp>
|
||||
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
#include <boost/spirit/include/support_adapt_adt_attributes.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class box
|
||||
{
|
||||
private:
|
||||
int width_;
|
||||
int height_;
|
||||
|
||||
public:
|
||||
|
||||
box()
|
||||
: width_(400),
|
||||
height_(400) {}
|
||||
|
||||
box(int width, int height)
|
||||
: width_(width),
|
||||
height_(height) {}
|
||||
|
||||
int width() const { return width_;}
|
||||
int height() const { return height_;}
|
||||
|
||||
void set_width(int width) { width_=width;}
|
||||
void set_height(int height) { height_=height;}
|
||||
};
|
||||
|
||||
BOOST_FUSION_ADAPT_ADT(
|
||||
box,
|
||||
(int, int, obj.width(), obj.set_width(val) )
|
||||
(int, int, obj.height(), obj.set_height(val) )
|
||||
);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int main ()
|
||||
{
|
||||
using spirit_test::test;
|
||||
|
||||
{
|
||||
using boost::spirit::karma::int_;
|
||||
|
||||
box b(800, 600);
|
||||
BOOST_TEST(test("width: 800\nheight: 600\n",
|
||||
"width: " << int_ << "\n" << "height: " << int_ << "\n", b));
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
@@ -38,6 +38,11 @@ struct seqsize_impl
|
||||
: boost::fusion::result_of::size<Sequence>
|
||||
{};
|
||||
|
||||
template <typename This, typename Sequence>
|
||||
struct result<This(Sequence)>
|
||||
: result<typename boost::proto::detail::uncvref<Sequence>::type>
|
||||
{};
|
||||
|
||||
template <typename Sequence>
|
||||
typename result<Sequence>::type
|
||||
operator()(Sequence const& seq) const
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
#include <boost/mpl/print.hpp>
|
||||
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
#include <boost/mpl/print.hpp>
|
||||
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
#include <boost/mpl/print.hpp>
|
||||
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
#include <boost/spirit/include/karma.hpp>
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@@ -15,16 +15,12 @@
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
|
||||
#include <boost/spirit/include/support_multi_pass.hpp>
|
||||
#include <boost/spirit/include/classic_position_iterator.hpp>
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
|
||||
#include <boost/spirit/home/phoenix/core.hpp>
|
||||
#include <boost/spirit/home/phoenix/operator.hpp>
|
||||
#include <boost/spirit/home/phoenix/statement.hpp>
|
||||
#include <boost/spirit/home/phoenix/object.hpp>
|
||||
#include <boost/spirit/home/phoenix/stl.hpp>
|
||||
|
||||
namespace spirit = boost::spirit;
|
||||
namespace lex = spirit::lex;
|
||||
namespace phoenix = boost::phoenix;
|
||||
|
||||
@@ -11,10 +11,7 @@
|
||||
#include <boost/spirit/include/classic_position_iterator.hpp>
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
|
||||
#include <boost/spirit/home/phoenix/core.hpp>
|
||||
#include <boost/spirit/home/phoenix/operator.hpp>
|
||||
#include <boost/spirit/home/phoenix/statement.hpp>
|
||||
#include <boost/spirit/home/phoenix/object.hpp>
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
|
||||
namespace spirit = boost::spirit;
|
||||
namespace lex = spirit::lex;
|
||||
|
||||
@@ -26,7 +26,7 @@ struct switch_state_tokens : boost::spirit::lex::lexer<Lexer>
|
||||
this->self = identifier [ phoenix::ref(state_) = _state ];
|
||||
|
||||
integer = "[0-9]+";
|
||||
this->self("INT") = integer [ _state = phoenix::val("INITIAL") ];
|
||||
this->self("INT") = integer [ _state = "INITIAL" ];
|
||||
}
|
||||
|
||||
std::string state_;
|
||||
|
||||
@@ -13,11 +13,7 @@
|
||||
#include <boost/spirit/include/classic_position_iterator.hpp>
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
|
||||
#include <boost/spirit/home/phoenix/core.hpp>
|
||||
#include <boost/spirit/home/phoenix/operator.hpp>
|
||||
#include <boost/spirit/home/phoenix/statement.hpp>
|
||||
#include <boost/spirit/home/phoenix/object.hpp>
|
||||
#include <boost/spirit/home/phoenix/stl.hpp>
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
|
||||
namespace spirit = boost::spirit;
|
||||
namespace lex = spirit::lex;
|
||||
@@ -41,14 +37,14 @@ make_file_iterator(std::istream& input, const std::string& filename)
|
||||
|
||||
struct identifier
|
||||
{
|
||||
identifier(file_iterator begin, file_iterator end)
|
||||
identifier(file_iterator, file_iterator)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct string_literal
|
||||
{
|
||||
string_literal(file_iterator begin, file_iterator end)
|
||||
string_literal(file_iterator, file_iterator)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,11 +13,7 @@
|
||||
#include <boost/spirit/include/classic_position_iterator.hpp>
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
|
||||
#include <boost/spirit/home/phoenix/core.hpp>
|
||||
#include <boost/spirit/home/phoenix/operator.hpp>
|
||||
#include <boost/spirit/home/phoenix/statement.hpp>
|
||||
#include <boost/spirit/home/phoenix/object.hpp>
|
||||
#include <boost/spirit/home/phoenix/stl.hpp>
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
|
||||
namespace spirit = boost::spirit;
|
||||
namespace lex = spirit::lex;
|
||||
@@ -39,14 +35,14 @@ make_file_iterator(std::istream& input, const std::string& filename)
|
||||
|
||||
struct identifier
|
||||
{
|
||||
identifier(file_iterator begin, file_iterator end)
|
||||
identifier(file_iterator, file_iterator)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct string_literal
|
||||
{
|
||||
string_literal(file_iterator begin, file_iterator end)
|
||||
string_literal(file_iterator, file_iterator)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
#include <boost/spirit/include/classic_position_iterator.hpp>
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
|
||||
#include <boost/spirit/home/phoenix/core.hpp>
|
||||
#include <boost/spirit/home/phoenix/operator.hpp>
|
||||
#include <boost/spirit/home/phoenix/statement.hpp>
|
||||
#include <boost/spirit/home/phoenix/object.hpp>
|
||||
#include <boost/spirit/include/phoenix_core.hpp>
|
||||
#include <boost/spirit/include/phoenix_operator.hpp>
|
||||
#include <boost/spirit/include/phoenix_statement.hpp>
|
||||
#include <boost/spirit/include/phoenix_object.hpp>
|
||||
#include <boost/spirit/include/phoenix_stl.hpp>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
@@ -43,7 +44,7 @@ make_file_iterator(std::istream& input, const std::string& filename)
|
||||
|
||||
struct string_literal
|
||||
{
|
||||
string_literal(file_iterator begin, file_iterator end)
|
||||
string_literal(file_iterator, file_iterator)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,10 +17,7 @@
|
||||
#include <boost/spirit/include/classic_position_iterator.hpp>
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
|
||||
#include <boost/spirit/home/phoenix/core.hpp>
|
||||
#include <boost/spirit/home/phoenix/operator.hpp>
|
||||
#include <boost/spirit/home/phoenix/statement.hpp>
|
||||
#include <boost/spirit/home/phoenix/object.hpp>
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
|
||||
namespace spirit = boost::spirit;
|
||||
namespace lex = spirit::lex;
|
||||
|
||||
@@ -59,6 +59,7 @@ test_data data[] =
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
struct test_impl
|
||||
{
|
||||
typedef void result_type;
|
||||
template <typename TokenId, typename Value>
|
||||
struct result { typedef void type; };
|
||||
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/spirit/include/lex_lexertl.hpp>
|
||||
|
||||
#include <boost/spirit/include/phoenix_operator.hpp>
|
||||
#include <boost/spirit/include/phoenix_statement.hpp>
|
||||
#include <boost/spirit/include/phoenix_container.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
#include <boost/spirit/include/qi_action.hpp>
|
||||
#include <boost/spirit/include/qi_nonterminal.hpp>
|
||||
#include <boost/spirit/include/qi_auxiliary.hpp>
|
||||
#include <boost/spirit/include/qi_rule.hpp>
|
||||
#include <boost/spirit/include/support_argument.hpp>
|
||||
#include <boost/spirit/include/phoenix_core.hpp>
|
||||
#include <boost/spirit/include/phoenix_operator.hpp>
|
||||
#include <boost/fusion/include/adapt_struct.hpp>
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
@@ -55,6 +57,26 @@ struct test_action_2
|
||||
}
|
||||
};
|
||||
|
||||
struct DIgnore
|
||||
{
|
||||
std::string text;
|
||||
};
|
||||
|
||||
struct DInclude
|
||||
{
|
||||
std::string FileName;
|
||||
};
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
DIgnore,
|
||||
(std::string, text)
|
||||
)
|
||||
|
||||
BOOST_FUSION_ADAPT_STRUCT(
|
||||
DInclude,
|
||||
(std::string, FileName)
|
||||
)
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
@@ -228,6 +250,15 @@ main()
|
||||
rule<std::string::const_iterator, value_type()> r1 = r1 | eps;
|
||||
}
|
||||
|
||||
{
|
||||
using boost::spirit::qi::rule;
|
||||
typedef boost::variant<DIgnore, DInclude> DLine;
|
||||
|
||||
rule<char*, DIgnore()> ignore;
|
||||
rule<char*, DInclude()> include;
|
||||
rule<char*, DLine()> line = include | ignore;
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/spirit/include/phoenix_limits.hpp>
|
||||
|
||||
#include <boost/fusion/include/struct.hpp>
|
||||
#include <boost/fusion/include/nview.hpp>
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <boost/config/warning_disable.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/spirit/include/phoenix_limits.hpp>
|
||||
|
||||
#include <boost/fusion/include/struct.hpp>
|
||||
#include <boost/fusion/include/nview.hpp>
|
||||
|
||||
|
||||
187
test/qi/radix_test.cpp
Normal file
187
test/qi/radix_test.cpp
Normal file
@@ -0,0 +1,187 @@
|
||||
#include "uint.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
using spirit_test::test;
|
||||
using spirit_test::test_attr;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// arbitrary radix test (base 3)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
using boost::spirit::qi::uint_;
|
||||
using boost::spirit::qi::uint_parser;
|
||||
unsigned int u;
|
||||
|
||||
uint_parser<unsigned int, 3, 1, -1> base3_parser;
|
||||
|
||||
BOOST_TEST(test("210112221200", base3_parser));
|
||||
BOOST_TEST(test_attr("210112221200", base3_parser, u));
|
||||
BOOST_TEST(424242 == u);
|
||||
|
||||
BOOST_TEST(!test("1231", base3_parser));
|
||||
BOOST_TEST(!test_attr("1231", base3_parser, u));
|
||||
|
||||
char const* max_unsigned_base3 = "102002022201221111210";
|
||||
char const* unsigned_overflow_base3 = "102002022201221111211";
|
||||
char const* digit_overflow_base3 = "1020020222012211112100";
|
||||
|
||||
BOOST_TEST(test(max_unsigned_base3, base3_parser));
|
||||
BOOST_TEST(test_attr(max_unsigned_base3, base3_parser, u));
|
||||
|
||||
BOOST_TEST(!test(unsigned_overflow_base3, base3_parser));
|
||||
BOOST_TEST(!test_attr(unsigned_overflow_base3, base3_parser, u));
|
||||
BOOST_TEST(!test(digit_overflow_base3, base3_parser));
|
||||
BOOST_TEST(!test_attr(digit_overflow_base3, base3_parser, u));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// arbitrary radix test (base 4)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
using boost::spirit::qi::uint_;
|
||||
using boost::spirit::qi::uint_parser;
|
||||
unsigned int u;
|
||||
|
||||
uint_parser<unsigned int, 4, 1, -1> base4_parser;
|
||||
|
||||
BOOST_TEST(test("1213210302", base4_parser));
|
||||
BOOST_TEST(test_attr("1213210302", base4_parser, u));
|
||||
BOOST_TEST(424242 == u);
|
||||
|
||||
BOOST_TEST(!test("1234", base4_parser));
|
||||
BOOST_TEST(!test_attr("1234", base4_parser, u));
|
||||
|
||||
char const* max_unsigned_base4 = "3333333333333333";
|
||||
char const* unsigned_overflow_base4 = "33333333333333330";
|
||||
BOOST_TEST(test(max_unsigned_base4, base4_parser));
|
||||
BOOST_TEST(test_attr(max_unsigned_base4, base4_parser, u));
|
||||
BOOST_TEST(!test(unsigned_overflow_base4, base4_parser));
|
||||
BOOST_TEST(!test_attr(unsigned_overflow_base4, base4_parser, u));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// arbitrary radix test (base 5)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
using boost::spirit::qi::uint_;
|
||||
using boost::spirit::qi::uint_parser;
|
||||
unsigned int u;
|
||||
|
||||
uint_parser<unsigned int, 5, 1, -1> base5_parser;
|
||||
|
||||
BOOST_TEST(test("102033432", base5_parser));
|
||||
BOOST_TEST(test_attr("102033432", base5_parser, u));
|
||||
BOOST_TEST(424242 == u);
|
||||
|
||||
BOOST_TEST(!test("2345", base5_parser));
|
||||
BOOST_TEST(!test_attr("2345", base5_parser, u));
|
||||
|
||||
char const* max_unsigned_base5 = "32244002423140";
|
||||
char const* unsigned_overflow_base5 = "32244002423141";
|
||||
char const* digit_overflow_base5 = "322440024231400";
|
||||
|
||||
BOOST_TEST(test(max_unsigned_base5, base5_parser));
|
||||
BOOST_TEST(test_attr(max_unsigned_base5, base5_parser, u));
|
||||
|
||||
BOOST_TEST(!test(unsigned_overflow_base5, base5_parser));
|
||||
BOOST_TEST(!test_attr(unsigned_overflow_base5, base5_parser, u));
|
||||
BOOST_TEST(!test(digit_overflow_base5, base5_parser));
|
||||
BOOST_TEST(!test_attr(digit_overflow_base5, base5_parser, u));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// arbitrary radix test (base 6)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
using boost::spirit::qi::uint_;
|
||||
using boost::spirit::qi::uint_parser;
|
||||
unsigned int u;
|
||||
|
||||
uint_parser<unsigned int, 6, 1, -1> base6_parser;
|
||||
|
||||
BOOST_TEST(test("13032030", base6_parser));
|
||||
BOOST_TEST(test_attr("13032030", base6_parser, u));
|
||||
BOOST_TEST(424242 == u);
|
||||
|
||||
BOOST_TEST(!test("3456", base6_parser));
|
||||
BOOST_TEST(!test_attr("3456", base6_parser, u));
|
||||
|
||||
char const* max_unsigned_base6 = "1550104015503";
|
||||
char const* unsigned_overflow_base6 = "1550104015504";
|
||||
char const* digit_overflow_base6 = "15501040155030";
|
||||
|
||||
BOOST_TEST(test(max_unsigned_base6, base6_parser));
|
||||
BOOST_TEST(test_attr(max_unsigned_base6, base6_parser, u));
|
||||
|
||||
BOOST_TEST(!test(unsigned_overflow_base6, base6_parser));
|
||||
BOOST_TEST(!test_attr(unsigned_overflow_base6, base6_parser, u));
|
||||
BOOST_TEST(!test(digit_overflow_base6, base6_parser));
|
||||
BOOST_TEST(!test_attr(digit_overflow_base6, base6_parser, u));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// arbitrary radix test (base 7)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
using boost::spirit::qi::uint_;
|
||||
using boost::spirit::qi::uint_parser;
|
||||
unsigned int u;
|
||||
|
||||
uint_parser<unsigned int, 7, 1, -1> base7_parser;
|
||||
|
||||
BOOST_TEST(test("3414600", base7_parser));
|
||||
BOOST_TEST(test_attr("3414600", base7_parser, u));
|
||||
BOOST_TEST(424242 == u);
|
||||
|
||||
BOOST_TEST(!test("4567", base7_parser));
|
||||
BOOST_TEST(!test_attr("4567", base7_parser, u));
|
||||
|
||||
char const* max_unsigned_base7 = "211301422353";
|
||||
char const* unsigned_overflow_base7 = "211301422354";
|
||||
char const* digit_overflow_base7 = "2113014223530";
|
||||
|
||||
BOOST_TEST(test(max_unsigned_base7, base7_parser));
|
||||
BOOST_TEST(test_attr(max_unsigned_base7, base7_parser, u));
|
||||
|
||||
BOOST_TEST(!test(unsigned_overflow_base7, base7_parser));
|
||||
BOOST_TEST(!test_attr(unsigned_overflow_base7, base7_parser, u));
|
||||
BOOST_TEST(!test(digit_overflow_base7, base7_parser));
|
||||
BOOST_TEST(!test_attr(digit_overflow_base7, base7_parser, u));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// arbitrary radix test (base 7)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
using boost::spirit::qi::uint_;
|
||||
using boost::spirit::qi::uint_parser;
|
||||
unsigned int u;
|
||||
|
||||
uint_parser<unsigned int, 9, 1, -1> base9_parser;
|
||||
|
||||
BOOST_TEST(test("715850", base9_parser));
|
||||
BOOST_TEST(test_attr("715850", base9_parser, u));
|
||||
BOOST_TEST(424242 == u);
|
||||
|
||||
BOOST_TEST(!test("6789", base9_parser));
|
||||
BOOST_TEST(!test_attr("6789", base9_parser, u));
|
||||
|
||||
char const* max_unsigned_base9 = "12068657453";
|
||||
char const* unsigned_overflow_base9 = "12068657454";
|
||||
char const* digit_overflow_base9 = "120686574530";
|
||||
|
||||
BOOST_TEST(test(max_unsigned_base9, base9_parser));
|
||||
BOOST_TEST(test_attr(max_unsigned_base9, base9_parser, u));
|
||||
|
||||
BOOST_TEST(!test(unsigned_overflow_base9, base9_parser));
|
||||
BOOST_TEST(!test_attr(unsigned_overflow_base9, base9_parser, u));
|
||||
BOOST_TEST(!test(digit_overflow_base9, base9_parser));
|
||||
BOOST_TEST(!test_attr(digit_overflow_base9, base9_parser, u));
|
||||
}
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
@@ -3,11 +3,14 @@
|
||||
// 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)
|
||||
|
||||
#include "test.hpp"
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
|
||||
int main() {
|
||||
#include "test.hpp"
|
||||
|
||||
int main()
|
||||
{
|
||||
using spirit_test::test;
|
||||
using boost::spirit::qi::rule;
|
||||
using boost::spirit::qi::parse;
|
||||
|
||||
@@ -238,6 +238,7 @@ main()
|
||||
BOOST_TEST(!test("aaaaaa", repeat(3, val(5))[char_]));
|
||||
BOOST_TEST(!test("aa", repeat(val(3), 5)[char_]));
|
||||
|
||||
//#warning "testcase commented out"
|
||||
BOOST_TEST(test("aaa", repeat(val(3), inf)[char_]));
|
||||
BOOST_TEST(test("aaaaa", repeat(3, val(inf))[char_]));
|
||||
BOOST_TEST(test("aaaaaa", repeat(val(3), inf)[char_]));
|
||||
|
||||
@@ -316,10 +316,6 @@ main()
|
||||
using spirit_test::test_attr;
|
||||
using spirit_test::test;
|
||||
|
||||
using boost::phoenix::val;
|
||||
using boost::phoenix::actor;
|
||||
using boost::phoenix::value;
|
||||
|
||||
using testns::ops;
|
||||
using testns::check_type_1;
|
||||
using testns::check_type_2;
|
||||
@@ -345,6 +341,12 @@ main()
|
||||
BOOST_TEST(test_attr("++---****/", IP4 >> '/', c) && c == 9);
|
||||
}
|
||||
|
||||
#ifndef BOOST_SPIRIT_USE_PHOENIX_V3
|
||||
|
||||
using boost::phoenix::val;
|
||||
using boost::phoenix::actor;
|
||||
using boost::phoenix::value;
|
||||
|
||||
{ // all lazy args
|
||||
int c = 0;
|
||||
#define LP1 ops(val(1))
|
||||
@@ -393,6 +395,61 @@ main()
|
||||
BOOST_TEST(test_attr("++--**/", MP5 >> '/', c) && c == 6);
|
||||
}
|
||||
|
||||
#else // BOOST_SPIRIT_USE_PHOENIX_V3
|
||||
|
||||
using boost::phoenix::val;
|
||||
using boost::phoenix::actor;
|
||||
using boost::phoenix::expression::value;
|
||||
|
||||
{ // all lazy args
|
||||
int c = 0;
|
||||
#define LP1 ops(val(1))
|
||||
check_type_1<value<int>::type>(LP1);
|
||||
BOOST_TEST(test_attr("+/", LP1 >> '/', c) && c == 1);
|
||||
|
||||
c = 0;
|
||||
#define LP2 ops(val(1), val(4))
|
||||
check_type_2<value<int>::type, value<int>::type>(LP2);
|
||||
BOOST_TEST(test_attr("+----/", LP2 >> '/', c) && c == 5);
|
||||
|
||||
c = 0;
|
||||
#define LP3 ops(val((char)2), val(3.), val(4))
|
||||
check_type_3<value<char>::type, value<double>::type, value<int>::type>(LP3);
|
||||
BOOST_TEST(!test("++---***/", LP3 >> '/'));
|
||||
#define LP4 ops(val(1), val(2), val(3))
|
||||
check_type_3<value<int>::type, value<int>::type, value<int>::type>(LP4);
|
||||
BOOST_TEST(test_attr("+--***/", LP4 >> '/', c) && c == 6);
|
||||
}
|
||||
|
||||
{ // mixed immediate and lazy args
|
||||
namespace fusion = boost::fusion;
|
||||
namespace phx = boost::phoenix;
|
||||
|
||||
int c = 0;
|
||||
#define MP1 ops(val(3), 2)
|
||||
check_type_2<value<int>::type, int>(MP1);
|
||||
BOOST_TEST(test_attr("+++--/", MP1 >> '/', c) && c == 5);
|
||||
|
||||
c = 0;
|
||||
#define MP2 ops(4, val(1))
|
||||
check_type_2<int, value<int>::type>(MP2);
|
||||
BOOST_TEST(test_attr("++++-/", MP2 >> '/', c) && c == 5);
|
||||
|
||||
c = 0;
|
||||
#define MP3 ops(2, val(2), val(2))
|
||||
check_type_3<int, value<int>::type, value<int>::type>(MP3);
|
||||
BOOST_TEST(!test("++-**/", MP3 >> '/'));
|
||||
#define MP4 ops(2, val(2), 2)
|
||||
check_type_3<int, value<int>::type, int>(MP4);
|
||||
BOOST_TEST(test_attr("++--**/", MP4 >> '/', c) && c == 6);
|
||||
|
||||
c = 0;
|
||||
#define MP5 ops(val(5) - val(3), 2, val(2))
|
||||
check_type_3<phx::expression::minus<value<int>::type, value<int>::type>::type, int, value<int>::type>(MP5);
|
||||
BOOST_TEST(test_attr("++--**/", MP5 >> '/', c) && c == 6);
|
||||
}
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
@@ -148,9 +148,25 @@ main()
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
boost::spirit::qi::uint_parser<boost::uint8_t> uint8_;
|
||||
boost::uint8_t u;
|
||||
boost::uint8_t u8;
|
||||
|
||||
BOOST_TEST(!test_attr("999", uint8_, u));
|
||||
BOOST_TEST(!test_attr("999", uint8_, u8));
|
||||
BOOST_TEST(!test_attr("256", uint8_, u8));
|
||||
BOOST_TEST(test_attr("255", uint8_, u8));
|
||||
|
||||
boost::spirit::qi::uint_parser<boost::uint16_t> uint16_;
|
||||
boost::uint16_t u16;
|
||||
|
||||
BOOST_TEST(!test_attr("99999", uint16_, u16));
|
||||
BOOST_TEST(!test_attr("65536", uint16_, u16));
|
||||
BOOST_TEST(test_attr("65535", uint16_, u16));
|
||||
|
||||
boost::spirit::qi::uint_parser<boost::uint32_t> uint32_;
|
||||
boost::uint32_t u32;
|
||||
|
||||
BOOST_TEST(!test_attr("9999999999", uint32_, u32));
|
||||
BOOST_TEST(!test_attr("4294967296", uint32_, u32));
|
||||
BOOST_TEST(test_attr("4294967295", uint32_, u32));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/spirit/include/phoenix.hpp>
|
||||
#include <boost/spirit/include/support_utree.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
Reference in New Issue
Block a user