155 Tree t1, t2, t3, ff, label, cur,
min,
max, step, type,
name, file, arg,
156 body, fun, args, abstr, genv, vis, lenv, ldef, slot,
157 ident, rules, filename;
164 if (xt) fout << xt->
name();
192 for (
int i = 0; i <
ffarity(ff); i++) {
225 <<
boxpp(cur) <<
", "
226 <<
boxpp(min) <<
", "
227 <<
boxpp(max) <<
", "
228 <<
boxpp(step)<<
')';
233 <<
boxpp(cur) <<
", "
234 <<
boxpp(min) <<
", "
235 <<
boxpp(max) <<
", "
236 <<
boxpp(step)<<
')';
250 <<
boxpp(min) <<
", "
251 <<
boxpp(max) <<
')';
256 <<
boxpp(min) <<
", "
257 <<
boxpp(max) <<
')';
262 <<
boxpp(cur) <<
", "
263 <<
boxpp(min) <<
", "
264 <<
boxpp(max) <<
", "
265 <<
boxpp(step)<<
')';
287 for (
size_t i=0; i<
box->
arity(); i++) {
312 fout <<
"environment";
315 fout <<
"closure[" <<
boxpp(abstr)
316 <<
", genv = " <<
envpp(genv)
317 <<
", lenv = " <<
envpp(lenv)
336 fout <<
"\\(" <<
boxpp(slot) <<
").(" <<
boxpp(body) <<
")";
342 while (!
isNil(rules)) {
351 fout <<
"<" <<
boxpp(ident) <<
">";
356 fout <<
boxpp(ident);
361 fout <<
"PM[" <<
box <<
"]";
375 cerr <<
"Error in box::print() : " << *
box <<
" is not a valid box" << endl;
Tree(* prim2)(Tree x, Tree y)
bool isBoxIPar(Tree t, Tree &x, Tree &y, Tree &z)
bool isImportFile(Tree s, Tree &filename)
const char * prim3name(CTree *(*ptr)(CTree *, CTree *, CTree *))
bool isBoxSeq(Tree t, Tree &x, Tree &y)
bool isBoxWithLocalDef(Tree t, Tree &body, Tree &ldef)
const char * prim2name(CTree *(*ptr)(CTree *, CTree *))
bool isBoxOutputs(Tree t, Tree &x)
bool isBoxIProd(Tree t, Tree &x, Tree &y, Tree &z)
bool isBoxPatternMatcher(Tree s)
int tree2int(Tree t)
if t has a node of type int, return it otherwise error
bool isBoxSplit(Tree t, Tree &x, Tree &y)
bool isBoxComponent(Tree s, Tree &filename)
Tree(* prim4)(Tree w, Tree x, Tree y, Tree z)
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
bool isBoxAccess(Tree t, Tree &exp, Tree &id)
bool isBoxHBargraph(Tree s)
bool isBoxRec(Tree t, Tree &x, Tree &y)
double max(double x, double y)
Tree ffsignature(Tree ff)
Tree(* prim3)(Tree x, Tree y, Tree z)
Tree(* prim5)(Tree v, Tree w, Tree x, Tree y, Tree z)
const char * ffincfile(Tree ff)
static string type2str(int type)
bool isBoxSymbolic(Tree t)
bool isBoxISum(Tree t, Tree &x, Tree &y, Tree &z)
bool isBoxEnvironment(Tree s)
static string tree2quotedstr(Tree t)
bool isBoxPar(Tree t, Tree &x, Tree &y)
bool isBoxHSlider(Tree s)
static void printRule(ostream &fout, Tree rule)
bool isBoxVBargraph(Tree s)
bool isBoxWaveform(Tree s)
bool isClosure(Tree t, Tree &abstr, Tree &genv, Tree &vis, Tree &lenv)
bool isBoxCheckbox(Tree s)
static void streambinop(ostream &fout, Tree t1, const char *op, Tree t2, int curPriority, int upPriority)
int arity() const
return the number of branches (subtrees) of a tree
const char * name(Symbol *sym)
Returns the name of a symbol.
bool isBoxVSlider(Tree s)
const char * fflibfile(Tree ff)
bool isBoxNumEntry(Tree s)
bool isBoxInputs(Tree t, Tree &x)
void * getUserData(Symbol *sym)
Returns user data.
bool isBoxISeq(Tree t, Tree &x, Tree &y, Tree &z)
bool isBoxPatternVar(Tree s, Tree &id)
int ffargtype(Tree t, int i)
const char * prim5name(CTree *(*ptr)(CTree *, CTree *, CTree *, CTree *, CTree *))
const char * prim1name(CTree *(*ptr)(CTree *))
bool isBoxMerge(Tree t, Tree &x, Tree &y)
double min(double x, double y)
const char * prim0name(CTree *(*ptr)())
const char * tree2str(Tree t)
if t has a node of type symbol, return its name otherwise error
Tree branch(int i) const
return the ith branch (subtree) of a tree
const char * prim4name(CTree *(*ptr)(CTree *, CTree *, CTree *, CTree *))