19#define CHECK_COMPOUND(t) \
20 TM_DEBUG (ASSERT (t->op != 0, "an compound tree use 0 as operator"))
22template <
typename T>
class lolly_tree;
23template <
typename T>
class lolly_tree_rep;
173 if (
t->op == 0)
return 0;
174 else return N (
t->a);
200 return ((
t->op) > 0);
212 return (
t->op ==
lab) && (
N (
t) == 0);
218 return (
t->op !=
lab) || (
N (
t) != 0);
224 return (
t->op == 0) && (
t->label == s);
230 return (
t->op != 0) || (
t->label != s);
236 return (
t->op == 0) && (
t->label == s);
242 return (
t->op != 0) || (
t->label != s);
249 return (
t->op ==
u->op) &&
257 return (
t->op !=
u->op) ||
264 return t.operator->() ==
u.operator->();
270 return (
t->op == l) && (
N (
t) != 0);
276 return (
t->op == l) && (
N (
t) == i);
347 for (i= 0; i <
N (
t1); i++)
349 for (i= 0; i <
N (
t2); i++)
377 if (n == 0)
return out <<
"()";
379 for (i= 0; i < n - 1; i++)
394 for (i= 0; i < n; i++)
A template class representing an array.
#define CONCRETE_TEMPLATE_CODE(PTR, TT, T)
Macro used to define the implementation of a concrete smart pointer with reference counting for a sin...
The list class represents a linked list.
lolly_tree_rep(int l, array< lolly_tree< T > > a2)
array< lolly_tree< T > > a
lolly_tree< T > & operator[](int i)
lolly_tree< T > * begin()
lolly_tree(int l, int n=0)
lolly_tree< T > operator()(int start, int end)
lolly_tree(int l, lolly_tree< T > t1, lolly_tree< T > t2, lolly_tree< T > t3, lolly_tree< T > t4, lolly_tree< T > t5)
lolly_tree(int l, lolly_tree< T > t1, lolly_tree< T > t2, lolly_tree< T > t3, lolly_tree< T > t4, lolly_tree< T > t5, lolly_tree< T > t6, lolly_tree< T > t7, lolly_tree< T > t8)
lolly_tree(int l, lolly_tree< T > t1, lolly_tree< T > t2, lolly_tree< T > t3)
CONCRETE_TEMPLATE(lolly_tree, T)
lolly_tree(lolly_tree_rep< T > *rep2)
lolly_tree(int l, lolly_tree< T > t1, lolly_tree< T > t2, lolly_tree< T > t3, lolly_tree< T > t4, lolly_tree< T > t5, lolly_tree< T > t6)
lolly_tree(int l, lolly_tree< T > t1, lolly_tree< T > t2)
lolly_tree(const char *l)
lolly_tree(int l, array< lolly_tree< T > > a)
lolly_tree(int l, lolly_tree< T > t1, lolly_tree< T > t2, lolly_tree< T > t3, lolly_tree< T > t4)
lolly_tree(int l, lolly_tree< T > t1)
lolly_tree(lolly_tree< T > t, int n)
lolly_tree(int l, lolly_tree< T > t1, lolly_tree< T > t2, lolly_tree< T > t3, lolly_tree< T > t4, lolly_tree< T > t5, lolly_tree< T > t6, lolly_tree< T > t7)
#define CHECK_COMPOUND(t)
array< lolly_tree< T > > A(lolly_tree< T > t)
array< lolly_tree< T > > & AR(lolly_tree< T > t)
bool operator!=(lolly_tree< T > t, int lab)
bool is_bool(lolly_tree< T > t)
bool as_bool(lolly_tree< T > t)
bool is_double(lolly_tree< T > t)
int as_int(lolly_tree< T > t)
int arity(lolly_tree< T > t)
bool is_string(lolly_tree< T > t)
double as_double(lolly_tree< T > t)
bool is_int(lolly_tree< T > t)
bool is_compound(lolly_tree< T > t)
bool strong_equal(lolly_tree< T > t, lolly_tree< T > u)
bool is_atomic(lolly_tree< T > t)
long int as_long_int(lolly_tree< T > t)
bool is_generic(lolly_tree< T > t)
lolly_tree< T > operator*(lolly_tree< T > t1, lolly_tree< T > t2)
string to_string(lolly_tree< T > t)
lolly_tree< T > copy(lolly_tree< T > t)
bool is_func(lolly_tree< T > t, int l)
lolly_tree< T > & operator<<(lolly_tree< T > &t, lolly_tree< T > t2)
bool operator==(lolly_tree< T > t, int lab)
string as_string(int16_t i)
Structure representing a concrete object with a reference count.