![]() |
Home | Libraries | People | FAQ | More |
BOOST_PHOENIX_DEFINE_EXPRESSION_EXT_VARARG
is a macro that can be used to generate all the necessary boilerplate to
create Phoenix Expressions
BOOST_PHOENIX_DEFINE_EXPRESSION_EXT_VARARG( actor , (namespace_seq)(name) , (child_grammar0) (child_grammar1) ... (child_grammarN) , N )
The above macro generates the necessary code for an expression name
in namespace namespace_seq
.
N
is the maximum number
of variable children. All but the last elements in the grammar sequence
are required children of the expression, and the last denotes a variable
number of children. The number of children an expression of this kind can
hold is therefor N-1
plus the size of the sequence
The macro should be used at global scope. namespace_seq
shall be the sequence of namespaces under which the following symbols will
be defined:
namespace tag { struct name; } namespace expression { template <typename A0, typename A1 ... typename AN> struct name : boost::phoenix::expr_ext< actor , tag::name , A0 , A1 ... , AN > {}; } namespace rule { struct name : expression::name< child_grammar0 , child_grammar1 ... , proto::vararg<child_grammarN> > {}; }
#include <boost/phoenix/core/expression.hpp>
TBD