Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-02-17 15:53:19


Author: eric_niebler
Date: 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
New Revision: 43296
URL: http://svn.boost.org/trac/boost/changeset/43296

Log:
proto documentation improvements
Text files modified:
   trunk/boost/xpressive/proto/detail/as_lvalue.hpp | 2
   trunk/boost/xpressive/proto/domain.hpp | 8
   trunk/boost/xpressive/proto/generate.hpp | 2
   trunk/boost/xpressive/proto/make_expr.hpp | 269 ++++++++++++++++++++++++++++++---------
   trunk/boost/xpressive/proto/proto_fwd.hpp | 3
   trunk/boost/xpressive/proto/transform/arg.hpp | 29 ++++
   trunk/boost/xpressive/proto/transform/when.hpp | 13 -
   trunk/libs/xpressive/proto/doc/Jamfile.v2 | 6
   trunk/libs/xpressive/proto/doc/construction.qbk | 6
   trunk/libs/xpressive/proto/doc/installation.qbk | 4
   trunk/libs/xpressive/proto/doc/proto.xml | 2
   trunk/libs/xpressive/proto/doc/rationale.qbk | 4
   12 files changed, 264 insertions(+), 84 deletions(-)

Modified: trunk/boost/xpressive/proto/detail/as_lvalue.hpp
==============================================================================
--- trunk/boost/xpressive/proto/detail/as_lvalue.hpp (original)
+++ trunk/boost/xpressive/proto/detail/as_lvalue.hpp 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -1,6 +1,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 /// \file as_lvalue.hpp
-/// Contains definition of the call<> transform.
+/// Contains definition the as_lvalue() and uncv() functions.
 //
 // Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file

Modified: trunk/boost/xpressive/proto/domain.hpp
==============================================================================
--- trunk/boost/xpressive/proto/domain.hpp (original)
+++ trunk/boost/xpressive/proto/domain.hpp 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -74,14 +74,14 @@
         /// };
         /// \endcode
         ///
- template<typename Generator, typename Grammar>
+ template<
+ typename Generator BOOST_PROTO_FOR_DOXYGEN_ONLY(= default_generator)
+ , typename Grammar BOOST_PROTO_FOR_DOXYGEN_ONLY(= proto::_)
+ >
         struct domain
           : Generator
         {
             typedef Grammar proto_grammar;
-
- /// INTERNAL ONLY
- ///
             typedef void proto_is_domain_;
         };
 

Modified: trunk/boost/xpressive/proto/generate.hpp
==============================================================================
--- trunk/boost/xpressive/proto/generate.hpp (original)
+++ trunk/boost/xpressive/proto/generate.hpp 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -162,7 +162,7 @@
             /// held by value before forwarding the expression on to
             /// another generator for further processing. The \c Generator
             /// parameter defaults to \c default_generator.
- template<typename Generator>
+ template<typename Generator BOOST_PROTO_FOR_DOXYGEN_ONLY(= default_generator)>
             struct by_value_generator
             {
                 template<typename Expr>

Modified: trunk/boost/xpressive/proto/make_expr.hpp
==============================================================================
--- trunk/boost/xpressive/proto/make_expr.hpp (original)
+++ trunk/boost/xpressive/proto/make_expr.hpp 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -493,40 +493,37 @@
 
         namespace result_of
         {
- template<typename Tag, typename Sequence, typename EnableIf1, typename EnableIf2>
- struct unpack_expr
- {
- typedef
- typename detail::unpack_expr_<
- Tag
- , deduce_domain
- , Sequence
- , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
- >::type
- type;
- };
-
- template<typename Tag, typename Domain, typename Sequence>
- struct unpack_expr<Tag, Domain, Sequence, typename Domain::proto_is_domain_>
- {
- typedef
- typename detail::unpack_expr_<
- Tag
- , Domain
- , Sequence
- , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
- >::type
- type;
- };
-
+ /// \brief Metafunction that computes the return type of the
+ /// \c make_expr() function, with a domain deduced from the
+ /// domains of the children.
+ ///
+ /// Use the <tt>result_of::make_expr\<\></tt> metafunction to
+ /// compute the return type of the \c make_expr() function.
+ ///
+ /// In this specialization, the domain is deduced from the
+ /// domains of the children types. (If
+ /// <tt>is_domain\<A0\>::::value</tt> is \c true, then another
+ /// specialization is selected.)
             template<
                 typename Tag
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, typename A)
- , typename EnableIf1
- , typename EnableIf2
+ , typename A0
+ , BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS(
+ BOOST_PROTO_MAX_ARITY
+ , typename A
+ , BOOST_PROTO_FOR_DOXYGEN_ONLY(= void) BOOST_PP_INTERCEPT
+ )
+ , typename Void1 BOOST_PROTO_FOR_DOXYGEN_ONLY(= void)
+ , typename Void2 BOOST_PROTO_FOR_DOXYGEN_ONLY(= void)
>
             struct make_expr
             {
+ /// Same as <tt>result_of::make_expr\<Tag, D, A0, ... AN\>::::type</tt>
+ /// where \c D is the deduced domain, which is calculated as follows:
+ ///
+ /// For each \c x in <tt>[0,N)</tt> (proceeding in order beginning with
+ /// <tt>x=0</tt>), if <tt>domain_of\<Ax\>::::type</tt> is not
+ /// \c default_domain, then \c D is <tt>domain_of\<Ax\>::::type</tt>.
+ /// Otherwise, \c D is \c default_domain.
                 typedef
                     typename detail::make_expr_<
                         Tag
@@ -536,6 +533,11 @@
                 type;
             };
 
+ /// \brief Metafunction that computes the return type of the
+ /// \c make_expr() function, within the specified domain.
+ ///
+ /// Use the <tt>result_of::make_expr\<\></tt> metafunction to compute
+ /// the return type of the \c make_expr() function.
             template<
                 typename Tag
               , typename Domain
@@ -548,6 +550,28 @@
               , typename Domain::proto_is_domain_
>
             {
+ /// If \c Tag is <tt>tag::terminal</tt>, then \c type is a
+ /// typedef for <tt>Domain::apply\<expr\<tag::terminal,
+ /// args0\<A0\> \> \>::::type</tt>.
+ ///
+ /// Otherwise, \c type is a typedef for <tt>Domain::apply\<expr\<Tag,
+ /// argsN\< as_child\<A0\>::::type, ... as_child\<AN\>::::type \>
+ /// \>::::type</tt>, where \c N is the number of non-void template
+ /// arguments, and <tt>as_child\<A\>::::type</tt> is evaluated as
+ /// follows:
+ ///
+ /// \li If <tt>is_expr\<A\>::::value</tt> is \c true, then the
+ /// child type is \c A.
+ /// \li If \c A is <tt>B &</tt> or <tt>cv boost::reference_wrapper\<B\></tt>,
+ /// and <tt>is_expr\<B\>::::value</tt> is \c true, then the
+ /// child type is <tt>ref_\<B\></tt>.
+ /// \li If <tt>is_expr\<A\>::::value</tt> is \c false, then the
+ /// child type is <tt>Domain::apply\<expr\<tag::terminal, args0\<A\> \>
+ /// \>::::type</tt>.
+ /// \li If \c A is <tt>B &</tt> or <tt>cv boost::reference_wrapper\<B\></tt>,
+ /// and <tt>is_expr\<B\>::::value</tt> is \c false, then the
+ /// child type is <tt>Domain::apply\<expr\<tag::terminal, args0\<B &\> \>
+ /// \>::::type</tt>.
                 typedef
                     typename detail::make_expr_<
                         Tag
@@ -556,11 +580,76 @@
>::type
                 type;
             };
+
+ /// \brief Metafunction that computes the return type of the
+ /// \c unpack_expr() function, with a domain deduced from the
+ /// domains of the children.
+ ///
+ /// Use the <tt>result_of::unpack_expr\<\></tt> metafunction to
+ /// compute the return type of the \c unpack_expr() function.
+ ///
+ /// \c Sequence is a Fusion Random Access Sequence.
+ ///
+ /// In this specialization, the domain is deduced from the
+ /// domains of the children types. (If
+ /// <tt>is_domain\<Sequence>::::value</tt> is \c true, then another
+ /// specialization is selected.)
+ template<
+ typename Tag
+ , typename Sequence
+ , typename Void1 BOOST_PROTO_FOR_DOXYGEN_ONLY(= void)
+ , typename Void2 BOOST_PROTO_FOR_DOXYGEN_ONLY(= void)
+ >
+ struct unpack_expr
+ {
+ /// Same as <tt>result_of::make_expr\<Tag,
+ /// fusion::value_at\<Sequence, 0\>::::type, ...
+ /// fusion::value_at\<Sequence, N-1\>::::type\>::::type</tt>,
+ /// where \c N is the size of \c Sequence.
+ typedef
+ typename detail::unpack_expr_<
+ Tag
+ , deduce_domain
+ , Sequence
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::type
+ type;
+ };
+
+ /// \brief Metafunction that computes the return type of the
+ /// \c unpack_expr() function, within the specified domain.
+ ///
+ /// Use the <tt>result_of::make_expr\<\></tt> metafunction to compute
+ /// the return type of the \c make_expr() function.
+ template<typename Tag, typename Domain, typename Sequence>
+ struct unpack_expr<Tag, Domain, Sequence, typename Domain::proto_is_domain_>
+ {
+ /// Same as <tt>result_of::make_expr\<Tag, Domain,
+ /// fusion::value_at\<Sequence, 0\>::::type, ...
+ /// fusion::value_at\<Sequence, N-1\>::::type\>::::type</tt>,
+ /// where \c N is the size of \c Sequence.
+ typedef
+ typename detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::type
+ type;
+ };
         }
 
         namespace functional
         {
- template<typename Tag, typename Domain>
+ /// \brief A callable function object equivalent to the
+ /// \c proto::make_expr() function.
+ ///
+ /// In all cases, <tt>functional::make_expr\<Tag, Domain\>()(a0, ... aN)</tt>
+ /// is equivalent to <tt>proto::make_expr\<Tag, Domain\>(a0, ... aN)</tt>.
+ ///
+ /// <tt>functional::make_expr\<Tag\>()(a0, ... aN)</tt>
+ /// is equivalent to <tt>proto::make_expr\<Tag\>(a0, ... aN)</tt>.
+ template<typename Tag, typename Domain BOOST_PROTO_FOR_DOXYGEN_ONLY(= deduce_domain)>
             struct make_expr
             {
                 BOOST_PROTO_CALLABLE()
@@ -582,6 +671,8 @@
 
                 /// Construct an expression node with tag type \c Tag
                 /// and in the domain \c Domain.
+ ///
+ /// \return <tt>proto::make_expr\<Tag, Domain\>(a0,...aN)</tt>
                 template<typename A0>
                 typename result_of::make_expr<
                     Tag
@@ -606,7 +697,15 @@
             #include BOOST_PP_ITERATE()
             };
 
- template<typename Tag, typename Domain>
+ /// \brief A callable function object equivalent to the
+ /// \c proto::unpack_expr() function.
+ ///
+ /// In all cases, <tt>functional::unpack_expr\<Tag, Domain\>()(seq)</tt>
+ /// is equivalent to <tt>proto::unpack_expr\<Tag, Domain\>(seq)</tt>.
+ ///
+ /// <tt>functional::unpack_expr\<Tag\>()(seq)</tt>
+ /// is equivalent to <tt>proto::unpack_expr\<Tag\>(seq)</tt>.
+ template<typename Tag, typename Domain BOOST_PROTO_FOR_DOXYGEN_ONLY(= deduce_domain)>
             struct unpack_expr
             {
                 BOOST_PROTO_CALLABLE()
@@ -627,6 +726,11 @@
                     type;
                 };
 
+ /// Construct an expression node with tag type \c Tag
+ /// and in the domain \c Domain.
+ ///
+ /// \param sequence A Fusion Random Access Sequence
+ /// \return <tt>proto::unpack_expr\<Tag, Domain\>(sequence)</tt>
                 template<typename Sequence>
                 typename result_of::unpack_expr<Tag, Domain, Sequence const>::type const
                 operator ()(Sequence const &sequence) const
@@ -685,39 +789,27 @@
             };
         }
 
- /// unpack_expr
+ /// \brief Construct an expression of the requested tag type
+ /// with a domain and with the specified arguments as children.
         ///
- template<typename Tag, typename Sequence>
- typename lazy_disable_if<
- is_domain<Sequence>
- , result_of::unpack_expr<Tag, Sequence const>
- >::type const
- unpack_expr(Sequence const &sequence)
- {
- return proto::detail::unpack_expr_<
- Tag
- , deduce_domain
- , Sequence const
- , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
- >::call(sequence);
- }
-
- /// \overload
+ /// This function template may be invoked either with or without
+ /// specifying a \c Domain argument. If no domain is specified,
+ /// the domain is deduced by examining in order the domains of
+ /// the given arguments and taking the first that is not
+ /// \c default_domain, if any such domain exists, or
+ /// \c default_domain otherwise.
         ///
- template<typename Tag, typename Domain, typename Sequence2>
- typename result_of::unpack_expr<Tag, Domain, Sequence2 const>::type const
- unpack_expr(Sequence2 const &sequence2)
- {
- return proto::detail::unpack_expr_<
- Tag
- , Domain
- , Sequence2 const
- , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence2>::type::value
- >::call(sequence2);
- }
-
- /// make_expr
+ /// Let \c wrap_(x) be defined such that:
+ /// \li If \c x is a <tt>boost::reference_wrapper\<\></tt>,
+ /// \c wrap_(x) is equivalent to <tt>as_arg\<Domain\>(x.get())</tt>.
+ /// \li Otherwise, \c wrap_(x) is equivalent to
+ /// <tt>as_expr\<Domain\>(x)</tt>.
         ///
+ /// Let <tt>make_\<Tag\>(b0,...bN)</tt> be defined as
+ /// <tt>expr\<Tag, argsN\<B0,...BN\> \>::::make(b0,...bN)</tt>
+ /// where \c Bx is the type of \c bx.
+ ///
+ /// \return <tt>Domain::make(make_\<Tag\>(wrap_(a0),...wrap_(aN)))</tt>.
         template<typename Tag, typename A0>
         typename lazy_disable_if<
             is_domain<A0>
@@ -760,6 +852,61 @@
 
     #include BOOST_PP_ITERATE()
 
+ /// \brief Construct an expression of the requested tag type
+ /// with a domain and with childres from the specified Fusion
+ /// Random Access Sequence.
+ ///
+ /// This function template may be invoked either with or without
+ /// specifying a \c Domain argument. If no domain is specified,
+ /// the domain is deduced by examining in order the domains of the
+ /// elements of \c sequence and taking the first that is not
+ /// \c default_domain, if any such domain exists, or
+ /// \c default_domain otherwise.
+ ///
+ /// Let <tt>wrap_\<N\>(s)</tt>, where \c s has type \c S, be defined
+ /// such that:
+ /// \li If <tt>fusion::value_at\<S,N\>::::type</tt> is a reference,
+ /// <tt>wrap_\<N\>(s)</tt> is equivalent to
+ /// <tt>as_arg\<Domain\>(fusion::at_c\<N\>(s))</tt>.
+ /// \li Otherwise, <tt>wrap_\<N\>(s)</tt> is equivalent to
+ /// <tt>as_expr\<Domain\>(fusion::at_c\<N\>(s))</tt>.
+ ///
+ /// Let <tt>make_\<Tag\>(b0,...bN)</tt> be defined as
+ /// <tt>expr\<Tag, argsN\<B0,...BN\> \>::::make(b0,...bN)</tt>
+ /// where \c Bx is the type of \c bx.
+ ///
+ /// \param sequence a Fusion Random Access Sequence.
+ /// \return <tt>Domain::make(make_\<Tag\>(wrap_\<0\>(s),...wrap_\<N-1\>(S)))</tt>,
+ /// where N is the size of \c Sequence.
+ template<typename Tag, typename Sequence>
+ typename lazy_disable_if<
+ is_domain<Sequence>
+ , result_of::unpack_expr<Tag, Sequence const>
+ >::type const
+ unpack_expr(Sequence const &sequence)
+ {
+ return proto::detail::unpack_expr_<
+ Tag
+ , deduce_domain
+ , Sequence const
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence>::type::value
+ >::call(sequence);
+ }
+
+ /// \overload
+ ///
+ template<typename Tag, typename Domain, typename Sequence2>
+ typename result_of::unpack_expr<Tag, Domain, Sequence2 const>::type const
+ unpack_expr(Sequence2 const &sequence2)
+ {
+ return proto::detail::unpack_expr_<
+ Tag
+ , Domain
+ , Sequence2 const
+ , fusion::BOOST_PROTO_FUSION_RESULT_OF::size<Sequence2>::type::value
+ >::call(sequence2);
+ }
+
         /// INTERNAL ONLY
         ///
         template<typename Tag, typename Domain>

Modified: trunk/boost/xpressive/proto/proto_fwd.hpp
==============================================================================
--- trunk/boost/xpressive/proto/proto_fwd.hpp (original)
+++ trunk/boost/xpressive/proto/proto_fwd.hpp 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -87,6 +87,9 @@
         class unfused_generic {};
     }
 }
+#define BOOST_PROTO_FOR_DOXYGEN_ONLY(x) x
+#else
+#define BOOST_PROTO_FOR_DOXYGEN_ONLY(x)
 #endif
 
 namespace boost { namespace proto

Modified: trunk/boost/xpressive/proto/transform/arg.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/arg.hpp (original)
+++ trunk/boost/xpressive/proto/transform/arg.hpp 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -20,6 +20,8 @@
     namespace transform
     {
 
+ /// \brief A PrimitiveTransform that returns the current expression
+ /// unmodified
         struct expr : proto::callable
         {
             template<typename Sig>
@@ -31,6 +33,9 @@
                 typedef Expr type;
             };
 
+ /// \param expr_ The current expression.
+ /// \return \c expr_
+ /// \throw nothrow
             template<typename Expr, typename State, typename Visitor>
             Expr const &
             operator ()(Expr const &expr_, State const &, Visitor &) const
@@ -39,6 +44,8 @@
             }
         };
 
+ /// \brief A PrimitiveTransform that returns the current state
+ /// unmodified
         struct state : proto::callable
         {
             template<typename Sig>
@@ -50,6 +57,9 @@
                 typedef State type;
             };
 
+ /// \param state_ The current state.
+ /// \return \c state_
+ /// \throw nothrow
             template<typename Expr, typename State, typename Visitor>
             State const &
             operator ()(Expr const &, State const &state_, Visitor &) const
@@ -58,6 +68,8 @@
             }
         };
 
+ /// \brief A PrimitiveTransform that returns the current visitor
+ /// unmodified
         struct visitor : proto::callable
         {
             template<typename Sig>
@@ -69,6 +81,9 @@
                 typedef Visitor type;
             };
 
+ /// \param visitor_ The current visitor
+ /// \return \c visitor_
+ /// \throw nothrow
             template<typename Expr, typename State, typename Visitor>
             Visitor &
             operator ()(Expr const &, State const &, Visitor &visitor_) const
@@ -77,6 +92,8 @@
             }
         };
 
+ /// \brief A PrimitiveTransform that returns I-th child of the current
+ /// expression.
         template<int I>
         struct arg_c : proto::callable
         {
@@ -89,6 +106,9 @@
                 typedef typename proto::result_of::arg_c<Expr, I>::type type;
             };
 
+ /// \param expr The current expression.
+ /// \return <tt>proto::arg_c\<I\>(expr)</tt>
+ /// \throw nothrow
             template<typename Expr, typename State, typename Visitor>
             typename proto::result_of::arg_c<Expr, I>::const_reference
             operator ()(Expr const &expr, State const &, Visitor &) const
@@ -97,6 +117,8 @@
             }
         };
 
+ /// \brief A unary CallableTransform that wraps its argument
+ /// in a \c boost::reference_wrapper\<\>.
         struct _ref : proto::callable
         {
             template<typename Sig>
@@ -114,6 +136,9 @@
                 typedef boost::reference_wrapper<T> type;
             };
 
+ /// \param t The object to wrap
+ /// \return <tt>boost::ref(t)</tt>
+ /// \throw nothrow
             template<typename T>
             boost::reference_wrapper<T>
             operator ()(T &t) const
@@ -121,6 +146,8 @@
                 return boost::reference_wrapper<T>(t);
             }
 
+ /// \overload
+ ///
             template<typename T>
             boost::reference_wrapper<T const>
             operator ()(T const &t) const
@@ -130,6 +157,8 @@
         };
     }
 
+ /// \brief A PrimitiveTransform that returns I-th child of the current
+ /// expression.
     template<int I>
     struct _arg_c
       : transform::arg_c<I>

Modified: trunk/boost/xpressive/proto/transform/when.hpp
==============================================================================
--- trunk/boost/xpressive/proto/transform/when.hpp (original)
+++ trunk/boost/xpressive/proto/transform/when.hpp 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -77,17 +77,16 @@
                 typedef typename impl::template result<void(Expr, State, Visitor)>::type type;
             };
 
- /// Function call operator
- ///
+ /// \param expr The current expression
+ /// \param state The current state
+ /// \param visitor An arbitrary visitor
+ /// \pre <tt>matches\<Expr, Grammar\>::::value</tt> is \c true
+ /// \return <tt>result\<void(Expr, State, Visitor)\>::::impl()(expr, state, visitor)</tt>
             template<typename Expr, typename State, typename Visitor>
             typename result<void(Expr, State, Visitor)>::type
             operator ()(Expr const &expr, State const &state, Visitor &visitor) const
             {
- return typename mpl::if_<
- is_callable<Return>
- , call<Return(BOOST_PP_ENUM_PARAMS(N, A))>
- , make<Return(BOOST_PP_ENUM_PARAMS(N, A))>
- >::type()(expr, state, visitor);
+ return typename result<void(Expr, State, Visitor)>::impl()(expr, state, visitor);
             }
         };
 

Modified: trunk/libs/xpressive/proto/doc/Jamfile.v2
==============================================================================
--- trunk/libs/xpressive/proto/doc/Jamfile.v2 (original)
+++ trunk/libs/xpressive/proto/doc/Jamfile.v2 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -81,9 +81,9 @@
         # How far down we go with TOC's
         <xsl:param>generate.section.toc.level=10
         # Set the path to the boost-root so we find our graphics:
- #<xsl:param>boost.root=../../../../..
+ #<xsl:param>boost.root=../../../..
         # location of the main index file so our links work:
- #<xsl:param>boost.libraries=../../../../../libs/libraries.htm
+ #<xsl:param>boost.libraries=../../../../libs/libraries.htm
 
         # PDF Options:
         # TOC Generation: this is needed for FOP-0.9 and later:
@@ -104,5 +104,5 @@
         # better use SVG's instead:
         # <xsl:param>admon.graphics.extension=".svg"
 
-# <dependency>protodoc
+ <dependency>protodoc
     ;

Modified: trunk/libs/xpressive/proto/doc/construction.qbk
==============================================================================
--- trunk/libs/xpressive/proto/doc/construction.qbk (original)
+++ trunk/libs/xpressive/proto/doc/construction.qbk 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -221,7 +221,7 @@
 
 [heading [^arg()], [^left()], and [^right()]]
 
-Most operators in C++ are unary or binary. For that reason, accesing the
+Most operators in C++ are unary or binary. For that reason, accessing the
 only operand, or the left and right operands, are very common operations. For
 this reason, Proto provides the _arg_, _left_, and _right_ functions. _arg_
 and _left_ are synonomous with `arg_c<0>()`, and _right_ is synonomous with
@@ -236,7 +236,9 @@
 children nodes. That means you can apply Fusion algorithms to them,
 transform them, apply Fusion filters and views to them, and access their
 elements using `fusion::at()`. The things Fusion can do to heterogeneous
-sequences is beyond the scope of this users' guide, but here is an example:
+sequences is beyond the scope of this users' guide, but below is a simple
+example. It takes a lazy function invocation like `fun(1,2,3,4)` and uses
+Fusion to print the function arguments in order.
 
     struct display
     {

Modified: trunk/libs/xpressive/proto/doc/installation.qbk
==============================================================================
--- trunk/libs/xpressive/proto/doc/installation.qbk (original)
+++ trunk/libs/xpressive/proto/doc/installation.qbk 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -21,9 +21,9 @@
 your build scripts or link to any separate lib file to use it. All you need
 to do is `#include <boost/xpressive/proto/proto.hpp>`. This will include the
 core of Proto. If you want to use any transforms, you must include the
-appropriate header from the [^boost\/xpressive\/proto\/transform\/] directory.
+appropriate header from the [^boost\/proto\/transform\/] directory.
 Likewise for any evaluation contexts, which live in the
-[^boost\/xpressive\/proto\/context\/] directory.
+[^boost\/proto\/context\/] directory.
 
 [heading Requirements]
 

Modified: trunk/libs/xpressive/proto/doc/proto.xml
==============================================================================
--- trunk/libs/xpressive/proto/doc/proto.xml (original)
+++ trunk/libs/xpressive/proto/doc/proto.xml 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -1,6 +1,6 @@
 <?xml version="1.0" standalone="yes"?>
 <library-reference id="reference" xmlns:xi="http://www.w3.org/2001/XInclude">
- <title>Reference</title>
+ <title>Reference</title>
   <xi:include href="concepts/CallableTransform.xml"/>
   <xi:include href="concepts/PrimitiveTransform.xml"/>
   <xi:include href="concepts/Transform.xml"/>

Modified: trunk/libs/xpressive/proto/doc/rationale.qbk
==============================================================================
--- trunk/libs/xpressive/proto/doc/rationale.qbk (original)
+++ trunk/libs/xpressive/proto/doc/rationale.qbk 2008-02-17 15:53:18 EST (Sun, 17 Feb 2008)
@@ -56,7 +56,7 @@
     boost::result_of<Tr(Expr, State, Visitor)>::type
 
 It is done this way largely for compile-time performance. Full
-compliance with the TR1 ResultOf protocol incurs a not insigninficant penalty
+compliance with the TR1 ResultOf protocol incurs a not insignificant penalty
 at compile time. Metaprogramming tricks are needed to first detect a nested
 `result_type` typedef if it exists. And each nested `result<>` template
 would need to be coded specially to handle references and cv-qualifiers, which
@@ -79,7 +79,7 @@
 Anyone who has peeked at Proto's source code has probably wondered,
 "Why all the dirty preprocessor gunk? Couldn't this have been all
 implemented cleanly on top of libraries like MPL and Fusion?" The
-answer is that Proto could have been implement this way, and in fact
+answer is that Proto could have been implemented this way, and in fact
 was at one point. The problem is that template metaprogramming (TMP)
 makes for very long compile times. As a foundation upon which other
 TMP-heavy libraries will be built, Proto itself should be as lightweight


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk