48using namespace boost::placeholders;
161 assert(data.type() ==
typeid(
string));
168 return boost::get<string>(data);
182 return boost::get<expr_t::func_t>(data);
195 return data.which() == 0;
199 return boost::get<shared_ptr<scope_t> >(data);
226 return boost::get<ptr_op_t>(data);
247 return data.which() != 0 &&
as_op();
251 void acquire()
const {
253 "Acquiring " <<
this <<
", refc now " << refc + 1);
257 void release()
const {
259 "Releasing " <<
this <<
", refc now " << refc - 1);
282 const int depth = 0);
308 void dump(std::ostream& out,
const int depth = 0)
const;
342#define MAKE_FUNCTOR(x) expr_t::op_t::wrap_functor(bind(&x, this, _1))
343#define WRAP_FUNCTOR(x) expr_t::op_t::wrap_functor(x)
#define TRACE_CTOR(cls, args)
value_t split_cons_expr(expr_t::ptr_op_t op)
string op_context(const expr_t::ptr_op_t op, const expr_t::ptr_op_t locus=NULL)
intrusive_ptr< op_t > ptr_op_t
function< result_type(call_scope_t &) func_t)
static ptr_op_t wrap_scope(shared_ptr< scope_t > sobj)
static ptr_op_t new_node(kind_t _kind, ptr_op_t _left=NULL, ptr_op_t _right=NULL)
const expr_t::func_t & as_function() const
static ptr_op_t wrap_functor(expr_t::func_t fobj)
expr_t::func_t & as_function_lval()
void set_right(const ptr_op_t &expr)
static ptr_op_t wrap_value(const value_t &val)
void set_value(const value_t &val)
void set_left(const ptr_op_t &expr)
friend void intrusive_ptr_add_ref(const op_t *op)
void set_ident(const string &val)
shared_ptr< scope_t > as_scope_lval()
value_t call(const value_t &args, scope_t &scope, ptr_op_t *locus=NULL, const int depth=0)
const ptr_op_t & right() const
void set_function(const expr_t::func_t &val)
const ptr_op_t & left() const
friend void intrusive_ptr_release(const op_t *op)
bool print(std::ostream &out, const context_t &context=context_t()) const
ptr_op_t compile(scope_t &scope, const int depth=0, scope_t *param_scope=NULL)
const shared_ptr< scope_t > as_scope() const
void set_scope(shared_ptr< scope_t > val)
expr_t::ptr_op_t ptr_op_t
const ptr_op_t & as_op() const
value_t calc(scope_t &scope, ptr_op_t *locus=NULL, const int depth=0)
const value_t & as_value() const
bool is_scope_unset() const
const string & as_ident() const
void dump(std::ostream &out, const int depth=0) const
value_t & as_value_lval()
std::ostream::pos_type * end_pos
std::ostream::pos_type * start_pos
context_t(const ptr_op_t &_expr_op, const ptr_op_t &_op_to_find, std::ostream::pos_type *const _start_pos=NULL, std::ostream::pos_type *const _end_pos=NULL, const bool _relaxed=true)
Dynamic type representing various numeric types.