FAUST compiler  0.9.9.6b8
Functions
ppbox.cpp File Reference
#include "list.hh"
#include "boxes.hh"
#include "ppbox.hh"
#include "signals.hh"
#include "prim2.hh"
#include "xtended.hh"
Include dependency graph for ppbox.cpp:

Go to the source code of this file.

Functions

const char * prim0name (CTree *(*ptr)())
const char * prim1name (CTree *(*ptr)(CTree *))
const char * prim2name (CTree *(*ptr)(CTree *, CTree *))
const char * prim3name (CTree *(*ptr)(CTree *, CTree *, CTree *))
const char * prim4name (CTree *(*ptr)(CTree *, CTree *, CTree *, CTree *))
const char * prim5name (CTree *(*ptr)(CTree *, CTree *, CTree *, CTree *, CTree *))
static void streambinop (ostream &fout, Tree t1, const char *op, Tree t2, int curPriority, int upPriority)
static void printRule (ostream &fout, Tree rule)

Function Documentation

const char* prim0name ( CTree *(*)()  ptr)

Definition at line 32 of file ppbox.cpp.

Referenced by generateInsideSchema(), and boxpp::print().

{
    return "prim0???";
}

Here is the caller graph for this function:

const char* prim1name ( CTree *(*)(CTree *)  ptr)

Definition at line 37 of file ppbox.cpp.

References sigDelay1(), sigFloatCast(), and sigIntCast().

Referenced by generateInsideSchema(), and boxpp::print().

{
    if (ptr == sigDelay1) return "mem";
    if (ptr == sigIntCast) return "int";
    if (ptr == sigFloatCast) return "float";
    return "prim1???";
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* prim2name ( CTree *(*)(CTree *, CTree *)  ptr)

Definition at line 45 of file ppbox.cpp.

References sigAdd(), sigAND(), sigAttach(), sigDiv(), sigEQ(), sigFixDelay(), sigGE(), sigGT(), sigLE(), sigLeftShift(), sigLT(), sigMul(), sigNE(), sigOR(), sigPrefix(), sigRem(), sigRightShift(), sigSub(), and sigXOR().

Referenced by generateInsideSchema(), and boxpp::print().

{
    if (ptr == sigAdd) return "+";
    if (ptr == sigSub) return "-";
    if (ptr == sigMul) return "*";
    if (ptr == sigDiv) return "/";
    if (ptr == sigRem) return "%";

    if (ptr == sigAND) return "&";
    if (ptr == sigOR ) return "|";
    if (ptr == sigXOR) return "^";

    if (ptr == sigLeftShift ) return "<<";
    if (ptr == sigRightShift) return ">>";

    if (ptr == sigLT) return "<";
    if (ptr == sigLE) return "<=";
    if (ptr == sigGT) return ">";
    if (ptr == sigGE) return ">=";
    if (ptr == sigEQ) return "==";
    if (ptr == sigNE) return "!=";

    if (ptr == sigFixDelay) return "@";
    if (ptr == sigPrefix)   return "prefix";
    if (ptr == sigAttach)   return "attach";

    return "prim2???";
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* prim3name ( CTree *(*)(CTree *, CTree *, CTree *)  ptr)

Definition at line 74 of file ppbox.cpp.

References sigReadOnlyTable(), and sigSelect2().

Referenced by generateInsideSchema(), and boxpp::print().

{
    if (ptr == sigReadOnlyTable)    return "rdtable";
    if (ptr == sigSelect2)          return "select2";
    return "prim3???";
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* prim4name ( CTree *(*)(CTree *, CTree *, CTree *, CTree *)  ptr)

Definition at line 81 of file ppbox.cpp.

References sigSelect3().

Referenced by generateInsideSchema(), and boxpp::print().

{
    if (ptr == sigSelect3)          return "select3";
    return "prim4???";
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* prim5name ( CTree *(*)(CTree *, CTree *, CTree *, CTree *, CTree *)  ptr)

Definition at line 87 of file ppbox.cpp.

References sigWriteReadTable().

Referenced by generateInsideSchema(), and boxpp::print().

{
    if (ptr == sigWriteReadTable)   return "wrtable";
    return "prim5???";
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void printRule ( ostream &  fout,
Tree  rule 
) [static]

Definition at line 101 of file ppbox.cpp.

References hd(), isNil(), left(), right(), and tl().

Referenced by boxpp::print().

{
    Tree lhs = left(rule);
    Tree rhs = right(rule);
    char sep = '('; while (!isNil(lhs)) { fout << sep << boxpp(hd(lhs)); sep=','; lhs=tl(lhs); }
    fout << ") => " << boxpp(rhs) << "; ";
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void streambinop ( ostream &  fout,
Tree  t1,
const char *  op,
Tree  t2,
int  curPriority,
int  upPriority 
) [static]

Definition at line 94 of file ppbox.cpp.

Referenced by boxpp::print().

{
    if (upPriority > curPriority) fout << '(';
    fout << boxpp(t1,curPriority) << op << boxpp(t2,curPriority);
    if (upPriority > curPriority) fout << ')';
}

Here is the caller graph for this function: