1 /************************************************************************
2 ************************************************************************
4 Copyright (C) 2003-2004 GRAME, Centre National de Creation Musicale
5 ---------------------------------------------------------------------
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 ************************************************************************
20 ************************************************************************/
27 /**********************************************************************
28 - ppbox.h : pretty print box expressions (projet FAUST) -
33 12-07-2002 first implementation (yo)
35 ***********************************************************************/
43 //void fppbox (FILE* fout, Tree box, int priority=0);
44 //inline void ppbox (Tree box, int priority=0) { fppbox(stdout, box, priority); }
47 const char * prim0name(CTree *(*ptr) ());
48 const char * prim1name(CTree *(*ptr) (CTree *));
49 const char * prim2name(CTree *(*ptr) (CTree *, CTree *));
50 const char * prim3name(CTree *(*ptr) (CTree *, CTree *, CTree *));
51 const char * prim4name(CTree *(*ptr) (CTree *, CTree *, CTree *, CTree *));
52 const char * prim5name(CTree *(*ptr) (CTree *, CTree *, CTree *, CTree *, CTree *));
55 // box pretty printer.
56 // usage : out << boxpp(aBoxExp);
63 boxpp(Tree b, int p=0) : box(b), priority(p) {}
64 ostream& print (ostream& fout) const;
67 inline ostream& operator << (ostream& file, const boxpp& bpp) { return bpp.print(file); }
70 // box pretty printer.
71 // usage : out << boxpp(aBoxExp);
77 envpp(Tree e) : fEnv(e) {}
78 ostream& print (ostream& fout) const;
81 inline ostream& operator << (ostream& file, const envpp& epp) { return epp.print(file); }