#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"
Go to the source code of this file.
Defines | |
#define | FAUSTVERSION "0.9.24" |
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< Tree > | gDocVector |
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 | 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 | gSchedulerSwitch = false |
bool | gGroupTaskSwitch = false |
bool | gUIMacroSwitch = false |
int | gTimeout = 0 |
int | gFloatSize = 1 |
bool | gPrintFileListSwitch = false |
#define FAUSTVERSION "0.9.24" |
Definition at line 21 of file main.cpp.
Referenced by main(), printheader(), and printversion().
static string dirname | ( | const string & | path | ) | [static] |
Definition at line 433 of file main.cpp.
Referenced by initFaustDirectories().
00434 { 00435 char s[1024]; 00436 strncpy(s, path.c_str(), 1024); 00437 return string(dirname(s)); 00438 }
static string fxname | ( | const string & | filename | ) | [static] |
transform a filename "faust/example/noise.dsp" into the corresponding fx name "noise"
Definition at line 444 of file main.cpp.
Referenced by initFaustDirectories().
00445 { 00446 // determine position right after the last '/' or 0 00447 unsigned int p1 = 0; 00448 for (unsigned int i=0; i<filename.size(); i++) { 00449 if (filename[i] == '/') { p1 = i+1; } 00450 } 00451 00452 // determine position of the last '.' 00453 unsigned int p2 = filename.size(); 00454 for (unsigned int i=p1; i<filename.size(); i++) { 00455 if (filename[i] == '.') { p2 = i; } 00456 } 00457 00458 return filename.substr(p1, p2-p1); 00459 }
static void initFaustDirectories | ( | ) | [static] |
Definition at line 462 of file main.cpp.
References dirname(), fxname(), gDocName, getFaustPathname(), gFaustDirectory, gFaustSuperDirectory, gFaustSuperSuperDirectory, gInputFiles, gMasterDirectory, gMasterDocument, and gMasterName.
Referenced by main().
00463 { 00464 char s[1024]; 00465 getFaustPathname(s, 1024); 00466 dirname(s); 00467 gFaustDirectory = s; 00468 gFaustSuperDirectory = dirname(gFaustDirectory); 00469 gFaustSuperSuperDirectory = dirname(gFaustSuperDirectory); 00470 if (gInputFiles.empty()) { 00471 gMasterDocument = "Unknown"; 00472 gMasterDirectory = "."; 00473 gMasterName = "faustfx"; 00474 gDocName = "faustdoc"; 00475 } else { 00476 gMasterDocument = *gInputFiles.begin(); 00477 gMasterDirectory = dirname(gMasterDocument); 00478 gMasterName = fxname(gMasterDocument); 00479 gDocName = fxname(gMasterDocument); 00480 } 00481 }
static bool isCmd | ( | const char * | cmd, | |
const char * | kw1, | |||
const char * | kw2 | |||
) | [static] |
static bool isCmd | ( | const char * | cmd, | |
const char * | kw1 | |||
) | [static] |
Definition at line 155 of file main.cpp.
Referenced by process_cmdline().
int main | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 485 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(), gGraphSwitch, 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(), 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.
00486 { 00487 00488 /**************************************************************** 00489 1 - process command line 00490 *****************************************************************/ 00491 00492 process_cmdline(argc, argv); 00493 00494 if (gHelpSwitch) { printhelp(); exit(0); } 00495 if (gVersionSwitch) { printversion(); exit(0); } 00496 00497 initFaustDirectories(); 00498 #ifndef WIN32 00499 alarm(gTimeout); 00500 #endif 00501 00502 00503 /**************************************************************** 00504 2 - parse source files 00505 *****************************************************************/ 00506 00507 startTiming("parser"); 00508 00509 00510 list<string>::iterator s; 00511 gResult2 = nil; 00512 yyerr = 0; 00513 00514 if (gInputFiles.begin() == gInputFiles.end()) { 00515 cerr << "ERROR: no files specified; for help type \"faust --help\"" << endl; 00516 exit(1); 00517 } 00518 for (s = gInputFiles.begin(); s != gInputFiles.end(); s++) { 00519 if (s == gInputFiles.begin()) gMasterDocument = *s; 00520 gResult2 = cons(importFile(tree(s->c_str())), gResult2); 00521 } 00522 if (yyerr > 0) { 00523 //fprintf(stderr, "Erreur de parsing 2, count = %d \n", yyerr); 00524 exit(1); 00525 } 00526 gExpandedDefList = gReader.expandlist(gResult2); 00527 00528 endTiming("parser"); 00529 00530 /**************************************************************** 00531 3 - evaluate 'process' definition 00532 *****************************************************************/ 00533 00534 startTiming("evaluation"); 00535 00536 00537 Tree process = evalprocess(gExpandedDefList); 00538 if (gErrorCount > 0) { 00539 // cerr << "Total of " << gErrorCount << " errors during evaluation of : process = " << boxpp(process) << ";\n"; 00540 cerr << "Total of " << gErrorCount << " errors during the compilation of " << gMasterDocument << ";\n"; 00541 exit(1); 00542 } 00543 00544 00545 if (gDetailsSwitch) { cerr << "process = " << boxpp(process) << ";\n"; } 00546 00547 if (gDrawPSSwitch || gDrawSVGSwitch) { 00548 string projname = gMasterDocument; 00549 if( gMasterDocument.substr(gMasterDocument.length()-4) == ".dsp" ) { 00550 projname = gMasterDocument.substr(0, gMasterDocument.length()-4); 00551 } 00552 if (gDrawPSSwitch) { drawSchema( process, subst("$0-ps", projname).c_str(), "ps" ); } 00553 if (gDrawSVGSwitch) { drawSchema( process, subst("$0-svg", projname).c_str(), "svg" ); } 00554 } 00555 00556 int numInputs, numOutputs; 00557 if (!getBoxType(process, &numInputs, &numOutputs)) { 00558 cerr << "ERROR during the evaluation of process : " 00559 << boxpp(process) << endl; 00560 exit(1); 00561 } 00562 00563 if (gDetailsSwitch) { 00564 cerr <<"process has " << numInputs <<" inputs, and " << numOutputs <<" outputs" << endl; 00565 } 00566 00567 endTiming("evaluation"); 00568 00569 00570 /**************************************************************** 00571 3.5 - output file list is needed 00572 *****************************************************************/ 00573 if (gPrintFileListSwitch) { 00574 cout << "******* "; 00575 // print the pathnames of the files used to evaluate process 00576 vector<string> pathnames = gReader.listSrcFiles(); 00577 for (unsigned int i=0; i< pathnames.size(); i++) cout << pathnames[i] << ' '; 00578 cout << endl; 00579 00580 } 00581 00582 00583 /**************************************************************** 00584 4 - compute output signals of 'process' 00585 *****************************************************************/ 00586 00587 startTiming("propagation"); 00588 00589 00590 Tree lsignals = boxPropagateSig(nil, process , makeSigInputList(numInputs) ); 00591 if (gDetailsSwitch) { cerr << "output signals are : " << endl; printSignal(lsignals, stderr); } 00592 00593 endTiming("propagation"); 00594 00595 00596 /**************************************************************** 00597 5 - translate output signals into C++ code 00598 *****************************************************************/ 00599 00600 startTiming("compilation"); 00601 00602 Compiler* C; 00603 if (gSchedulerSwitch) C = new SchedulerCompiler("mydsp", "dsp", numInputs, numOutputs); 00604 else if (gVectorSwitch) C = new VectorCompiler("mydsp", "dsp", numInputs, numOutputs); 00605 else C = new ScalarCompiler("mydsp", "dsp", numInputs, numOutputs); 00606 00607 if (gPrintXMLSwitch) C->setDescription(new Description()); 00608 if (gPrintDocSwitch) C->setDescription(new Description()); 00609 00610 C->compileMultiSignal(lsignals); 00611 00612 endTiming("compilation"); 00613 00614 /**************************************************************** 00615 6 - generate XML description (if required) 00616 *****************************************************************/ 00617 00618 if (gPrintXMLSwitch) { 00619 Description* D = C->getDescription(); assert(D); 00620 //ostream* xout = new ofstream(subst("$0.xml", gMasterDocument).c_str()); 00621 ofstream xout(subst("$0.xml", gMasterDocument).c_str()); 00622 00623 if(gMetaDataSet.count(tree("name"))>0) D->name(tree2str(*(gMetaDataSet[tree("name")].begin()))); 00624 if(gMetaDataSet.count(tree("author"))>0) D->author(tree2str(*(gMetaDataSet[tree("author")].begin()))); 00625 if(gMetaDataSet.count(tree("copyright"))>0) D->copyright(tree2str(*(gMetaDataSet[tree("copyright")].begin()))); 00626 if(gMetaDataSet.count(tree("license"))>0) D->license(tree2str(*(gMetaDataSet[tree("license")].begin()))); 00627 if(gMetaDataSet.count(tree("version"))>0) D->version(tree2str(*(gMetaDataSet[tree("version")].begin()))); 00628 00629 D->inputs(C->getClass()->inputs()); 00630 D->outputs(C->getClass()->outputs()); 00631 00632 D->print(0, xout); 00633 } 00634 00635 00636 /**************************************************************** 00637 7 - generate documentation from Faust comments (if required) 00638 *****************************************************************/ 00639 00640 00641 if (gPrintDocSwitch) { 00642 if (gLatexDocSwitch) { 00643 string projname = gMasterDocument; 00644 if( gMasterDocument.substr(gMasterDocument.length()-4) == ".dsp" ) { 00645 projname = gMasterDocument.substr(0, gMasterDocument.length()-4); } 00646 printDoc( subst("$0-mdoc", projname).c_str(), "tex", FAUSTVERSION ); 00647 } 00648 } 00649 00650 00651 00652 00653 /**************************************************************** 00654 8 - generate output file 00655 *****************************************************************/ 00656 00657 ostream* dst; 00658 istream* enrobage; 00659 //istream* intrinsic; 00660 00661 if (gOutputFile != "") { 00662 dst = new ofstream(gOutputFile.c_str()); 00663 } else { 00664 dst = &cout; 00665 } 00666 00667 if (gArchFile != "") { 00668 if ( (enrobage = open_arch_stream(gArchFile.c_str())) ) { 00669 printheader(*dst); 00670 C->getClass()->printLibrary(*dst); 00671 C->getClass()->printIncludeFile(*dst); 00672 C->getClass()->printAdditionalCode(*dst); 00673 00674 streamCopyUntil(*enrobage, *dst, "<<includeIntrinsic>>"); 00675 00676 // if ( gVectorSwitch && (intrinsic = open_arch_stream("intrinsic.hh")) ) { 00677 // streamCopyUntilEnd(*intrinsic, *dst); 00678 // } 00679 00680 if (gSchedulerSwitch) { 00681 istream* scheduler_include = open_arch_stream("scheduler.h"); 00682 if (scheduler_include) { 00683 streamCopy(*scheduler_include, *dst); 00684 } 00685 } 00686 00687 streamCopyUntil(*enrobage, *dst, "<<includeclass>>"); 00688 printfloatdef(*dst); 00689 00690 C->getClass()->println(0,*dst); 00691 streamCopyUntilEnd(*enrobage, *dst); 00692 } else { 00693 cerr << "ERROR : can't open architecture file " << gArchFile << endl; 00694 return 1; 00695 } 00696 } else { 00697 printheader(*dst); 00698 printfloatdef(*dst); 00699 C->getClass()->printLibrary(*dst); 00700 C->getClass()->printIncludeFile(*dst); 00701 C->getClass()->printAdditionalCode(*dst); 00702 C->getClass()->println(0,*dst); 00703 } 00704 00705 00706 /**************************************************************** 00707 9 - generate the task graph file in dot format 00708 *****************************************************************/ 00709 00710 if (gGraphSwitch) { 00711 ofstream dotfile(subst("$0.dot", gMasterDocument).c_str()); 00712 C->getClass()->printGraphDotFormat(dotfile); 00713 } 00714 00715 00716 00717 00718 delete C; 00719 return 0; 00720 }
void printheader | ( | ostream & | dst | ) |
Definition at line 397 of file main.cpp.
References FAUSTVERSION, gMetaDataSet, and tree().
Referenced by main().
00398 { 00399 // defines the metadata we want to print as comments at the begin of in the C++ file 00400 set<Tree> selectedKeys; 00401 selectedKeys.insert(tree("name")); 00402 selectedKeys.insert(tree("author")); 00403 selectedKeys.insert(tree("copyright")); 00404 selectedKeys.insert(tree("license")); 00405 selectedKeys.insert(tree("version")); 00406 00407 dst << "//-----------------------------------------------------" << endl; 00408 for (map<Tree, set<Tree> >::iterator i = gMetaDataSet.begin(); i != gMetaDataSet.end(); i++) { 00409 if (selectedKeys.count(i->first)) { 00410 dst << "// " << *(i->first); 00411 const char* sep = ": "; 00412 for (set<Tree>::iterator j = i->second.begin(); j != i->second.end(); ++j) { 00413 dst << sep << **j; 00414 sep = ", "; 00415 } 00416 dst << endl; 00417 } 00418 } 00419 00420 dst << "//" << endl; 00421 dst << "// Code generated with Faust " << FAUSTVERSION << " (http://faust.grame.fr)" << endl; 00422 dst << "//-----------------------------------------------------" << endl; 00423 }
void printhelp | ( | ) |
Definition at line 346 of file main.cpp.
References printversion().
Referenced by main().
00347 { 00348 printversion(); 00349 cout << "usage: faust [options] file1 [file2 ...]\n"; 00350 cout << "\twhere options represent zero or more compiler options \n\tand fileN represents a faust source file (.dsp extension).\n"; 00351 00352 cout << "\noptions :\n"; 00353 cout << "---------\n"; 00354 00355 cout << "-h \t\tprint this --help message\n"; 00356 cout << "-v \t\tprint compiler --version information\n"; 00357 cout << "-d \t\tprint compilation --details\n"; 00358 cout << "-tg \t\tprint the internal --task-graph in dot format file\n"; 00359 cout << "-ps \t\tprint block-diagram --postscript file\n"; 00360 cout << "-svg \tprint block-diagram --svg file\n"; 00361 cout << "-mdoc \tprint --mathdoc of a Faust program in LaTeX format in a -mdoc directory\n"; 00362 cout << "-mdlang <l>\t\tload --mathdoc-lang <l> if translation file exists (<l> = en, fr, ...)\n"; 00363 cout << "-stripdoc \t\tapply --strip-mdoc-tags when printing Faust -mdoc listings\n"; 00364 cout << "-sd \t\ttry to further --simplify-diagrams before drawing them\n"; 00365 cout << "-f <n> \t\t--fold <n> threshold during block-diagram generation (default 25 elements) \n"; 00366 cout << "-mns <n> \t--max-name-size <n> threshold during block-diagram generation (default 40 char)\n"; 00367 cout << "-sn \t\tuse --simple-names (without arguments) during block-diagram generation\n"; 00368 cout << "-xml \t\tgenerate an --xml description file\n"; 00369 cout << "-blur \t\tadd a --shadow-blur to SVG boxes\n"; 00370 cout << "-lb \t\tgenerate --left-balanced expressions\n"; 00371 cout << "-mb \t\tgenerate --mid-balanced expressions (default)\n"; 00372 cout << "-rb \t\tgenerate --right-balanced expressions\n"; 00373 cout << "-lt \t\tgenerate --less-temporaries in compiling delays\n"; 00374 cout << "-mcd <n> \t--max-copy-delay <n> threshold between copy and ring buffer implementation (default 16 samples)\n"; 00375 cout << "-a <file> \tC++ architecture file\n"; 00376 cout << "-o <file> \tC++ output file\n"; 00377 cout << "-vec \t--vectorize generate easier to vectorize code\n"; 00378 cout << "-vs <n> \t--vec-size <n> size of the vector (default 32 samples)\n"; 00379 cout << "-lv <n> \t--loop-variant [0:fastest (default), 1:simple] \n"; 00380 cout << "-omp \t--openMP generate OpenMP pragmas, activates --vectorize option\n"; 00381 cout << "-sch \t--scheduler generate tasks and use a Work Stealing scheduler, activates --vectorize option\n"; 00382 cout << "-dfs \t--deepFirstScheduling schedule vector loops in deep first order\n"; 00383 cout << "-g \t\t--groupTasks group single-threaded sequential tasks together when -omp or -sch is used\n"; 00384 cout << "-uim \t--user-interface-macros add user interface macro definitions in the C++ code\n"; 00385 cout << "-single \tuse --single-precision-floats for internal computations (default)\n"; 00386 cout << "-double \tuse --double-precision-floats for internal computations\n"; 00387 cout << "-quad \t\tuse --quad-precision-floats for internal computations\n"; 00388 cout << "-flist \t\tuse --file-list used to eval process\n"; 00389 00390 cout << "\nexample :\n"; 00391 cout << "---------\n"; 00392 00393 cout << "faust -a jack-gtk.cpp -o myfx.cpp myfx.dsp\n"; 00394 }
void printversion | ( | ) |
Definition at line 339 of file main.cpp.
References FAUSTVERSION.
Referenced by main(), and printhelp().
00340 { 00341 cout << "FAUST, DSP to C++ compiler, Version " << FAUSTVERSION << "\n"; 00342 cout << "Copyright (C) 2002-2010, GRAME - Centre National de Creation Musicale. All rights reserved. \n\n"; 00343 }
bool process_cmdline | ( | int | argc, | |
char * | argv[] | |||
) |
Definition at line 165 of file main.cpp.
References check_file(), gArchFile, gBalancedSwitch, gDeepFirstSwitch, gDetailsSwitch, gDocLang, gDrawPSSwitch, gDrawSVGSwitch, gFloatSize, gFoldThreshold, gGraphSwitch, 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().
00166 { 00167 int i=1; int err=0; 00168 00169 while (i<argc) { 00170 00171 if (isCmd(argv[i], "-h", "--help")) { 00172 gHelpSwitch = true; 00173 i += 1; 00174 00175 } else if (isCmd(argv[i], "-v", "--version")) { 00176 gVersionSwitch = true; 00177 i += 1; 00178 00179 } else if (isCmd(argv[i], "-d", "--details")) { 00180 gDetailsSwitch = true; 00181 i += 1; 00182 00183 } else if (isCmd(argv[i], "-a", "--architecture")) { 00184 gArchFile = argv[i+1]; 00185 i += 2; 00186 00187 } else if (isCmd(argv[i], "-o")) { 00188 gOutputFile = argv[i+1]; 00189 i += 2; 00190 00191 } else if (isCmd(argv[i], "-ps", "--postscript")) { 00192 gDrawPSSwitch = true; 00193 i += 1; 00194 00195 } else if (isCmd(argv[i], "-xml", "--xml")) { 00196 gPrintXMLSwitch = true; 00197 i += 1; 00198 00199 } else if (isCmd(argv[i], "-tg", "--task-graph")) { 00200 gGraphSwitch = true; 00201 i += 1; 00202 00203 } else if (isCmd(argv[i], "-blur", "--shadow-blur")) { 00204 gShadowBlur = true; 00205 i += 1; 00206 00207 } else if (isCmd(argv[i], "-svg", "--svg")) { 00208 gDrawSVGSwitch = true; 00209 i += 1; 00210 00211 } else if (isCmd(argv[i], "-f", "--fold")) { 00212 gFoldThreshold = atoi(argv[i+1]); 00213 i += 2; 00214 00215 } else if (isCmd(argv[i], "-mns", "--max-name-size")) { 00216 gMaxNameSize = atoi(argv[i+1]); 00217 i += 2; 00218 00219 } else if (isCmd(argv[i], "-sn", "--simple-names")) { 00220 gSimpleNames = true; 00221 i += 1; 00222 00223 } else if (isCmd(argv[i], "-lb", "--left-balanced")) { 00224 gBalancedSwitch = 0; 00225 i += 1; 00226 00227 } else if (isCmd(argv[i], "-mb", "--mid-balanced")) { 00228 gBalancedSwitch = 1; 00229 i += 1; 00230 00231 } else if (isCmd(argv[i], "-rb", "--right-balanced")) { 00232 gBalancedSwitch = 2; 00233 i += 1; 00234 00235 } else if (isCmd(argv[i], "-lt", "--less-temporaries")) { 00236 gLessTempSwitch = true; 00237 i += 1; 00238 00239 } else if (isCmd(argv[i], "-mcd", "--max-copy-delay")) { 00240 gMaxCopyDelay = atoi(argv[i+1]); 00241 i += 2; 00242 00243 } else if (isCmd(argv[i], "-sd", "--simplify-diagrams")) { 00244 gSimplifyDiagrams = true; 00245 i += 1; 00246 00247 } else if (isCmd(argv[i], "-vec", "--vectorize")) { 00248 gVectorSwitch = true; 00249 i += 1; 00250 00251 } else if (isCmd(argv[i], "-dfs", "--deepFirstScheduling")) { 00252 gDeepFirstSwitch = true; 00253 i += 1; 00254 00255 } else if (isCmd(argv[i], "-vs", "--vec-size")) { 00256 gVecSize = atoi(argv[i+1]); 00257 i += 2; 00258 00259 } else if (isCmd(argv[i], "-lv", "--loop-variant")) { 00260 gVectorLoopVariant = atoi(argv[i+1]); 00261 i += 2; 00262 00263 } else if (isCmd(argv[i], "-omp", "--openMP")) { 00264 gOpenMPSwitch = true; 00265 i += 1; 00266 00267 } else if (isCmd(argv[i], "-sch", "--scheduler")) { 00268 gSchedulerSwitch = true; 00269 i += 1; 00270 00271 } else if (isCmd(argv[i], "-g", "--groupTasks")) { 00272 gGroupTaskSwitch = true; 00273 i += 1; 00274 00275 } else if (isCmd(argv[i], "-uim", "--user-interface-macros")) { 00276 gUIMacroSwitch = true; 00277 i += 1; 00278 00279 } else if (isCmd(argv[i], "-t", "--timeout")) { 00280 gTimeout = atoi(argv[i+1]); 00281 i += 2; 00282 00283 // double float options 00284 } else if (isCmd(argv[i], "-single", "--single-precision-floats")) { 00285 gFloatSize = 1; 00286 i += 1; 00287 00288 } else if (isCmd(argv[i], "-double", "--double-precision-floats")) { 00289 gFloatSize = 2; 00290 i += 1; 00291 00292 } else if (isCmd(argv[i], "-quad", "--quad-precision-floats")) { 00293 gFloatSize = 3; 00294 i += 1; 00295 00296 } else if (isCmd(argv[i], "-mdoc", "--mathdoc")) { 00297 gPrintDocSwitch = true; 00298 i += 1; 00299 00300 } else if (isCmd(argv[i], "-mdlang", "--mathdoc-lang")) { 00301 gDocLang = argv[i+1]; 00302 i += 2; 00303 00304 } else if (isCmd(argv[i], "-stripmdoc", "--strip-mdoc-tags")) { 00305 gStripDocSwitch = true; 00306 i += 1; 00307 00308 } else if (isCmd(argv[i], "-flist", "--file-list")) { 00309 gPrintFileListSwitch = true; 00310 i += 1; 00311 00312 } else if (argv[i][0] != '-') { 00313 if (check_file(argv[i])) { 00314 gInputFiles.push_back(argv[i]); 00315 } 00316 i++; 00317 00318 } else { 00319 cerr << "faust: unrecognized option \"" << argv[i] <<"\"" << endl; 00320 i++; 00321 err++; 00322 } 00323 } 00324 00325 // adjust related options 00326 if (gOpenMPSwitch || gSchedulerSwitch) gVectorSwitch = true; 00327 00328 return err == 0; 00329 }
int yyparse | ( | ) |
Definition at line 1674 of file faustparser.cpp.
Referenced by SourceReader::parse().
01678 { 01679 01680 01681 int yystate; 01682 /* Number of tokens to shift before error messages enabled. */ 01683 int yyerrstatus; 01684 01685 /* The stacks and their tools: 01686 `yyss': related to states. 01687 `yyvs': related to semantic values. 01688 01689 Refer to the stacks thru separate pointers, to allow yyoverflow 01690 to reallocate them elsewhere. */ 01691 01692 /* The state stack. */ 01693 yytype_int16 yyssa[YYINITDEPTH]; 01694 yytype_int16 *yyss; 01695 yytype_int16 *yyssp; 01696 01697 /* The semantic value stack. */ 01698 YYSTYPE yyvsa[YYINITDEPTH]; 01699 YYSTYPE *yyvs; 01700 YYSTYPE *yyvsp; 01701 01702 YYSIZE_T yystacksize; 01703 01704 int yyn; 01705 int yyresult; 01706 /* Lookahead token as an internal (translated) token number. */ 01707 int yytoken; 01708 /* The variables used to return semantic value and location from the 01709 action routines. */ 01710 YYSTYPE yyval; 01711 01712 #if YYERROR_VERBOSE 01713 /* Buffer for error messages, and its allocated size. */ 01714 char yymsgbuf[128]; 01715 char *yymsg = yymsgbuf; 01716 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 01717 #endif 01718 01719 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 01720 01721 /* The number of symbols on the RHS of the reduced rule. 01722 Keep to zero when no symbol should be popped. */ 01723 int yylen = 0; 01724 01725 yytoken = 0; 01726 yyss = yyssa; 01727 yyvs = yyvsa; 01728 yystacksize = YYINITDEPTH; 01729 01730 YYDPRINTF ((stderr, "Starting parse\n")); 01731 01732 yystate = 0; 01733 yyerrstatus = 0; 01734 yynerrs = 0; 01735 yychar = YYEMPTY; /* Cause a token to be read. */ 01736 01737 /* Initialize stack pointers. 01738 Waste one element of value and location stack 01739 so that they stay on the same level as the state stack. 01740 The wasted elements are never initialized. */ 01741 yyssp = yyss; 01742 yyvsp = yyvs; 01743 01744 goto yysetstate; 01745 01746 /*------------------------------------------------------------. 01747 | yynewstate -- Push a new state, which is found in yystate. | 01748 `------------------------------------------------------------*/ 01749 yynewstate: 01750 /* In all cases, when you get here, the value and location stacks 01751 have just been pushed. So pushing a state here evens the stacks. */ 01752 yyssp++; 01753 01754 yysetstate: 01755 *yyssp = yystate; 01756 01757 if (yyss + yystacksize - 1 <= yyssp) 01758 { 01759 /* Get the current used size of the three stacks, in elements. */ 01760 YYSIZE_T yysize = yyssp - yyss + 1; 01761 01762 #ifdef yyoverflow 01763 { 01764 /* Give user a chance to reallocate the stack. Use copies of 01765 these so that the &'s don't force the real ones into 01766 memory. */ 01767 YYSTYPE *yyvs1 = yyvs; 01768 yytype_int16 *yyss1 = yyss; 01769 01770 /* Each stack pointer address is followed by the size of the 01771 data in use in that stack, in bytes. This used to be a 01772 conditional around just the two extra args, but that might 01773 be undefined if yyoverflow is a macro. */ 01774 yyoverflow (YY_("memory exhausted"), 01775 &yyss1, yysize * sizeof (*yyssp), 01776 &yyvs1, yysize * sizeof (*yyvsp), 01777 &yystacksize); 01778 01779 yyss = yyss1; 01780 yyvs = yyvs1; 01781 } 01782 #else /* no yyoverflow */ 01783 # ifndef YYSTACK_RELOCATE 01784 goto yyexhaustedlab; 01785 # else 01786 /* Extend the stack our own way. */ 01787 if (YYMAXDEPTH <= yystacksize) 01788 goto yyexhaustedlab; 01789 yystacksize *= 2; 01790 if (YYMAXDEPTH < yystacksize) 01791 yystacksize = YYMAXDEPTH; 01792 01793 { 01794 yytype_int16 *yyss1 = yyss; 01795 union yyalloc *yyptr = 01796 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 01797 if (! yyptr) 01798 goto yyexhaustedlab; 01799 YYSTACK_RELOCATE (yyss_alloc, yyss); 01800 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 01801 # undef YYSTACK_RELOCATE 01802 if (yyss1 != yyssa) 01803 YYSTACK_FREE (yyss1); 01804 } 01805 # endif 01806 #endif /* no yyoverflow */ 01807 01808 yyssp = yyss + yysize - 1; 01809 yyvsp = yyvs + yysize - 1; 01810 01811 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 01812 (unsigned long int) yystacksize)); 01813 01814 if (yyss + yystacksize - 1 <= yyssp) 01815 YYABORT; 01816 } 01817 01818 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 01819 01820 if (yystate == YYFINAL) 01821 YYACCEPT; 01822 01823 goto yybackup; 01824 01825 /*-----------. 01826 | yybackup. | 01827 `-----------*/ 01828 yybackup: 01829 01830 /* Do appropriate processing given the current state. Read a 01831 lookahead token if we need one and don't already have one. */ 01832 01833 /* First try to decide what to do without reference to lookahead token. */ 01834 yyn = yypact[yystate]; 01835 if (yyn == YYPACT_NINF) 01836 goto yydefault; 01837 01838 /* Not known => get a lookahead token if don't already have one. */ 01839 01840 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 01841 if (yychar == YYEMPTY) 01842 { 01843 YYDPRINTF ((stderr, "Reading a token: ")); 01844 yychar = YYLEX; 01845 } 01846 01847 if (yychar <= YYEOF) 01848 { 01849 yychar = yytoken = YYEOF; 01850 YYDPRINTF ((stderr, "Now at end of input.\n")); 01851 } 01852 else 01853 { 01854 yytoken = YYTRANSLATE (yychar); 01855 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 01856 } 01857 01858 /* If the proper action on seeing token YYTOKEN is to reduce or to 01859 detect an error, take that action. */ 01860 yyn += yytoken; 01861 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 01862 goto yydefault; 01863 yyn = yytable[yyn]; 01864 if (yyn <= 0) 01865 { 01866 if (yyn == 0 || yyn == YYTABLE_NINF) 01867 goto yyerrlab; 01868 yyn = -yyn; 01869 goto yyreduce; 01870 } 01871 01872 /* Count tokens shifted since error; after three, turn off error 01873 status. */ 01874 if (yyerrstatus) 01875 yyerrstatus--; 01876 01877 /* Shift the lookahead token. */ 01878 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 01879 01880 /* Discard the shifted token. */ 01881 yychar = YYEMPTY; 01882 01883 yystate = yyn; 01884 *++yyvsp = yylval; 01885 01886 goto yynewstate; 01887 01888 01889 /*-----------------------------------------------------------. 01890 | yydefault -- do the default action for the current state. | 01891 `-----------------------------------------------------------*/ 01892 yydefault: 01893 yyn = yydefact[yystate]; 01894 if (yyn == 0) 01895 goto yyerrlab; 01896 goto yyreduce; 01897 01898 01899 /*-----------------------------. 01900 | yyreduce -- Do a reduction. | 01901 `-----------------------------*/ 01902 yyreduce: 01903 /* yyn is the number of a rule to reduce with. */ 01904 yylen = yyr2[yyn]; 01905 01906 /* If YYLEN is nonzero, implement the default value of the action: 01907 `$$ = $1'. 01908 01909 Otherwise, the following line sets YYVAL to garbage. 01910 This behavior is undocumented and Bison 01911 users should not rely upon it. Assigning to YYVAL 01912 unconditionally makes the parser a bit smaller, and it avoids a 01913 GCC warning that YYVAL may be used uninitialized. */ 01914 yyval = yyvsp[1-yylen]; 01915 01916 01917 YY_REDUCE_PRINT (yyn); 01918 switch (yyn) 01919 { 01920 case 2: 01921 01922 /* Line 1455 of yacc.c */ 01923 #line 292 "parser/faustparser.y" 01924 { (yyval.exp) = (yyvsp[(1) - (1)].exp); gResult = formatDefinitions((yyval.exp)); ;} 01925 break; 01926 01927 case 3: 01928 01929 /* Line 1455 of yacc.c */ 01930 #line 295 "parser/faustparser.y" 01931 { (yyval.exp) = nil; ;} 01932 break; 01933 01934 case 4: 01935 01936 /* Line 1455 of yacc.c */ 01937 #line 296 "parser/faustparser.y" 01938 { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;} 01939 break; 01940 01941 case 5: 01942 01943 /* Line 1455 of yacc.c */ 01944 #line 298 "parser/faustparser.y" 01945 { (yyval.exp) = nil; ;} 01946 break; 01947 01948 case 6: 01949 01950 /* Line 1455 of yacc.c */ 01951 #line 299 "parser/faustparser.y" 01952 { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;} 01953 break; 01954 01955 case 7: 01956 01957 /* Line 1455 of yacc.c */ 01958 #line 302 "parser/faustparser.y" 01959 { (yyval.exp) = importFile((yyvsp[(3) - (5)].exp)); ;} 01960 break; 01961 01962 case 8: 01963 01964 /* Line 1455 of yacc.c */ 01965 #line 303 "parser/faustparser.y" 01966 { declareMetadata((yyvsp[(2) - (4)].exp),(yyvsp[(3) - (4)].exp)); (yyval.exp) = nil; ;} 01967 break; 01968 01969 case 9: 01970 01971 /* Line 1455 of yacc.c */ 01972 #line 304 "parser/faustparser.y" 01973 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 01974 break; 01975 01976 case 10: 01977 01978 /* Line 1455 of yacc.c */ 01979 #line 305 "parser/faustparser.y" 01980 { declareDoc((yyvsp[(2) - (3)].exp)); (yyval.exp) = nil; /* cerr << "Yacc : doc : " << *$2 << endl; */ ;} 01981 break; 01982 01983 case 11: 01984 01985 /* Line 1455 of yacc.c */ 01986 #line 308 "parser/faustparser.y" 01987 { (yyval.exp) = nil; ;} 01988 break; 01989 01990 case 12: 01991 01992 /* Line 1455 of yacc.c */ 01993 #line 309 "parser/faustparser.y" 01994 { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;} 01995 break; 01996 01997 case 13: 01998 01999 /* Line 1455 of yacc.c */ 02000 #line 312 "parser/faustparser.y" 02001 { (yyval.exp) = docTxt((yyvsp[(1) - (1)].cppstr)->c_str()); delete (yyvsp[(1) - (1)].cppstr); ;} 02002 break; 02003 02004 case 14: 02005 02006 /* Line 1455 of yacc.c */ 02007 #line 313 "parser/faustparser.y" 02008 { (yyval.exp) = docEqn((yyvsp[(1) - (1)].exp)); ;} 02009 break; 02010 02011 case 15: 02012 02013 /* Line 1455 of yacc.c */ 02014 #line 314 "parser/faustparser.y" 02015 { (yyval.exp) = docDgm((yyvsp[(1) - (1)].exp)); ;} 02016 break; 02017 02018 case 16: 02019 02020 /* Line 1455 of yacc.c */ 02021 #line 315 "parser/faustparser.y" 02022 { (yyval.exp) = docNtc(); ;} 02023 break; 02024 02025 case 17: 02026 02027 /* Line 1455 of yacc.c */ 02028 #line 316 "parser/faustparser.y" 02029 { (yyval.exp) = docLst(); ;} 02030 break; 02031 02032 case 18: 02033 02034 /* Line 1455 of yacc.c */ 02035 #line 317 "parser/faustparser.y" 02036 { (yyval.exp) = docMtd((yyvsp[(1) - (1)].exp)); ;} 02037 break; 02038 02039 case 19: 02040 02041 /* Line 1455 of yacc.c */ 02042 #line 320 "parser/faustparser.y" 02043 { (yyval.cppstr) = new string(); ;} 02044 break; 02045 02046 case 20: 02047 02048 /* Line 1455 of yacc.c */ 02049 #line 321 "parser/faustparser.y" 02050 { (yyval.cppstr) = &((yyvsp[(1) - (2)].cppstr)->append(yytext)); ;} 02051 break; 02052 02053 case 21: 02054 02055 /* Line 1455 of yacc.c */ 02056 #line 324 "parser/faustparser.y" 02057 { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;} 02058 break; 02059 02060 case 22: 02061 02062 /* Line 1455 of yacc.c */ 02063 #line 327 "parser/faustparser.y" 02064 { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;} 02065 break; 02066 02067 case 23: 02068 02069 /* Line 1455 of yacc.c */ 02070 #line 330 "parser/faustparser.y" 02071 { ;} 02072 break; 02073 02074 case 24: 02075 02076 /* Line 1455 of yacc.c */ 02077 #line 333 "parser/faustparser.y" 02078 { ;} 02079 break; 02080 02081 case 25: 02082 02083 /* Line 1455 of yacc.c */ 02084 #line 336 "parser/faustparser.y" 02085 { ;} 02086 break; 02087 02088 case 26: 02089 02090 /* Line 1455 of yacc.c */ 02091 #line 337 "parser/faustparser.y" 02092 { ;} 02093 break; 02094 02095 case 27: 02096 02097 /* Line 1455 of yacc.c */ 02098 #line 340 "parser/faustparser.y" 02099 { gLstDependenciesSwitch = (yyvsp[(4) - (5)].b); ;} 02100 break; 02101 02102 case 28: 02103 02104 /* Line 1455 of yacc.c */ 02105 #line 341 "parser/faustparser.y" 02106 { gStripDocSwitch = (yyvsp[(4) - (5)].b); gStripDocSwitch==true ? gStripDocSwitch=false : gStripDocSwitch=true; ;} 02107 break; 02108 02109 case 29: 02110 02111 /* Line 1455 of yacc.c */ 02112 #line 342 "parser/faustparser.y" 02113 { gLstDistributedSwitch = (yyvsp[(4) - (5)].b); ;} 02114 break; 02115 02116 case 30: 02117 02118 /* Line 1455 of yacc.c */ 02119 #line 345 "parser/faustparser.y" 02120 { (yyval.b) = true; ;} 02121 break; 02122 02123 case 31: 02124 02125 /* Line 1455 of yacc.c */ 02126 #line 346 "parser/faustparser.y" 02127 { (yyval.b) = false; ;} 02128 break; 02129 02130 case 32: 02131 02132 /* Line 1455 of yacc.c */ 02133 #line 349 "parser/faustparser.y" 02134 { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;} 02135 break; 02136 02137 case 33: 02138 02139 /* Line 1455 of yacc.c */ 02140 #line 352 "parser/faustparser.y" 02141 { (yyval.exp) = cons((yyvsp[(1) - (7)].exp),cons((yyvsp[(3) - (7)].exp),(yyvsp[(6) - (7)].exp))); ;} 02142 break; 02143 02144 case 34: 02145 02146 /* Line 1455 of yacc.c */ 02147 #line 353 "parser/faustparser.y" 02148 { (yyval.exp) = cons((yyvsp[(1) - (4)].exp),cons(nil,(yyvsp[(3) - (4)].exp))); ;} 02149 break; 02150 02151 case 35: 02152 02153 /* Line 1455 of yacc.c */ 02154 #line 354 "parser/faustparser.y" 02155 { (yyval.exp) = nil; yyerr++; ;} 02156 break; 02157 02158 case 36: 02159 02160 /* Line 1455 of yacc.c */ 02161 #line 357 "parser/faustparser.y" 02162 { (yyval.exp)=(yyvsp[(1) - (1)].exp); setDefProp((yyvsp[(1) - (1)].exp), yyfilename, yylineno); ;} 02163 break; 02164 02165 case 37: 02166 02167 /* Line 1455 of yacc.c */ 02168 #line 360 "parser/faustparser.y" 02169 { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;} 02170 break; 02171 02172 case 38: 02173 02174 /* Line 1455 of yacc.c */ 02175 #line 361 "parser/faustparser.y" 02176 { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;} 02177 break; 02178 02179 case 39: 02180 02181 /* Line 1455 of yacc.c */ 02182 #line 364 "parser/faustparser.y" 02183 { (yyval.exp) = boxWithLocalDef((yyvsp[(1) - (5)].exp),formatDefinitions((yyvsp[(4) - (5)].exp))); ;} 02184 break; 02185 02186 case 40: 02187 02188 /* Line 1455 of yacc.c */ 02189 #line 365 "parser/faustparser.y" 02190 { (yyval.exp) = boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02191 break; 02192 02193 case 41: 02194 02195 /* Line 1455 of yacc.c */ 02196 #line 366 "parser/faustparser.y" 02197 { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02198 break; 02199 02200 case 42: 02201 02202 /* Line 1455 of yacc.c */ 02203 #line 367 "parser/faustparser.y" 02204 { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02205 break; 02206 02207 case 43: 02208 02209 /* Line 1455 of yacc.c */ 02210 #line 368 "parser/faustparser.y" 02211 { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02212 break; 02213 02214 case 44: 02215 02216 /* Line 1455 of yacc.c */ 02217 #line 369 "parser/faustparser.y" 02218 { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02219 break; 02220 02221 case 45: 02222 02223 /* Line 1455 of yacc.c */ 02224 #line 370 "parser/faustparser.y" 02225 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02226 break; 02227 02228 case 46: 02229 02230 /* Line 1455 of yacc.c */ 02231 #line 373 "parser/faustparser.y" 02232 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAdd)); ;} 02233 break; 02234 02235 case 47: 02236 02237 /* Line 1455 of yacc.c */ 02238 #line 374 "parser/faustparser.y" 02239 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigSub)); ;} 02240 break; 02241 02242 case 48: 02243 02244 /* Line 1455 of yacc.c */ 02245 #line 375 "parser/faustparser.y" 02246 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigMul)); ;} 02247 break; 02248 02249 case 49: 02250 02251 /* Line 1455 of yacc.c */ 02252 #line 376 "parser/faustparser.y" 02253 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigDiv)); ;} 02254 break; 02255 02256 case 50: 02257 02258 /* Line 1455 of yacc.c */ 02259 #line 377 "parser/faustparser.y" 02260 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRem)); ;} 02261 break; 02262 02263 case 51: 02264 02265 /* Line 1455 of yacc.c */ 02266 #line 378 "parser/faustparser.y" 02267 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),gPowPrim->box()); ;} 02268 break; 02269 02270 case 52: 02271 02272 /* Line 1455 of yacc.c */ 02273 #line 379 "parser/faustparser.y" 02274 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigFixDelay)); ;} 02275 break; 02276 02277 case 53: 02278 02279 /* Line 1455 of yacc.c */ 02280 #line 380 "parser/faustparser.y" 02281 { (yyval.exp) = boxSeq((yyvsp[(1) - (2)].exp),boxPrim1(sigDelay1)); ;} 02282 break; 02283 02284 case 54: 02285 02286 /* Line 1455 of yacc.c */ 02287 #line 381 "parser/faustparser.y" 02288 { (yyval.exp) = boxAccess((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02289 break; 02290 02291 case 55: 02292 02293 /* Line 1455 of yacc.c */ 02294 #line 383 "parser/faustparser.y" 02295 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAND)); ;} 02296 break; 02297 02298 case 56: 02299 02300 /* Line 1455 of yacc.c */ 02301 #line 384 "parser/faustparser.y" 02302 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigOR)); ;} 02303 break; 02304 02305 case 57: 02306 02307 /* Line 1455 of yacc.c */ 02308 #line 385 "parser/faustparser.y" 02309 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigXOR)); ;} 02310 break; 02311 02312 case 58: 02313 02314 /* Line 1455 of yacc.c */ 02315 #line 387 "parser/faustparser.y" 02316 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLeftShift)); ;} 02317 break; 02318 02319 case 59: 02320 02321 /* Line 1455 of yacc.c */ 02322 #line 388 "parser/faustparser.y" 02323 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRightShift)); ;} 02324 break; 02325 02326 case 60: 02327 02328 /* Line 1455 of yacc.c */ 02329 #line 390 "parser/faustparser.y" 02330 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLT)); ;} 02331 break; 02332 02333 case 61: 02334 02335 /* Line 1455 of yacc.c */ 02336 #line 391 "parser/faustparser.y" 02337 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLE)); ;} 02338 break; 02339 02340 case 62: 02341 02342 /* Line 1455 of yacc.c */ 02343 #line 392 "parser/faustparser.y" 02344 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGT)); ;} 02345 break; 02346 02347 case 63: 02348 02349 /* Line 1455 of yacc.c */ 02350 #line 393 "parser/faustparser.y" 02351 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGE)); ;} 02352 break; 02353 02354 case 64: 02355 02356 /* Line 1455 of yacc.c */ 02357 #line 394 "parser/faustparser.y" 02358 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigEQ)); ;} 02359 break; 02360 02361 case 65: 02362 02363 /* Line 1455 of yacc.c */ 02364 #line 395 "parser/faustparser.y" 02365 { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigNE)); ;} 02366 break; 02367 02368 case 66: 02369 02370 /* Line 1455 of yacc.c */ 02371 #line 397 "parser/faustparser.y" 02372 { (yyval.exp) = buildBoxAppl((yyvsp[(1) - (4)].exp),(yyvsp[(3) - (4)].exp)); ;} 02373 break; 02374 02375 case 67: 02376 02377 /* Line 1455 of yacc.c */ 02378 #line 398 "parser/faustparser.y" 02379 { (yyval.exp) = boxModifLocalDef((yyvsp[(1) - (4)].exp),formatDefinitions((yyvsp[(3) - (4)].exp))); ;} 02380 break; 02381 02382 case 68: 02383 02384 /* Line 1455 of yacc.c */ 02385 #line 400 "parser/faustparser.y" 02386 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02387 break; 02388 02389 case 69: 02390 02391 /* Line 1455 of yacc.c */ 02392 #line 403 "parser/faustparser.y" 02393 { (yyval.exp) = boxInt(atoi(yytext)); ;} 02394 break; 02395 02396 case 70: 02397 02398 /* Line 1455 of yacc.c */ 02399 #line 404 "parser/faustparser.y" 02400 { (yyval.exp) = boxReal(atof(yytext)); ;} 02401 break; 02402 02403 case 71: 02404 02405 /* Line 1455 of yacc.c */ 02406 #line 406 "parser/faustparser.y" 02407 { (yyval.exp) = boxInt (atoi(yytext)); ;} 02408 break; 02409 02410 case 72: 02411 02412 /* Line 1455 of yacc.c */ 02413 #line 407 "parser/faustparser.y" 02414 { (yyval.exp) = boxReal(atof(yytext)); ;} 02415 break; 02416 02417 case 73: 02418 02419 /* Line 1455 of yacc.c */ 02420 #line 409 "parser/faustparser.y" 02421 { (yyval.exp) = boxInt ( -atoi(yytext) ); ;} 02422 break; 02423 02424 case 74: 02425 02426 /* Line 1455 of yacc.c */ 02427 #line 410 "parser/faustparser.y" 02428 { (yyval.exp) = boxReal( -atof(yytext) ); ;} 02429 break; 02430 02431 case 75: 02432 02433 /* Line 1455 of yacc.c */ 02434 #line 412 "parser/faustparser.y" 02435 { (yyval.exp) = boxWire(); ;} 02436 break; 02437 02438 case 76: 02439 02440 /* Line 1455 of yacc.c */ 02441 #line 413 "parser/faustparser.y" 02442 { (yyval.exp) = boxCut(); ;} 02443 break; 02444 02445 case 77: 02446 02447 /* Line 1455 of yacc.c */ 02448 #line 415 "parser/faustparser.y" 02449 { (yyval.exp) = boxPrim1(sigDelay1); ;} 02450 break; 02451 02452 case 78: 02453 02454 /* Line 1455 of yacc.c */ 02455 #line 416 "parser/faustparser.y" 02456 { (yyval.exp) = boxPrim2(sigPrefix); ;} 02457 break; 02458 02459 case 79: 02460 02461 /* Line 1455 of yacc.c */ 02462 #line 418 "parser/faustparser.y" 02463 { (yyval.exp) = boxPrim1(sigIntCast); ;} 02464 break; 02465 02466 case 80: 02467 02468 /* Line 1455 of yacc.c */ 02469 #line 419 "parser/faustparser.y" 02470 { (yyval.exp) = boxPrim1(sigFloatCast); ;} 02471 break; 02472 02473 case 81: 02474 02475 /* Line 1455 of yacc.c */ 02476 #line 421 "parser/faustparser.y" 02477 { (yyval.exp) = boxPrim2(sigAdd); ;} 02478 break; 02479 02480 case 82: 02481 02482 /* Line 1455 of yacc.c */ 02483 #line 422 "parser/faustparser.y" 02484 { (yyval.exp) = boxPrim2(sigSub); ;} 02485 break; 02486 02487 case 83: 02488 02489 /* Line 1455 of yacc.c */ 02490 #line 423 "parser/faustparser.y" 02491 { (yyval.exp) = boxPrim2(sigMul); ;} 02492 break; 02493 02494 case 84: 02495 02496 /* Line 1455 of yacc.c */ 02497 #line 424 "parser/faustparser.y" 02498 { (yyval.exp) = boxPrim2(sigDiv); ;} 02499 break; 02500 02501 case 85: 02502 02503 /* Line 1455 of yacc.c */ 02504 #line 425 "parser/faustparser.y" 02505 { (yyval.exp) = boxPrim2(sigRem); ;} 02506 break; 02507 02508 case 86: 02509 02510 /* Line 1455 of yacc.c */ 02511 #line 426 "parser/faustparser.y" 02512 { (yyval.exp) = boxPrim2(sigFixDelay); ;} 02513 break; 02514 02515 case 87: 02516 02517 /* Line 1455 of yacc.c */ 02518 #line 428 "parser/faustparser.y" 02519 { (yyval.exp) = boxPrim2(sigAND); ;} 02520 break; 02521 02522 case 88: 02523 02524 /* Line 1455 of yacc.c */ 02525 #line 429 "parser/faustparser.y" 02526 { (yyval.exp) = boxPrim2(sigOR); ;} 02527 break; 02528 02529 case 89: 02530 02531 /* Line 1455 of yacc.c */ 02532 #line 430 "parser/faustparser.y" 02533 { (yyval.exp) = boxPrim2(sigXOR); ;} 02534 break; 02535 02536 case 90: 02537 02538 /* Line 1455 of yacc.c */ 02539 #line 432 "parser/faustparser.y" 02540 { (yyval.exp) = boxPrim2(sigLeftShift); ;} 02541 break; 02542 02543 case 91: 02544 02545 /* Line 1455 of yacc.c */ 02546 #line 433 "parser/faustparser.y" 02547 { (yyval.exp) = boxPrim2(sigRightShift); ;} 02548 break; 02549 02550 case 92: 02551 02552 /* Line 1455 of yacc.c */ 02553 #line 435 "parser/faustparser.y" 02554 { (yyval.exp) = boxPrim2(sigLT); ;} 02555 break; 02556 02557 case 93: 02558 02559 /* Line 1455 of yacc.c */ 02560 #line 436 "parser/faustparser.y" 02561 { (yyval.exp) = boxPrim2(sigLE); ;} 02562 break; 02563 02564 case 94: 02565 02566 /* Line 1455 of yacc.c */ 02567 #line 437 "parser/faustparser.y" 02568 { (yyval.exp) = boxPrim2(sigGT); ;} 02569 break; 02570 02571 case 95: 02572 02573 /* Line 1455 of yacc.c */ 02574 #line 438 "parser/faustparser.y" 02575 { (yyval.exp) = boxPrim2(sigGE); ;} 02576 break; 02577 02578 case 96: 02579 02580 /* Line 1455 of yacc.c */ 02581 #line 439 "parser/faustparser.y" 02582 { (yyval.exp) = boxPrim2(sigEQ); ;} 02583 break; 02584 02585 case 97: 02586 02587 /* Line 1455 of yacc.c */ 02588 #line 440 "parser/faustparser.y" 02589 { (yyval.exp) = boxPrim2(sigNE); ;} 02590 break; 02591 02592 case 98: 02593 02594 /* Line 1455 of yacc.c */ 02595 #line 442 "parser/faustparser.y" 02596 { (yyval.exp) = boxPrim2(sigAttach); ;} 02597 break; 02598 02599 case 99: 02600 02601 /* Line 1455 of yacc.c */ 02602 #line 444 "parser/faustparser.y" 02603 { (yyval.exp) = gAcosPrim->box(); ;} 02604 break; 02605 02606 case 100: 02607 02608 /* Line 1455 of yacc.c */ 02609 #line 445 "parser/faustparser.y" 02610 { (yyval.exp) = gAsinPrim->box(); ;} 02611 break; 02612 02613 case 101: 02614 02615 /* Line 1455 of yacc.c */ 02616 #line 446 "parser/faustparser.y" 02617 { (yyval.exp) = gAtanPrim->box(); ;} 02618 break; 02619 02620 case 102: 02621 02622 /* Line 1455 of yacc.c */ 02623 #line 447 "parser/faustparser.y" 02624 { (yyval.exp) = gAtan2Prim->box(); ;} 02625 break; 02626 02627 case 103: 02628 02629 /* Line 1455 of yacc.c */ 02630 #line 448 "parser/faustparser.y" 02631 { (yyval.exp) = gCosPrim->box(); ;} 02632 break; 02633 02634 case 104: 02635 02636 /* Line 1455 of yacc.c */ 02637 #line 449 "parser/faustparser.y" 02638 { (yyval.exp) = gSinPrim->box(); ;} 02639 break; 02640 02641 case 105: 02642 02643 /* Line 1455 of yacc.c */ 02644 #line 450 "parser/faustparser.y" 02645 { (yyval.exp) = gTanPrim->box(); ;} 02646 break; 02647 02648 case 106: 02649 02650 /* Line 1455 of yacc.c */ 02651 #line 452 "parser/faustparser.y" 02652 { (yyval.exp) = gExpPrim->box(); ;} 02653 break; 02654 02655 case 107: 02656 02657 /* Line 1455 of yacc.c */ 02658 #line 453 "parser/faustparser.y" 02659 { (yyval.exp) = gLogPrim->box(); ;} 02660 break; 02661 02662 case 108: 02663 02664 /* Line 1455 of yacc.c */ 02665 #line 454 "parser/faustparser.y" 02666 { (yyval.exp) = gLog10Prim->box(); ;} 02667 break; 02668 02669 case 109: 02670 02671 /* Line 1455 of yacc.c */ 02672 #line 455 "parser/faustparser.y" 02673 { (yyval.exp) = gPowPrim->box(); ;} 02674 break; 02675 02676 case 110: 02677 02678 /* Line 1455 of yacc.c */ 02679 #line 456 "parser/faustparser.y" 02680 { (yyval.exp) = gPowPrim->box(); ;} 02681 break; 02682 02683 case 111: 02684 02685 /* Line 1455 of yacc.c */ 02686 #line 457 "parser/faustparser.y" 02687 { (yyval.exp) = gSqrtPrim->box(); ;} 02688 break; 02689 02690 case 112: 02691 02692 /* Line 1455 of yacc.c */ 02693 #line 459 "parser/faustparser.y" 02694 { (yyval.exp) = gAbsPrim->box(); ;} 02695 break; 02696 02697 case 113: 02698 02699 /* Line 1455 of yacc.c */ 02700 #line 460 "parser/faustparser.y" 02701 { (yyval.exp) = gMinPrim->box(); ;} 02702 break; 02703 02704 case 114: 02705 02706 /* Line 1455 of yacc.c */ 02707 #line 461 "parser/faustparser.y" 02708 { (yyval.exp) = gMaxPrim->box(); ;} 02709 break; 02710 02711 case 115: 02712 02713 /* Line 1455 of yacc.c */ 02714 #line 463 "parser/faustparser.y" 02715 { (yyval.exp) = gFmodPrim->box(); ;} 02716 break; 02717 02718 case 116: 02719 02720 /* Line 1455 of yacc.c */ 02721 #line 464 "parser/faustparser.y" 02722 { (yyval.exp) = gRemainderPrim->box(); ;} 02723 break; 02724 02725 case 117: 02726 02727 /* Line 1455 of yacc.c */ 02728 #line 466 "parser/faustparser.y" 02729 { (yyval.exp) = gFloorPrim->box(); ;} 02730 break; 02731 02732 case 118: 02733 02734 /* Line 1455 of yacc.c */ 02735 #line 467 "parser/faustparser.y" 02736 { (yyval.exp) = gCeilPrim->box(); ;} 02737 break; 02738 02739 case 119: 02740 02741 /* Line 1455 of yacc.c */ 02742 #line 468 "parser/faustparser.y" 02743 { (yyval.exp) = gRintPrim->box(); ;} 02744 break; 02745 02746 case 120: 02747 02748 /* Line 1455 of yacc.c */ 02749 #line 471 "parser/faustparser.y" 02750 { (yyval.exp) = boxPrim3(sigReadOnlyTable); ;} 02751 break; 02752 02753 case 121: 02754 02755 /* Line 1455 of yacc.c */ 02756 #line 472 "parser/faustparser.y" 02757 { (yyval.exp) = boxPrim5(sigWriteReadTable); ;} 02758 break; 02759 02760 case 122: 02761 02762 /* Line 1455 of yacc.c */ 02763 #line 474 "parser/faustparser.y" 02764 { (yyval.exp) = boxPrim3(sigSelect2); ;} 02765 break; 02766 02767 case 123: 02768 02769 /* Line 1455 of yacc.c */ 02770 #line 475 "parser/faustparser.y" 02771 { (yyval.exp) = boxPrim4(sigSelect3); ;} 02772 break; 02773 02774 case 124: 02775 02776 /* Line 1455 of yacc.c */ 02777 #line 477 "parser/faustparser.y" 02778 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02779 break; 02780 02781 case 125: 02782 02783 /* Line 1455 of yacc.c */ 02784 #line 478 "parser/faustparser.y" 02785 { (yyval.exp) = boxSeq(boxPar(boxInt(0),(yyvsp[(2) - (2)].exp)),boxPrim2(sigSub)); ;} 02786 break; 02787 02788 case 126: 02789 02790 /* Line 1455 of yacc.c */ 02791 #line 480 "parser/faustparser.y" 02792 { (yyval.exp) = (yyvsp[(2) - (3)].exp); ;} 02793 break; 02794 02795 case 127: 02796 02797 /* Line 1455 of yacc.c */ 02798 #line 482 "parser/faustparser.y" 02799 { (yyval.exp) = buildBoxAbstr((yyvsp[(3) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 02800 break; 02801 02802 case 128: 02803 02804 /* Line 1455 of yacc.c */ 02805 #line 484 "parser/faustparser.y" 02806 { (yyval.exp) = boxCase(checkRulelist((yyvsp[(3) - (4)].exp))); ;} 02807 break; 02808 02809 case 129: 02810 02811 /* Line 1455 of yacc.c */ 02812 #line 486 "parser/faustparser.y" 02813 { (yyval.exp) = boxFFun((yyvsp[(1) - (1)].exp)); ;} 02814 break; 02815 02816 case 130: 02817 02818 /* Line 1455 of yacc.c */ 02819 #line 487 "parser/faustparser.y" 02820 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02821 break; 02822 02823 case 131: 02824 02825 /* Line 1455 of yacc.c */ 02826 #line 488 "parser/faustparser.y" 02827 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02828 break; 02829 02830 case 132: 02831 02832 /* Line 1455 of yacc.c */ 02833 #line 489 "parser/faustparser.y" 02834 { (yyval.exp) = boxComponent((yyvsp[(3) - (4)].exp)); ;} 02835 break; 02836 02837 case 133: 02838 02839 /* Line 1455 of yacc.c */ 02840 #line 490 "parser/faustparser.y" 02841 { (yyval.exp) = boxLibrary((yyvsp[(3) - (4)].exp)); ;} 02842 break; 02843 02844 case 134: 02845 02846 /* Line 1455 of yacc.c */ 02847 #line 491 "parser/faustparser.y" 02848 { (yyval.exp) = boxWithLocalDef(boxEnvironment(),formatDefinitions((yyvsp[(3) - (4)].exp))); ;} 02849 break; 02850 02851 case 135: 02852 02853 /* Line 1455 of yacc.c */ 02854 #line 493 "parser/faustparser.y" 02855 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02856 break; 02857 02858 case 136: 02859 02860 /* Line 1455 of yacc.c */ 02861 #line 494 "parser/faustparser.y" 02862 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02863 break; 02864 02865 case 137: 02866 02867 /* Line 1455 of yacc.c */ 02868 #line 495 "parser/faustparser.y" 02869 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02870 break; 02871 02872 case 138: 02873 02874 /* Line 1455 of yacc.c */ 02875 #line 496 "parser/faustparser.y" 02876 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02877 break; 02878 02879 case 139: 02880 02881 /* Line 1455 of yacc.c */ 02882 #line 497 "parser/faustparser.y" 02883 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02884 break; 02885 02886 case 140: 02887 02888 /* Line 1455 of yacc.c */ 02889 #line 498 "parser/faustparser.y" 02890 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02891 break; 02892 02893 case 141: 02894 02895 /* Line 1455 of yacc.c */ 02896 #line 499 "parser/faustparser.y" 02897 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02898 break; 02899 02900 case 142: 02901 02902 /* Line 1455 of yacc.c */ 02903 #line 500 "parser/faustparser.y" 02904 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02905 break; 02906 02907 case 143: 02908 02909 /* Line 1455 of yacc.c */ 02910 #line 501 "parser/faustparser.y" 02911 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02912 break; 02913 02914 case 144: 02915 02916 /* Line 1455 of yacc.c */ 02917 #line 502 "parser/faustparser.y" 02918 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02919 break; 02920 02921 case 145: 02922 02923 /* Line 1455 of yacc.c */ 02924 #line 504 "parser/faustparser.y" 02925 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02926 break; 02927 02928 case 146: 02929 02930 /* Line 1455 of yacc.c */ 02931 #line 505 "parser/faustparser.y" 02932 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02933 break; 02934 02935 case 147: 02936 02937 /* Line 1455 of yacc.c */ 02938 #line 506 "parser/faustparser.y" 02939 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02940 break; 02941 02942 case 148: 02943 02944 /* Line 1455 of yacc.c */ 02945 #line 507 "parser/faustparser.y" 02946 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 02947 break; 02948 02949 case 149: 02950 02951 /* Line 1455 of yacc.c */ 02952 #line 511 "parser/faustparser.y" 02953 { (yyval.exp) = boxIdent(yytext); ;} 02954 break; 02955 02956 case 150: 02957 02958 /* Line 1455 of yacc.c */ 02959 #line 514 "parser/faustparser.y" 02960 { (yyval.exp) = tree(yytext); ;} 02961 break; 02962 02963 case 151: 02964 02965 /* Line 1455 of yacc.c */ 02966 #line 519 "parser/faustparser.y" 02967 { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;} 02968 break; 02969 02970 case 152: 02971 02972 /* Line 1455 of yacc.c */ 02973 #line 520 "parser/faustparser.y" 02974 { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;} 02975 break; 02976 02977 case 153: 02978 02979 /* Line 1455 of yacc.c */ 02980 #line 523 "parser/faustparser.y" 02981 { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02982 break; 02983 02984 case 154: 02985 02986 /* Line 1455 of yacc.c */ 02987 #line 524 "parser/faustparser.y" 02988 { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02989 break; 02990 02991 case 155: 02992 02993 /* Line 1455 of yacc.c */ 02994 #line 525 "parser/faustparser.y" 02995 { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 02996 break; 02997 02998 case 156: 02999 03000 /* Line 1455 of yacc.c */ 03001 #line 526 "parser/faustparser.y" 03002 { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); ;} 03003 break; 03004 03005 case 157: 03006 03007 /* Line 1455 of yacc.c */ 03008 #line 527 "parser/faustparser.y" 03009 { (yyval.exp) = (yyvsp[(1) - (1)].exp); ;} 03010 break; 03011 03012 case 158: 03013 03014 /* Line 1455 of yacc.c */ 03015 #line 530 "parser/faustparser.y" 03016 { (yyval.exp) = tree(yytext); ;} 03017 break; 03018 03019 case 159: 03020 03021 /* Line 1455 of yacc.c */ 03022 #line 533 "parser/faustparser.y" 03023 { (yyval.exp) = unquote(yytext); ;} 03024 break; 03025 03026 case 160: 03027 03028 /* Line 1455 of yacc.c */ 03029 #line 536 "parser/faustparser.y" 03030 { (yyval.exp) = tree(yytext); ;} 03031 break; 03032 03033 case 161: 03034 03035 /* Line 1455 of yacc.c */ 03036 #line 537 "parser/faustparser.y" 03037 { (yyval.exp) = tree(yytext); ;} 03038 break; 03039 03040 case 162: 03041 03042 /* Line 1455 of yacc.c */ 03043 #line 543 "parser/faustparser.y" 03044 { (yyval.exp) = boxIPar((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 03045 break; 03046 03047 case 163: 03048 03049 /* Line 1455 of yacc.c */ 03050 #line 547 "parser/faustparser.y" 03051 { (yyval.exp) = boxISeq((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 03052 break; 03053 03054 case 164: 03055 03056 /* Line 1455 of yacc.c */ 03057 #line 551 "parser/faustparser.y" 03058 { (yyval.exp) = boxISum((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 03059 break; 03060 03061 case 165: 03062 03063 /* Line 1455 of yacc.c */ 03064 #line 555 "parser/faustparser.y" 03065 { (yyval.exp) = boxIProd((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 03066 break; 03067 03068 case 166: 03069 03070 /* Line 1455 of yacc.c */ 03071 #line 562 "parser/faustparser.y" 03072 { (yyval.exp) = ffunction((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 03073 break; 03074 03075 case 167: 03076 03077 /* Line 1455 of yacc.c */ 03078 #line 566 "parser/faustparser.y" 03079 { (yyval.exp) = boxFConst((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); ;} 03080 break; 03081 03082 case 168: 03083 03084 /* Line 1455 of yacc.c */ 03085 #line 569 "parser/faustparser.y" 03086 { (yyval.exp) = boxFVar((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); ;} 03087 break; 03088 03089 case 169: 03090 03091 /* Line 1455 of yacc.c */ 03092 #line 573 "parser/faustparser.y" 03093 { (yyval.exp) = boxButton((yyvsp[(3) - (4)].exp)); ;} 03094 break; 03095 03096 case 170: 03097 03098 /* Line 1455 of yacc.c */ 03099 #line 576 "parser/faustparser.y" 03100 { (yyval.exp) = boxCheckbox((yyvsp[(3) - (4)].exp)); ;} 03101 break; 03102 03103 case 171: 03104 03105 /* Line 1455 of yacc.c */ 03106 #line 580 "parser/faustparser.y" 03107 { (yyval.exp) = boxVSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;} 03108 break; 03109 03110 case 172: 03111 03112 /* Line 1455 of yacc.c */ 03113 #line 583 "parser/faustparser.y" 03114 { (yyval.exp) = boxHSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;} 03115 break; 03116 03117 case 173: 03118 03119 /* Line 1455 of yacc.c */ 03120 #line 586 "parser/faustparser.y" 03121 { (yyval.exp) = boxNumEntry((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); ;} 03122 break; 03123 03124 case 174: 03125 03126 /* Line 1455 of yacc.c */ 03127 #line 589 "parser/faustparser.y" 03128 { (yyval.exp) = boxVGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;} 03129 break; 03130 03131 case 175: 03132 03133 /* Line 1455 of yacc.c */ 03134 #line 592 "parser/faustparser.y" 03135 { (yyval.exp) = boxHGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;} 03136 break; 03137 03138 case 176: 03139 03140 /* Line 1455 of yacc.c */ 03141 #line 595 "parser/faustparser.y" 03142 { (yyval.exp) = boxTGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); ;} 03143 break; 03144 03145 case 177: 03146 03147 /* Line 1455 of yacc.c */ 03148 #line 599 "parser/faustparser.y" 03149 { (yyval.exp) = boxVBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 03150 break; 03151 03152 case 178: 03153 03154 /* Line 1455 of yacc.c */ 03155 #line 602 "parser/faustparser.y" 03156 { (yyval.exp) = boxHBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); ;} 03157 break; 03158 03159 case 179: 03160 03161 /* Line 1455 of yacc.c */ 03162 #line 607 "parser/faustparser.y" 03163 { (yyval.exp) = cons((yyvsp[(1) - (5)].exp), cons((yyvsp[(2) - (5)].exp), (yyvsp[(4) - (5)].exp))); ;} 03164 break; 03165 03166 case 180: 03167 03168 /* Line 1455 of yacc.c */ 03169 #line 608 "parser/faustparser.y" 03170 { (yyval.exp) = cons((yyvsp[(1) - (4)].exp), cons((yyvsp[(2) - (4)].exp), nil)); ;} 03171 break; 03172 03173 case 181: 03174 03175 /* Line 1455 of yacc.c */ 03176 #line 611 "parser/faustparser.y" 03177 { (yyval.exp) = tree(yytext); ;} 03178 break; 03179 03180 case 182: 03181 03182 /* Line 1455 of yacc.c */ 03183 #line 614 "parser/faustparser.y" 03184 { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;} 03185 break; 03186 03187 case 183: 03188 03189 /* Line 1455 of yacc.c */ 03190 #line 615 "parser/faustparser.y" 03191 { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); ;} 03192 break; 03193 03194 case 184: 03195 03196 /* Line 1455 of yacc.c */ 03197 #line 618 "parser/faustparser.y" 03198 { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); ;} 03199 break; 03200 03201 case 185: 03202 03203 /* Line 1455 of yacc.c */ 03204 #line 619 "parser/faustparser.y" 03205 { (yyval.exp) = cons((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); ;} 03206 break; 03207 03208 case 186: 03209 03210 /* Line 1455 of yacc.c */ 03211 #line 623 "parser/faustparser.y" 03212 { (yyval.exp) = cons((yyvsp[(2) - (6)].exp),(yyvsp[(5) - (6)].exp)); ;} 03213 break; 03214 03215 case 187: 03216 03217 /* Line 1455 of yacc.c */ 03218 #line 626 "parser/faustparser.y" 03219 { (yyval.exp) = tree(0); ;} 03220 break; 03221 03222 case 188: 03223 03224 /* Line 1455 of yacc.c */ 03225 #line 627 "parser/faustparser.y" 03226 { (yyval.exp) = tree(1); ;} 03227 break; 03228 03229 03230 03231 /* Line 1455 of yacc.c */ 03232 #line 3233 "parser/faustparser.cpp" 03233 default: break; 03234 } 03235 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 03236 03237 YYPOPSTACK (yylen); 03238 yylen = 0; 03239 YY_STACK_PRINT (yyss, yyssp); 03240 03241 *++yyvsp = yyval; 03242 03243 /* Now `shift' the result of the reduction. Determine what state 03244 that goes to, based on the state we popped back to and the rule 03245 number reduced by. */ 03246 03247 yyn = yyr1[yyn]; 03248 03249 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 03250 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 03251 yystate = yytable[yystate]; 03252 else 03253 yystate = yydefgoto[yyn - YYNTOKENS]; 03254 03255 goto yynewstate; 03256 03257 03258 /*------------------------------------. 03259 | yyerrlab -- here on detecting error | 03260 `------------------------------------*/ 03261 yyerrlab: 03262 /* If not already recovering from an error, report this error. */ 03263 if (!yyerrstatus) 03264 { 03265 ++yynerrs; 03266 #if ! YYERROR_VERBOSE 03267 yyerror (YY_("syntax error")); 03268 #else 03269 { 03270 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 03271 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 03272 { 03273 YYSIZE_T yyalloc = 2 * yysize; 03274 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 03275 yyalloc = YYSTACK_ALLOC_MAXIMUM; 03276 if (yymsg != yymsgbuf) 03277 YYSTACK_FREE (yymsg); 03278 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 03279 if (yymsg) 03280 yymsg_alloc = yyalloc; 03281 else 03282 { 03283 yymsg = yymsgbuf; 03284 yymsg_alloc = sizeof yymsgbuf; 03285 } 03286 } 03287 03288 if (0 < yysize && yysize <= yymsg_alloc) 03289 { 03290 (void) yysyntax_error (yymsg, yystate, yychar); 03291 yyerror (yymsg); 03292 } 03293 else 03294 { 03295 yyerror (YY_("syntax error")); 03296 if (yysize != 0) 03297 goto yyexhaustedlab; 03298 } 03299 } 03300 #endif 03301 } 03302 03303 03304 03305 if (yyerrstatus == 3) 03306 { 03307 /* If just tried and failed to reuse lookahead token after an 03308 error, discard it. */ 03309 03310 if (yychar <= YYEOF) 03311 { 03312 /* Return failure if at end of input. */ 03313 if (yychar == YYEOF) 03314 YYABORT; 03315 } 03316 else 03317 { 03318 yydestruct ("Error: discarding", 03319 yytoken, &yylval); 03320 yychar = YYEMPTY; 03321 } 03322 } 03323 03324 /* Else will try to reuse lookahead token after shifting the error 03325 token. */ 03326 goto yyerrlab1; 03327 03328 03329 /*---------------------------------------------------. 03330 | yyerrorlab -- error raised explicitly by YYERROR. | 03331 `---------------------------------------------------*/ 03332 yyerrorlab: 03333 03334 /* Pacify compilers like GCC when the user code never invokes 03335 YYERROR and the label yyerrorlab therefore never appears in user 03336 code. */ 03337 if (/*CONSTCOND*/ 0) 03338 goto yyerrorlab; 03339 03340 /* Do not reclaim the symbols of the rule which action triggered 03341 this YYERROR. */ 03342 YYPOPSTACK (yylen); 03343 yylen = 0; 03344 YY_STACK_PRINT (yyss, yyssp); 03345 yystate = *yyssp; 03346 goto yyerrlab1; 03347 03348 03349 /*-------------------------------------------------------------. 03350 | yyerrlab1 -- common code for both syntax error and YYERROR. | 03351 `-------------------------------------------------------------*/ 03352 yyerrlab1: 03353 yyerrstatus = 3; /* Each real token shifted decrements this. */ 03354 03355 for (;;) 03356 { 03357 yyn = yypact[yystate]; 03358 if (yyn != YYPACT_NINF) 03359 { 03360 yyn += YYTERROR; 03361 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 03362 { 03363 yyn = yytable[yyn]; 03364 if (0 < yyn) 03365 break; 03366 } 03367 } 03368 03369 /* Pop the current state because it cannot handle the error token. */ 03370 if (yyssp == yyss) 03371 YYABORT; 03372 03373 03374 yydestruct ("Error: popping", 03375 yystos[yystate], yyvsp); 03376 YYPOPSTACK (1); 03377 yystate = *yyssp; 03378 YY_STACK_PRINT (yyss, yyssp); 03379 } 03380 03381 *++yyvsp = yylval; 03382 03383 03384 /* Shift the error token. */ 03385 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 03386 03387 yystate = yyn; 03388 goto yynewstate; 03389 03390 03391 /*-------------------------------------. 03392 | yyacceptlab -- YYACCEPT comes here. | 03393 `-------------------------------------*/ 03394 yyacceptlab: 03395 yyresult = 0; 03396 goto yyreturn; 03397 03398 /*-----------------------------------. 03399 | yyabortlab -- YYABORT comes here. | 03400 `-----------------------------------*/ 03401 yyabortlab: 03402 yyresult = 1; 03403 goto yyreturn; 03404 03405 #if !defined(yyoverflow) || YYERROR_VERBOSE 03406 /*-------------------------------------------------. 03407 | yyexhaustedlab -- memory exhaustion comes here. | 03408 `-------------------------------------------------*/ 03409 yyexhaustedlab: 03410 yyerror (YY_("memory exhausted")); 03411 yyresult = 2; 03412 /* Fall through. */ 03413 #endif 03414 03415 yyreturn: 03416 if (yychar != YYEMPTY) 03417 yydestruct ("Cleanup: discarding lookahead", 03418 yytoken, &yylval); 03419 /* Do not reclaim the symbols of the rule which action triggered 03420 this YYABORT or YYACCEPT. */ 03421 YYPOPSTACK (yylen); 03422 YY_STACK_PRINT (yyss, yyssp); 03423 while (yyssp != yyss) 03424 { 03425 yydestruct ("Cleanup: popping", 03426 yystos[*yyssp], yyvsp); 03427 YYPOPSTACK (1); 03428 } 03429 #ifndef yyoverflow 03430 if (yyss != yyssa) 03431 YYSTACK_FREE (yyss); 03432 #endif 03433 #if YYERROR_VERBOSE 03434 if (yymsg != yymsgbuf) 03435 YYSTACK_FREE (yymsg); 03436 #endif 03437 /* Make sure YYID is used. */ 03438 return YYID (yyresult); 03439 }
string gArchFile |
Definition at line 130 of file main.cpp.
Referenced by main(), and process_cmdline().
int gBalancedSwitch = 0 |
Definition at line 123 of file main.cpp.
Referenced by process_cmdline().
bool gDeepFirstSwitch = false |
Definition at line 137 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 |
bool gDrawPSSwitch = false |
Definition at line 117 of file main.cpp.
Referenced by main(), and process_cmdline().
bool gDrawSVGSwitch = false |
Definition at line 118 of file main.cpp.
Referenced by main(), and process_cmdline().
string gFaustDirectory |
Definition at line 103 of file main.cpp.
Referenced by fopensearch(), initFaustDirectories(), and open_arch_stream().
string gFaustSuperDirectory |
Definition at line 102 of file main.cpp.
Referenced by fopensearch(), initFaustDirectories(), and open_arch_stream().
string gFaustSuperSuperDirectory |
Definition at line 101 of file main.cpp.
Referenced by fopensearch(), initFaustDirectories(), and open_arch_stream().
int gFloatSize = 1 |
int gFoldThreshold = 25 |
Definition at line 124 of file main.cpp.
Referenced by drawSchema(), and process_cmdline().
bool gGraphSwitch = false |
Definition at line 116 of file main.cpp.
Referenced by main(), and process_cmdline().
bool gGroupTaskSwitch = false |
Definition at line 143 of file main.cpp.
Referenced by Klass::buildTasksList(), Klass::printLoopGraphOpenMP(), Klass::printLoopGraphScheduler(), Klass::printLoopGraphVector(), and process_cmdline().
bool gHelpSwitch = false |
Definition at line 112 of file main.cpp.
Referenced by main(), and process_cmdline().
list<string> gInputFiles |
Definition at line 132 of file main.cpp.
Referenced by initFaustDirectories(), main(), and process_cmdline().
bool gLatexDocSwitch = true |
bool gLessTempSwitch = false |
Definition at line 128 of file main.cpp.
Referenced by process_cmdline().
string gMasterDirectory |
Definition at line 105 of file main.cpp.
Referenced by fopensearch(), and initFaustDirectories().
string gMasterDocument |
Definition at line 104 of file main.cpp.
Referenced by declareMetadata(), initFaustDirectories(), main(), printdoccontent(), printfaustlistings(), and printlatexheader().
string gMasterName |
Definition at line 106 of file main.cpp.
Referenced by initFaustDirectories(), and printlatexheader().
int gMaxCopyDelay = 16 |
Definition at line 129 of file main.cpp.
Referenced by VectorCompiler::dlineLoop(), SchedulerCompiler::dlineLoop(), ScalarCompiler::generateDelayLine(), ScalarCompiler::generateDelayVecNoTemp(), VectorCompiler::generateFixDelay(), ScalarCompiler::generateFixDelay(), and process_cmdline().
int gMaxNameSize = 40 |
Definition at line 125 of file main.cpp.
Referenced by process_cmdline(), and setDefNameProperty().
map<Tree, set<Tree> > gMetaDataSet |
Definition at line 91 of file main.cpp.
Referenced by declareAutoDoc(), declareMetadata(), main(), printDocMetadata(), printheader(), Klass::println(), and Klass::printMetadata().
bool gOpenMPSwitch = false |
Definition at line 141 of file main.cpp.
Referenced by Klass::printComputeMethod(), Klass::printIncludeFile(), and process_cmdline().
string gOutputFile |
Definition at line 131 of file main.cpp.
Referenced by main(), and process_cmdline().
bool gPatternEvalMode = false |
Definition at line 134 of file main.cpp.
Referenced by evalIdDef(), and evalPattern().
bool gPrintDocSwitch = false |
Definition at line 120 of file main.cpp.
Referenced by main(), and process_cmdline().
bool gPrintFileListSwitch = false |
Definition at line 151 of file main.cpp.
Referenced by main(), and process_cmdline().
bool gPrintXMLSwitch = false |
Definition at line 119 of file main.cpp.
Referenced by main(), and process_cmdline().
bool gSchedulerSwitch = false |
Definition at line 142 of file main.cpp.
Referenced by main(), Klass::printComputeMethod(), Klass::println(), and process_cmdline().
bool gShadowBlur = false |
Definition at line 115 of file main.cpp.
Referenced by process_cmdline(), SVGDev::rect(), and SVGDev::SVGDev().
bool gSimpleNames = false |
Definition at line 126 of file main.cpp.
Referenced by applyList(), and process_cmdline().
bool gSimplifyDiagrams = false |
Definition at line 127 of file main.cpp.
Referenced by process_cmdline(), and real_a2sb().
bool gStripDocSwitch = false |
Definition at line 122 of file main.cpp.
Referenced by printfaustlisting(), process_cmdline(), and yyparse().
int gTimeout = 0 |
Definition at line 147 of file main.cpp.
Referenced by main(), and process_cmdline().
bool gUIMacroSwitch = false |
Definition at line 145 of file main.cpp.
Referenced by Klass::println(), and process_cmdline().
int gVecSize = 32 |
Definition at line 138 of file main.cpp.
Referenced by VectorCompiler::dlineLoop(), SchedulerCompiler::dlineLoop(), VectorCompiler::generateFixDelay(), Klass::printComputeMethodOpenMP(), Klass::printComputeMethodScheduler(), Klass::printComputeMethodVectorFaster(), Klass::printComputeMethodVectorSimple(), process_cmdline(), VectorCompiler::vectorLoop(), and SchedulerCompiler::vectorLoop().
int gVectorLoopVariant = 0 |
Definition at line 139 of file main.cpp.
Referenced by Klass::printComputeMethod(), and process_cmdline().
bool gVectorSwitch = false |
Definition at line 136 of file main.cpp.
Referenced by main(), Klass::printComputeMethod(), Klass::printLoopGraphInternal(), Klass::printLoopGraphVector(), and process_cmdline().
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().