Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-04-06 13:18:12


On 04/04/2007 02:18 AM, Eric Niebler wrote:
> As discussed here recently, Boost.Proto is an expression template (ET)
> framework for building domain-specific embedded languages (DSEL). The
>
[snip]
> Feedback is most welcome.
>

proto/libs/xpressive/proto/doc/html/boost_proto/user_s_guide/calculator.html

contains:

   The expr<> template makes up the nodes in expression trees. The
   first template parameter is the node type; in this case,
   proto::tag::terminal. That means that _1 is a leaf-node in the
   expression tree. The second template parameter is a list of children
   types. Terminals will always have only one type in the type
   list. The last parameter is the number of types in the list. It is
   deduced from the type list, so you won't need to worry about it.

which suggests a leaf-node can have children. I thought leaf-nodes had
no children. What am I missing? OOPS. Maybe a leaf-node, as you're
defining it can have no other proto-expressions as children but it can
have other types of children. Is that right?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk