FAUST compiler  0.9.9.6b8
Defines | Functions | Variables
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 "compile_sched.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.46"

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 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 gDrawSignals = false
bool gShadowBlur = false
bool gGraphSwitch = 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 gOpenMPLoop = false
bool gSchedulerSwitch = false
bool gGroupTaskSwitch = false
bool gUIMacroSwitch = false
bool gDumpNorm = false
int gTimeout = 600
int gFloatSize = 1
bool gPrintFileListSwitch = false
string gClassName = "mydsp"

Define Documentation

#define FAUSTVERSION   "0.9.46"

Definition at line 21 of file main.cpp.

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


Function Documentation

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

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

Definition at line 463 of file main.cpp.

Referenced by initFaustDirectories().

{
    // determine position right after the last '/' or 0
    unsigned int p1 = 0;
    for (unsigned int i=0; i<filename.size(); i++) {
        if (filename[i] == '/')  { p1 = i+1; }
    }
    
    // determine position of the last '.'
    unsigned int p2 = filename.size();
    for (unsigned int i=p1; i<filename.size(); i++) {
        if (filename[i] == '.')  { p2 = i; }
    }

    return filename.substr(p1, p2-p1);
}

Here is the caller graph for this function:

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

Definition at line 160 of file main.cpp.

Referenced by process_cmdline().

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

Here is the caller graph for this function:

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

Definition at line 165 of file main.cpp.

{
    return  (strcmp(cmd, kw1) == 0) || (strcmp(cmd, kw2) == 0);
}
int main ( int  argc,
char *  argv[] 
)

Definition at line 504 of file main.cpp.

References Description::author(), boxPropagateSig(), Compiler::compileMultiSignal(), cons(), Description::copyright(), drawSchema(), endTiming(), evalprocess(), SourceReader::expandlist(), FAUSTVERSION, gArchFile, gClassName, gDetailsSwitch, gDrawPSSwitch, gDrawSVGSwitch, gErrorCount, getBoxType(), Compiler::getClass(), Compiler::getDescription(), gExpandedDefList, gGraphSwitch, gHelpSwitch, gInputFiles, gLatexDocSwitch, gMasterDocument, gMetaDataSet, gOutputFile, gPrintDocSwitch, gPrintFileListSwitch, gPrintXMLSwitch, gReader, gResult2, gSchedulerSwitch, gTimeout, gVectorSwitch, gVersionSwitch, importFile(), initFaustDirectories(), Description::inputs(), Klass::inputs(), Description::license(), SourceReader::listSrcFiles(), makeSigInputList(), Description::name(), nil, open_arch_stream(), Description::outputs(), Klass::outputs(), Description::print(), Klass::printAdditionalCode(), printDoc(), printfloatdef(), Klass::printGraphDotFormat(), 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.

{

    /****************************************************************
     1 - process command line
    *****************************************************************/

    process_cmdline(argc, argv);

    if (gHelpSwitch)        { printhelp(); exit(0); }
    if (gVersionSwitch)     { printversion(); exit(0); }

    initFaustDirectories();
#ifndef WIN32
    alarm(gTimeout);
#endif


    /****************************************************************
     2 - parse source files
    *****************************************************************/

    startTiming("parser");

    
    list<string>::iterator s;
    gResult2 = nil;
    yyerr = 0;

    if (gInputFiles.begin() == gInputFiles.end()) {
        cerr << "ERROR: no files specified; for help type \"faust --help\"" << endl;
        exit(1);
    }
    for (s = gInputFiles.begin(); s != gInputFiles.end(); s++) {
        if (s == gInputFiles.begin()) gMasterDocument = *s;
        gResult2 = cons(importFile(tree(s->c_str())), gResult2);
    }
    if (yyerr > 0) {
        //fprintf(stderr, "Erreur de parsing 2, count = %d \n", yyerr);
        exit(1);
    }
    gExpandedDefList = gReader.expandlist(gResult2);

    endTiming("parser");
    
    /****************************************************************
     3 - evaluate 'process' definition
    *****************************************************************/
    
    startTiming("evaluation");


    Tree process = evalprocess(gExpandedDefList);

    if (gErrorCount > 0) {
       // cerr << "Total of " << gErrorCount << " errors during evaluation of : process = " << boxpp(process) << ";\n";
        cerr << "Total of " << gErrorCount << " errors during the compilation of  " << gMasterDocument << ";\n";
        exit(1);
    }


    if (gDetailsSwitch) { cerr << "process = " << boxpp(process) << ";\n"; }

    if (gDrawPSSwitch || gDrawSVGSwitch) {
        string projname = gMasterDocument;
        if( gMasterDocument.substr(gMasterDocument.length()-4) == ".dsp" ) {
            projname = gMasterDocument.substr(0, gMasterDocument.length()-4); 
        }
        if (gDrawPSSwitch)  { drawSchema( process, subst("$0-ps",  projname).c_str(), "ps" ); }
        if (gDrawSVGSwitch) { drawSchema( process, subst("$0-svg", projname).c_str(), "svg" ); }
    }

    int numInputs, numOutputs;
    if (!getBoxType(process, &numInputs, &numOutputs)) {
        cerr << "ERROR during the evaluation of  process : "
             << boxpp(process) << endl;
        exit(1);
    }

    if (gDetailsSwitch) {
        cerr <<"process has " << numInputs <<" inputs, and " << numOutputs <<" outputs" << endl;
    }
    
    endTiming("evaluation");


    /****************************************************************
     3.5 - output file list is needed
    *****************************************************************/
    if (gPrintFileListSwitch) {
        cout << "******* ";
        // print the pathnames of the files used to evaluate process
        vector<string> pathnames = gReader.listSrcFiles();
        for (unsigned int i=0; i< pathnames.size(); i++) cout << pathnames[i] << ' ';
        cout << endl;

    }
    

    /****************************************************************
     4 - compute output signals of 'process'
    *****************************************************************/
    
    startTiming("propagation");


    Tree lsignals = boxPropagateSig(nil, process , makeSigInputList(numInputs) );
    if (gDetailsSwitch) { cerr << "output signals are : " << endl;  printSignal(lsignals, stderr); }

    endTiming("propagation");


    /****************************************************************
     5 - translate output signals into C++ code
    *****************************************************************/

    startTiming("compilation");

    Compiler* C;
    if (gSchedulerSwitch)   C = new SchedulerCompiler(gClassName, "dsp", numInputs, numOutputs);
    else if (gVectorSwitch) C = new VectorCompiler(gClassName, "dsp", numInputs, numOutputs);
    else                    C = new ScalarCompiler(gClassName, "dsp", numInputs, numOutputs);

    if (gPrintXMLSwitch) C->setDescription(new Description());
    if (gPrintDocSwitch) C->setDescription(new Description());

    C->compileMultiSignal(lsignals);

    endTiming("compilation");

    /****************************************************************
     6 - generate XML description (if required)
    *****************************************************************/

    if (gPrintXMLSwitch) {
        Description*    D = C->getDescription(); assert(D);
        //ostream*      xout = new ofstream(subst("$0.xml", gMasterDocument).c_str());
        ofstream        xout(subst("$0.xml", gMasterDocument).c_str());

        if(gMetaDataSet.count(tree("name"))>0)          D->name(tree2str(*(gMetaDataSet[tree("name")].begin())));
        if(gMetaDataSet.count(tree("author"))>0)        D->author(tree2str(*(gMetaDataSet[tree("author")].begin())));
        if(gMetaDataSet.count(tree("copyright"))>0)     D->copyright(tree2str(*(gMetaDataSet[tree("copyright")].begin())));
        if(gMetaDataSet.count(tree("license"))>0)       D->license(tree2str(*(gMetaDataSet[tree("license")].begin())));
        if(gMetaDataSet.count(tree("version"))>0)       D->version(tree2str(*(gMetaDataSet[tree("version")].begin())));

        D->inputs(C->getClass()->inputs());
        D->outputs(C->getClass()->outputs());

        D->print(0, xout);
    }


    /****************************************************************
     7 - generate documentation from Faust comments (if required)
    *****************************************************************/


    if (gPrintDocSwitch) {
        if (gLatexDocSwitch) {
            string projname = gMasterDocument;
            if( gMasterDocument.substr(gMasterDocument.length()-4) == ".dsp" ) {
                projname = gMasterDocument.substr(0, gMasterDocument.length()-4); }
            printDoc( subst("$0-mdoc", projname).c_str(), "tex", FAUSTVERSION );
        }
    }




    /****************************************************************
     8 - generate output file
    *****************************************************************/

    ostream* dst;
    istream* enrobage;
    //istream* intrinsic;

    if (gOutputFile != "") {
        dst = new ofstream(gOutputFile.c_str());
    } else {
        dst = &cout;
    }

    if (gArchFile != "") {
        if ( (enrobage = open_arch_stream(gArchFile.c_str())) ) {
            printheader(*dst);
            C->getClass()->printLibrary(*dst);
            C->getClass()->printIncludeFile(*dst);
            C->getClass()->printAdditionalCode(*dst);

            streamCopyUntil(*enrobage, *dst, "<<includeIntrinsic>>");

//          if ( gVectorSwitch && (intrinsic = open_arch_stream("intrinsic.hh")) ) {
//              streamCopyUntilEnd(*intrinsic, *dst);
//          }
            
            if (gSchedulerSwitch) {
                istream* scheduler_include = open_arch_stream("scheduler.h");
                if (scheduler_include) {
                    streamCopy(*scheduler_include, *dst);
                }
            }
            
            streamCopyUntil(*enrobage, *dst, "<<includeclass>>");
            printfloatdef(*dst);
            
            C->getClass()->println(0,*dst);
            streamCopyUntilEnd(*enrobage, *dst);
        } else {
            cerr << "ERROR : can't open architecture file " << gArchFile << endl;
            return 1;
        }
    } else {
        printheader(*dst);
        printfloatdef(*dst);
        C->getClass()->printLibrary(*dst);
        C->getClass()->printIncludeFile(*dst);
        C->getClass()->printAdditionalCode(*dst);
        C->getClass()->println(0,*dst);
    }


    /****************************************************************
     9 - generate the task graph file in dot format
    *****************************************************************/

    if (gGraphSwitch) {
        ofstream dotfile(subst("$0.dot", gMasterDocument).c_str());
        C->getClass()->printGraphDotFormat(dotfile);
    }



    
    delete C;
    return 0;
}

Here is the call graph for this function:

void printheader ( ostream &  dst)

Definition at line 422 of file main.cpp.

References FAUSTVERSION, gMetaDataSet, and tree().

Referenced by main().

{
    // defines the metadata we want to print as comments at the begin of in the C++ file
    set<Tree> selectedKeys;
    selectedKeys.insert(tree("name"));
    selectedKeys.insert(tree("author"));
    selectedKeys.insert(tree("copyright"));
    selectedKeys.insert(tree("license"));
    selectedKeys.insert(tree("version"));

    dst << "//-----------------------------------------------------" << endl;
    for (map<Tree, set<Tree> >::iterator i = gMetaDataSet.begin(); i != gMetaDataSet.end(); i++) {
        if (selectedKeys.count(i->first)) {
            dst << "// " << *(i->first);
            const char* sep = ": ";
            for (set<Tree>::iterator j = i->second.begin(); j != i->second.end(); ++j) {
                dst << sep << **j;
                sep = ", ";
            }
            dst << endl;
        }
    }

    dst << "//" << endl;
    dst << "// Code generated with Faust " << FAUSTVERSION << " (http://faust.grame.fr)" << endl;
    dst << "//-----------------------------------------------------" << endl;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void printhelp ( )

Definition at line 367 of file main.cpp.

References printversion().

Referenced by main().

{
    printversion();
    cout << "usage: faust [options] file1 [file2 ...]\n";
    cout << "\twhere options represent zero or more compiler options \n\tand fileN represents a faust source file (.dsp extension).\n";

    cout << "\noptions :\n";
    cout << "---------\n";

    cout << "-h \t\tprint this --help message\n";
    cout << "-v \t\tprint compiler --version information\n";
    cout << "-d \t\tprint compilation --details\n";
    cout << "-tg \t\tprint the internal --task-graph in dot format file\n";
    cout << "-sg \t\tprint the internal --signal-graph in dot format file\n";
    cout << "-ps \t\tprint block-diagram --postscript file\n";
    cout << "-svg \tprint block-diagram --svg file\n";
    cout << "-mdoc \tprint --mathdoc of a Faust program in LaTeX format in a -mdoc directory\n";
    cout << "-mdlang <l>\t\tload --mathdoc-lang <l> if translation file exists (<l> = en, fr, ...)\n";
    cout << "-stripdoc \t\tapply --strip-mdoc-tags when printing Faust -mdoc listings\n";
    cout << "-sd \t\ttry to further --simplify-diagrams before drawing them\n";
    cout << "-f <n> \t\t--fold <n> threshold during block-diagram generation (default 25 elements) \n";
    cout << "-mns <n> \t--max-name-size <n> threshold during block-diagram generation (default 40 char)\n";
    cout << "-sn \t\tuse --simple-names (without arguments) during block-diagram generation\n";
    cout << "-xml \t\tgenerate an --xml description file\n";
    cout << "-blur \t\tadd a --shadow-blur to SVG boxes\n";
    cout << "-lb \t\tgenerate --left-balanced expressions\n";
    cout << "-mb \t\tgenerate --mid-balanced expressions (default)\n";
    cout << "-rb \t\tgenerate --right-balanced expressions\n";
    cout << "-lt \t\tgenerate --less-temporaries in compiling delays\n";
    cout << "-mcd <n> \t--max-copy-delay <n> threshold between copy and ring buffer implementation (default 16 samples)\n";
    cout << "-a <file> \tC++ architecture file\n";
    cout << "-cn <name> \t--class-name <name> specify the name of the dsp class to be used instead of mydsp \n";
    cout << "-o <file> \tC++ output file\n";
    cout << "-vec    \t--vectorize generate easier to vectorize code\n";
    cout << "-vs <n> \t--vec-size <n> size of the vector (default 32 samples)\n";
    cout << "-lv <n> \t--loop-variant [0:fastest (default), 1:simple] \n";
    cout << "-omp    \t--openMP generate OpenMP pragmas, activates --vectorize option\n";
    cout << "-pl     \t--par-loop generate parallel loops in --openMP mode\n";
    cout << "-sch    \t--scheduler generate tasks and use a Work Stealing scheduler, activates --vectorize option\n";
    cout << "-dfs    \t--deepFirstScheduling schedule vector loops in deep first order\n";
    cout << "-g    \t\t--groupTasks group single-threaded sequential tasks together when -omp or -sch is used\n";
    cout << "-uim    \t--user-interface-macros add user interface macro definitions in the C++ code\n";
    cout << "-single \tuse --single-precision-floats for internal computations (default)\n";
    cout << "-double \tuse --double-precision-floats for internal computations\n";
    cout << "-quad \t\tuse --quad-precision-floats for internal computations\n";
    cout << "-flist \t\tuse --file-list used to eval process\n";
    cout << "-norm \t\t--normalized-form prints signals in normalized form and exits\n";

    cout << "\nexample :\n";
    cout << "---------\n";

    cout << "faust -a jack-gtk.cpp -o myfx.cpp myfx.dsp\n";
}

Here is the call graph for this function:

Here is the caller graph for this function:

void printversion ( )

Definition at line 360 of file main.cpp.

References FAUSTVERSION.

Referenced by main(), and printhelp().

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

Here is the caller graph for this function:

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

Definition at line 170 of file main.cpp.

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

Referenced by main().

{
    int i=1; int err=0;

    while (i<argc) {

        if        (isCmd(argv[i], "-h", "--help")) {
            gHelpSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-v", "--version")) {
            gVersionSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-d", "--details")) {
            gDetailsSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-a", "--architecture")) {
            gArchFile = argv[i+1];
            i += 2;

        } else if (isCmd(argv[i], "-o")) {
            gOutputFile = argv[i+1];
            i += 2;

        } else if (isCmd(argv[i], "-ps", "--postscript")) {
            gDrawPSSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-xml", "--xml")) {
            gPrintXMLSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-tg", "--task-graph")) {
            gGraphSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-sg", "--signal-graph")) {
            gDrawSignals = true;
            i += 1;

        } else if (isCmd(argv[i], "-blur", "--shadow-blur")) {
            gShadowBlur = true;
            i += 1;

        } else if (isCmd(argv[i], "-svg", "--svg")) {
            gDrawSVGSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-f", "--fold")) {
            gFoldThreshold = atoi(argv[i+1]);
            i += 2;

        } else if (isCmd(argv[i], "-mns", "--max-name-size")) {
            gMaxNameSize = atoi(argv[i+1]);
            i += 2;

        } else if (isCmd(argv[i], "-sn", "--simple-names")) {
            gSimpleNames = true;
            i += 1;

        } else if (isCmd(argv[i], "-lb", "--left-balanced")) {
            gBalancedSwitch = 0;
            i += 1;

        } else if (isCmd(argv[i], "-mb", "--mid-balanced")) {
            gBalancedSwitch = 1;
            i += 1;

        } else if (isCmd(argv[i], "-rb", "--right-balanced")) {
            gBalancedSwitch = 2;
            i += 1;

        } else if (isCmd(argv[i], "-lt", "--less-temporaries")) {
            gLessTempSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-mcd", "--max-copy-delay")) {
            gMaxCopyDelay = atoi(argv[i+1]);
            i += 2;

        } else if (isCmd(argv[i], "-sd", "--simplify-diagrams")) {
            gSimplifyDiagrams = true;
            i += 1;

        } else if (isCmd(argv[i], "-vec", "--vectorize")) {
            gVectorSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-dfs", "--deepFirstScheduling")) {
            gDeepFirstSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-vs", "--vec-size")) {
            gVecSize = atoi(argv[i+1]);
            i += 2;

        } else if (isCmd(argv[i], "-lv", "--loop-variant")) {
            gVectorLoopVariant = atoi(argv[i+1]);
            i += 2;

        } else if (isCmd(argv[i], "-omp", "--openMP")) {
            gOpenMPSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-pl", "--par-loop")) {
            gOpenMPLoop = true;
            i += 1;

        } else if (isCmd(argv[i], "-sch", "--scheduler")) {
            gSchedulerSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-g", "--groupTasks")) {
            gGroupTaskSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-uim", "--user-interface-macros")) {
            gUIMacroSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-t", "--timeout")) {
            gTimeout = atoi(argv[i+1]);
            i += 2;

        // double float options
        } else if (isCmd(argv[i], "-single", "--single-precision-floats")) {
            gFloatSize = 1;
            i += 1;

        } else if (isCmd(argv[i], "-double", "--double-precision-floats")) {
            gFloatSize = 2;
            i += 1;

        } else if (isCmd(argv[i], "-quad", "--quad-precision-floats")) {
            gFloatSize = 3;
            i += 1;
            
        } else if (isCmd(argv[i], "-mdoc", "--mathdoc")) {
            gPrintDocSwitch = true;
            i += 1;
            
        } else if (isCmd(argv[i], "-mdlang", "--mathdoc-lang")) {
            gDocLang = argv[i+1];
            i += 2;
            
        } else if (isCmd(argv[i], "-stripmdoc", "--strip-mdoc-tags")) {
            gStripDocSwitch = true;
            i += 1;
            
        } else if (isCmd(argv[i], "-flist", "--file-list")) {
            gPrintFileListSwitch = true;
            i += 1;

        } else if (isCmd(argv[i], "-norm", "--normalized-form")) {
            gDumpNorm = true;
            i += 1;

        } else if (isCmd(argv[i], "-cn", "--class-name")) {
            gClassName = argv[i+1];
            i += 2;

        } else if (argv[i][0] != '-') {
            if (check_file(argv[i])) {
                gInputFiles.push_back(argv[i]);
            }
            i++;

        } else {
            cerr << "faust: unrecognized option \"" << argv[i] <<"\"" << endl;
            i++;
            err++;
        }
    }

    // adjust related options
    if (gOpenMPSwitch || gSchedulerSwitch) gVectorSwitch = true;

    return err == 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int yyparse ( )

Definition at line 1683 of file faustparser.cpp.

Referenced by SourceReader::parse().

{


    int yystate;
    /* Number of tokens to shift before error messages enabled.  */
    int yyerrstatus;

    /* The stacks and their tools:
       `yyss': related to states.
       `yyvs': related to semantic values.

       Refer to the stacks thru separate pointers, to allow yyoverflow
       to reallocate them elsewhere.  */

    /* The state stack.  */
    yytype_int16 yyssa[YYINITDEPTH];
    yytype_int16 *yyss;
    yytype_int16 *yyssp;

    /* The semantic value stack.  */
    YYSTYPE yyvsa[YYINITDEPTH];
    YYSTYPE *yyvs;
    YYSTYPE *yyvsp;

    YYSIZE_T yystacksize;

  int yyn;
  int yyresult;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken;
  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;

#if YYERROR_VERBOSE
  /* Buffer for error messages, and its allocated size.  */
  char yymsgbuf[128];
  char *yymsg = yymsgbuf;
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif

#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  yytoken = 0;
  yyss = yyssa;
  yyvs = yyvsa;
  yystacksize = YYINITDEPTH;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY; /* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */
  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
    /* Give user a chance to reallocate the stack.  Use copies of
       these so that the &'s don't force the real ones into
       memory.  */
    YYSTYPE *yyvs1 = yyvs;
    yytype_int16 *yyss1 = yyss;

    /* Each stack pointer address is followed by the size of the
       data in use in that stack, in bytes.  This used to be a
       conditional around just the two extra args, but that might
       be undefined if yyoverflow is a macro.  */
    yyoverflow (YY_("memory exhausted"),
            &yyss1, yysize * sizeof (*yyssp),
            &yyvs1, yysize * sizeof (*yyvsp),
            &yystacksize);

    yyss = yyss1;
    yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyexhaustedlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
    goto yyexhaustedlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
    yystacksize = YYMAXDEPTH;

      {
    yytype_int16 *yyss1 = yyss;
    union yyalloc *yyptr =
      (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
    if (! yyptr)
      goto yyexhaustedlab;
    YYSTACK_RELOCATE (yyss_alloc, yyss);
    YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  undef YYSTACK_RELOCATE
    if (yyss1 != yyssa)
      YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;

      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
          (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
    YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  if (yystate == YYFINAL)
    YYACCEPT;

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

  /* Do appropriate processing given the current state.  Read a
     lookahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to lookahead token.  */
  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
    goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the lookahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);

  /* Discard the shifted token.  */
  yychar = YYEMPTY;

  yystate = yyn;
  *++yyvsp = yylval;

  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 2:

/* Line 1455 of yacc.c  */
#line 301 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); gResult = formatDefinitions((yyval.exp)); ;}
    break;

  case 3:

/* Line 1455 of yacc.c  */
#line 304 "parser/faustparser.y"
    { (yyval.exp) = nil; ;}
    break;

  case 4:

/* Line 1455 of yacc.c  */
#line 305 "parser/faustparser.y"
    { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
    break;

  case 5:

/* Line 1455 of yacc.c  */
#line 307 "parser/faustparser.y"
    { (yyval.exp) = nil; ;}
    break;

  case 6:

/* Line 1455 of yacc.c  */
#line 308 "parser/faustparser.y"
    { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
    break;

  case 7:

/* Line 1455 of yacc.c  */
#line 311 "parser/faustparser.y"
    { (yyval.exp) = importFile((yyvsp[(3) - (5)].exp)); ;}
    break;

  case 8:

/* Line 1455 of yacc.c  */
#line 312 "parser/faustparser.y"
    { declareMetadata((yyvsp[(2) - (4)].exp),(yyvsp[(3) - (4)].exp)); (yyval.exp) = nil; ;}
    break;

  case 9:

/* Line 1455 of yacc.c  */
#line 313 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 10:

/* Line 1455 of yacc.c  */
#line 314 "parser/faustparser.y"
    { declareDoc((yyvsp[(2) - (3)].exp)); (yyval.exp) = nil; /* cerr << "Yacc : doc : " << *$2 << endl; */ ;}
    break;

  case 11:

/* Line 1455 of yacc.c  */
#line 317 "parser/faustparser.y"
    { (yyval.exp) = nil; ;}
    break;

  case 12:

/* Line 1455 of yacc.c  */
#line 318 "parser/faustparser.y"
    { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
    break;

  case 13:

/* Line 1455 of yacc.c  */
#line 321 "parser/faustparser.y"
    { (yyval.exp) = docTxt((yyvsp[(1) - (1)].cppstr)->c_str()); delete (yyvsp[(1) - (1)].cppstr); ;}
    break;

  case 14:

/* Line 1455 of yacc.c  */
#line 322 "parser/faustparser.y"
    { (yyval.exp) = docEqn((yyvsp[(1) - (1)].exp)); ;}
    break;

  case 15:

/* Line 1455 of yacc.c  */
#line 323 "parser/faustparser.y"
    { (yyval.exp) = docDgm((yyvsp[(1) - (1)].exp)); ;}
    break;

  case 16:

/* Line 1455 of yacc.c  */
#line 324 "parser/faustparser.y"
    { (yyval.exp) = docNtc(); ;}
    break;

  case 17:

/* Line 1455 of yacc.c  */
#line 325 "parser/faustparser.y"
    { (yyval.exp) = docLst(); ;}
    break;

  case 18:

/* Line 1455 of yacc.c  */
#line 326 "parser/faustparser.y"
    { (yyval.exp) = docMtd((yyvsp[(1) - (1)].exp)); ;}
    break;

  case 19:

/* Line 1455 of yacc.c  */
#line 329 "parser/faustparser.y"
    { (yyval.cppstr) = new string(); ;}
    break;

  case 20:

/* Line 1455 of yacc.c  */
#line 330 "parser/faustparser.y"
    { (yyval.cppstr) = &((yyvsp[(1) - (2)].cppstr)->append(yytext)); ;}
    break;

  case 21:

/* Line 1455 of yacc.c  */
#line 333 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
    break;

  case 22:

/* Line 1455 of yacc.c  */
#line 336 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
    break;

  case 23:

/* Line 1455 of yacc.c  */
#line 339 "parser/faustparser.y"
    { ;}
    break;

  case 24:

/* Line 1455 of yacc.c  */
#line 342 "parser/faustparser.y"
    { ;}
    break;

  case 25:

/* Line 1455 of yacc.c  */
#line 345 "parser/faustparser.y"
    { ;}
    break;

  case 26:

/* Line 1455 of yacc.c  */
#line 346 "parser/faustparser.y"
    { ;}
    break;

  case 27:

/* Line 1455 of yacc.c  */
#line 349 "parser/faustparser.y"
    { gLstDependenciesSwitch = (yyvsp[(4) - (5)].b); ;}
    break;

  case 28:

/* Line 1455 of yacc.c  */
#line 350 "parser/faustparser.y"
    { gStripDocSwitch = (yyvsp[(4) - (5)].b); gStripDocSwitch==true ? gStripDocSwitch=false : gStripDocSwitch=true; ;}
    break;

  case 29:

/* Line 1455 of yacc.c  */
#line 351 "parser/faustparser.y"
    { gLstDistributedSwitch = (yyvsp[(4) - (5)].b); ;}
    break;

  case 30:

/* Line 1455 of yacc.c  */
#line 354 "parser/faustparser.y"
    { (yyval.b) = true; ;}
    break;

  case 31:

/* Line 1455 of yacc.c  */
#line 355 "parser/faustparser.y"
    { (yyval.b) = false; ;}
    break;

  case 32:

/* Line 1455 of yacc.c  */
#line 358 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
    break;

  case 33:

/* Line 1455 of yacc.c  */
#line 361 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (7)].exp),cons((yyvsp[(3) - (7)].exp),(yyvsp[(6) - (7)].exp))); ;}
    break;

  case 34:

/* Line 1455 of yacc.c  */
#line 362 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (4)].exp),cons(nil,(yyvsp[(3) - (4)].exp))); ;}
    break;

  case 35:

/* Line 1455 of yacc.c  */
#line 363 "parser/faustparser.y"
    { (yyval.exp) = nil; yyerr++; ;}
    break;

  case 36:

/* Line 1455 of yacc.c  */
#line 366 "parser/faustparser.y"
    { (yyval.exp)=(yyvsp[(1) - (1)].exp); setDefProp((yyvsp[(1) - (1)].exp), yyfilename, yylineno); ;}
    break;

  case 37:

/* Line 1455 of yacc.c  */
#line 369 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
    break;

  case 38:

/* Line 1455 of yacc.c  */
#line 370 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;}
    break;

  case 39:

/* Line 1455 of yacc.c  */
#line 373 "parser/faustparser.y"
    { (yyval.exp) = boxWithLocalDef((yyvsp[(1) - (5)].exp),formatDefinitions((yyvsp[(4) - (5)].exp))); ;}
    break;

  case 40:

/* Line 1455 of yacc.c  */
#line 374 "parser/faustparser.y"
    { (yyval.exp) = boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 41:

/* Line 1455 of yacc.c  */
#line 375 "parser/faustparser.y"
    { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 42:

/* Line 1455 of yacc.c  */
#line 376 "parser/faustparser.y"
    { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 43:

/* Line 1455 of yacc.c  */
#line 377 "parser/faustparser.y"
    { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 44:

/* Line 1455 of yacc.c  */
#line 378 "parser/faustparser.y"
    { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 45:

/* Line 1455 of yacc.c  */
#line 379 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 46:

/* Line 1455 of yacc.c  */
#line 382 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAdd)); ;}
    break;

  case 47:

/* Line 1455 of yacc.c  */
#line 383 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigSub)); ;}
    break;

  case 48:

/* Line 1455 of yacc.c  */
#line 384 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigMul)); ;}
    break;

  case 49:

/* Line 1455 of yacc.c  */
#line 385 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigDiv)); ;}
    break;

  case 50:

/* Line 1455 of yacc.c  */
#line 386 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRem)); ;}
    break;

  case 51:

/* Line 1455 of yacc.c  */
#line 387 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),gPowPrim->box()); ;}
    break;

  case 52:

/* Line 1455 of yacc.c  */
#line 388 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigFixDelay)); ;}
    break;

  case 53:

/* Line 1455 of yacc.c  */
#line 389 "parser/faustparser.y"
    { (yyval.exp) = boxSeq((yyvsp[(1) - (2)].exp),boxPrim1(sigDelay1)); ;}
    break;

  case 54:

/* Line 1455 of yacc.c  */
#line 390 "parser/faustparser.y"
    { (yyval.exp) = boxAccess((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 55:

/* Line 1455 of yacc.c  */
#line 392 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAND)); ;}
    break;

  case 56:

/* Line 1455 of yacc.c  */
#line 393 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigOR)); ;}
    break;

  case 57:

/* Line 1455 of yacc.c  */
#line 394 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigXOR)); ;}
    break;

  case 58:

/* Line 1455 of yacc.c  */
#line 396 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLeftShift)); ;}
    break;

  case 59:

/* Line 1455 of yacc.c  */
#line 397 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRightShift)); ;}
    break;

  case 60:

/* Line 1455 of yacc.c  */
#line 399 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLT)); ;}
    break;

  case 61:

/* Line 1455 of yacc.c  */
#line 400 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLE)); ;}
    break;

  case 62:

/* Line 1455 of yacc.c  */
#line 401 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGT)); ;}
    break;

  case 63:

/* Line 1455 of yacc.c  */
#line 402 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGE)); ;}
    break;

  case 64:

/* Line 1455 of yacc.c  */
#line 403 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigEQ)); ;}
    break;

  case 65:

/* Line 1455 of yacc.c  */
#line 404 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigNE)); ;}
    break;

  case 66:

/* Line 1455 of yacc.c  */
#line 406 "parser/faustparser.y"
    { (yyval.exp) = buildBoxAppl((yyvsp[(1) - (4)].exp),(yyvsp[(3) - (4)].exp)); ;}
    break;

  case 67:

/* Line 1455 of yacc.c  */
#line 407 "parser/faustparser.y"
    { (yyval.exp) = boxModifLocalDef((yyvsp[(1) - (4)].exp),formatDefinitions((yyvsp[(3) - (4)].exp))); ;}
    break;

  case 68:

/* Line 1455 of yacc.c  */
#line 409 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 69:

/* Line 1455 of yacc.c  */
#line 412 "parser/faustparser.y"
    { (yyval.exp) = boxInt(atoi(yytext)); ;}
    break;

  case 70:

/* Line 1455 of yacc.c  */
#line 413 "parser/faustparser.y"
    { (yyval.exp) = boxReal(atof(yytext)); ;}
    break;

  case 71:

/* Line 1455 of yacc.c  */
#line 415 "parser/faustparser.y"
    { (yyval.exp) = boxInt (atoi(yytext)); ;}
    break;

  case 72:

/* Line 1455 of yacc.c  */
#line 416 "parser/faustparser.y"
    { (yyval.exp) = boxReal(atof(yytext)); ;}
    break;

  case 73:

/* Line 1455 of yacc.c  */
#line 418 "parser/faustparser.y"
    { (yyval.exp) = boxInt ( -atoi(yytext) ); ;}
    break;

  case 74:

/* Line 1455 of yacc.c  */
#line 419 "parser/faustparser.y"
    { (yyval.exp) = boxReal( -atof(yytext) ); ;}
    break;

  case 75:

/* Line 1455 of yacc.c  */
#line 421 "parser/faustparser.y"
    { (yyval.exp) = boxWire(); ;}
    break;

  case 76:

/* Line 1455 of yacc.c  */
#line 422 "parser/faustparser.y"
    { (yyval.exp) = boxCut(); ;}
    break;

  case 77:

/* Line 1455 of yacc.c  */
#line 424 "parser/faustparser.y"
    { (yyval.exp) = boxPrim1(sigDelay1); ;}
    break;

  case 78:

/* Line 1455 of yacc.c  */
#line 425 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigPrefix); ;}
    break;

  case 79:

/* Line 1455 of yacc.c  */
#line 427 "parser/faustparser.y"
    { (yyval.exp) = boxPrim1(sigIntCast); ;}
    break;

  case 80:

/* Line 1455 of yacc.c  */
#line 428 "parser/faustparser.y"
    { (yyval.exp) = boxPrim1(sigFloatCast); ;}
    break;

  case 81:

/* Line 1455 of yacc.c  */
#line 430 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigAdd); ;}
    break;

  case 82:

/* Line 1455 of yacc.c  */
#line 431 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigSub); ;}
    break;

  case 83:

/* Line 1455 of yacc.c  */
#line 432 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigMul); ;}
    break;

  case 84:

/* Line 1455 of yacc.c  */
#line 433 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigDiv); ;}
    break;

  case 85:

/* Line 1455 of yacc.c  */
#line 434 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigRem); ;}
    break;

  case 86:

/* Line 1455 of yacc.c  */
#line 435 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigFixDelay); ;}
    break;

  case 87:

/* Line 1455 of yacc.c  */
#line 437 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigAND); ;}
    break;

  case 88:

/* Line 1455 of yacc.c  */
#line 438 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigOR); ;}
    break;

  case 89:

/* Line 1455 of yacc.c  */
#line 439 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigXOR); ;}
    break;

  case 90:

/* Line 1455 of yacc.c  */
#line 441 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigLeftShift); ;}
    break;

  case 91:

/* Line 1455 of yacc.c  */
#line 442 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigRightShift); ;}
    break;

  case 92:

/* Line 1455 of yacc.c  */
#line 444 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigLT); ;}
    break;

  case 93:

/* Line 1455 of yacc.c  */
#line 445 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigLE); ;}
    break;

  case 94:

/* Line 1455 of yacc.c  */
#line 446 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigGT); ;}
    break;

  case 95:

/* Line 1455 of yacc.c  */
#line 447 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigGE); ;}
    break;

  case 96:

/* Line 1455 of yacc.c  */
#line 448 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigEQ); ;}
    break;

  case 97:

/* Line 1455 of yacc.c  */
#line 449 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigNE); ;}
    break;

  case 98:

/* Line 1455 of yacc.c  */
#line 451 "parser/faustparser.y"
    { (yyval.exp) = boxPrim2(sigAttach); ;}
    break;

  case 99:

/* Line 1455 of yacc.c  */
#line 453 "parser/faustparser.y"
    { (yyval.exp) = gAcosPrim->box(); ;}
    break;

  case 100:

/* Line 1455 of yacc.c  */
#line 454 "parser/faustparser.y"
    { (yyval.exp) = gAsinPrim->box(); ;}
    break;

  case 101:

/* Line 1455 of yacc.c  */
#line 455 "parser/faustparser.y"
    { (yyval.exp) = gAtanPrim->box(); ;}
    break;

  case 102:

/* Line 1455 of yacc.c  */
#line 456 "parser/faustparser.y"
    { (yyval.exp) = gAtan2Prim->box(); ;}
    break;

  case 103:

/* Line 1455 of yacc.c  */
#line 457 "parser/faustparser.y"
    { (yyval.exp) = gCosPrim->box(); ;}
    break;

  case 104:

/* Line 1455 of yacc.c  */
#line 458 "parser/faustparser.y"
    { (yyval.exp) = gSinPrim->box(); ;}
    break;

  case 105:

/* Line 1455 of yacc.c  */
#line 459 "parser/faustparser.y"
    { (yyval.exp) = gTanPrim->box(); ;}
    break;

  case 106:

/* Line 1455 of yacc.c  */
#line 461 "parser/faustparser.y"
    { (yyval.exp) = gExpPrim->box(); ;}
    break;

  case 107:

/* Line 1455 of yacc.c  */
#line 462 "parser/faustparser.y"
    { (yyval.exp) = gLogPrim->box(); ;}
    break;

  case 108:

/* Line 1455 of yacc.c  */
#line 463 "parser/faustparser.y"
    { (yyval.exp) = gLog10Prim->box(); ;}
    break;

  case 109:

/* Line 1455 of yacc.c  */
#line 464 "parser/faustparser.y"
    { (yyval.exp) = gPowPrim->box(); ;}
    break;

  case 110:

/* Line 1455 of yacc.c  */
#line 465 "parser/faustparser.y"
    { (yyval.exp) = gPowPrim->box(); ;}
    break;

  case 111:

/* Line 1455 of yacc.c  */
#line 466 "parser/faustparser.y"
    { (yyval.exp) = gSqrtPrim->box(); ;}
    break;

  case 112:

/* Line 1455 of yacc.c  */
#line 468 "parser/faustparser.y"
    { (yyval.exp) = gAbsPrim->box(); ;}
    break;

  case 113:

/* Line 1455 of yacc.c  */
#line 469 "parser/faustparser.y"
    { (yyval.exp) = gMinPrim->box(); ;}
    break;

  case 114:

/* Line 1455 of yacc.c  */
#line 470 "parser/faustparser.y"
    { (yyval.exp) = gMaxPrim->box(); ;}
    break;

  case 115:

/* Line 1455 of yacc.c  */
#line 472 "parser/faustparser.y"
    { (yyval.exp) = gFmodPrim->box(); ;}
    break;

  case 116:

/* Line 1455 of yacc.c  */
#line 473 "parser/faustparser.y"
    { (yyval.exp) = gRemainderPrim->box(); ;}
    break;

  case 117:

/* Line 1455 of yacc.c  */
#line 475 "parser/faustparser.y"
    { (yyval.exp) = gFloorPrim->box(); ;}
    break;

  case 118:

/* Line 1455 of yacc.c  */
#line 476 "parser/faustparser.y"
    { (yyval.exp) = gCeilPrim->box(); ;}
    break;

  case 119:

/* Line 1455 of yacc.c  */
#line 477 "parser/faustparser.y"
    { (yyval.exp) = gRintPrim->box(); ;}
    break;

  case 120:

/* Line 1455 of yacc.c  */
#line 480 "parser/faustparser.y"
    { (yyval.exp) = boxPrim3(sigReadOnlyTable); ;}
    break;

  case 121:

/* Line 1455 of yacc.c  */
#line 481 "parser/faustparser.y"
    { (yyval.exp) = boxPrim5(sigWriteReadTable); ;}
    break;

  case 122:

/* Line 1455 of yacc.c  */
#line 483 "parser/faustparser.y"
    { (yyval.exp) = boxPrim3(sigSelect2); ;}
    break;

  case 123:

/* Line 1455 of yacc.c  */
#line 484 "parser/faustparser.y"
    { (yyval.exp) = boxPrim4(sigSelect3); ;}
    break;

  case 124:

/* Line 1455 of yacc.c  */
#line 486 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 125:

/* Line 1455 of yacc.c  */
#line 487 "parser/faustparser.y"
    { (yyval.exp) = boxSeq(boxPar(boxInt(0),(yyvsp[(2) - (2)].exp)),boxPrim2(sigSub)); ;}
    break;

  case 126:

/* Line 1455 of yacc.c  */
#line 489 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;}
    break;

  case 127:

/* Line 1455 of yacc.c  */
#line 491 "parser/faustparser.y"
    { (yyval.exp) = buildBoxAbstr((yyvsp[(3) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 128:

/* Line 1455 of yacc.c  */
#line 493 "parser/faustparser.y"
    { (yyval.exp) = boxCase(checkRulelist((yyvsp[(3) - (4)].exp))); ;}
    break;

  case 129:

/* Line 1455 of yacc.c  */
#line 495 "parser/faustparser.y"
    { (yyval.exp) = boxFFun((yyvsp[(1) - (1)].exp)); ;}
    break;

  case 130:

/* Line 1455 of yacc.c  */
#line 496 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 131:

/* Line 1455 of yacc.c  */
#line 497 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 132:

/* Line 1455 of yacc.c  */
#line 498 "parser/faustparser.y"
    { (yyval.exp) = boxComponent((yyvsp[(3) - (4)].exp)); ;}
    break;

  case 133:

/* Line 1455 of yacc.c  */
#line 499 "parser/faustparser.y"
    { (yyval.exp) = boxLibrary((yyvsp[(3) - (4)].exp)); ;}
    break;

  case 134:

/* Line 1455 of yacc.c  */
#line 500 "parser/faustparser.y"
    { (yyval.exp) = boxWithLocalDef(boxEnvironment(),formatDefinitions((yyvsp[(3) - (4)].exp))); ;}
    break;

  case 135:

/* Line 1455 of yacc.c  */
#line 502 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 136:

/* Line 1455 of yacc.c  */
#line 503 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 137:

/* Line 1455 of yacc.c  */
#line 504 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 138:

/* Line 1455 of yacc.c  */
#line 505 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 139:

/* Line 1455 of yacc.c  */
#line 506 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 140:

/* Line 1455 of yacc.c  */
#line 507 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 141:

/* Line 1455 of yacc.c  */
#line 508 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 142:

/* Line 1455 of yacc.c  */
#line 509 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 143:

/* Line 1455 of yacc.c  */
#line 510 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 144:

/* Line 1455 of yacc.c  */
#line 511 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 145:

/* Line 1455 of yacc.c  */
#line 513 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 146:

/* Line 1455 of yacc.c  */
#line 514 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 147:

/* Line 1455 of yacc.c  */
#line 515 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 148:

/* Line 1455 of yacc.c  */
#line 516 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 149:

/* Line 1455 of yacc.c  */
#line 520 "parser/faustparser.y"
    { (yyval.exp) = boxIdent(yytext); ;}
    break;

  case 150:

/* Line 1455 of yacc.c  */
#line 523 "parser/faustparser.y"
    { (yyval.exp) = tree(yytext); ;}
    break;

  case 151:

/* Line 1455 of yacc.c  */
#line 528 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
    break;

  case 152:

/* Line 1455 of yacc.c  */
#line 529 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;}
    break;

  case 153:

/* Line 1455 of yacc.c  */
#line 532 "parser/faustparser.y"
    { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 154:

/* Line 1455 of yacc.c  */
#line 533 "parser/faustparser.y"
    { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 155:

/* Line 1455 of yacc.c  */
#line 534 "parser/faustparser.y"
    { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 156:

/* Line 1455 of yacc.c  */
#line 535 "parser/faustparser.y"
    { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;}
    break;

  case 157:

/* Line 1455 of yacc.c  */
#line 536 "parser/faustparser.y"
    { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;}
    break;

  case 158:

/* Line 1455 of yacc.c  */
#line 539 "parser/faustparser.y"
    { (yyval.exp) = tree(yytext); ;}
    break;

  case 159:

/* Line 1455 of yacc.c  */
#line 542 "parser/faustparser.y"
    { (yyval.exp) = unquote(yytext); ;}
    break;

  case 160:

/* Line 1455 of yacc.c  */
#line 545 "parser/faustparser.y"
    { (yyval.exp) = tree(yytext); ;}
    break;

  case 161:

/* Line 1455 of yacc.c  */
#line 546 "parser/faustparser.y"
    { (yyval.exp) = tree(yytext); ;}
    break;

  case 162:

/* Line 1455 of yacc.c  */
#line 552 "parser/faustparser.y"
    { (yyval.exp) = boxIPar((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 163:

/* Line 1455 of yacc.c  */
#line 556 "parser/faustparser.y"
    { (yyval.exp) = boxISeq((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 164:

/* Line 1455 of yacc.c  */
#line 560 "parser/faustparser.y"
    { (yyval.exp) = boxISum((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 165:

/* Line 1455 of yacc.c  */
#line 564 "parser/faustparser.y"
    { (yyval.exp) = boxIProd((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 166:

/* Line 1455 of yacc.c  */
#line 571 "parser/faustparser.y"
    { (yyval.exp) = ffunction((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 167:

/* Line 1455 of yacc.c  */
#line 575 "parser/faustparser.y"
    { (yyval.exp) = boxFConst((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); ;}
    break;

  case 168:

/* Line 1455 of yacc.c  */
#line 578 "parser/faustparser.y"
    { (yyval.exp) = boxFVar((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); ;}
    break;

  case 169:

/* Line 1455 of yacc.c  */
#line 582 "parser/faustparser.y"
    { (yyval.exp) = boxButton((yyvsp[(3) - (4)].exp)); ;}
    break;

  case 170:

/* Line 1455 of yacc.c  */
#line 585 "parser/faustparser.y"
    { (yyval.exp) = boxCheckbox((yyvsp[(3) - (4)].exp)); ;}
    break;

  case 171:

/* Line 1455 of yacc.c  */
#line 589 "parser/faustparser.y"
    { (yyval.exp) = boxVSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;}
    break;

  case 172:

/* Line 1455 of yacc.c  */
#line 592 "parser/faustparser.y"
    { (yyval.exp) = boxHSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;}
    break;

  case 173:

/* Line 1455 of yacc.c  */
#line 595 "parser/faustparser.y"
    { (yyval.exp) = boxNumEntry((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;}
    break;

  case 174:

/* Line 1455 of yacc.c  */
#line 598 "parser/faustparser.y"
    { (yyval.exp) = boxVGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;}
    break;

  case 175:

/* Line 1455 of yacc.c  */
#line 601 "parser/faustparser.y"
    { (yyval.exp) = boxHGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;}
    break;

  case 176:

/* Line 1455 of yacc.c  */
#line 604 "parser/faustparser.y"
    { (yyval.exp) = boxTGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;}
    break;

  case 177:

/* Line 1455 of yacc.c  */
#line 608 "parser/faustparser.y"
    { (yyval.exp) = boxVBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 178:

/* Line 1455 of yacc.c  */
#line 611 "parser/faustparser.y"
    { (yyval.exp) = boxHBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;}
    break;

  case 179:

/* Line 1455 of yacc.c  */
#line 616 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (5)].exp), cons((yyvsp[(2) - (5)].exp), (yyvsp[(4) - (5)].exp))); ;}
    break;

  case 180:

/* Line 1455 of yacc.c  */
#line 617 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (4)].exp), cons((yyvsp[(2) - (4)].exp), nil)); ;}
    break;

  case 181:

/* Line 1455 of yacc.c  */
#line 620 "parser/faustparser.y"
    { (yyval.exp) = tree(yytext); ;}
    break;

  case 182:

/* Line 1455 of yacc.c  */
#line 623 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
    break;

  case 183:

/* Line 1455 of yacc.c  */
#line 624 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;}
    break;

  case 184:

/* Line 1455 of yacc.c  */
#line 627 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;}
    break;

  case 185:

/* Line 1455 of yacc.c  */
#line 628 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;}
    break;

  case 186:

/* Line 1455 of yacc.c  */
#line 632 "parser/faustparser.y"
    { (yyval.exp) = cons((yyvsp[(2) - (6)].exp),(yyvsp[(5) - (6)].exp)); ;}
    break;

  case 187:

/* Line 1455 of yacc.c  */
#line 635 "parser/faustparser.y"
    { (yyval.exp) = tree(0); ;}
    break;

  case 188:

/* Line 1455 of yacc.c  */
#line 636 "parser/faustparser.y"
    { (yyval.exp) = tree(1); ;}
    break;



/* Line 1455 of yacc.c  */
#line 3242 "parser/faustparser.cpp"
      default: break;
    }
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;

  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if ! YYERROR_VERBOSE
      yyerror (YY_("syntax error"));
#else
      {
    YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
    if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
      {
        YYSIZE_T yyalloc = 2 * yysize;
        if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
          yyalloc = YYSTACK_ALLOC_MAXIMUM;
        if (yymsg != yymsgbuf)
          YYSTACK_FREE (yymsg);
        yymsg = (char *) YYSTACK_ALLOC (yyalloc);
        if (yymsg)
          yymsg_alloc = yyalloc;
        else
          {
        yymsg = yymsgbuf;
        yymsg_alloc = sizeof yymsgbuf;
          }
      }

    if (0 < yysize && yysize <= yymsg_alloc)
      {
        (void) yysyntax_error (yymsg, yystate, yychar);
        yyerror (yymsg);
      }
    else
      {
        yyerror (YY_("syntax error"));
        if (yysize != 0)
          goto yyexhaustedlab;
      }
      }
#endif
    }



  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse lookahead token after an
     error, discard it.  */

      if (yychar <= YYEOF)
    {
      /* Return failure if at end of input.  */
      if (yychar == YYEOF)
        YYABORT;
    }
      else
    {
      yydestruct ("Error: discarding",
              yytoken, &yylval);
      yychar = YYEMPTY;
    }
    }

  /* Else will try to reuse lookahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (/*CONSTCOND*/ 0)
     goto yyerrorlab;

  /* Do not reclaim the symbols of the rule which action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;  /* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
    {
      yyn += YYTERROR;
      if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
        {
          yyn = yytable[yyn];
          if (0 < yyn)
        break;
        }
    }

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
    YYABORT;


      yydestruct ("Error: popping",
          yystos[yystate], yyvsp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  *++yyvsp = yylval;


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here.  |
`-------------------------------------------------*/
yyexhaustedlab:
  yyerror (YY_("memory exhausted"));
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
  if (yychar != YYEMPTY)
     yydestruct ("Cleanup: discarding lookahead",
         yytoken, &yylval);
  /* Do not reclaim the symbols of the rule which action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
          yystos[*yyssp], yyvsp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
  if (yymsg != yymsgbuf)
    YYSTACK_FREE (yymsg);
#endif
  /* Make sure YYID is used.  */
  return YYID (yyresult);
}

Here is the caller graph for this function:


Variable Documentation

string gArchFile

Definition at line 131 of file main.cpp.

Referenced by main(), and process_cmdline().

int gBalancedSwitch = 0

Definition at line 124 of file main.cpp.

Referenced by process_cmdline().

string gClassName = "mydsp"

Definition at line 156 of file main.cpp.

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

bool gDeepFirstSwitch = false

Definition at line 138 of file main.cpp.

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

bool gDetailsSwitch = false

Definition at line 114 of file main.cpp.

Referenced by main(), and process_cmdline().

string gDocLang

Definition at line 119 of file doc.cpp.

Referenced by printDoc(), and process_cmdline().

string gDocName

Contains the filename for out documentation.

Definition at line 107 of file main.cpp.

Referenced by declareAutoDoc(), initFaustDirectories(), and printDoc().

vector<Tree> gDocVector

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

Definition at line 110 of file doc.cpp.

bool gDrawPSSwitch = false

Definition at line 118 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gDrawSignals = false

Definition at line 115 of file main.cpp.

Referenced by ScalarCompiler::prepare(), and process_cmdline().

bool gDrawSVGSwitch = false

Definition at line 119 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gDumpNorm = false

Definition at line 148 of file main.cpp.

Referenced by ScalarCompiler::prepare(), and process_cmdline().

Definition at line 108 of file main.cpp.

Referenced by main(), prepareDocEqns(), and printDocDgm().

Definition at line 103 of file main.cpp.

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

Definition at line 102 of file main.cpp.

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

Definition at line 101 of file main.cpp.

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

int gFloatSize = 1

Definition at line 152 of file main.cpp.

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

int gFoldThreshold = 25

Definition at line 125 of file main.cpp.

Referenced by drawSchema(), and process_cmdline().

bool gGraphSwitch = false

Definition at line 117 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gGroupTaskSwitch = false
bool gHelpSwitch = false

Definition at line 112 of file main.cpp.

Referenced by main(), and process_cmdline().

list<string> gInputFiles

Definition at line 133 of file main.cpp.

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

bool gLatexDocSwitch = true

Definition at line 122 of file main.cpp.

Referenced by main().

bool gLessTempSwitch = false

Definition at line 129 of file main.cpp.

Referenced by process_cmdline().

Definition at line 105 of file main.cpp.

Referenced by fopensearch(), and initFaustDirectories().

string gMasterName

Definition at line 106 of file main.cpp.

Referenced by initFaustDirectories(), and printlatexheader().

int gMaxCopyDelay = 16
int gMaxNameSize = 40

Definition at line 126 of file main.cpp.

Referenced by process_cmdline(), and setDefNameProperty().

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

Definition at line 143 of file main.cpp.

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

bool gOpenMPSwitch = false

Definition at line 142 of file main.cpp.

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

string gOutputFile

Definition at line 132 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gPatternEvalMode = false

Definition at line 135 of file main.cpp.

bool gPrintDocSwitch = false

Definition at line 121 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gPrintFileListSwitch = false

Definition at line 154 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gPrintXMLSwitch = false

Definition at line 120 of file main.cpp.

Referenced by main(), and process_cmdline().

Definition at line 89 of file main.cpp.

Referenced by main(), printDoc(), and printfaustlistings().

Definition at line 86 of file main.cpp.

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

Definition at line 87 of file main.cpp.

Referenced by main().

bool gSchedulerSwitch = false

Definition at line 144 of file main.cpp.

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

bool gShadowBlur = false

Definition at line 116 of file main.cpp.

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

bool gSimpleNames = false

Definition at line 127 of file main.cpp.

Referenced by applyList(), and process_cmdline().

bool gSimplifyDiagrams = false

Definition at line 128 of file main.cpp.

Referenced by evalprocess(), and process_cmdline().

bool gStripDocSwitch = false

Definition at line 123 of file main.cpp.

Referenced by printfaustlisting(), process_cmdline(), and yyparse().

int gTimeout = 600

Definition at line 150 of file main.cpp.

Referenced by main(), and process_cmdline().

bool gUIMacroSwitch = false

Definition at line 147 of file main.cpp.

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

int gVecSize = 32

Definition at line 140 of file main.cpp.

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

bool gVectorSwitch = false
bool gVersionSwitch = false

Definition at line 113 of file main.cpp.

Referenced by main(), and process_cmdline().

int yydebug
int yyerr

Definition at line 83 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().