#include "list.hh"
#include "boxes.hh"
#include "ppbox.hh"
#include "signals.hh"
#include "prim2.hh"
#include "xtended.hh"
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) |
const char* prim0name | ( | CTree *(*)() | ptr | ) |
Definition at line 32 of file ppbox.cpp.
Referenced by generateInsideSchema(), and boxpp::print().
Definition at line 37 of file ppbox.cpp.
References sigDelay1(), sigFloatCast(), and sigIntCast().
Referenced by generateInsideSchema(), and boxpp::print().
00038 { 00039 if (ptr == sigDelay1) return "mem"; 00040 if (ptr == sigIntCast) return "int"; 00041 if (ptr == sigFloatCast) return "float"; 00042 return "prim1???"; 00043 }
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().
00046 { 00047 if (ptr == sigAdd) return "+"; 00048 if (ptr == sigSub) return "-"; 00049 if (ptr == sigMul) return "*"; 00050 if (ptr == sigDiv) return "/"; 00051 if (ptr == sigRem) return "%"; 00052 00053 if (ptr == sigAND) return "&"; 00054 if (ptr == sigOR ) return "|"; 00055 if (ptr == sigXOR) return "^"; 00056 00057 if (ptr == sigLeftShift ) return "<<"; 00058 if (ptr == sigRightShift) return ">>"; 00059 00060 if (ptr == sigLT) return "<"; 00061 if (ptr == sigLE) return "<="; 00062 if (ptr == sigGT) return ">"; 00063 if (ptr == sigGE) return ">="; 00064 if (ptr == sigEQ) return "=="; 00065 if (ptr == sigNE) return "!="; 00066 00067 if (ptr == sigFixDelay) return "@"; 00068 if (ptr == sigPrefix) return "prefix"; 00069 if (ptr == sigAttach) return "attach"; 00070 00071 return "prim2???"; 00072 }
Definition at line 74 of file ppbox.cpp.
References sigReadOnlyTable(), and sigSelect2().
Referenced by generateInsideSchema(), and boxpp::print().
00075 { 00076 if (ptr == sigReadOnlyTable) return "rdtable"; 00077 if (ptr == sigSelect2) return "select2"; 00078 return "prim3???"; 00079 }
Definition at line 81 of file ppbox.cpp.
References sigSelect3().
Referenced by generateInsideSchema(), and boxpp::print().
00082 { 00083 if (ptr == sigSelect3) return "select3"; 00084 return "prim4???"; 00085 }
Definition at line 87 of file ppbox.cpp.
References sigWriteReadTable().
Referenced by generateInsideSchema(), and boxpp::print().
00088 { 00089 if (ptr == sigWriteReadTable) return "wrtable"; 00090 return "prim5???"; 00091 }
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().
00102 { 00103 Tree lhs = left(rule); 00104 Tree rhs = right(rule); 00105 char sep = '('; while (!isNil(lhs)) { fout << sep << boxpp(hd(lhs)); sep=','; lhs=tl(lhs); } 00106 fout << ") => " << boxpp(rhs) << "; "; 00107 }
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().
00095 { 00096 if (upPriority > curPriority) fout << '('; 00097 fout << boxpp(t1,curPriority) << op << boxpp(t2,curPriority); 00098 if (upPriority > curPriority) fout << ')'; 00099 }