main.cpp File Reference

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <sys/time.h>
#include "libgen.h"
#include "compatibility.hh"
#include "signals.hh"
#include "sigtype.hh"
#include "sigtyperules.hh"
#include "sigprint.hh"
#include "simplify.hh"
#include "privatise.hh"
#include "compile_scal.hh"
#include "compile_vect.hh"
#include "propagate.hh"
#include "errormsg.hh"
#include "ppbox.hh"
#include "enrobage.hh"
#include "eval.hh"
#include "description.hh"
#include "floats.hh"
#include "doc.hh"
#include <map>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include <unistd.h>
#include "sourcereader.hh"
#include "schema.h"
#include "drawschema.hh"
#include "timing.hh"
Include dependency graph for main.cpp:

Go to the source code of this file.

Defines

#define FAUSTVERSION   "0.9.10"

Functions

int yyparse ()
static bool isCmd (const char *cmd, const char *kw1)
static bool isCmd (const char *cmd, const char *kw1, const char *kw2)
bool process_cmdline (int argc, char *argv[])
void printversion ()
void printhelp ()
void printheader (ostream &dst)
static string dirname (const string &path)
static string fxname (const string &filename)
 transform a filename "faust/example/noise.dsp" into the corresponding fx name "noise"
static void initFaustDirectories ()
int main (int argc, char *argv[])

Variables

int yyerr
int yydebug
FILE * yyin = (FILE *) 0
Tree gResult
Tree gResult2
SourceReader gReader
map< Tree, set< Tree > > gMetaDataSet
vector< TreegDocVector
 Contains <mdoc> parsed trees: DOCTXT, DOCEQN, DOCDGM.
string gDocLang
string gFaustSuperSuperDirectory
string gFaustSuperDirectory
string gFaustDirectory
string gMasterDocument
string gMasterDirectory
string gMasterName
string gDocName
 Contains the filename for out documentation.
Tree gExpandedDefList
bool gHelpSwitch = false
bool gVersionSwitch = false
bool gDetailsSwitch = false
bool gShadowBlur = false
bool gDrawPSSwitch = false
bool gDrawSVGSwitch = false
bool gPrintXMLSwitch = false
bool gPrintDocSwitch = false
bool gLatexDocSwitch = true
bool gStripDocSwitch = false
int gBalancedSwitch = 0
int gFoldThreshold = 25
int gMaxNameSize = 40
bool gSimpleNames = false
bool gSimplifyDiagrams = false
bool gLessTempSwitch = false
int gMaxCopyDelay = 16
string gArchFile
string gOutputFile
list< string > gInputFiles
bool gPatternEvalMode = false
bool gVectorSwitch = false
bool gDeepFirstSwitch = false
int gVecSize = 32
int gVectorLoopVariant = 0
bool gOpenMPSwitch = false
bool gSchedulerSwitch = false
bool gGroupTaskSwitch = false
bool gUIMacroSwitch = false
int gTimeout = 0
int gFloatSize = 1
bool gPrintFileListSwitch = false

Define Documentation

#define FAUSTVERSION   "0.9.10"

Definition at line 21 of file main.cpp.

Referenced by main(), printheader(), and printversion().


Function Documentation

static string dirname ( const string &  path  )  [static]

Definition at line 423 of file main.cpp.

Referenced by initFaustDirectories().

00424 {
00425     char s[1024];
00426     strncpy(s, path.c_str(), 1024);
00427     return string(dirname(s));
00428 }

Here is the caller graph for this function:

static string fxname ( const string &  filename  )  [static]

transform a filename "faust/example/noise.dsp" into the corresponding fx name "noise"

Definition at line 434 of file main.cpp.

Referenced by initFaustDirectories().

00435 {
00436     // determine position right after the last '/' or 0
00437     unsigned int p1 = 0;
00438     for (unsigned int i=0; i<filename.size(); i++) {
00439         if (filename[i] == '/')  { p1 = i+1; }
00440     }
00441     
00442     // determine position of the last '.'
00443     unsigned int p2 = filename.size();
00444     for (unsigned int i=p1; i<filename.size(); i++) {
00445         if (filename[i] == '.')  { p2 = i; }
00446     }
00447 
00448     return filename.substr(p1, p2-p1);
00449 }

Here is the caller graph for this function:

static void initFaustDirectories (  )  [static]

Definition at line 452 of file main.cpp.

References dirname(), fxname(), gDocName, getFaustPathname(), gFaustDirectory, gFaustSuperDirectory, gFaustSuperSuperDirectory, gInputFiles, gMasterDirectory, gMasterDocument, and gMasterName.

Referenced by main().

00453 {
00454     char s[1024];
00455     getFaustPathname(s, 1024);
00456     dirname(s);
00457     gFaustDirectory = s;
00458     gFaustSuperDirectory = dirname(gFaustDirectory);
00459     gFaustSuperSuperDirectory = dirname(gFaustSuperDirectory);
00460     if (gInputFiles.empty()) {
00461         gMasterDocument = "Unknown";
00462         gMasterDirectory = ".";
00463         gMasterName = "faustfx";
00464         gDocName = "faustdoc";
00465     } else {
00466         gMasterDocument = *gInputFiles.begin();
00467         gMasterDirectory = dirname(gMasterDocument);
00468         gMasterName = fxname(gMasterDocument);
00469         gDocName = fxname(gMasterDocument);
00470     }
00471 }

Here is the call graph for this function:

Here is the caller graph for this function:

static bool isCmd ( const char *  cmd,
const char *  kw1,
const char *  kw2 
) [static]

Definition at line 155 of file main.cpp.

00156 {
00157     return  (strcmp(cmd, kw1) == 0) || (strcmp(cmd, kw2) == 0);
00158 }

static bool isCmd ( const char *  cmd,
const char *  kw1 
) [static]

Definition at line 150 of file main.cpp.

Referenced by process_cmdline().

00151 {
00152     return  (strcmp(cmd, kw1) == 0);
00153 }

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 475 of file main.cpp.

References Description::author(), boxPropagateSig(), Compiler::compileMultiSignal(), cons(), Description::copyright(), drawSchema(), endTiming(), evalprocess(), SourceReader::expandlist(), FAUSTVERSION, gArchFile, gDetailsSwitch, gDrawPSSwitch, gDrawSVGSwitch, gErrorCount, getBoxType(), Compiler::getClass(), Compiler::getDescription(), gHelpSwitch, gInputFiles, gLatexDocSwitch, gMasterDocument, gMetaDataSet, gOutputFile, gPrintDocSwitch, gPrintFileListSwitch, gPrintXMLSwitch, gSchedulerSwitch, gTimeout, gVectorSwitch, gVersionSwitch, importFile(), initFaustDirectories(), Klass::inputs(), Description::inputs(), Description::license(), SourceReader::listSrcFiles(), makeSigInputList(), Description::name(), nil, open_arch_stream(), Klass::outputs(), Description::outputs(), Description::print(), printDoc(), printfloatdef(), printheader(), printhelp(), Klass::printIncludeFile(), Klass::printLibrary(), Klass::println(), printSignal(), printversion(), process_cmdline(), Compiler::setDescription(), startTiming(), streamCopy(), streamCopyUntil(), streamCopyUntilEnd(), subst(), tree(), tree2str(), Description::version(), and yyerr.

00476 {
00477 
00478     /****************************************************************
00479      1 - process command line
00480     *****************************************************************/
00481 
00482     process_cmdline(argc, argv);
00483 
00484     if (gHelpSwitch)        { printhelp(); exit(0); }
00485     if (gVersionSwitch)     { printversion(); exit(0); }
00486 
00487     initFaustDirectories();
00488 #ifndef WIN32
00489     alarm(gTimeout);
00490 #endif
00491 
00492 
00493     /****************************************************************
00494      2 - parse source files
00495     *****************************************************************/
00496 
00497     startTiming("parser");
00498 
00499     
00500     list<string>::iterator s;
00501     gResult2 = nil;
00502     yyerr = 0;
00503 
00504     if (gInputFiles.begin() == gInputFiles.end()) {
00505         cerr << "ERROR: no files specified; for help type \"faust --help\"" << endl;
00506         exit(1);
00507     }
00508     for (s = gInputFiles.begin(); s != gInputFiles.end(); s++) {
00509         if (s == gInputFiles.begin()) gMasterDocument = *s;
00510         gResult2 = cons(importFile(tree(s->c_str())), gResult2);
00511     }
00512     if (yyerr > 0) {
00513         //fprintf(stderr, "Erreur de parsing 2, count = %d \n", yyerr);
00514         exit(1);
00515     }
00516     gExpandedDefList = gReader.expandlist(gResult2);
00517 
00518     endTiming("parser");
00519     
00520     /****************************************************************
00521      3 - evaluate 'process' definition
00522     *****************************************************************/
00523     
00524     startTiming("evaluation");
00525 
00526 
00527     Tree process = evalprocess(gExpandedDefList);
00528     if (gErrorCount > 0) {
00529        // cerr << "Total of " << gErrorCount << " errors during evaluation of : process = " << boxpp(process) << ";\n";
00530         cerr << "Total of " << gErrorCount << " errors during the compilation of  " << gMasterDocument << ";\n";
00531         exit(1);
00532     }
00533 
00534 
00535     if (gDetailsSwitch) { cerr << "process = " << boxpp(process) << ";\n"; }
00536 
00537     if (gDrawPSSwitch or gDrawSVGSwitch) {
00538         string projname = gMasterDocument;
00539         if( gMasterDocument.substr(gMasterDocument.length()-4) == ".dsp" ) {
00540             projname = gMasterDocument.substr(0, gMasterDocument.length()-4); 
00541         }
00542         if (gDrawPSSwitch)  { drawSchema( process, subst("$0-ps",  projname).c_str(), "ps" ); }
00543         if (gDrawSVGSwitch) { drawSchema( process, subst("$0-svg", projname).c_str(), "svg" ); }
00544     }
00545 
00546     int numInputs, numOutputs;
00547     if (!getBoxType(process, &numInputs, &numOutputs)) {
00548         cerr << "ERROR during the evaluation of  process : "
00549              << boxpp(process) << endl;
00550         exit(1);
00551     }
00552 
00553     if (gDetailsSwitch) {
00554         cerr <<"process has " << numInputs <<" inputs, and " << numOutputs <<" outputs" << endl;
00555     }
00556     
00557     endTiming("evaluation");
00558 
00559 
00560     /****************************************************************
00561      3.5 - output file list is needed
00562     *****************************************************************/
00563     if (gPrintFileListSwitch) {
00564         cout << "******* ";
00565         // print the pathnames of the files used to evaluate process
00566         vector<string> pathnames = gReader.listSrcFiles();
00567         for (unsigned int i=0; i< pathnames.size(); i++) cout << pathnames[i] << ' ';
00568         cout << endl;
00569 
00570     }
00571     
00572 
00573     /****************************************************************
00574      4 - compute output signals of 'process'
00575     *****************************************************************/
00576     
00577     startTiming("propagation");
00578 
00579 
00580     Tree lsignals = boxPropagateSig(nil, process , makeSigInputList(numInputs) );
00581     if (gDetailsSwitch) { cerr << "output signals are : " << endl;  printSignal(lsignals, stderr); }
00582 
00583     endTiming("propagation");
00584 
00585 
00586     /****************************************************************
00587      5 - translate output signals into C++ code
00588     *****************************************************************/
00589 
00590     startTiming("compilation");
00591 
00592     Compiler* C;
00593     if (gVectorSwitch)  C = new VectorCompiler("mydsp", "dsp", numInputs, numOutputs);
00594     else                C = new ScalarCompiler("mydsp", "dsp", numInputs, numOutputs);
00595 
00596     if (gPrintXMLSwitch) C->setDescription(new Description());
00597     if (gPrintDocSwitch) C->setDescription(new Description());
00598 
00599     C->compileMultiSignal(lsignals);
00600 
00601     endTiming("compilation");
00602 
00603     /****************************************************************
00604      6 - generate XML description (if required)
00605     *****************************************************************/
00606 
00607     if (gPrintXMLSwitch) {
00608         Description*    D = C->getDescription(); assert(D);
00609         //ostream*      xout = new ofstream(subst("$0.xml", gMasterDocument).c_str());
00610         ofstream        xout(subst("$0.xml", gMasterDocument).c_str());
00611 
00612         if(gMetaDataSet.count(tree("name"))>0)          D->name(tree2str(*(gMetaDataSet[tree("name")].begin())));
00613         if(gMetaDataSet.count(tree("author"))>0)        D->author(tree2str(*(gMetaDataSet[tree("author")].begin())));
00614         if(gMetaDataSet.count(tree("copyright"))>0)     D->copyright(tree2str(*(gMetaDataSet[tree("copyright")].begin())));
00615         if(gMetaDataSet.count(tree("license"))>0)       D->license(tree2str(*(gMetaDataSet[tree("license")].begin())));
00616         if(gMetaDataSet.count(tree("version"))>0)       D->version(tree2str(*(gMetaDataSet[tree("version")].begin())));
00617 
00618         D->inputs(C->getClass()->inputs());
00619         D->outputs(C->getClass()->outputs());
00620 
00621         D->print(0, xout);
00622     }
00623 
00624 
00625     /****************************************************************
00626      7 - generate documentation from Faust comments (if required)
00627     *****************************************************************/
00628 
00629 
00630     if (gPrintDocSwitch) {
00631         if (gLatexDocSwitch) {
00632             string projname = gMasterDocument;
00633             if( gMasterDocument.substr(gMasterDocument.length()-4) == ".dsp" ) {
00634                 projname = gMasterDocument.substr(0, gMasterDocument.length()-4); }
00635             printDoc( subst("$0-mdoc", projname).c_str(), "tex", FAUSTVERSION );
00636         }
00637     }
00638 
00639 
00640 
00641 
00642     /****************************************************************
00643      8 - generate output file
00644     *****************************************************************/
00645 
00646     ostream* dst;
00647     istream* enrobage;
00648     //istream* intrinsic;
00649 
00650     if (gOutputFile != "") {
00651         dst = new ofstream(gOutputFile.c_str());
00652     } else {
00653         dst = &cout;
00654     }
00655 
00656     if (gArchFile != "") {
00657         if ( (enrobage = open_arch_stream(gArchFile.c_str())) ) {
00658             printheader(*dst);
00659             C->getClass()->printLibrary(*dst);
00660             C->getClass()->printIncludeFile(*dst);
00661 
00662             streamCopyUntil(*enrobage, *dst, "<<includeIntrinsic>>");
00663             
00664 //          if ( gVectorSwitch && (intrinsic = open_arch_stream("intrinsic.hh")) ) {
00665 //              streamCopyUntilEnd(*intrinsic, *dst);
00666 //          }
00667             
00668             if (gSchedulerSwitch) {
00669                 istream* scheduler_include = open_arch_stream("scheduler.h");
00670                 if (scheduler_include) {
00671                     streamCopy(*scheduler_include, *dst);
00672                 }
00673             }
00674             
00675             streamCopyUntil(*enrobage, *dst, "<<includeclass>>");
00676             printfloatdef(*dst);
00677             
00678             C->getClass()->println(0,*dst);
00679             streamCopyUntilEnd(*enrobage, *dst);
00680         } else {
00681             cerr << "ERROR : can't open architecture file " << gArchFile << endl;
00682             return 1;
00683         }
00684     } else {
00685         printheader(*dst);
00686         printfloatdef(*dst);
00687         C->getClass()->printLibrary(*dst);
00688         C->getClass()->printIncludeFile(*dst);
00689         C->getClass()->println(0,*dst);
00690     }
00691     
00692     delete C;
00693     return 0;
00694 }

Here is the call graph for this function:

void printheader ( ostream &  dst  ) 

Definition at line 387 of file main.cpp.

References FAUSTVERSION, gMetaDataSet, and tree().

Referenced by main().

00388 {
00389     // defines the metadata we want to print as comments at the begin of in the C++ file
00390     set<Tree> selectedKeys;
00391     selectedKeys.insert(tree("name"));
00392     selectedKeys.insert(tree("author"));
00393     selectedKeys.insert(tree("copyright"));
00394     selectedKeys.insert(tree("license"));
00395     selectedKeys.insert(tree("version"));
00396 
00397     dst << "//-----------------------------------------------------" << endl;
00398     for (map<Tree, set<Tree> >::iterator i = gMetaDataSet.begin(); i != gMetaDataSet.end(); i++) {
00399         if (selectedKeys.count(i->first)) {
00400             dst << "// " << *(i->first);
00401             const char* sep = ": ";
00402             for (set<Tree>::iterator j = i->second.begin(); j != i->second.end(); ++j) {
00403                 dst << sep << **j;
00404                 sep = ", ";
00405             }
00406             dst << endl;
00407         }
00408     }
00409 
00410     dst << "//" << endl;
00411     dst << "// Code generated with Faust " << FAUSTVERSION << " (http://faust.grame.fr)" << endl;
00412     dst << "//-----------------------------------------------------" << endl;
00413 }

Here is the call graph for this function:

Here is the caller graph for this function:

void printhelp (  ) 

Definition at line 337 of file main.cpp.

References printversion().

Referenced by main().

00338 {
00339     printversion();
00340     cout << "usage: faust [options] file1 [file2 ...]\n";
00341     cout << "\twhere options represent zero or more compiler options \n\tand fileN represents a faust source file (.dsp extension).\n";
00342 
00343     cout << "\noptions :\n";
00344     cout << "---------\n";
00345 
00346     cout << "-h \t\tprint this --help message\n";
00347     cout << "-v \t\tprint compiler --version information\n";
00348     cout << "-d \t\tprint compilation --details\n";
00349     cout << "-ps \t\tprint block-diagram --postscript file\n";
00350     cout << "-svg \tprint block-diagram --svg file\n";
00351     cout << "-mdoc \tprint --mathdoc of a Faust program in LaTeX format in a -mdoc directory\n";
00352     cout << "-mdlang <l>\t\tload --mathdoc-lang <l> if translation file exists (<l> = en, fr, ...)\n";
00353     cout << "-stripdoc \t\tapply --strip-mdoc-tags when printing Faust -mdoc listings\n";
00354     cout << "-sd \t\ttry to further --simplify-diagrams before drawing them\n";
00355     cout << "-f <n> \t\t--fold <n> threshold during block-diagram generation (default 25 elements) \n";
00356     cout << "-mns <n> \t--max-name-size <n> threshold during block-diagram generation (default 40 char)\n";
00357     cout << "-sn \t\tuse --simple-names (without arguments) during block-diagram generation\n";
00358     cout << "-xml \t\tgenerate an --xml description file\n";
00359     cout << "-blur \t\tadd a --shadow-blur to SVG boxes\n";
00360     cout << "-lb \t\tgenerate --left-balanced expressions\n";
00361     cout << "-mb \t\tgenerate --mid-balanced expressions (default)\n";
00362     cout << "-rb \t\tgenerate --right-balanced expressions\n";
00363     cout << "-lt \t\tgenerate --less-temporaries in compiling delays\n";
00364     cout << "-mcd <n> \t--max-copy-delay <n> threshold between copy and ring buffer implementation (default 16 samples)\n";
00365     cout << "-a <file> \tC++ architecture file\n";
00366     cout << "-o <file> \tC++ output file\n";
00367     cout << "-vec    \t--vectorize generate easier to vectorize code\n";
00368     cout << "-vs <n> \t--vec-size <n> size of the vector (default 32 samples)\n";
00369     cout << "-lv <n> \t--loop-variant [0:fastest (default), 1:simple] \n";
00370     cout << "-omp    \t--openMP generate OpenMP pragmas, activates --vectorize option\n";
00371     cout << "-sch    \t--scheduler generate tasks and used Thread pool based scheduler, activates --vectorize option\n";
00372     cout << "-dfs    \t--deepFirstScheduling schedule vector loops in deep first order\n";
00373     cout << "-g    \t\t--groupTasks group single-threaded sequential tasks together when -omp or -sch is used\n";
00374     cout << "-uim    \t--user-interface-macros add user interface macro definitions in the C++ code\n";
00375     cout << "-single \tuse --single-precision-floats for internal computations (default)\n";
00376     cout << "-double \tuse --double-precision-floats for internal computations\n";
00377     cout << "-quad \t\tuse --quad-precision-floats for internal computations\n";
00378     cout << "-flist \t\tuse --file-list used to eval process\n";
00379 
00380     cout << "\nexample :\n";
00381     cout << "---------\n";
00382 
00383     cout << "faust -a jack-gtk.cpp -o myfx.cpp myfx.dsp\n";
00384 }

Here is the call graph for this function:

Here is the caller graph for this function:

void printversion (  ) 

Definition at line 330 of file main.cpp.

References FAUSTVERSION.

Referenced by main(), and printhelp().

00331 {
00332     cout << "FAUST, DSP to C++ compiler, Version " << FAUSTVERSION << "\n";
00333     cout << "Copyright (C) 2002-2010, GRAME - Centre National de Creation Musicale. All rights reserved. \n\n";
00334 }

Here is the caller graph for this function:

bool process_cmdline ( int  argc,
char *  argv[] 
)

Definition at line 160 of file main.cpp.

References check_file(), gArchFile, gBalancedSwitch, gDeepFirstSwitch, gDetailsSwitch, gDocLang, gDrawPSSwitch, gDrawSVGSwitch, gFloatSize, gFoldThreshold, gGroupTaskSwitch, gHelpSwitch, gInputFiles, gLessTempSwitch, gMaxCopyDelay, gMaxNameSize, gOpenMPSwitch, gOutputFile, gPrintDocSwitch, gPrintFileListSwitch, gPrintXMLSwitch, gSchedulerSwitch, gShadowBlur, gSimpleNames, gSimplifyDiagrams, gStripDocSwitch, gTimeout, gUIMacroSwitch, gVecSize, gVectorLoopVariant, gVectorSwitch, gVersionSwitch, and isCmd().

Referenced by main().

00161 {
00162     int i=1; int err=0;
00163 
00164     while (i<argc) {
00165 
00166         if        (isCmd(argv[i], "-h", "--help")) {
00167             gHelpSwitch = true;
00168             i += 1;
00169 
00170         } else if (isCmd(argv[i], "-v", "--version")) {
00171             gVersionSwitch = true;
00172             i += 1;
00173 
00174         } else if (isCmd(argv[i], "-d", "--details")) {
00175             gDetailsSwitch = true;
00176             i += 1;
00177 
00178         } else if (isCmd(argv[i], "-a", "--architecture")) {
00179             gArchFile = argv[i+1];
00180             i += 2;
00181 
00182         } else if (isCmd(argv[i], "-o")) {
00183             gOutputFile = argv[i+1];
00184             i += 2;
00185 
00186         } else if (isCmd(argv[i], "-ps", "--postscript")) {
00187             gDrawPSSwitch = true;
00188             i += 1;
00189 
00190         } else if (isCmd(argv[i], "-xml", "--xml")) {
00191             gPrintXMLSwitch = true;
00192             i += 1;
00193 
00194         } else if (isCmd(argv[i], "-blur", "--shadow-blur")) {
00195             gShadowBlur = true;
00196             i += 1;
00197 
00198         } else if (isCmd(argv[i], "-svg", "--svg")) {
00199             gDrawSVGSwitch = true;
00200             i += 1;
00201 
00202         } else if (isCmd(argv[i], "-f", "--fold")) {
00203             gFoldThreshold = atoi(argv[i+1]);
00204             i += 2;
00205 
00206         } else if (isCmd(argv[i], "-mns", "--max-name-size")) {
00207             gMaxNameSize = atoi(argv[i+1]);
00208             i += 2;
00209 
00210         } else if (isCmd(argv[i], "-sn", "--simple-names")) {
00211             gSimpleNames = true;
00212             i += 1;
00213 
00214         } else if (isCmd(argv[i], "-lb", "--left-balanced")) {
00215             gBalancedSwitch = 0;
00216             i += 1;
00217 
00218         } else if (isCmd(argv[i], "-mb", "--mid-balanced")) {
00219             gBalancedSwitch = 1;
00220             i += 1;
00221 
00222         } else if (isCmd(argv[i], "-rb", "--right-balanced")) {
00223             gBalancedSwitch = 2;
00224             i += 1;
00225 
00226         } else if (isCmd(argv[i], "-lt", "--less-temporaries")) {
00227             gLessTempSwitch = true;
00228             i += 1;
00229 
00230         } else if (isCmd(argv[i], "-mcd", "--max-copy-delay")) {
00231             gMaxCopyDelay = atoi(argv[i+1]);
00232             i += 2;
00233 
00234         } else if (isCmd(argv[i], "-sd", "--simplify-diagrams")) {
00235             gSimplifyDiagrams = true;
00236             i += 1;
00237 
00238         } else if (isCmd(argv[i], "-vec", "--vectorize")) {
00239             gVectorSwitch = true;
00240             i += 1;
00241 
00242         } else if (isCmd(argv[i], "-dfs", "--deepFirstScheduling")) {
00243             gDeepFirstSwitch = true;
00244             i += 1;
00245 
00246         } else if (isCmd(argv[i], "-vs", "--vec-size")) {
00247             gVecSize = atoi(argv[i+1]);
00248             i += 2;
00249 
00250         } else if (isCmd(argv[i], "-lv", "--loop-variant")) {
00251             gVectorLoopVariant = atoi(argv[i+1]);
00252             i += 2;
00253 
00254         } else if (isCmd(argv[i], "-omp", "--openMP")) {
00255             gOpenMPSwitch = true;
00256             i += 1;
00257 
00258         } else if (isCmd(argv[i], "-sch", "--scheduler")) {
00259             gSchedulerSwitch = true;
00260             i += 1;
00261 
00262         } else if (isCmd(argv[i], "-g", "--groupTasks")) {
00263             gGroupTaskSwitch = true;
00264             i += 1;
00265 
00266         } else if (isCmd(argv[i], "-uim", "--user-interface-macros")) {
00267             gUIMacroSwitch = true;
00268             i += 1;
00269 
00270         } else if (isCmd(argv[i], "-t", "--timeout")) {
00271             gTimeout = atoi(argv[i+1]);
00272             i += 2;
00273 
00274         // double float options
00275         } else if (isCmd(argv[i], "-single", "--single-precision-floats")) {
00276             gFloatSize = 1;
00277             i += 1;
00278 
00279         } else if (isCmd(argv[i], "-double", "--double-precision-floats")) {
00280             gFloatSize = 2;
00281             i += 1;
00282 
00283         } else if (isCmd(argv[i], "-quad", "--quad-precision-floats")) {
00284             gFloatSize = 3;
00285             i += 1;
00286             
00287         } else if (isCmd(argv[i], "-mdoc", "--mathdoc")) {
00288             gPrintDocSwitch = true;
00289             i += 1;
00290             
00291         } else if (isCmd(argv[i], "-mdlang", "--mathdoc-lang")) {
00292             gDocLang = argv[i+1];
00293             i += 2;
00294             
00295         } else if (isCmd(argv[i], "-stripmdoc", "--strip-mdoc-tags")) {
00296             gStripDocSwitch = true;
00297             i += 1;
00298             
00299         } else if (isCmd(argv[i], "-flist", "--file-list")) {
00300             gPrintFileListSwitch = true;
00301             i += 1;
00302             
00303         } else if (argv[i][0] != '-') {
00304             if (check_file(argv[i])) {
00305                 gInputFiles.push_back(argv[i]);
00306             }
00307             i++;
00308 
00309         } else {
00310             cerr << "faust: unrecognized option \"" << argv[i] <<"\"" << endl;
00311             i++;
00312             err++;
00313         }
00314     }
00315 
00316     // adjust related options
00317     if (gOpenMPSwitch || gSchedulerSwitch) gVectorSwitch = true;
00318 
00319     return err == 0;
00320 }

Here is the call graph for this function:

Here is the caller graph for this function:

int yyparse (  ) 

Definition at line 1621 of file faustparser.cpp.

Referenced by SourceReader::parse().

01625 {
01626 
01627 
01628     int yystate;
01629     /* Number of tokens to shift before error messages enabled.  */
01630     int yyerrstatus;
01631 
01632     /* The stacks and their tools:
01633        `yyss': related to states.
01634        `yyvs': related to semantic values.
01635 
01636        Refer to the stacks thru separate pointers, to allow yyoverflow
01637        to reallocate them elsewhere.  */
01638 
01639     /* The state stack.  */
01640     yytype_int16 yyssa[YYINITDEPTH];
01641     yytype_int16 *yyss;
01642     yytype_int16 *yyssp;
01643 
01644     /* The semantic value stack.  */
01645     YYSTYPE yyvsa[YYINITDEPTH];
01646     YYSTYPE *yyvs;
01647     YYSTYPE *yyvsp;
01648 
01649     YYSIZE_T yystacksize;
01650 
01651   int yyn;
01652   int yyresult;
01653   /* Lookahead token as an internal (translated) token number.  */
01654   int yytoken;
01655   /* The variables used to return semantic value and location from the
01656      action routines.  */
01657   YYSTYPE yyval;
01658 
01659 #if YYERROR_VERBOSE
01660   /* Buffer for error messages, and its allocated size.  */
01661   char yymsgbuf[128];
01662   char *yymsg = yymsgbuf;
01663   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01664 #endif
01665 
01666 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
01667 
01668   /* The number of symbols on the RHS of the reduced rule.
01669      Keep to zero when no symbol should be popped.  */
01670   int yylen = 0;
01671 
01672   yytoken = 0;
01673   yyss = yyssa;
01674   yyvs = yyvsa;
01675   yystacksize = YYINITDEPTH;
01676 
01677   YYDPRINTF ((stderr, "Starting parse\n"));
01678 
01679   yystate = 0;
01680   yyerrstatus = 0;
01681   yynerrs = 0;
01682   yychar = YYEMPTY; /* Cause a token to be read.  */
01683 
01684   /* Initialize stack pointers.
01685      Waste one element of value and location stack
01686      so that they stay on the same level as the state stack.
01687      The wasted elements are never initialized.  */
01688   yyssp = yyss;
01689   yyvsp = yyvs;
01690 
01691   goto yysetstate;
01692 
01693 /*------------------------------------------------------------.
01694 | yynewstate -- Push a new state, which is found in yystate.  |
01695 `------------------------------------------------------------*/
01696  yynewstate:
01697   /* In all cases, when you get here, the value and location stacks
01698      have just been pushed.  So pushing a state here evens the stacks.  */
01699   yyssp++;
01700 
01701  yysetstate:
01702   *yyssp = yystate;
01703 
01704   if (yyss + yystacksize - 1 <= yyssp)
01705     {
01706       /* Get the current used size of the three stacks, in elements.  */
01707       YYSIZE_T yysize = yyssp - yyss + 1;
01708 
01709 #ifdef yyoverflow
01710       {
01711     /* Give user a chance to reallocate the stack.  Use copies of
01712        these so that the &'s don't force the real ones into
01713        memory.  */
01714     YYSTYPE *yyvs1 = yyvs;
01715     yytype_int16 *yyss1 = yyss;
01716 
01717     /* Each stack pointer address is followed by the size of the
01718        data in use in that stack, in bytes.  This used to be a
01719        conditional around just the two extra args, but that might
01720        be undefined if yyoverflow is a macro.  */
01721     yyoverflow (YY_("memory exhausted"),
01722             &yyss1, yysize * sizeof (*yyssp),
01723             &yyvs1, yysize * sizeof (*yyvsp),
01724             &yystacksize);
01725 
01726     yyss = yyss1;
01727     yyvs = yyvs1;
01728       }
01729 #else /* no yyoverflow */
01730 # ifndef YYSTACK_RELOCATE
01731       goto yyexhaustedlab;
01732 # else
01733       /* Extend the stack our own way.  */
01734       if (YYMAXDEPTH <= yystacksize)
01735     goto yyexhaustedlab;
01736       yystacksize *= 2;
01737       if (YYMAXDEPTH < yystacksize)
01738     yystacksize = YYMAXDEPTH;
01739 
01740       {
01741     yytype_int16 *yyss1 = yyss;
01742     union yyalloc *yyptr =
01743       (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01744     if (! yyptr)
01745       goto yyexhaustedlab;
01746     YYSTACK_RELOCATE (yyss_alloc, yyss);
01747     YYSTACK_RELOCATE (yyvs_alloc, yyvs);
01748 #  undef YYSTACK_RELOCATE
01749     if (yyss1 != yyssa)
01750       YYSTACK_FREE (yyss1);
01751       }
01752 # endif
01753 #endif /* no yyoverflow */
01754 
01755       yyssp = yyss + yysize - 1;
01756       yyvsp = yyvs + yysize - 1;
01757 
01758       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01759           (unsigned long int) yystacksize));
01760 
01761       if (yyss + yystacksize - 1 <= yyssp)
01762     YYABORT;
01763     }
01764 
01765   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01766 
01767   if (yystate == YYFINAL)
01768     YYACCEPT;
01769 
01770   goto yybackup;
01771 
01772 /*-----------.
01773 | yybackup.  |
01774 `-----------*/
01775 yybackup:
01776 
01777   /* Do appropriate processing given the current state.  Read a
01778      lookahead token if we need one and don't already have one.  */
01779 
01780   /* First try to decide what to do without reference to lookahead token.  */
01781   yyn = yypact[yystate];
01782   if (yyn == YYPACT_NINF)
01783     goto yydefault;
01784 
01785   /* Not known => get a lookahead token if don't already have one.  */
01786 
01787   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
01788   if (yychar == YYEMPTY)
01789     {
01790       YYDPRINTF ((stderr, "Reading a token: "));
01791       yychar = YYLEX;
01792     }
01793 
01794   if (yychar <= YYEOF)
01795     {
01796       yychar = yytoken = YYEOF;
01797       YYDPRINTF ((stderr, "Now at end of input.\n"));
01798     }
01799   else
01800     {
01801       yytoken = YYTRANSLATE (yychar);
01802       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01803     }
01804 
01805   /* If the proper action on seeing token YYTOKEN is to reduce or to
01806      detect an error, take that action.  */
01807   yyn += yytoken;
01808   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01809     goto yydefault;
01810   yyn = yytable[yyn];
01811   if (yyn <= 0)
01812     {
01813       if (yyn == 0 || yyn == YYTABLE_NINF)
01814     goto yyerrlab;
01815       yyn = -yyn;
01816       goto yyreduce;
01817     }
01818 
01819   /* Count tokens shifted since error; after three, turn off error
01820      status.  */
01821   if (yyerrstatus)
01822     yyerrstatus--;
01823 
01824   /* Shift the lookahead token.  */
01825   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01826 
01827   /* Discard the shifted token.  */
01828   yychar = YYEMPTY;
01829 
01830   yystate = yyn;
01831   *++yyvsp = yylval;
01832 
01833   goto yynewstate;
01834 
01835 
01836 /*-----------------------------------------------------------.
01837 | yydefault -- do the default action for the current state.  |
01838 `-----------------------------------------------------------*/
01839 yydefault:
01840   yyn = yydefact[yystate];
01841   if (yyn == 0)
01842     goto yyerrlab;
01843   goto yyreduce;
01844 
01845 
01846 /*-----------------------------.
01847 | yyreduce -- Do a reduction.  |
01848 `-----------------------------*/
01849 yyreduce:
01850   /* yyn is the number of a rule to reduce with.  */
01851   yylen = yyr2[yyn];
01852 
01853   /* If YYLEN is nonzero, implement the default value of the action:
01854      `$$ = $1'.
01855 
01856      Otherwise, the following line sets YYVAL to garbage.
01857      This behavior is undocumented and Bison
01858      users should not rely upon it.  Assigning to YYVAL
01859      unconditionally makes the parser a bit smaller, and it avoids a
01860      GCC warning that YYVAL may be used uninitialized.  */
01861   yyval = yyvsp[1-yylen];
01862 
01863 
01864   YY_REDUCE_PRINT (yyn);
01865   switch (yyn)
01866     {
01867         case 2:
01868 
01869 /* Line 1455 of yacc.c  */
01870 #line 265 "parser/faustparser.y"
01871     { (yyval.exp) = (yyvsp[(1) - (1)].exp); gResult = formatDefinitions((yyval.exp)); ;}
01872     break;
01873 
01874   case 3:
01875 
01876 /* Line 1455 of yacc.c  */
01877 #line 268 "parser/faustparser.y"
01878     { (yyval.exp) = nil; ;}
01879     break;
01880 
01881   case 4:
01882 
01883 /* Line 1455 of yacc.c  */
01884 #line 269 "parser/faustparser.y"
01885     { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
01886     break;
01887 
01888   case 5:
01889 
01890 /* Line 1455 of yacc.c  */
01891 #line 271 "parser/faustparser.y"
01892     { (yyval.exp) = nil; ;}
01893     break;
01894 
01895   case 6:
01896 
01897 /* Line 1455 of yacc.c  */
01898 #line 272 "parser/faustparser.y"
01899     { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
01900     break;
01901 
01902   case 7:
01903 
01904 /* Line 1455 of yacc.c  */
01905 #line 275 "parser/faustparser.y"
01906     { (yyval.exp) = importFile((yyvsp[(3) - (5)].exp)); ;}
01907     break;
01908 
01909   case 8:
01910 
01911 /* Line 1455 of yacc.c  */
01912 #line 276 "parser/faustparser.y"
01913     { declareMetadata((yyvsp[(2) - (4)].exp),(yyvsp[(3) - (4)].exp)); (yyval.exp) = nil; ;}
01914     break;
01915 
01916   case 9:
01917 
01918 /* Line 1455 of yacc.c  */
01919 #line 277 "parser/faustparser.y"
01920     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
01921     break;
01922 
01923   case 10:
01924 
01925 /* Line 1455 of yacc.c  */
01926 #line 278 "parser/faustparser.y"
01927     { declareDoc((yyvsp[(2) - (3)].exp)); (yyval.exp) = nil; /*cerr << "Yacc : doc : " << *$2 << endl ; doctxtString = ""; */ ;}
01928     break;
01929 
01930   case 11:
01931 
01932 /* Line 1455 of yacc.c  */
01933 #line 281 "parser/faustparser.y"
01934     { (yyval.exp) = nil; ;}
01935     break;
01936 
01937   case 12:
01938 
01939 /* Line 1455 of yacc.c  */
01940 #line 282 "parser/faustparser.y"
01941     { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
01942     break;
01943 
01944   case 13:
01945 
01946 /* Line 1455 of yacc.c  */
01947 #line 285 "parser/faustparser.y"
01948     { (yyval.exp) = docTxt(doctxtString.c_str()); ;}
01949     break;
01950 
01951   case 14:
01952 
01953 /* Line 1455 of yacc.c  */
01954 #line 286 "parser/faustparser.y"
01955     { (yyval.exp) = docEqn((yyvsp[(1) - (1)].exp)); ;}
01956     break;
01957 
01958   case 15:
01959 
01960 /* Line 1455 of yacc.c  */
01961 #line 287 "parser/faustparser.y"
01962     { (yyval.exp) = docDgm((yyvsp[(1) - (1)].exp)); ;}
01963     break;
01964 
01965   case 16:
01966 
01967 /* Line 1455 of yacc.c  */
01968 #line 288 "parser/faustparser.y"
01969     { (yyval.exp) = docNtc(); ;}
01970     break;
01971 
01972   case 17:
01973 
01974 /* Line 1455 of yacc.c  */
01975 #line 289 "parser/faustparser.y"
01976     { (yyval.exp) = docLst(); ;}
01977     break;
01978 
01979   case 18:
01980 
01981 /* Line 1455 of yacc.c  */
01982 #line 292 "parser/faustparser.y"
01983     { ;}
01984     break;
01985 
01986   case 19:
01987 
01988 /* Line 1455 of yacc.c  */
01989 #line 293 "parser/faustparser.y"
01990     { (doctxtString += yytext); ;}
01991     break;
01992 
01993   case 20:
01994 
01995 /* Line 1455 of yacc.c  */
01996 #line 296 "parser/faustparser.y"
01997     { (yyval.exp) = (yyvsp[(2) - (3)].exp); doctxtString = ""; ;}
01998     break;
01999 
02000   case 21:
02001 
02002 /* Line 1455 of yacc.c  */
02003 #line 299 "parser/faustparser.y"
02004     { (yyval.exp) = (yyvsp[(2) - (3)].exp); doctxtString = ""; ;}
02005     break;
02006 
02007   case 22:
02008 
02009 /* Line 1455 of yacc.c  */
02010 #line 302 "parser/faustparser.y"
02011     { doctxtString = ""; ;}
02012     break;
02013 
02014   case 23:
02015 
02016 /* Line 1455 of yacc.c  */
02017 #line 305 "parser/faustparser.y"
02018     { doctxtString = ""; ;}
02019     break;
02020 
02021   case 24:
02022 
02023 /* Line 1455 of yacc.c  */
02024 #line 308 "parser/faustparser.y"
02025     { (yyval.exp) = cons((yyvsp[(1) - (7)].exp),cons((yyvsp[(3) - (7)].exp),(yyvsp[(6) - (7)].exp))); ;}
02026     break;
02027 
02028   case 25:
02029 
02030 /* Line 1455 of yacc.c  */
02031 #line 309 "parser/faustparser.y"
02032     { (yyval.exp) = cons((yyvsp[(1) - (4)].exp),cons(nil,(yyvsp[(3) - (4)].exp))); ;}
02033     break;
02034 
02035   case 26:
02036 
02037 /* Line 1455 of yacc.c  */
02038 #line 310 "parser/faustparser.y"
02039     { (yyval.exp) = nil; yyerr++; ;}
02040     break;
02041 
02042   case 27:
02043 
02044 /* Line 1455 of yacc.c  */
02045 #line 313 "parser/faustparser.y"
02046     { (yyval.exp)=(yyvsp[(1) - (1)].exp); setDefProp((yyvsp[(1) - (1)].exp), yyfilename, yylineno); ;}
02047     break;
02048 
02049   case 28:
02050 
02051 /* Line 1455 of yacc.c  */
02052 #line 316 "parser/faustparser.y"
02053     { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
02054     break;
02055 
02056   case 29:
02057 
02058 /* Line 1455 of yacc.c  */
02059 #line 317 "parser/faustparser.y"
02060     { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;}
02061     break;
02062 
02063   case 30:
02064 
02065 /* Line 1455 of yacc.c  */
02066 #line 320 "parser/faustparser.y"
02067     { (yyval.exp) = boxWithLocalDef((yyvsp[(1) - (5)].exp),formatDefinitions((yyvsp[(4) - (5)].exp))); ;}
02068     break;
02069 
02070   case 31:
02071 
02072 /* Line 1455 of yacc.c  */
02073 #line 321 "parser/faustparser.y"
02074     { (yyval.exp) = boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02075     break;
02076 
02077   case 32:
02078 
02079 /* Line 1455 of yacc.c  */
02080 #line 322 "parser/faustparser.y"
02081     { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02082     break;
02083 
02084   case 33:
02085 
02086 /* Line 1455 of yacc.c  */
02087 #line 323 "parser/faustparser.y"
02088     { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02089     break;
02090 
02091   case 34:
02092 
02093 /* Line 1455 of yacc.c  */
02094 #line 324 "parser/faustparser.y"
02095     { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02096     break;
02097 
02098   case 35:
02099 
02100 /* Line 1455 of yacc.c  */
02101 #line 325 "parser/faustparser.y"
02102     { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02103     break;
02104 
02105   case 36:
02106 
02107 /* Line 1455 of yacc.c  */
02108 #line 326 "parser/faustparser.y"
02109     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02110     break;
02111 
02112   case 37:
02113 
02114 /* Line 1455 of yacc.c  */
02115 #line 329 "parser/faustparser.y"
02116     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAdd)); ;}
02117     break;
02118 
02119   case 38:
02120 
02121 /* Line 1455 of yacc.c  */
02122 #line 330 "parser/faustparser.y"
02123     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigSub)); ;}
02124     break;
02125 
02126   case 39:
02127 
02128 /* Line 1455 of yacc.c  */
02129 #line 331 "parser/faustparser.y"
02130     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigMul)); ;}
02131     break;
02132 
02133   case 40:
02134 
02135 /* Line 1455 of yacc.c  */
02136 #line 332 "parser/faustparser.y"
02137     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigDiv)); ;}
02138     break;
02139 
02140   case 41:
02141 
02142 /* Line 1455 of yacc.c  */
02143 #line 333 "parser/faustparser.y"
02144     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRem)); ;}
02145     break;
02146 
02147   case 42:
02148 
02149 /* Line 1455 of yacc.c  */
02150 #line 334 "parser/faustparser.y"
02151     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),gPowPrim->box()); ;}
02152     break;
02153 
02154   case 43:
02155 
02156 /* Line 1455 of yacc.c  */
02157 #line 335 "parser/faustparser.y"
02158     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigFixDelay)); ;}
02159     break;
02160 
02161   case 44:
02162 
02163 /* Line 1455 of yacc.c  */
02164 #line 336 "parser/faustparser.y"
02165     { (yyval.exp) = boxSeq((yyvsp[(1) - (2)].exp),boxPrim1(sigDelay1)); ;}
02166     break;
02167 
02168   case 45:
02169 
02170 /* Line 1455 of yacc.c  */
02171 #line 337 "parser/faustparser.y"
02172     { (yyval.exp) = boxAccess((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02173     break;
02174 
02175   case 46:
02176 
02177 /* Line 1455 of yacc.c  */
02178 #line 339 "parser/faustparser.y"
02179     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAND)); ;}
02180     break;
02181 
02182   case 47:
02183 
02184 /* Line 1455 of yacc.c  */
02185 #line 340 "parser/faustparser.y"
02186     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigOR)); ;}
02187     break;
02188 
02189   case 48:
02190 
02191 /* Line 1455 of yacc.c  */
02192 #line 341 "parser/faustparser.y"
02193     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigXOR)); ;}
02194     break;
02195 
02196   case 49:
02197 
02198 /* Line 1455 of yacc.c  */
02199 #line 343 "parser/faustparser.y"
02200     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLeftShift)); ;}
02201     break;
02202 
02203   case 50:
02204 
02205 /* Line 1455 of yacc.c  */
02206 #line 344 "parser/faustparser.y"
02207     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRightShift)); ;}
02208     break;
02209 
02210   case 51:
02211 
02212 /* Line 1455 of yacc.c  */
02213 #line 346 "parser/faustparser.y"
02214     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLT)); ;}
02215     break;
02216 
02217   case 52:
02218 
02219 /* Line 1455 of yacc.c  */
02220 #line 347 "parser/faustparser.y"
02221     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLE)); ;}
02222     break;
02223 
02224   case 53:
02225 
02226 /* Line 1455 of yacc.c  */
02227 #line 348 "parser/faustparser.y"
02228     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGT)); ;}
02229     break;
02230 
02231   case 54:
02232 
02233 /* Line 1455 of yacc.c  */
02234 #line 349 "parser/faustparser.y"
02235     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGE)); ;}
02236     break;
02237 
02238   case 55:
02239 
02240 /* Line 1455 of yacc.c  */
02241 #line 350 "parser/faustparser.y"
02242     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigEQ)); ;}
02243     break;
02244 
02245   case 56:
02246 
02247 /* Line 1455 of yacc.c  */
02248 #line 351 "parser/faustparser.y"
02249     { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigNE)); ;}
02250     break;
02251 
02252   case 57:
02253 
02254 /* Line 1455 of yacc.c  */
02255 #line 353 "parser/faustparser.y"
02256     { (yyval.exp) = buildBoxAppl((yyvsp[(1) - (4)].exp),(yyvsp[(3) - (4)].exp)); ;}
02257     break;
02258 
02259   case 58:
02260 
02261 /* Line 1455 of yacc.c  */
02262 #line 355 "parser/faustparser.y"
02263     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02264     break;
02265 
02266   case 59:
02267 
02268 /* Line 1455 of yacc.c  */
02269 #line 358 "parser/faustparser.y"
02270     { (yyval.exp) = boxInt(atoi(yytext)); ;}
02271     break;
02272 
02273   case 60:
02274 
02275 /* Line 1455 of yacc.c  */
02276 #line 359 "parser/faustparser.y"
02277     { (yyval.exp) = boxReal(atof(yytext)); ;}
02278     break;
02279 
02280   case 61:
02281 
02282 /* Line 1455 of yacc.c  */
02283 #line 361 "parser/faustparser.y"
02284     { (yyval.exp) = boxInt (atoi(yytext)); ;}
02285     break;
02286 
02287   case 62:
02288 
02289 /* Line 1455 of yacc.c  */
02290 #line 362 "parser/faustparser.y"
02291     { (yyval.exp) = boxReal(atof(yytext)); ;}
02292     break;
02293 
02294   case 63:
02295 
02296 /* Line 1455 of yacc.c  */
02297 #line 364 "parser/faustparser.y"
02298     { (yyval.exp) = boxInt ( -atoi(yytext) ); ;}
02299     break;
02300 
02301   case 64:
02302 
02303 /* Line 1455 of yacc.c  */
02304 #line 365 "parser/faustparser.y"
02305     { (yyval.exp) = boxReal( -atof(yytext) ); ;}
02306     break;
02307 
02308   case 65:
02309 
02310 /* Line 1455 of yacc.c  */
02311 #line 367 "parser/faustparser.y"
02312     { (yyval.exp) = boxWire(); ;}
02313     break;
02314 
02315   case 66:
02316 
02317 /* Line 1455 of yacc.c  */
02318 #line 368 "parser/faustparser.y"
02319     { (yyval.exp) = boxCut(); ;}
02320     break;
02321 
02322   case 67:
02323 
02324 /* Line 1455 of yacc.c  */
02325 #line 370 "parser/faustparser.y"
02326     { (yyval.exp) = boxPrim1(sigDelay1); ;}
02327     break;
02328 
02329   case 68:
02330 
02331 /* Line 1455 of yacc.c  */
02332 #line 371 "parser/faustparser.y"
02333     { (yyval.exp) = boxPrim2(sigPrefix); ;}
02334     break;
02335 
02336   case 69:
02337 
02338 /* Line 1455 of yacc.c  */
02339 #line 373 "parser/faustparser.y"
02340     { (yyval.exp) = boxPrim1(sigIntCast); ;}
02341     break;
02342 
02343   case 70:
02344 
02345 /* Line 1455 of yacc.c  */
02346 #line 374 "parser/faustparser.y"
02347     { (yyval.exp) = boxPrim1(sigFloatCast); ;}
02348     break;
02349 
02350   case 71:
02351 
02352 /* Line 1455 of yacc.c  */
02353 #line 376 "parser/faustparser.y"
02354     { (yyval.exp) = boxPrim2(sigAdd); ;}
02355     break;
02356 
02357   case 72:
02358 
02359 /* Line 1455 of yacc.c  */
02360 #line 377 "parser/faustparser.y"
02361     { (yyval.exp) = boxPrim2(sigSub); ;}
02362     break;
02363 
02364   case 73:
02365 
02366 /* Line 1455 of yacc.c  */
02367 #line 378 "parser/faustparser.y"
02368     { (yyval.exp) = boxPrim2(sigMul); ;}
02369     break;
02370 
02371   case 74:
02372 
02373 /* Line 1455 of yacc.c  */
02374 #line 379 "parser/faustparser.y"
02375     { (yyval.exp) = boxPrim2(sigDiv); ;}
02376     break;
02377 
02378   case 75:
02379 
02380 /* Line 1455 of yacc.c  */
02381 #line 380 "parser/faustparser.y"
02382     { (yyval.exp) = boxPrim2(sigRem); ;}
02383     break;
02384 
02385   case 76:
02386 
02387 /* Line 1455 of yacc.c  */
02388 #line 381 "parser/faustparser.y"
02389     { (yyval.exp) = boxPrim2(sigFixDelay); ;}
02390     break;
02391 
02392   case 77:
02393 
02394 /* Line 1455 of yacc.c  */
02395 #line 383 "parser/faustparser.y"
02396     { (yyval.exp) = boxPrim2(sigAND); ;}
02397     break;
02398 
02399   case 78:
02400 
02401 /* Line 1455 of yacc.c  */
02402 #line 384 "parser/faustparser.y"
02403     { (yyval.exp) = boxPrim2(sigOR); ;}
02404     break;
02405 
02406   case 79:
02407 
02408 /* Line 1455 of yacc.c  */
02409 #line 385 "parser/faustparser.y"
02410     { (yyval.exp) = boxPrim2(sigXOR); ;}
02411     break;
02412 
02413   case 80:
02414 
02415 /* Line 1455 of yacc.c  */
02416 #line 387 "parser/faustparser.y"
02417     { (yyval.exp) = boxPrim2(sigLeftShift); ;}
02418     break;
02419 
02420   case 81:
02421 
02422 /* Line 1455 of yacc.c  */
02423 #line 388 "parser/faustparser.y"
02424     { (yyval.exp) = boxPrim2(sigRightShift); ;}
02425     break;
02426 
02427   case 82:
02428 
02429 /* Line 1455 of yacc.c  */
02430 #line 390 "parser/faustparser.y"
02431     { (yyval.exp) = boxPrim2(sigLT); ;}
02432     break;
02433 
02434   case 83:
02435 
02436 /* Line 1455 of yacc.c  */
02437 #line 391 "parser/faustparser.y"
02438     { (yyval.exp) = boxPrim2(sigLE); ;}
02439     break;
02440 
02441   case 84:
02442 
02443 /* Line 1455 of yacc.c  */
02444 #line 392 "parser/faustparser.y"
02445     { (yyval.exp) = boxPrim2(sigGT); ;}
02446     break;
02447 
02448   case 85:
02449 
02450 /* Line 1455 of yacc.c  */
02451 #line 393 "parser/faustparser.y"
02452     { (yyval.exp) = boxPrim2(sigGE); ;}
02453     break;
02454 
02455   case 86:
02456 
02457 /* Line 1455 of yacc.c  */
02458 #line 394 "parser/faustparser.y"
02459     { (yyval.exp) = boxPrim2(sigEQ); ;}
02460     break;
02461 
02462   case 87:
02463 
02464 /* Line 1455 of yacc.c  */
02465 #line 395 "parser/faustparser.y"
02466     { (yyval.exp) = boxPrim2(sigNE); ;}
02467     break;
02468 
02469   case 88:
02470 
02471 /* Line 1455 of yacc.c  */
02472 #line 397 "parser/faustparser.y"
02473     { (yyval.exp) = boxPrim2(sigAttach); ;}
02474     break;
02475 
02476   case 89:
02477 
02478 /* Line 1455 of yacc.c  */
02479 #line 399 "parser/faustparser.y"
02480     { (yyval.exp) = gAcosPrim->box(); ;}
02481     break;
02482 
02483   case 90:
02484 
02485 /* Line 1455 of yacc.c  */
02486 #line 400 "parser/faustparser.y"
02487     { (yyval.exp) = gAsinPrim->box(); ;}
02488     break;
02489 
02490   case 91:
02491 
02492 /* Line 1455 of yacc.c  */
02493 #line 401 "parser/faustparser.y"
02494     { (yyval.exp) = gAtanPrim->box(); ;}
02495     break;
02496 
02497   case 92:
02498 
02499 /* Line 1455 of yacc.c  */
02500 #line 402 "parser/faustparser.y"
02501     { (yyval.exp) = gAtan2Prim->box(); ;}
02502     break;
02503 
02504   case 93:
02505 
02506 /* Line 1455 of yacc.c  */
02507 #line 403 "parser/faustparser.y"
02508     { (yyval.exp) = gCosPrim->box(); ;}
02509     break;
02510 
02511   case 94:
02512 
02513 /* Line 1455 of yacc.c  */
02514 #line 404 "parser/faustparser.y"
02515     { (yyval.exp) = gSinPrim->box(); ;}
02516     break;
02517 
02518   case 95:
02519 
02520 /* Line 1455 of yacc.c  */
02521 #line 405 "parser/faustparser.y"
02522     { (yyval.exp) = gTanPrim->box(); ;}
02523     break;
02524 
02525   case 96:
02526 
02527 /* Line 1455 of yacc.c  */
02528 #line 407 "parser/faustparser.y"
02529     { (yyval.exp) = gExpPrim->box(); ;}
02530     break;
02531 
02532   case 97:
02533 
02534 /* Line 1455 of yacc.c  */
02535 #line 408 "parser/faustparser.y"
02536     { (yyval.exp) = gLogPrim->box(); ;}
02537     break;
02538 
02539   case 98:
02540 
02541 /* Line 1455 of yacc.c  */
02542 #line 409 "parser/faustparser.y"
02543     { (yyval.exp) = gLog10Prim->box(); ;}
02544     break;
02545 
02546   case 99:
02547 
02548 /* Line 1455 of yacc.c  */
02549 #line 410 "parser/faustparser.y"
02550     { (yyval.exp) = gPowPrim->box(); ;}
02551     break;
02552 
02553   case 100:
02554 
02555 /* Line 1455 of yacc.c  */
02556 #line 411 "parser/faustparser.y"
02557     { (yyval.exp) = gPowPrim->box(); ;}
02558     break;
02559 
02560   case 101:
02561 
02562 /* Line 1455 of yacc.c  */
02563 #line 412 "parser/faustparser.y"
02564     { (yyval.exp) = gSqrtPrim->box(); ;}
02565     break;
02566 
02567   case 102:
02568 
02569 /* Line 1455 of yacc.c  */
02570 #line 414 "parser/faustparser.y"
02571     { (yyval.exp) = gAbsPrim->box(); ;}
02572     break;
02573 
02574   case 103:
02575 
02576 /* Line 1455 of yacc.c  */
02577 #line 415 "parser/faustparser.y"
02578     { (yyval.exp) = gMinPrim->box(); ;}
02579     break;
02580 
02581   case 104:
02582 
02583 /* Line 1455 of yacc.c  */
02584 #line 416 "parser/faustparser.y"
02585     { (yyval.exp) = gMaxPrim->box(); ;}
02586     break;
02587 
02588   case 105:
02589 
02590 /* Line 1455 of yacc.c  */
02591 #line 418 "parser/faustparser.y"
02592     { (yyval.exp) = gFmodPrim->box(); ;}
02593     break;
02594 
02595   case 106:
02596 
02597 /* Line 1455 of yacc.c  */
02598 #line 419 "parser/faustparser.y"
02599     { (yyval.exp) = gRemainderPrim->box(); ;}
02600     break;
02601 
02602   case 107:
02603 
02604 /* Line 1455 of yacc.c  */
02605 #line 421 "parser/faustparser.y"
02606     { (yyval.exp) = gFloorPrim->box(); ;}
02607     break;
02608 
02609   case 108:
02610 
02611 /* Line 1455 of yacc.c  */
02612 #line 422 "parser/faustparser.y"
02613     { (yyval.exp) = gCeilPrim->box(); ;}
02614     break;
02615 
02616   case 109:
02617 
02618 /* Line 1455 of yacc.c  */
02619 #line 423 "parser/faustparser.y"
02620     { (yyval.exp) = gRintPrim->box(); ;}
02621     break;
02622 
02623   case 110:
02624 
02625 /* Line 1455 of yacc.c  */
02626 #line 426 "parser/faustparser.y"
02627     { (yyval.exp) = boxPrim3(sigReadOnlyTable); ;}
02628     break;
02629 
02630   case 111:
02631 
02632 /* Line 1455 of yacc.c  */
02633 #line 427 "parser/faustparser.y"
02634     { (yyval.exp) = boxPrim5(sigWriteReadTable); ;}
02635     break;
02636 
02637   case 112:
02638 
02639 /* Line 1455 of yacc.c  */
02640 #line 429 "parser/faustparser.y"
02641     { (yyval.exp) = boxPrim3(sigSelect2); ;}
02642     break;
02643 
02644   case 113:
02645 
02646 /* Line 1455 of yacc.c  */
02647 #line 430 "parser/faustparser.y"
02648     { (yyval.exp) = boxPrim4(sigSelect3); ;}
02649     break;
02650 
02651   case 114:
02652 
02653 /* Line 1455 of yacc.c  */
02654 #line 432 "parser/faustparser.y"
02655     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02656     break;
02657 
02658   case 115:
02659 
02660 /* Line 1455 of yacc.c  */
02661 #line 433 "parser/faustparser.y"
02662     { (yyval.exp) = boxSeq(boxPar(boxInt(0),(yyvsp[(2) - (2)].exp)),boxPrim2(sigSub)); ;}
02663     break;
02664 
02665   case 116:
02666 
02667 /* Line 1455 of yacc.c  */
02668 #line 435 "parser/faustparser.y"
02669     { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
02670     break;
02671 
02672   case 117:
02673 
02674 /* Line 1455 of yacc.c  */
02675 #line 437 "parser/faustparser.y"
02676     { (yyval.exp) = buildBoxAbstr((yyvsp[(3) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
02677     break;
02678 
02679   case 118:
02680 
02681 /* Line 1455 of yacc.c  */
02682 #line 439 "parser/faustparser.y"
02683     { (yyval.exp) = boxCase(checkRulelist((yyvsp[(3) - (4)].exp))); ;}
02684     break;
02685 
02686   case 119:
02687 
02688 /* Line 1455 of yacc.c  */
02689 #line 441 "parser/faustparser.y"
02690     { (yyval.exp) = boxFFun((yyvsp[(1) - (1)].exp)); ;}
02691     break;
02692 
02693   case 120:
02694 
02695 /* Line 1455 of yacc.c  */
02696 #line 442 "parser/faustparser.y"
02697     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02698     break;
02699 
02700   case 121:
02701 
02702 /* Line 1455 of yacc.c  */
02703 #line 443 "parser/faustparser.y"
02704     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02705     break;
02706 
02707   case 122:
02708 
02709 /* Line 1455 of yacc.c  */
02710 #line 444 "parser/faustparser.y"
02711     { (yyval.exp) = boxComponent((yyvsp[(3) - (4)].exp)); ;}
02712     break;
02713 
02714   case 123:
02715 
02716 /* Line 1455 of yacc.c  */
02717 #line 445 "parser/faustparser.y"
02718     { (yyval.exp) = boxLibrary((yyvsp[(3) - (4)].exp)); ;}
02719     break;
02720 
02721   case 124:
02722 
02723 /* Line 1455 of yacc.c  */
02724 #line 446 "parser/faustparser.y"
02725     { (yyval.exp) = boxWithLocalDef(boxEnvironment(),formatDefinitions((yyvsp[(3) - (4)].exp))); ;}
02726     break;
02727 
02728   case 125:
02729 
02730 /* Line 1455 of yacc.c  */
02731 #line 448 "parser/faustparser.y"
02732     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02733     break;
02734 
02735   case 126:
02736 
02737 /* Line 1455 of yacc.c  */
02738 #line 449 "parser/faustparser.y"
02739     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02740     break;
02741 
02742   case 127:
02743 
02744 /* Line 1455 of yacc.c  */
02745 #line 450 "parser/faustparser.y"
02746     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02747     break;
02748 
02749   case 128:
02750 
02751 /* Line 1455 of yacc.c  */
02752 #line 451 "parser/faustparser.y"
02753     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02754     break;
02755 
02756   case 129:
02757 
02758 /* Line 1455 of yacc.c  */
02759 #line 452 "parser/faustparser.y"
02760     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02761     break;
02762 
02763   case 130:
02764 
02765 /* Line 1455 of yacc.c  */
02766 #line 453 "parser/faustparser.y"
02767     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02768     break;
02769 
02770   case 131:
02771 
02772 /* Line 1455 of yacc.c  */
02773 #line 454 "parser/faustparser.y"
02774     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02775     break;
02776 
02777   case 132:
02778 
02779 /* Line 1455 of yacc.c  */
02780 #line 455 "parser/faustparser.y"
02781     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02782     break;
02783 
02784   case 133:
02785 
02786 /* Line 1455 of yacc.c  */
02787 #line 456 "parser/faustparser.y"
02788     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02789     break;
02790 
02791   case 134:
02792 
02793 /* Line 1455 of yacc.c  */
02794 #line 457 "parser/faustparser.y"
02795     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02796     break;
02797 
02798   case 135:
02799 
02800 /* Line 1455 of yacc.c  */
02801 #line 459 "parser/faustparser.y"
02802     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02803     break;
02804 
02805   case 136:
02806 
02807 /* Line 1455 of yacc.c  */
02808 #line 460 "parser/faustparser.y"
02809     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02810     break;
02811 
02812   case 137:
02813 
02814 /* Line 1455 of yacc.c  */
02815 #line 461 "parser/faustparser.y"
02816     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02817     break;
02818 
02819   case 138:
02820 
02821 /* Line 1455 of yacc.c  */
02822 #line 462 "parser/faustparser.y"
02823     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02824     break;
02825 
02826   case 139:
02827 
02828 /* Line 1455 of yacc.c  */
02829 #line 466 "parser/faustparser.y"
02830     { (yyval.exp) = boxIdent(yytext); ;}
02831     break;
02832 
02833   case 140:
02834 
02835 /* Line 1455 of yacc.c  */
02836 #line 469 "parser/faustparser.y"
02837     { (yyval.exp) = tree(yytext); ;}
02838     break;
02839 
02840   case 141:
02841 
02842 /* Line 1455 of yacc.c  */
02843 #line 474 "parser/faustparser.y"
02844     { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
02845     break;
02846 
02847   case 142:
02848 
02849 /* Line 1455 of yacc.c  */
02850 #line 475 "parser/faustparser.y"
02851     { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;}
02852     break;
02853 
02854   case 143:
02855 
02856 /* Line 1455 of yacc.c  */
02857 #line 478 "parser/faustparser.y"
02858     { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02859     break;
02860 
02861   case 144:
02862 
02863 /* Line 1455 of yacc.c  */
02864 #line 479 "parser/faustparser.y"
02865     { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02866     break;
02867 
02868   case 145:
02869 
02870 /* Line 1455 of yacc.c  */
02871 #line 480 "parser/faustparser.y"
02872     { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02873     break;
02874 
02875   case 146:
02876 
02877 /* Line 1455 of yacc.c  */
02878 #line 481 "parser/faustparser.y"
02879     { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
02880     break;
02881 
02882   case 147:
02883 
02884 /* Line 1455 of yacc.c  */
02885 #line 482 "parser/faustparser.y"
02886     { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
02887     break;
02888 
02889   case 148:
02890 
02891 /* Line 1455 of yacc.c  */
02892 #line 485 "parser/faustparser.y"
02893     { (yyval.exp) = tree(yytext); ;}
02894     break;
02895 
02896   case 149:
02897 
02898 /* Line 1455 of yacc.c  */
02899 #line 488 "parser/faustparser.y"
02900     { (yyval.exp) = unquote(yytext); ;}
02901     break;
02902 
02903   case 150:
02904 
02905 /* Line 1455 of yacc.c  */
02906 #line 491 "parser/faustparser.y"
02907     { (yyval.exp) = tree(yytext); ;}
02908     break;
02909 
02910   case 151:
02911 
02912 /* Line 1455 of yacc.c  */
02913 #line 492 "parser/faustparser.y"
02914     { (yyval.exp) = tree(yytext); ;}
02915     break;
02916 
02917   case 152:
02918 
02919 /* Line 1455 of yacc.c  */
02920 #line 498 "parser/faustparser.y"
02921     { (yyval.exp) = boxIPar((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
02922     break;
02923 
02924   case 153:
02925 
02926 /* Line 1455 of yacc.c  */
02927 #line 502 "parser/faustparser.y"
02928     { (yyval.exp) = boxISeq((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
02929     break;
02930 
02931   case 154:
02932 
02933 /* Line 1455 of yacc.c  */
02934 #line 506 "parser/faustparser.y"
02935     { (yyval.exp) = boxISum((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
02936     break;
02937 
02938   case 155:
02939 
02940 /* Line 1455 of yacc.c  */
02941 #line 510 "parser/faustparser.y"
02942     { (yyval.exp) = boxIProd((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
02943     break;
02944 
02945   case 156:
02946 
02947 /* Line 1455 of yacc.c  */
02948 #line 517 "parser/faustparser.y"
02949     { (yyval.exp) = ffunction((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
02950     break;
02951 
02952   case 157:
02953 
02954 /* Line 1455 of yacc.c  */
02955 #line 521 "parser/faustparser.y"
02956     { (yyval.exp) = boxFConst((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); ;}
02957     break;
02958 
02959   case 158:
02960 
02961 /* Line 1455 of yacc.c  */
02962 #line 524 "parser/faustparser.y"
02963     { (yyval.exp) = boxFVar((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); ;}
02964     break;
02965 
02966   case 159:
02967 
02968 /* Line 1455 of yacc.c  */
02969 #line 528 "parser/faustparser.y"
02970     { (yyval.exp) = boxButton((yyvsp[(3) - (4)].exp)); ;}
02971     break;
02972 
02973   case 160:
02974 
02975 /* Line 1455 of yacc.c  */
02976 #line 531 "parser/faustparser.y"
02977     { (yyval.exp) = boxCheckbox((yyvsp[(3) - (4)].exp)); ;}
02978     break;
02979 
02980   case 161:
02981 
02982 /* Line 1455 of yacc.c  */
02983 #line 535 "parser/faustparser.y"
02984     { (yyval.exp) = boxVSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;}
02985     break;
02986 
02987   case 162:
02988 
02989 /* Line 1455 of yacc.c  */
02990 #line 538 "parser/faustparser.y"
02991     { (yyval.exp) = boxHSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;}
02992     break;
02993 
02994   case 163:
02995 
02996 /* Line 1455 of yacc.c  */
02997 #line 541 "parser/faustparser.y"
02998     { (yyval.exp) = boxNumEntry((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;}
02999     break;
03000 
03001   case 164:
03002 
03003 /* Line 1455 of yacc.c  */
03004 #line 544 "parser/faustparser.y"
03005     { (yyval.exp) = boxVGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;}
03006     break;
03007 
03008   case 165:
03009 
03010 /* Line 1455 of yacc.c  */
03011 #line 547 "parser/faustparser.y"
03012     { (yyval.exp) = boxHGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;}
03013     break;
03014 
03015   case 166:
03016 
03017 /* Line 1455 of yacc.c  */
03018 #line 550 "parser/faustparser.y"
03019     { (yyval.exp) = boxTGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;}
03020     break;
03021 
03022   case 167:
03023 
03024 /* Line 1455 of yacc.c  */
03025 #line 554 "parser/faustparser.y"
03026     { (yyval.exp) = boxVBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
03027     break;
03028 
03029   case 168:
03030 
03031 /* Line 1455 of yacc.c  */
03032 #line 557 "parser/faustparser.y"
03033     { (yyval.exp) = boxHBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
03034     break;
03035 
03036   case 169:
03037 
03038 /* Line 1455 of yacc.c  */
03039 #line 562 "parser/faustparser.y"
03040     { (yyval.exp) = cons((yyvsp[(1) - (5)].exp), cons((yyvsp[(2) - (5)].exp), (yyvsp[(4) - (5)].exp))); ;}
03041     break;
03042 
03043   case 170:
03044 
03045 /* Line 1455 of yacc.c  */
03046 #line 563 "parser/faustparser.y"
03047     { (yyval.exp) = cons((yyvsp[(1) - (4)].exp), cons((yyvsp[(2) - (4)].exp), nil)); ;}
03048     break;
03049 
03050   case 171:
03051 
03052 /* Line 1455 of yacc.c  */
03053 #line 566 "parser/faustparser.y"
03054     { (yyval.exp) = tree(yytext); ;}
03055     break;
03056 
03057   case 172:
03058 
03059 /* Line 1455 of yacc.c  */
03060 #line 569 "parser/faustparser.y"
03061     { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
03062     break;
03063 
03064   case 173:
03065 
03066 /* Line 1455 of yacc.c  */
03067 #line 570 "parser/faustparser.y"
03068     { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;}
03069     break;
03070 
03071   case 174:
03072 
03073 /* Line 1455 of yacc.c  */
03074 #line 573 "parser/faustparser.y"
03075     { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
03076     break;
03077 
03078   case 175:
03079 
03080 /* Line 1455 of yacc.c  */
03081 #line 574 "parser/faustparser.y"
03082     { (yyval.exp) = cons((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
03083     break;
03084 
03085   case 176:
03086 
03087 /* Line 1455 of yacc.c  */
03088 #line 578 "parser/faustparser.y"
03089     { (yyval.exp) = cons((yyvsp[(2) - (6)].exp),(yyvsp[(5) - (6)].exp)); ;}
03090     break;
03091 
03092   case 177:
03093 
03094 /* Line 1455 of yacc.c  */
03095 #line 581 "parser/faustparser.y"
03096     { (yyval.exp) = tree(0); ;}
03097     break;
03098 
03099   case 178:
03100 
03101 /* Line 1455 of yacc.c  */
03102 #line 582 "parser/faustparser.y"
03103     { (yyval.exp) = tree(1); ;}
03104     break;
03105 
03106 
03107 
03108 /* Line 1455 of yacc.c  */
03109 #line 3110 "parser/faustparser.cpp"
03110       default: break;
03111     }
03112   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
03113 
03114   YYPOPSTACK (yylen);
03115   yylen = 0;
03116   YY_STACK_PRINT (yyss, yyssp);
03117 
03118   *++yyvsp = yyval;
03119 
03120   /* Now `shift' the result of the reduction.  Determine what state
03121      that goes to, based on the state we popped back to and the rule
03122      number reduced by.  */
03123 
03124   yyn = yyr1[yyn];
03125 
03126   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
03127   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
03128     yystate = yytable[yystate];
03129   else
03130     yystate = yydefgoto[yyn - YYNTOKENS];
03131 
03132   goto yynewstate;
03133 
03134 
03135 /*------------------------------------.
03136 | yyerrlab -- here on detecting error |
03137 `------------------------------------*/
03138 yyerrlab:
03139   /* If not already recovering from an error, report this error.  */
03140   if (!yyerrstatus)
03141     {
03142       ++yynerrs;
03143 #if ! YYERROR_VERBOSE
03144       yyerror (YY_("syntax error"));
03145 #else
03146       {
03147     YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
03148     if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
03149       {
03150         YYSIZE_T yyalloc = 2 * yysize;
03151         if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
03152           yyalloc = YYSTACK_ALLOC_MAXIMUM;
03153         if (yymsg != yymsgbuf)
03154           YYSTACK_FREE (yymsg);
03155         yymsg = (char *) YYSTACK_ALLOC (yyalloc);
03156         if (yymsg)
03157           yymsg_alloc = yyalloc;
03158         else
03159           {
03160         yymsg = yymsgbuf;
03161         yymsg_alloc = sizeof yymsgbuf;
03162           }
03163       }
03164 
03165     if (0 < yysize && yysize <= yymsg_alloc)
03166       {
03167         (void) yysyntax_error (yymsg, yystate, yychar);
03168         yyerror (yymsg);
03169       }
03170     else
03171       {
03172         yyerror (YY_("syntax error"));
03173         if (yysize != 0)
03174           goto yyexhaustedlab;
03175       }
03176       }
03177 #endif
03178     }
03179 
03180 
03181 
03182   if (yyerrstatus == 3)
03183     {
03184       /* If just tried and failed to reuse lookahead token after an
03185      error, discard it.  */
03186 
03187       if (yychar <= YYEOF)
03188     {
03189       /* Return failure if at end of input.  */
03190       if (yychar == YYEOF)
03191         YYABORT;
03192     }
03193       else
03194     {
03195       yydestruct ("Error: discarding",
03196               yytoken, &yylval);
03197       yychar = YYEMPTY;
03198     }
03199     }
03200 
03201   /* Else will try to reuse lookahead token after shifting the error
03202      token.  */
03203   goto yyerrlab1;
03204 
03205 
03206 /*---------------------------------------------------.
03207 | yyerrorlab -- error raised explicitly by YYERROR.  |
03208 `---------------------------------------------------*/
03209 yyerrorlab:
03210 
03211   /* Pacify compilers like GCC when the user code never invokes
03212      YYERROR and the label yyerrorlab therefore never appears in user
03213      code.  */
03214   if (/*CONSTCOND*/ 0)
03215      goto yyerrorlab;
03216 
03217   /* Do not reclaim the symbols of the rule which action triggered
03218      this YYERROR.  */
03219   YYPOPSTACK (yylen);
03220   yylen = 0;
03221   YY_STACK_PRINT (yyss, yyssp);
03222   yystate = *yyssp;
03223   goto yyerrlab1;
03224 
03225 
03226 /*-------------------------------------------------------------.
03227 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
03228 `-------------------------------------------------------------*/
03229 yyerrlab1:
03230   yyerrstatus = 3;  /* Each real token shifted decrements this.  */
03231 
03232   for (;;)
03233     {
03234       yyn = yypact[yystate];
03235       if (yyn != YYPACT_NINF)
03236     {
03237       yyn += YYTERROR;
03238       if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
03239         {
03240           yyn = yytable[yyn];
03241           if (0 < yyn)
03242         break;
03243         }
03244     }
03245 
03246       /* Pop the current state because it cannot handle the error token.  */
03247       if (yyssp == yyss)
03248     YYABORT;
03249 
03250 
03251       yydestruct ("Error: popping",
03252           yystos[yystate], yyvsp);
03253       YYPOPSTACK (1);
03254       yystate = *yyssp;
03255       YY_STACK_PRINT (yyss, yyssp);
03256     }
03257 
03258   *++yyvsp = yylval;
03259 
03260 
03261   /* Shift the error token.  */
03262   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
03263 
03264   yystate = yyn;
03265   goto yynewstate;
03266 
03267 
03268 /*-------------------------------------.
03269 | yyacceptlab -- YYACCEPT comes here.  |
03270 `-------------------------------------*/
03271 yyacceptlab:
03272   yyresult = 0;
03273   goto yyreturn;
03274 
03275 /*-----------------------------------.
03276 | yyabortlab -- YYABORT comes here.  |
03277 `-----------------------------------*/
03278 yyabortlab:
03279   yyresult = 1;
03280   goto yyreturn;
03281 
03282 #if !defined(yyoverflow) || YYERROR_VERBOSE
03283 /*-------------------------------------------------.
03284 | yyexhaustedlab -- memory exhaustion comes here.  |
03285 `-------------------------------------------------*/
03286 yyexhaustedlab:
03287   yyerror (YY_("memory exhausted"));
03288   yyresult = 2;
03289   /* Fall through.  */
03290 #endif
03291 
03292 yyreturn:
03293   if (yychar != YYEMPTY)
03294      yydestruct ("Cleanup: discarding lookahead",
03295          yytoken, &yylval);
03296   /* Do not reclaim the symbols of the rule which action triggered
03297      this YYABORT or YYACCEPT.  */
03298   YYPOPSTACK (yylen);
03299   YY_STACK_PRINT (yyss, yyssp);
03300   while (yyssp != yyss)
03301     {
03302       yydestruct ("Cleanup: popping",
03303           yystos[*yyssp], yyvsp);
03304       YYPOPSTACK (1);
03305     }
03306 #ifndef yyoverflow
03307   if (yyss != yyssa)
03308     YYSTACK_FREE (yyss);
03309 #endif
03310 #if YYERROR_VERBOSE
03311   if (yymsg != yymsgbuf)
03312     YYSTACK_FREE (yymsg);
03313 #endif
03314   /* Make sure YYID is used.  */
03315   return YYID (yyresult);
03316 }

Here is the caller graph for this function:


Variable Documentation

string gArchFile

Definition at line 125 of file main.cpp.

Referenced by main(), and process_cmdline().

int gBalancedSwitch = 0

Definition at line 118 of file main.cpp.

Referenced by process_cmdline().

bool gDeepFirstSwitch = false

Definition at line 132 of file main.cpp.

Referenced by Klass::printLoopGraphVector(), and process_cmdline().

bool gDetailsSwitch = false

Definition at line 110 of file main.cpp.

Referenced by main(), and process_cmdline().

string gDocLang

Definition at line 113 of file doc.cpp.

Referenced by printDoc(), and process_cmdline().

string gDocName

Contains the filename for out documentation.

Definition at line 103 of file main.cpp.

Referenced by initFaustDirectories(), and printDoc().

vector<Tree> gDocVector

Contains <mdoc> parsed trees: DOCTXT, DOCEQN, DOCDGM.

Definition at line 108 of file doc.cpp.

bool gDrawPSSwitch = false

Definition at line 112 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gDrawSVGSwitch = false

Definition at line 113 of file main.cpp.

Referenced by main(), and process_cmdline().

Definition at line 104 of file main.cpp.

Definition at line 99 of file main.cpp.

Referenced by fopensearch(), initFaustDirectories(), and open_arch_stream().

Definition at line 98 of file main.cpp.

Referenced by fopensearch(), initFaustDirectories(), and open_arch_stream().

Definition at line 97 of file main.cpp.

Referenced by fopensearch(), initFaustDirectories(), and open_arch_stream().

int gFloatSize = 1

Definition at line 144 of file main.cpp.

Referenced by icast(), ifloat(), inumix(), isuffix(), and process_cmdline().

int gFoldThreshold = 25

Definition at line 119 of file main.cpp.

Referenced by drawSchema(), and process_cmdline().

bool gGroupTaskSwitch = false
bool gHelpSwitch = false

Definition at line 108 of file main.cpp.

Referenced by main(), and process_cmdline().

list<string> gInputFiles

Definition at line 127 of file main.cpp.

Referenced by initFaustDirectories(), main(), and process_cmdline().

bool gLatexDocSwitch = true

Definition at line 116 of file main.cpp.

Referenced by main().

bool gLessTempSwitch = false

Definition at line 123 of file main.cpp.

Referenced by process_cmdline().

Definition at line 101 of file main.cpp.

Referenced by fopensearch(), and initFaustDirectories().

Definition at line 100 of file main.cpp.

Referenced by declareMetadata(), initFaustDirectories(), and main().

string gMasterName

Definition at line 102 of file main.cpp.

Referenced by initFaustDirectories().

int gMaxCopyDelay = 16
int gMaxNameSize = 40

Definition at line 120 of file main.cpp.

Referenced by process_cmdline(), and setDefNameProperty().

map<Tree, set<Tree> > gMetaDataSet
bool gOpenMPSwitch = false

Definition at line 136 of file main.cpp.

Referenced by Klass::printComputeMethod(), Klass::printIncludeFile(), and process_cmdline().

string gOutputFile

Definition at line 126 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gPatternEvalMode = false

Definition at line 129 of file main.cpp.

Referenced by evalIdDef(), and evalPattern().

bool gPrintDocSwitch = false

Definition at line 115 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gPrintFileListSwitch = false

Definition at line 146 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gPrintXMLSwitch = false

Definition at line 114 of file main.cpp.

Referenced by main(), and process_cmdline().

Definition at line 85 of file main.cpp.

Definition at line 82 of file main.cpp.

Definition at line 83 of file main.cpp.

bool gSchedulerSwitch = false
bool gShadowBlur = false

Definition at line 111 of file main.cpp.

Referenced by process_cmdline(), SVGDev::rect(), and SVGDev::SVGDev().

bool gSimpleNames = false

Definition at line 121 of file main.cpp.

Referenced by applyList(), and process_cmdline().

bool gSimplifyDiagrams = false

Definition at line 122 of file main.cpp.

Referenced by process_cmdline(), and real_a2sb().

bool gStripDocSwitch = false

Definition at line 117 of file main.cpp.

Referenced by printfaustlisting(), and process_cmdline().

int gTimeout = 0

Definition at line 142 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gUIMacroSwitch = false

Definition at line 140 of file main.cpp.

Referenced by Klass::println(), and process_cmdline().

int gVecSize = 32

Definition at line 134 of file main.cpp.

Referenced by Klass::printComputeMethod(), and process_cmdline().

bool gVectorSwitch = false
bool gVersionSwitch = false

Definition at line 109 of file main.cpp.

Referenced by main(), and process_cmdline().

int yydebug
int yyerr

Definition at line 79 of file main.cpp.

Referenced by main(), SourceReader::parse(), and yyparse().

FILE * yyin = (FILE *) 0

Definition at line 359 of file faustlexer.cpp.

Referenced by SourceReader::parse(), yy_init_globals(), yyget_in(), and yyset_in().

Generated on Thu Apr 29 00:00:08 2010 for FAUST compiler by  doxygen 1.6.3