Home | Libraries | People | FAQ | More |
Expr
An Expr represents a tagged node in an expression tree. The children of the Expr must themselves satisfy the Expr concept. The Expr has an arity representing the number of children. If the number of children is zero, the Expr also has a value. An Expr also has an associated Domain.
proto_tag
Expr::proto_tag
The tag type of the Expr.
proto_args
Expr::proto_args
A typelist representing either the types of the child nodes, or, if the arity of the Expr is 0, of the value of the terminal.
proto_arity
Expr::proto_arity
The arity (number of child nodes) of the Expr.
proto_arity
is an MPL Integral Constant.
proto_grammar
Expr::proto_grammar
A typedef for an instantiation of
proto::basic_expr<>
that is equivalent to Expr. Expression types are equivalent if they have the
same proto_tag
, proto_args
, and proto_arity
.
proto_base_expr
Expr::proto_base_expr
A typedef for an instantiation of
proto::expr<>
or
proto::basic_expr<>
that is equivalent to Expr. Expression types are equivalent if they have the
same proto_tag
, proto_args
, and proto_arity
.
proto_derived_expr
Expr::proto_derived_expr
A typedef for Expr
.
proto_domain
Expr::proto_domain
The Domain of the Expr. proto_domain
models Domain.
proto_childN
Expr::proto_childN
The type of the Nth child of Expr. Requires
0 == N::value || N::value < proto_arity::value
Name | Expression | Type | Semantics |
---|---|---|---|
Get N-th Child |
boost::proto::child< N >(e) |
proto_childN |
Extracts the Nth child from this Expr.
Requires |
Get Terminal Value |
boost::proto::value(e) |
proto_child0 |
Extracts the value from a terminal Expr.
Requires |
Get Base |
e.proto_base() |
proto_base_expr |
Returns an object of type
|