FAUST compiler  0.9.9.6b8
Functions | Variables
sourcereader.cpp File Reference
#include <iostream>
#include <map>
#include <list>
#include <string>
#include "sourcereader.hh"
#include "sourcefetcher.hh"
#include "enrobage.hh"
#include "ppbox.hh"
Include dependency graph for sourcereader.cpp:

Go to the source code of this file.

Functions

int yyparse ()
 
void yyrestart (FILE *new_file)
 Immediately switch to a different input stream. More...
 
struct yy_buffer_stateyy_scan_string (const char *yy_str)
 
static bool standardArgList (Tree args)
 Checks an argument list for containing only standard identifiers, no patterns and is linear. More...
 
static void printPatternError (Tree lhs1, Tree rhs1, Tree lhs2, Tree rhs2)
 
Tree checkRulelist (Tree lr)
 
static Tree makeDefinition (list< Tree > &variants)
 Transforms a list of variants (arglist.body) into an abstraction or a boxCase. More...
 
Tree formatDefinitions (Tree rldef)
 Formats a list of raw definitions represented by triplets <name,arglist,body> into abstractions or pattern matching rules when appropriate. More...
 
void declareMetadata (Tree key, Tree value)
 
void declareDoc (Tree t)
 

Variables

map< Tree, set< Tree > > gMetaDataSet
 
string gMasterDocument
 
vector< TreegDocVector
 Contains <mdoc> parsed trees: DOCTXT, DOCEQN, DOCDGM. More...
 
bool gLatexDocSwitch
 
int yyerr
 
int yydebug
 
FILE * yyin
 
int yylineno
 
const char * yyfilename
 
Tree gResult
 
Tree gResult2
 

Function Documentation

Tree checkRulelist ( Tree  lr)

Definition at line 76 of file sourcereader.cpp.

References hd(), isNil(), len(), printPatternError(), and tl().

Referenced by yyparse().

77 {
78  Tree lrules = lr;
79  if (isNil(lrules)) { cerr << "ERROR : a case expression can't be empty" << endl; exit(1); }
80  // first pattern used as a reference
81  Tree lhs1 = hd(hd(lrules));
82  Tree rhs1 = tl(hd(lrules));
83  int npat = len(lhs1);
84  lrules = tl(lrules);
85  while (! isNil(lrules)) {
86  Tree lhs2 = hd(hd(lrules));
87  Tree rhs2 = tl(hd(lrules));
88  if (npat != len(lhs2)) {
89  printPatternError(lhs1,rhs1,lhs2,rhs2);
90  exit(1);
91  }
92 
93  lhs1 = lhs2;
94  rhs1 = rhs2;
95  lrules = tl(lrules);
96  }
97  return lr;
98 }
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Tree hd(Tree l)
Definition: list.hh:133
bool isNil(Tree l)
Definition: list.hh:137
static void printPatternError(Tree lhs1, Tree rhs1, Tree lhs2, Tree rhs2)
int len(Tree l)
Definition: list.cpp:198
Tree tl(Tree l)
Definition: list.hh:134

Here is the call graph for this function:

Here is the caller graph for this function:

void declareDoc ( Tree  t)

Definition at line 353 of file sourcereader.cpp.

References gDocVector.

Referenced by declareAutoDoc(), and yyparse().

354 {
355  //gLatexDocSwitch = true;
356  gDocVector.push_back(t);
357 }
vector< Tree > gDocVector
Contains parsed trees: DOCTXT, DOCEQN, DOCDGM.
Definition: doc.cpp:109

Here is the caller graph for this function:

void declareMetadata ( Tree  key,
Tree  value 
)

Definition at line 338 of file sourcereader.cpp.

References gMasterDocument, gMetaDataSet, tree(), tree2str(), and yyfilename.

Referenced by yyparse().

339 {
340  if (gMasterDocument == yyfilename) {
341  // inside master document, no prefix needed to declare metadata
342  gMetaDataSet[key].insert(value);
343  } else {
344  string fkey(yyfilename);
345  fkey += "/";
346  fkey += tree2str(key);
347  gMetaDataSet[tree(fkey.c_str())].insert(value);
348  }
349  //cout << "Master " << gMasterDocument << ", file " << yyfilename << " : declare " << *key << "," << *value << endl;
350 }
const char * yyfilename
Definition: errormsg.cpp:30
string gMasterDocument
Definition: main.cpp:104
Tree tree(const Node &n)
Definition: tree.hh:186
map< Tree, set< Tree > > gMetaDataSet
Definition: main.cpp:91
const char * tree2str(Tree t)
if t has a node of type symbol, return its name otherwise error
Definition: tree.cpp:278

Here is the call graph for this function:

Here is the caller graph for this function:

Tree formatDefinitions ( Tree  rldef)

Formats a list of raw definitions represented by triplets <name,arglist,body> into abstractions or pattern matching rules when appropriate.

Parameters
rldeflist of raw definitions in reverse order
Returns
the list of formatted definitions

Definition at line 149 of file sourcereader.cpp.

References cons(), hd(), isImportFile(), isNil(), makeDefinition(), nil, and tl().

Referenced by yyparse().

150 {
151  map<Tree,list<Tree> > dic;
152  map<Tree,list<Tree> >::iterator p;
153  Tree ldef2 = nil;
154  Tree file;
155 
156  //cout << "Format definitions " << *rldef << endl;
157  // collects the definitions in a dictionnary
158  while (!isNil(rldef)) {
159  Tree def = hd(rldef);
160  rldef = tl(rldef);
161  if (isImportFile(def, file)) {
162  ldef2 = cons(def,ldef2);
163  } else if (!isNil(def)) {
164  //cout << " def : " << *def << endl;
165  dic[hd(def)].push_front(tl(def));
166  }
167  }
168 
169  // produce the definitions
170 
171  for (p=dic.begin(); p!=dic.end(); p++) {
172  ldef2 = cons (cons(p->first, makeDefinition(p->second)), ldef2);
173  }
174 
175  //cout << "list of definitions : " << *ldef2 << endl;
176  return ldef2;
177 
178 }
bool isImportFile(Tree s, Tree &filename)
Definition: boxes.cpp:301
Tree cons(Tree a, Tree b)
Definition: list.hh:124
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Tree hd(Tree l)
Definition: list.hh:133
bool isNil(Tree l)
Definition: list.hh:137
static Tree makeDefinition(list< Tree > &variants)
Transforms a list of variants (arglist.body) into an abstraction or a boxCase.
Tree nil
Definition: list.cpp:116
Tree tl(Tree l)
Definition: list.hh:134

Here is the call graph for this function:

Here is the caller graph for this function:

static Tree makeDefinition ( list< Tree > &  variants)
static

Transforms a list of variants (arglist.body) into an abstraction or a boxCase.

Parameters
variantslist of variants (arglist.body)
Returns
the corresponding box expression

Definition at line 107 of file sourcereader.cpp.

References boxCase(), buildBoxAbstr(), cons(), hd(), isNil(), len(), nil, printPatternError(), standardArgList(), and tl().

Referenced by formatDefinitions().

108 {
109  if (variants.size() == 1) {
110  Tree rhs = *(variants.begin());
111  Tree args= hd(rhs);
112  Tree body= tl(rhs);
113 
114  if (isNil(args)) {
115  return body;
116  } else if (standardArgList(args)) {
117  return buildBoxAbstr(args, body);
118  } else {
119  return boxCase(cons(rhs,nil));
120  }
121  } else {
122  list<Tree>::iterator p;
123  Tree l = nil;
124  Tree prev = *variants.begin();
125  int npat = len(hd(prev));
126  for (p=variants.begin(); p!=variants.end(); p++) {
127  Tree cur = *p;
128  if (npat != len(hd(cur))) {
129  printPatternError(hd(prev), tl(prev), hd(cur), tl(cur));
130  exit(1);
131  }
132  prev = cur;
133  l = cons(*p,l);
134  }
135  return boxCase(l);
136  }
137 }
Tree cons(Tree a, Tree b)
Definition: list.hh:124
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
Definition: tree.hh:109
Tree hd(Tree l)
Definition: list.hh:133
bool isNil(Tree l)
Definition: list.hh:137
static bool standardArgList(Tree args)
Checks an argument list for containing only standard identifiers, no patterns and is linear...
static void printPatternError(Tree lhs1, Tree rhs1, Tree lhs2, Tree rhs2)
Tree nil
Definition: list.cpp:116
Tree buildBoxAbstr(Tree largs, Tree body)
Definition: boxes.cpp:208
Tree boxCase(Tree rules)
Definition: boxes.cpp:615
int len(Tree l)
Definition: list.cpp:198
Tree tl(Tree l)
Definition: list.hh:134

Here is the call graph for this function:

Here is the caller graph for this function:

static void printPatternError ( Tree  lhs1,
Tree  rhs1,
Tree  lhs2,
Tree  rhs2 
)
static

Definition at line 67 of file sourcereader.cpp.

References reverse().

Referenced by checkRulelist(), and makeDefinition().

68 {
69  cerr << "ERROR : inconsistent number of parameters in pattern-matching rule: "
70  << boxpp(reverse(lhs2)) << " => " << boxpp(rhs2) << ";"
71  << " previous rule was: "
72  << boxpp(reverse(lhs1)) << " => " << boxpp(rhs1) << ";"
73  << endl;
74 }
Tree reverse(Tree l)
Definition: list.cpp:240
Definition: ppbox.hh:58

Here is the call graph for this function:

Here is the caller graph for this function:

static bool standardArgList ( Tree  args)
static

Checks an argument list for containing only standard identifiers, no patterns and is linear.

Parameters
argsthe argument list to check
Returns
true if it contains only identifiers

Definition at line 55 of file sourcereader.cpp.

References hd(), isBoxIdent(), isList(), and tl().

Referenced by makeDefinition().

56 {
57  map<Tree,int> L;
58  while (isList(args)) {
59  if (!isBoxIdent(hd(args))) return false;
60  if (++L[hd(args)] > 1) return false;
61  args = tl(args);
62  }
63  return true;
64 }
bool isBoxIdent(Tree t)
Definition: boxes.cpp:58
Tree hd(Tree l)
Definition: list.hh:133
bool isList(Tree l)
Definition: list.hh:138
Tree tl(Tree l)
Definition: list.hh:134

Here is the call graph for this function:

Here is the caller graph for this function:

struct yy_buffer_state* yy_scan_string ( const char *  yy_str)

Referenced by SourceReader::parse().

Here is the caller graph for this function:

int yyparse ( )

Definition at line 1748 of file faustparser.cpp.

References YYSTYPE::b, xtended::box(), boxAccess(), boxButton(), boxCase(), boxCheckbox(), boxComponent(), boxCut(), boxEnvironment(), boxFConst(), boxFFun(), boxFVar(), boxHBargraph(), boxHGroup(), boxHSlider(), boxIdent(), boxInputs(), boxInt(), boxIPar(), boxIProd(), boxISeq(), boxISum(), boxLibrary(), boxMerge(), boxModifLocalDef(), boxNumEntry(), boxOutputs(), boxPar(), boxPrim1(), boxPrim2(), boxPrim3(), boxPrim4(), boxPrim5(), boxReal(), boxRec(), boxSeq(), boxSplit(), boxTGroup(), boxVBargraph(), boxVGroup(), boxVSlider(), boxWaveform(), boxWire(), boxWithLocalDef(), buildBoxAbstr(), buildBoxAppl(), checkRulelist(), cons(), YYSTYPE::cppstr, declareDoc(), declareMetadata(), docDgm(), docEqn(), docLst(), docMtd(), docNtc(), docTxt(), YYSTYPE::exp, ffunction(), formatDefinitions(), gAbsPrim, gAcosPrim, gAsinPrim, gAtan2Prim, gAtanPrim, gCeilPrim, gCosPrim, gExpPrim, gFloorPrim, gFmodPrim, gLog10Prim, gLogPrim, gLstDependenciesSwitch, gLstDistributedSwitch, gMaxPrim, gMinPrim, gPowPrim, gRemainderPrim, gResult, gRintPrim, gSinPrim, gSqrtPrim, gStripDocSwitch, gTanPrim, gWaveForm, importFile(), nil, setDefProp(), sigAdd(), sigAND(), sigAttach(), sigDelay1(), sigDiv(), sigEQ(), sigFixDelay(), sigFloatCast(), sigGE(), sigGT(), sigIntCast(), sigLE(), sigLeftShift(), sigLT(), sigMul(), sigNE(), sigOR(), sigPrefix(), sigReadOnlyTable(), sigRem(), sigRightShift(), sigSelect2(), sigSelect3(), sigSub(), sigWriteReadTable(), sigXOR(), tree(), unquote(), YY_, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerr, yyerror(), yyfilename, YYFINAL, YYID, YYINITDEPTH, YYLAST, yylen, YYLEX, yylineno, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, yyalloc::yyss_alloc, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, YYSYNTAX_ERROR, yytable, yytable_value_is_error, YYTERROR, yytext, YYTRANSLATE, and yyalloc::yyvs_alloc.

Referenced by SourceReader::parse().

1752 {
1753  int yystate;
1754  /* Number of tokens to shift before error messages enabled. */
1755  int yyerrstatus;
1756 
1757  /* The stacks and their tools:
1758  `yyss': related to states.
1759  `yyvs': related to semantic values.
1760 
1761  Refer to the stacks through separate pointers, to allow yyoverflow
1762  to reallocate them elsewhere. */
1763 
1764  /* The state stack. */
1765  yytype_int16 yyssa[YYINITDEPTH];
1766  yytype_int16 *yyss;
1767  yytype_int16 *yyssp;
1768 
1769  /* The semantic value stack. */
1770  YYSTYPE yyvsa[YYINITDEPTH];
1771  YYSTYPE *yyvs;
1772  YYSTYPE *yyvsp;
1773 
1774  YYSIZE_T yystacksize;
1775 
1776  int yyn;
1777  int yyresult;
1778  /* Lookahead token as an internal (translated) token number. */
1779  int yytoken = 0;
1780  /* The variables used to return semantic value and location from the
1781  action routines. */
1782  YYSTYPE yyval;
1783 
1784 #if YYERROR_VERBOSE
1785  /* Buffer for error messages, and its allocated size. */
1786  char yymsgbuf[128];
1787  char *yymsg = yymsgbuf;
1788  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1789 #endif
1790 
1791 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1792 
1793  /* The number of symbols on the RHS of the reduced rule.
1794  Keep to zero when no symbol should be popped. */
1795  int yylen = 0;
1796 
1797  yyssp = yyss = yyssa;
1798  yyvsp = yyvs = yyvsa;
1799  yystacksize = YYINITDEPTH;
1800 
1801  YYDPRINTF ((stderr, "Starting parse\n"));
1802 
1803  yystate = 0;
1804  yyerrstatus = 0;
1805  yynerrs = 0;
1806  yychar = YYEMPTY; /* Cause a token to be read. */
1807  goto yysetstate;
1808 
1809 /*------------------------------------------------------------.
1810 | yynewstate -- Push a new state, which is found in yystate. |
1811 `------------------------------------------------------------*/
1812  yynewstate:
1813  /* In all cases, when you get here, the value and location stacks
1814  have just been pushed. So pushing a state here evens the stacks. */
1815  yyssp++;
1816 
1817  yysetstate:
1818  *yyssp = yystate;
1819 
1820  if (yyss + yystacksize - 1 <= yyssp)
1821  {
1822  /* Get the current used size of the three stacks, in elements. */
1823  YYSIZE_T yysize = yyssp - yyss + 1;
1824 
1825 #ifdef yyoverflow
1826  {
1827  /* Give user a chance to reallocate the stack. Use copies of
1828  these so that the &'s don't force the real ones into
1829  memory. */
1830  YYSTYPE *yyvs1 = yyvs;
1831  yytype_int16 *yyss1 = yyss;
1832 
1833  /* Each stack pointer address is followed by the size of the
1834  data in use in that stack, in bytes. This used to be a
1835  conditional around just the two extra args, but that might
1836  be undefined if yyoverflow is a macro. */
1837  yyoverflow (YY_("memory exhausted"),
1838  &yyss1, yysize * sizeof (*yyssp),
1839  &yyvs1, yysize * sizeof (*yyvsp),
1840  &yystacksize);
1841 
1842  yyss = yyss1;
1843  yyvs = yyvs1;
1844  }
1845 #else /* no yyoverflow */
1846 # ifndef YYSTACK_RELOCATE
1847  goto yyexhaustedlab;
1848 # else
1849  /* Extend the stack our own way. */
1850  if (YYMAXDEPTH <= yystacksize)
1851  goto yyexhaustedlab;
1852  yystacksize *= 2;
1853  if (YYMAXDEPTH < yystacksize)
1854  yystacksize = YYMAXDEPTH;
1855 
1856  {
1857  yytype_int16 *yyss1 = yyss;
1858  union yyalloc *yyptr =
1859  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1860  if (! yyptr)
1861  goto yyexhaustedlab;
1862  YYSTACK_RELOCATE (yyss_alloc, yyss);
1863  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1864 # undef YYSTACK_RELOCATE
1865  if (yyss1 != yyssa)
1866  YYSTACK_FREE (yyss1);
1867  }
1868 # endif
1869 #endif /* no yyoverflow */
1870 
1871  yyssp = yyss + yysize - 1;
1872  yyvsp = yyvs + yysize - 1;
1873 
1874  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1875  (unsigned long int) yystacksize));
1876 
1877  if (yyss + yystacksize - 1 <= yyssp)
1878  YYABORT;
1879  }
1880 
1881  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1882 
1883  if (yystate == YYFINAL)
1884  YYACCEPT;
1885 
1886  goto yybackup;
1887 
1888 /*-----------.
1889 | yybackup. |
1890 `-----------*/
1891 yybackup:
1892 
1893  /* Do appropriate processing given the current state. Read a
1894  lookahead token if we need one and don't already have one. */
1895 
1896  /* First try to decide what to do without reference to lookahead token. */
1897  yyn = yypact[yystate];
1898  if (yypact_value_is_default (yyn))
1899  goto yydefault;
1900 
1901  /* Not known => get a lookahead token if don't already have one. */
1902 
1903  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1904  if (yychar == YYEMPTY)
1905  {
1906  YYDPRINTF ((stderr, "Reading a token: "));
1907  yychar = YYLEX;
1908  }
1909 
1910  if (yychar <= YYEOF)
1911  {
1912  yychar = yytoken = YYEOF;
1913  YYDPRINTF ((stderr, "Now at end of input.\n"));
1914  }
1915  else
1916  {
1917  yytoken = YYTRANSLATE (yychar);
1918  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1919  }
1920 
1921  /* If the proper action on seeing token YYTOKEN is to reduce or to
1922  detect an error, take that action. */
1923  yyn += yytoken;
1924  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1925  goto yydefault;
1926  yyn = yytable[yyn];
1927  if (yyn <= 0)
1928  {
1929  if (yytable_value_is_error (yyn))
1930  goto yyerrlab;
1931  yyn = -yyn;
1932  goto yyreduce;
1933  }
1934 
1935  /* Count tokens shifted since error; after three, turn off error
1936  status. */
1937  if (yyerrstatus)
1938  yyerrstatus--;
1939 
1940  /* Shift the lookahead token. */
1941  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1942 
1943  /* Discard the shifted token. */
1944  yychar = YYEMPTY;
1945 
1946  yystate = yyn;
1948  *++yyvsp = yylval;
1950 
1951  goto yynewstate;
1952 
1953 
1954 /*-----------------------------------------------------------.
1955 | yydefault -- do the default action for the current state. |
1956 `-----------------------------------------------------------*/
1957 yydefault:
1958  yyn = yydefact[yystate];
1959  if (yyn == 0)
1960  goto yyerrlab;
1961  goto yyreduce;
1962 
1963 
1964 /*-----------------------------.
1965 | yyreduce -- Do a reduction. |
1966 `-----------------------------*/
1967 yyreduce:
1968  /* yyn is the number of a rule to reduce with. */
1969  yylen = yyr2[yyn];
1970 
1971  /* If YYLEN is nonzero, implement the default value of the action:
1972  `$$ = $1'.
1973 
1974  Otherwise, the following line sets YYVAL to garbage.
1975  This behavior is undocumented and Bison
1976  users should not rely upon it. Assigning to YYVAL
1977  unconditionally makes the parser a bit smaller, and it avoids a
1978  GCC warning that YYVAL may be used uninitialized. */
1979  yyval = yyvsp[1-yylen];
1980 
1981 
1982  YY_REDUCE_PRINT (yyn);
1983  switch (yyn)
1984  {
1985  case 2:
1986 /* Line 1787 of yacc.c */
1987 #line 310 "parser/faustparser.y"
1988  { (yyval.exp) = (yyvsp[(1) - (1)].exp); gResult = formatDefinitions((yyval.exp)); }
1989  break;
1990 
1991  case 3:
1992 /* Line 1787 of yacc.c */
1993 #line 313 "parser/faustparser.y"
1994  { (yyval.exp) = nil; }
1995  break;
1996 
1997  case 4:
1998 /* Line 1787 of yacc.c */
1999 #line 314 "parser/faustparser.y"
2000  { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); }
2001  break;
2002 
2003  case 5:
2004 /* Line 1787 of yacc.c */
2005 #line 316 "parser/faustparser.y"
2006  { (yyval.exp) = nil; }
2007  break;
2008 
2009  case 6:
2010 /* Line 1787 of yacc.c */
2011 #line 317 "parser/faustparser.y"
2012  { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); }
2013  break;
2014 
2015  case 7:
2016 /* Line 1787 of yacc.c */
2017 #line 324 "parser/faustparser.y"
2018  { gWaveForm.push_back((yyvsp[(1) - (1)].exp)); }
2019  break;
2020 
2021  case 8:
2022 /* Line 1787 of yacc.c */
2023 #line 325 "parser/faustparser.y"
2024  { gWaveForm.push_back((yyvsp[(3) - (3)].exp)); }
2025  break;
2026 
2027  case 9:
2028 /* Line 1787 of yacc.c */
2029 #line 328 "parser/faustparser.y"
2030  { (yyval.exp) = boxInt(atoi(yytext)); }
2031  break;
2032 
2033  case 10:
2034 /* Line 1787 of yacc.c */
2035 #line 329 "parser/faustparser.y"
2036  { (yyval.exp) = boxReal(atof(yytext)); }
2037  break;
2038 
2039  case 11:
2040 /* Line 1787 of yacc.c */
2041 #line 330 "parser/faustparser.y"
2042  { (yyval.exp) = boxInt (atoi(yytext)); }
2043  break;
2044 
2045  case 12:
2046 /* Line 1787 of yacc.c */
2047 #line 331 "parser/faustparser.y"
2048  { (yyval.exp) = boxReal(atof(yytext)); }
2049  break;
2050 
2051  case 13:
2052 /* Line 1787 of yacc.c */
2053 #line 332 "parser/faustparser.y"
2054  { (yyval.exp) = boxInt ( -atoi(yytext) ); }
2055  break;
2056 
2057  case 14:
2058 /* Line 1787 of yacc.c */
2059 #line 333 "parser/faustparser.y"
2060  { (yyval.exp) = boxReal( -atof(yytext) ); }
2061  break;
2062 
2063  case 15:
2064 /* Line 1787 of yacc.c */
2065 #line 337 "parser/faustparser.y"
2066  { (yyval.exp) = importFile((yyvsp[(3) - (5)].exp)); }
2067  break;
2068 
2069  case 16:
2070 /* Line 1787 of yacc.c */
2071 #line 338 "parser/faustparser.y"
2072  { declareMetadata((yyvsp[(2) - (4)].exp),(yyvsp[(3) - (4)].exp)); (yyval.exp) = nil; }
2073  break;
2074 
2075  case 17:
2076 /* Line 1787 of yacc.c */
2077 #line 339 "parser/faustparser.y"
2078  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2079  break;
2080 
2081  case 18:
2082 /* Line 1787 of yacc.c */
2083 #line 340 "parser/faustparser.y"
2084  { declareDoc((yyvsp[(2) - (3)].exp)); (yyval.exp) = nil; /* cerr << "Yacc : doc : " << *$2 << endl; */ }
2085  break;
2086 
2087  case 19:
2088 /* Line 1787 of yacc.c */
2089 #line 343 "parser/faustparser.y"
2090  { (yyval.exp) = nil; }
2091  break;
2092 
2093  case 20:
2094 /* Line 1787 of yacc.c */
2095 #line 344 "parser/faustparser.y"
2096  { (yyval.exp) = cons ((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); }
2097  break;
2098 
2099  case 21:
2100 /* Line 1787 of yacc.c */
2101 #line 347 "parser/faustparser.y"
2102  { (yyval.exp) = docTxt((yyvsp[(1) - (1)].cppstr)->c_str()); delete (yyvsp[(1) - (1)].cppstr); }
2103  break;
2104 
2105  case 22:
2106 /* Line 1787 of yacc.c */
2107 #line 348 "parser/faustparser.y"
2108  { (yyval.exp) = docEqn((yyvsp[(1) - (1)].exp)); }
2109  break;
2110 
2111  case 23:
2112 /* Line 1787 of yacc.c */
2113 #line 349 "parser/faustparser.y"
2114  { (yyval.exp) = docDgm((yyvsp[(1) - (1)].exp)); }
2115  break;
2116 
2117  case 24:
2118 /* Line 1787 of yacc.c */
2119 #line 350 "parser/faustparser.y"
2120  { (yyval.exp) = docNtc(); }
2121  break;
2122 
2123  case 25:
2124 /* Line 1787 of yacc.c */
2125 #line 351 "parser/faustparser.y"
2126  { (yyval.exp) = docLst(); }
2127  break;
2128 
2129  case 26:
2130 /* Line 1787 of yacc.c */
2131 #line 352 "parser/faustparser.y"
2132  { (yyval.exp) = docMtd((yyvsp[(1) - (1)].exp)); }
2133  break;
2134 
2135  case 27:
2136 /* Line 1787 of yacc.c */
2137 #line 355 "parser/faustparser.y"
2138  { (yyval.cppstr) = new string(); }
2139  break;
2140 
2141  case 28:
2142 /* Line 1787 of yacc.c */
2143 #line 356 "parser/faustparser.y"
2144  { (yyval.cppstr) = &((yyvsp[(1) - (2)].cppstr)->append(yytext)); }
2145  break;
2146 
2147  case 29:
2148 /* Line 1787 of yacc.c */
2149 #line 359 "parser/faustparser.y"
2150  { (yyval.exp) = (yyvsp[(2) - (3)].exp); }
2151  break;
2152 
2153  case 30:
2154 /* Line 1787 of yacc.c */
2155 #line 362 "parser/faustparser.y"
2156  { (yyval.exp) = (yyvsp[(2) - (3)].exp); }
2157  break;
2158 
2159  case 31:
2160 /* Line 1787 of yacc.c */
2161 #line 365 "parser/faustparser.y"
2162  { }
2163  break;
2164 
2165  case 32:
2166 /* Line 1787 of yacc.c */
2167 #line 368 "parser/faustparser.y"
2168  { }
2169  break;
2170 
2171  case 33:
2172 /* Line 1787 of yacc.c */
2173 #line 371 "parser/faustparser.y"
2174  { }
2175  break;
2176 
2177  case 34:
2178 /* Line 1787 of yacc.c */
2179 #line 372 "parser/faustparser.y"
2180  { }
2181  break;
2182 
2183  case 35:
2184 /* Line 1787 of yacc.c */
2185 #line 375 "parser/faustparser.y"
2186  { gLstDependenciesSwitch = (yyvsp[(4) - (5)].b); }
2187  break;
2188 
2189  case 36:
2190 /* Line 1787 of yacc.c */
2191 #line 376 "parser/faustparser.y"
2192  { gStripDocSwitch = (yyvsp[(4) - (5)].b); gStripDocSwitch==true ? gStripDocSwitch=false : gStripDocSwitch=true; }
2193  break;
2194 
2195  case 37:
2196 /* Line 1787 of yacc.c */
2197 #line 377 "parser/faustparser.y"
2198  { gLstDistributedSwitch = (yyvsp[(4) - (5)].b); }
2199  break;
2200 
2201  case 38:
2202 /* Line 1787 of yacc.c */
2203 #line 380 "parser/faustparser.y"
2204  { (yyval.b) = true; }
2205  break;
2206 
2207  case 39:
2208 /* Line 1787 of yacc.c */
2209 #line 381 "parser/faustparser.y"
2210  { (yyval.b) = false; }
2211  break;
2212 
2213  case 40:
2214 /* Line 1787 of yacc.c */
2215 #line 384 "parser/faustparser.y"
2216  { (yyval.exp) = (yyvsp[(2) - (3)].exp); }
2217  break;
2218 
2219  case 41:
2220 /* Line 1787 of yacc.c */
2221 #line 387 "parser/faustparser.y"
2222  { (yyval.exp) = cons((yyvsp[(1) - (7)].exp),cons((yyvsp[(3) - (7)].exp),(yyvsp[(6) - (7)].exp))); }
2223  break;
2224 
2225  case 42:
2226 /* Line 1787 of yacc.c */
2227 #line 388 "parser/faustparser.y"
2228  { (yyval.exp) = cons((yyvsp[(1) - (4)].exp),cons(nil,(yyvsp[(3) - (4)].exp))); }
2229  break;
2230 
2231  case 43:
2232 /* Line 1787 of yacc.c */
2233 #line 389 "parser/faustparser.y"
2234  { (yyval.exp) = nil; yyerr++; }
2235  break;
2236 
2237  case 44:
2238 /* Line 1787 of yacc.c */
2239 #line 392 "parser/faustparser.y"
2240  { (yyval.exp)=(yyvsp[(1) - (1)].exp); setDefProp((yyvsp[(1) - (1)].exp), yyfilename, yylineno); }
2241  break;
2242 
2243  case 45:
2244 /* Line 1787 of yacc.c */
2245 #line 395 "parser/faustparser.y"
2246  { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); }
2247  break;
2248 
2249  case 46:
2250 /* Line 1787 of yacc.c */
2251 #line 396 "parser/faustparser.y"
2252  { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); }
2253  break;
2254 
2255  case 47:
2256 /* Line 1787 of yacc.c */
2257 #line 399 "parser/faustparser.y"
2258  { (yyval.exp) = boxWithLocalDef((yyvsp[(1) - (5)].exp),formatDefinitions((yyvsp[(4) - (5)].exp))); }
2259  break;
2260 
2261  case 48:
2262 /* Line 1787 of yacc.c */
2263 #line 400 "parser/faustparser.y"
2264  { (yyval.exp) = boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2265  break;
2266 
2267  case 49:
2268 /* Line 1787 of yacc.c */
2269 #line 401 "parser/faustparser.y"
2270  { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2271  break;
2272 
2273  case 50:
2274 /* Line 1787 of yacc.c */
2275 #line 402 "parser/faustparser.y"
2276  { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2277  break;
2278 
2279  case 51:
2280 /* Line 1787 of yacc.c */
2281 #line 403 "parser/faustparser.y"
2282  { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2283  break;
2284 
2285  case 52:
2286 /* Line 1787 of yacc.c */
2287 #line 404 "parser/faustparser.y"
2288  { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2289  break;
2290 
2291  case 53:
2292 /* Line 1787 of yacc.c */
2293 #line 405 "parser/faustparser.y"
2294  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2295  break;
2296 
2297  case 54:
2298 /* Line 1787 of yacc.c */
2299 #line 408 "parser/faustparser.y"
2300  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAdd)); }
2301  break;
2302 
2303  case 55:
2304 /* Line 1787 of yacc.c */
2305 #line 409 "parser/faustparser.y"
2306  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigSub)); }
2307  break;
2308 
2309  case 56:
2310 /* Line 1787 of yacc.c */
2311 #line 410 "parser/faustparser.y"
2312  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigMul)); }
2313  break;
2314 
2315  case 57:
2316 /* Line 1787 of yacc.c */
2317 #line 411 "parser/faustparser.y"
2318  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigDiv)); }
2319  break;
2320 
2321  case 58:
2322 /* Line 1787 of yacc.c */
2323 #line 412 "parser/faustparser.y"
2324  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRem)); }
2325  break;
2326 
2327  case 59:
2328 /* Line 1787 of yacc.c */
2329 #line 413 "parser/faustparser.y"
2330  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),gPowPrim->box()); }
2331  break;
2332 
2333  case 60:
2334 /* Line 1787 of yacc.c */
2335 #line 414 "parser/faustparser.y"
2336  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigFixDelay)); }
2337  break;
2338 
2339  case 61:
2340 /* Line 1787 of yacc.c */
2341 #line 415 "parser/faustparser.y"
2342  { (yyval.exp) = boxSeq((yyvsp[(1) - (2)].exp),boxPrim1(sigDelay1)); }
2343  break;
2344 
2345  case 62:
2346 /* Line 1787 of yacc.c */
2347 #line 416 "parser/faustparser.y"
2348  { (yyval.exp) = boxAccess((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2349  break;
2350 
2351  case 63:
2352 /* Line 1787 of yacc.c */
2353 #line 418 "parser/faustparser.y"
2354  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigAND)); }
2355  break;
2356 
2357  case 64:
2358 /* Line 1787 of yacc.c */
2359 #line 419 "parser/faustparser.y"
2360  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigOR)); }
2361  break;
2362 
2363  case 65:
2364 /* Line 1787 of yacc.c */
2365 #line 420 "parser/faustparser.y"
2366  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigXOR)); }
2367  break;
2368 
2369  case 66:
2370 /* Line 1787 of yacc.c */
2371 #line 422 "parser/faustparser.y"
2372  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLeftShift)); }
2373  break;
2374 
2375  case 67:
2376 /* Line 1787 of yacc.c */
2377 #line 423 "parser/faustparser.y"
2378  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigRightShift)); }
2379  break;
2380 
2381  case 68:
2382 /* Line 1787 of yacc.c */
2383 #line 425 "parser/faustparser.y"
2384  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLT)); }
2385  break;
2386 
2387  case 69:
2388 /* Line 1787 of yacc.c */
2389 #line 426 "parser/faustparser.y"
2390  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigLE)); }
2391  break;
2392 
2393  case 70:
2394 /* Line 1787 of yacc.c */
2395 #line 427 "parser/faustparser.y"
2396  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGT)); }
2397  break;
2398 
2399  case 71:
2400 /* Line 1787 of yacc.c */
2401 #line 428 "parser/faustparser.y"
2402  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigGE)); }
2403  break;
2404 
2405  case 72:
2406 /* Line 1787 of yacc.c */
2407 #line 429 "parser/faustparser.y"
2408  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigEQ)); }
2409  break;
2410 
2411  case 73:
2412 /* Line 1787 of yacc.c */
2413 #line 430 "parser/faustparser.y"
2414  { (yyval.exp) = boxSeq(boxPar((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)),boxPrim2(sigNE)); }
2415  break;
2416 
2417  case 74:
2418 /* Line 1787 of yacc.c */
2419 #line 432 "parser/faustparser.y"
2420  { (yyval.exp) = buildBoxAppl((yyvsp[(1) - (4)].exp),(yyvsp[(3) - (4)].exp)); }
2421  break;
2422 
2423  case 75:
2424 /* Line 1787 of yacc.c */
2425 #line 433 "parser/faustparser.y"
2426  { (yyval.exp) = boxModifLocalDef((yyvsp[(1) - (4)].exp),formatDefinitions((yyvsp[(3) - (4)].exp))); }
2427  break;
2428 
2429  case 76:
2430 /* Line 1787 of yacc.c */
2431 #line 435 "parser/faustparser.y"
2432  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2433  break;
2434 
2435  case 77:
2436 /* Line 1787 of yacc.c */
2437 #line 438 "parser/faustparser.y"
2438  { (yyval.exp) = boxInt(atoi(yytext)); }
2439  break;
2440 
2441  case 78:
2442 /* Line 1787 of yacc.c */
2443 #line 439 "parser/faustparser.y"
2444  { (yyval.exp) = boxReal(atof(yytext)); }
2445  break;
2446 
2447  case 79:
2448 /* Line 1787 of yacc.c */
2449 #line 441 "parser/faustparser.y"
2450  { (yyval.exp) = boxInt (atoi(yytext)); }
2451  break;
2452 
2453  case 80:
2454 /* Line 1787 of yacc.c */
2455 #line 442 "parser/faustparser.y"
2456  { (yyval.exp) = boxReal(atof(yytext)); }
2457  break;
2458 
2459  case 81:
2460 /* Line 1787 of yacc.c */
2461 #line 444 "parser/faustparser.y"
2462  { (yyval.exp) = boxInt ( -atoi(yytext) ); }
2463  break;
2464 
2465  case 82:
2466 /* Line 1787 of yacc.c */
2467 #line 445 "parser/faustparser.y"
2468  { (yyval.exp) = boxReal( -atof(yytext) ); }
2469  break;
2470 
2471  case 83:
2472 /* Line 1787 of yacc.c */
2473 #line 447 "parser/faustparser.y"
2474  { (yyval.exp) = boxWire(); }
2475  break;
2476 
2477  case 84:
2478 /* Line 1787 of yacc.c */
2479 #line 448 "parser/faustparser.y"
2480  { (yyval.exp) = boxCut(); }
2481  break;
2482 
2483  case 85:
2484 /* Line 1787 of yacc.c */
2485 #line 450 "parser/faustparser.y"
2486  { (yyval.exp) = boxPrim1(sigDelay1); }
2487  break;
2488 
2489  case 86:
2490 /* Line 1787 of yacc.c */
2491 #line 451 "parser/faustparser.y"
2492  { (yyval.exp) = boxPrim2(sigPrefix); }
2493  break;
2494 
2495  case 87:
2496 /* Line 1787 of yacc.c */
2497 #line 453 "parser/faustparser.y"
2498  { (yyval.exp) = boxPrim1(sigIntCast); }
2499  break;
2500 
2501  case 88:
2502 /* Line 1787 of yacc.c */
2503 #line 454 "parser/faustparser.y"
2504  { (yyval.exp) = boxPrim1(sigFloatCast); }
2505  break;
2506 
2507  case 89:
2508 /* Line 1787 of yacc.c */
2509 #line 456 "parser/faustparser.y"
2510  { (yyval.exp) = boxPrim2(sigAdd); }
2511  break;
2512 
2513  case 90:
2514 /* Line 1787 of yacc.c */
2515 #line 457 "parser/faustparser.y"
2516  { (yyval.exp) = boxPrim2(sigSub); }
2517  break;
2518 
2519  case 91:
2520 /* Line 1787 of yacc.c */
2521 #line 458 "parser/faustparser.y"
2522  { (yyval.exp) = boxPrim2(sigMul); }
2523  break;
2524 
2525  case 92:
2526 /* Line 1787 of yacc.c */
2527 #line 459 "parser/faustparser.y"
2528  { (yyval.exp) = boxPrim2(sigDiv); }
2529  break;
2530 
2531  case 93:
2532 /* Line 1787 of yacc.c */
2533 #line 460 "parser/faustparser.y"
2534  { (yyval.exp) = boxPrim2(sigRem); }
2535  break;
2536 
2537  case 94:
2538 /* Line 1787 of yacc.c */
2539 #line 461 "parser/faustparser.y"
2540  { (yyval.exp) = boxPrim2(sigFixDelay); }
2541  break;
2542 
2543  case 95:
2544 /* Line 1787 of yacc.c */
2545 #line 463 "parser/faustparser.y"
2546  { (yyval.exp) = boxPrim2(sigAND); }
2547  break;
2548 
2549  case 96:
2550 /* Line 1787 of yacc.c */
2551 #line 464 "parser/faustparser.y"
2552  { (yyval.exp) = boxPrim2(sigOR); }
2553  break;
2554 
2555  case 97:
2556 /* Line 1787 of yacc.c */
2557 #line 465 "parser/faustparser.y"
2558  { (yyval.exp) = boxPrim2(sigXOR); }
2559  break;
2560 
2561  case 98:
2562 /* Line 1787 of yacc.c */
2563 #line 467 "parser/faustparser.y"
2564  { (yyval.exp) = boxPrim2(sigLeftShift); }
2565  break;
2566 
2567  case 99:
2568 /* Line 1787 of yacc.c */
2569 #line 468 "parser/faustparser.y"
2570  { (yyval.exp) = boxPrim2(sigRightShift); }
2571  break;
2572 
2573  case 100:
2574 /* Line 1787 of yacc.c */
2575 #line 470 "parser/faustparser.y"
2576  { (yyval.exp) = boxPrim2(sigLT); }
2577  break;
2578 
2579  case 101:
2580 /* Line 1787 of yacc.c */
2581 #line 471 "parser/faustparser.y"
2582  { (yyval.exp) = boxPrim2(sigLE); }
2583  break;
2584 
2585  case 102:
2586 /* Line 1787 of yacc.c */
2587 #line 472 "parser/faustparser.y"
2588  { (yyval.exp) = boxPrim2(sigGT); }
2589  break;
2590 
2591  case 103:
2592 /* Line 1787 of yacc.c */
2593 #line 473 "parser/faustparser.y"
2594  { (yyval.exp) = boxPrim2(sigGE); }
2595  break;
2596 
2597  case 104:
2598 /* Line 1787 of yacc.c */
2599 #line 474 "parser/faustparser.y"
2600  { (yyval.exp) = boxPrim2(sigEQ); }
2601  break;
2602 
2603  case 105:
2604 /* Line 1787 of yacc.c */
2605 #line 475 "parser/faustparser.y"
2606  { (yyval.exp) = boxPrim2(sigNE); }
2607  break;
2608 
2609  case 106:
2610 /* Line 1787 of yacc.c */
2611 #line 477 "parser/faustparser.y"
2612  { (yyval.exp) = boxPrim2(sigAttach); }
2613  break;
2614 
2615  case 107:
2616 /* Line 1787 of yacc.c */
2617 #line 479 "parser/faustparser.y"
2618  { (yyval.exp) = gAcosPrim->box(); }
2619  break;
2620 
2621  case 108:
2622 /* Line 1787 of yacc.c */
2623 #line 480 "parser/faustparser.y"
2624  { (yyval.exp) = gAsinPrim->box(); }
2625  break;
2626 
2627  case 109:
2628 /* Line 1787 of yacc.c */
2629 #line 481 "parser/faustparser.y"
2630  { (yyval.exp) = gAtanPrim->box(); }
2631  break;
2632 
2633  case 110:
2634 /* Line 1787 of yacc.c */
2635 #line 482 "parser/faustparser.y"
2636  { (yyval.exp) = gAtan2Prim->box(); }
2637  break;
2638 
2639  case 111:
2640 /* Line 1787 of yacc.c */
2641 #line 483 "parser/faustparser.y"
2642  { (yyval.exp) = gCosPrim->box(); }
2643  break;
2644 
2645  case 112:
2646 /* Line 1787 of yacc.c */
2647 #line 484 "parser/faustparser.y"
2648  { (yyval.exp) = gSinPrim->box(); }
2649  break;
2650 
2651  case 113:
2652 /* Line 1787 of yacc.c */
2653 #line 485 "parser/faustparser.y"
2654  { (yyval.exp) = gTanPrim->box(); }
2655  break;
2656 
2657  case 114:
2658 /* Line 1787 of yacc.c */
2659 #line 487 "parser/faustparser.y"
2660  { (yyval.exp) = gExpPrim->box(); }
2661  break;
2662 
2663  case 115:
2664 /* Line 1787 of yacc.c */
2665 #line 488 "parser/faustparser.y"
2666  { (yyval.exp) = gLogPrim->box(); }
2667  break;
2668 
2669  case 116:
2670 /* Line 1787 of yacc.c */
2671 #line 489 "parser/faustparser.y"
2672  { (yyval.exp) = gLog10Prim->box(); }
2673  break;
2674 
2675  case 117:
2676 /* Line 1787 of yacc.c */
2677 #line 490 "parser/faustparser.y"
2678  { (yyval.exp) = gPowPrim->box(); }
2679  break;
2680 
2681  case 118:
2682 /* Line 1787 of yacc.c */
2683 #line 491 "parser/faustparser.y"
2684  { (yyval.exp) = gPowPrim->box(); }
2685  break;
2686 
2687  case 119:
2688 /* Line 1787 of yacc.c */
2689 #line 492 "parser/faustparser.y"
2690  { (yyval.exp) = gSqrtPrim->box(); }
2691  break;
2692 
2693  case 120:
2694 /* Line 1787 of yacc.c */
2695 #line 494 "parser/faustparser.y"
2696  { (yyval.exp) = gAbsPrim->box(); }
2697  break;
2698 
2699  case 121:
2700 /* Line 1787 of yacc.c */
2701 #line 495 "parser/faustparser.y"
2702  { (yyval.exp) = gMinPrim->box(); }
2703  break;
2704 
2705  case 122:
2706 /* Line 1787 of yacc.c */
2707 #line 496 "parser/faustparser.y"
2708  { (yyval.exp) = gMaxPrim->box(); }
2709  break;
2710 
2711  case 123:
2712 /* Line 1787 of yacc.c */
2713 #line 498 "parser/faustparser.y"
2714  { (yyval.exp) = gFmodPrim->box(); }
2715  break;
2716 
2717  case 124:
2718 /* Line 1787 of yacc.c */
2719 #line 499 "parser/faustparser.y"
2720  { (yyval.exp) = gRemainderPrim->box(); }
2721  break;
2722 
2723  case 125:
2724 /* Line 1787 of yacc.c */
2725 #line 501 "parser/faustparser.y"
2726  { (yyval.exp) = gFloorPrim->box(); }
2727  break;
2728 
2729  case 126:
2730 /* Line 1787 of yacc.c */
2731 #line 502 "parser/faustparser.y"
2732  { (yyval.exp) = gCeilPrim->box(); }
2733  break;
2734 
2735  case 127:
2736 /* Line 1787 of yacc.c */
2737 #line 503 "parser/faustparser.y"
2738  { (yyval.exp) = gRintPrim->box(); }
2739  break;
2740 
2741  case 128:
2742 /* Line 1787 of yacc.c */
2743 #line 506 "parser/faustparser.y"
2744  { (yyval.exp) = boxPrim3(sigReadOnlyTable); }
2745  break;
2746 
2747  case 129:
2748 /* Line 1787 of yacc.c */
2749 #line 507 "parser/faustparser.y"
2750  { (yyval.exp) = boxPrim5(sigWriteReadTable); }
2751  break;
2752 
2753  case 130:
2754 /* Line 1787 of yacc.c */
2755 #line 509 "parser/faustparser.y"
2756  { (yyval.exp) = boxPrim3(sigSelect2); }
2757  break;
2758 
2759  case 131:
2760 /* Line 1787 of yacc.c */
2761 #line 510 "parser/faustparser.y"
2762  { (yyval.exp) = boxPrim4(sigSelect3); }
2763  break;
2764 
2765  case 132:
2766 /* Line 1787 of yacc.c */
2767 #line 512 "parser/faustparser.y"
2768  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2769  break;
2770 
2771  case 133:
2772 /* Line 1787 of yacc.c */
2773 #line 513 "parser/faustparser.y"
2774  { (yyval.exp) = boxSeq(boxPar(boxInt(0),(yyvsp[(2) - (2)].exp)),boxPrim2(sigSub)); }
2775  break;
2776 
2777  case 134:
2778 /* Line 1787 of yacc.c */
2779 #line 515 "parser/faustparser.y"
2780  { (yyval.exp) = (yyvsp[(2) - (3)].exp); }
2781  break;
2782 
2783  case 135:
2784 /* Line 1787 of yacc.c */
2785 #line 517 "parser/faustparser.y"
2786  { (yyval.exp) = buildBoxAbstr((yyvsp[(3) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
2787  break;
2788 
2789  case 136:
2790 /* Line 1787 of yacc.c */
2791 #line 519 "parser/faustparser.y"
2792  { (yyval.exp) = boxCase(checkRulelist((yyvsp[(3) - (4)].exp))); }
2793  break;
2794 
2795  case 137:
2796 /* Line 1787 of yacc.c */
2797 #line 521 "parser/faustparser.y"
2798  { (yyval.exp) = boxFFun((yyvsp[(1) - (1)].exp)); }
2799  break;
2800 
2801  case 138:
2802 /* Line 1787 of yacc.c */
2803 #line 522 "parser/faustparser.y"
2804  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2805  break;
2806 
2807  case 139:
2808 /* Line 1787 of yacc.c */
2809 #line 523 "parser/faustparser.y"
2810  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2811  break;
2812 
2813  case 140:
2814 /* Line 1787 of yacc.c */
2815 #line 524 "parser/faustparser.y"
2816  { (yyval.exp) = boxComponent((yyvsp[(3) - (4)].exp)); }
2817  break;
2818 
2819  case 141:
2820 /* Line 1787 of yacc.c */
2821 #line 525 "parser/faustparser.y"
2822  { (yyval.exp) = boxLibrary((yyvsp[(3) - (4)].exp)); }
2823  break;
2824 
2825  case 142:
2826 /* Line 1787 of yacc.c */
2827 #line 526 "parser/faustparser.y"
2828  { (yyval.exp) = boxWithLocalDef(boxEnvironment(),formatDefinitions((yyvsp[(3) - (4)].exp))); }
2829  break;
2830 
2831  case 143:
2832 /* Line 1787 of yacc.c */
2833 #line 527 "parser/faustparser.y"
2834  { (yyval.exp) = boxWaveform(gWaveForm); gWaveForm.clear(); }
2835  break;
2836 
2837  case 144:
2838 /* Line 1787 of yacc.c */
2839 #line 529 "parser/faustparser.y"
2840  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2841  break;
2842 
2843  case 145:
2844 /* Line 1787 of yacc.c */
2845 #line 530 "parser/faustparser.y"
2846  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2847  break;
2848 
2849  case 146:
2850 /* Line 1787 of yacc.c */
2851 #line 531 "parser/faustparser.y"
2852  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2853  break;
2854 
2855  case 147:
2856 /* Line 1787 of yacc.c */
2857 #line 532 "parser/faustparser.y"
2858  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2859  break;
2860 
2861  case 148:
2862 /* Line 1787 of yacc.c */
2863 #line 533 "parser/faustparser.y"
2864  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2865  break;
2866 
2867  case 149:
2868 /* Line 1787 of yacc.c */
2869 #line 534 "parser/faustparser.y"
2870  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2871  break;
2872 
2873  case 150:
2874 /* Line 1787 of yacc.c */
2875 #line 535 "parser/faustparser.y"
2876  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2877  break;
2878 
2879  case 151:
2880 /* Line 1787 of yacc.c */
2881 #line 536 "parser/faustparser.y"
2882  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2883  break;
2884 
2885  case 152:
2886 /* Line 1787 of yacc.c */
2887 #line 537 "parser/faustparser.y"
2888  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2889  break;
2890 
2891  case 153:
2892 /* Line 1787 of yacc.c */
2893 #line 538 "parser/faustparser.y"
2894  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2895  break;
2896 
2897  case 154:
2898 /* Line 1787 of yacc.c */
2899 #line 540 "parser/faustparser.y"
2900  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2901  break;
2902 
2903  case 155:
2904 /* Line 1787 of yacc.c */
2905 #line 541 "parser/faustparser.y"
2906  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2907  break;
2908 
2909  case 156:
2910 /* Line 1787 of yacc.c */
2911 #line 542 "parser/faustparser.y"
2912  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2913  break;
2914 
2915  case 157:
2916 /* Line 1787 of yacc.c */
2917 #line 543 "parser/faustparser.y"
2918  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2919  break;
2920 
2921  case 158:
2922 /* Line 1787 of yacc.c */
2923 #line 545 "parser/faustparser.y"
2924  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2925  break;
2926 
2927  case 159:
2928 /* Line 1787 of yacc.c */
2929 #line 546 "parser/faustparser.y"
2930  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2931  break;
2932 
2933  case 160:
2934 /* Line 1787 of yacc.c */
2935 #line 551 "parser/faustparser.y"
2936  { (yyval.exp) = boxIdent(yytext); }
2937  break;
2938 
2939  case 161:
2940 /* Line 1787 of yacc.c */
2941 #line 554 "parser/faustparser.y"
2942  { (yyval.exp) = tree(yytext); }
2943  break;
2944 
2945  case 162:
2946 /* Line 1787 of yacc.c */
2947 #line 559 "parser/faustparser.y"
2948  { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); }
2949  break;
2950 
2951  case 163:
2952 /* Line 1787 of yacc.c */
2953 #line 560 "parser/faustparser.y"
2954  { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); }
2955  break;
2956 
2957  case 164:
2958 /* Line 1787 of yacc.c */
2959 #line 563 "parser/faustparser.y"
2960  { (yyval.exp) = boxSeq((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2961  break;
2962 
2963  case 165:
2964 /* Line 1787 of yacc.c */
2965 #line 564 "parser/faustparser.y"
2966  { (yyval.exp) = boxSplit((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2967  break;
2968 
2969  case 166:
2970 /* Line 1787 of yacc.c */
2971 #line 565 "parser/faustparser.y"
2972  { (yyval.exp) = boxMerge((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2973  break;
2974 
2975  case 167:
2976 /* Line 1787 of yacc.c */
2977 #line 566 "parser/faustparser.y"
2978  { (yyval.exp) = boxRec((yyvsp[(1) - (3)].exp),(yyvsp[(3) - (3)].exp)); }
2979  break;
2980 
2981  case 168:
2982 /* Line 1787 of yacc.c */
2983 #line 567 "parser/faustparser.y"
2984  { (yyval.exp) = (yyvsp[(1) - (1)].exp); }
2985  break;
2986 
2987  case 169:
2988 /* Line 1787 of yacc.c */
2989 #line 570 "parser/faustparser.y"
2990  { (yyval.exp) = tree(yytext); }
2991  break;
2992 
2993  case 170:
2994 /* Line 1787 of yacc.c */
2995 #line 573 "parser/faustparser.y"
2996  { (yyval.exp) = unquote(yytext); }
2997  break;
2998 
2999  case 171:
3000 /* Line 1787 of yacc.c */
3001 #line 576 "parser/faustparser.y"
3002  { (yyval.exp) = tree(yytext); }
3003  break;
3004 
3005  case 172:
3006 /* Line 1787 of yacc.c */
3007 #line 577 "parser/faustparser.y"
3008  { (yyval.exp) = tree(yytext); }
3009  break;
3010 
3011  case 173:
3012 /* Line 1787 of yacc.c */
3013 #line 583 "parser/faustparser.y"
3014  { (yyval.exp) = boxIPar((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
3015  break;
3016 
3017  case 174:
3018 /* Line 1787 of yacc.c */
3019 #line 587 "parser/faustparser.y"
3020  { (yyval.exp) = boxISeq((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
3021  break;
3022 
3023  case 175:
3024 /* Line 1787 of yacc.c */
3025 #line 591 "parser/faustparser.y"
3026  { (yyval.exp) = boxISum((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
3027  break;
3028 
3029  case 176:
3030 /* Line 1787 of yacc.c */
3031 #line 595 "parser/faustparser.y"
3032  { (yyval.exp) = boxIProd((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
3033  break;
3034 
3035  case 177:
3036 /* Line 1787 of yacc.c */
3037 #line 599 "parser/faustparser.y"
3038  { (yyval.exp) = boxInputs((yyvsp[(3) - (4)].exp)); }
3039  break;
3040 
3041  case 178:
3042 /* Line 1787 of yacc.c */
3043 #line 602 "parser/faustparser.y"
3044  { (yyval.exp) = boxOutputs((yyvsp[(3) - (4)].exp)); }
3045  break;
3046 
3047  case 179:
3048 /* Line 1787 of yacc.c */
3049 #line 610 "parser/faustparser.y"
3050  { (yyval.exp) = ffunction((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
3051  break;
3052 
3053  case 180:
3054 /* Line 1787 of yacc.c */
3055 #line 614 "parser/faustparser.y"
3056  { (yyval.exp) = boxFConst((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); }
3057  break;
3058 
3059  case 181:
3060 /* Line 1787 of yacc.c */
3061 #line 617 "parser/faustparser.y"
3062  { (yyval.exp) = boxFVar((yyvsp[(3) - (7)].exp),(yyvsp[(4) - (7)].exp),(yyvsp[(6) - (7)].exp)); }
3063  break;
3064 
3065  case 182:
3066 /* Line 1787 of yacc.c */
3067 #line 621 "parser/faustparser.y"
3068  { (yyval.exp) = boxButton((yyvsp[(3) - (4)].exp)); }
3069  break;
3070 
3071  case 183:
3072 /* Line 1787 of yacc.c */
3073 #line 624 "parser/faustparser.y"
3074  { (yyval.exp) = boxCheckbox((yyvsp[(3) - (4)].exp)); }
3075  break;
3076 
3077  case 184:
3078 /* Line 1787 of yacc.c */
3079 #line 628 "parser/faustparser.y"
3080  { (yyval.exp) = boxVSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); }
3081  break;
3082 
3083  case 185:
3084 /* Line 1787 of yacc.c */
3085 #line 631 "parser/faustparser.y"
3086  { (yyval.exp) = boxHSlider((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); }
3087  break;
3088 
3089  case 186:
3090 /* Line 1787 of yacc.c */
3091 #line 634 "parser/faustparser.y"
3092  { (yyval.exp) = boxNumEntry((yyvsp[(3) - (12)].exp),(yyvsp[(5) - (12)].exp),(yyvsp[(7) - (12)].exp),(yyvsp[(9) - (12)].exp),(yyvsp[(11) - (12)].exp)); }
3093  break;
3094 
3095  case 187:
3096 /* Line 1787 of yacc.c */
3097 #line 637 "parser/faustparser.y"
3098  { (yyval.exp) = boxVGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); }
3099  break;
3100 
3101  case 188:
3102 /* Line 1787 of yacc.c */
3103 #line 640 "parser/faustparser.y"
3104  { (yyval.exp) = boxHGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); }
3105  break;
3106 
3107  case 189:
3108 /* Line 1787 of yacc.c */
3109 #line 643 "parser/faustparser.y"
3110  { (yyval.exp) = boxTGroup((yyvsp[(3) - (6)].exp), (yyvsp[(5) - (6)].exp)); }
3111  break;
3112 
3113  case 190:
3114 /* Line 1787 of yacc.c */
3115 #line 647 "parser/faustparser.y"
3116  { (yyval.exp) = boxVBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
3117  break;
3118 
3119  case 191:
3120 /* Line 1787 of yacc.c */
3121 #line 650 "parser/faustparser.y"
3122  { (yyval.exp) = boxHBargraph((yyvsp[(3) - (8)].exp),(yyvsp[(5) - (8)].exp),(yyvsp[(7) - (8)].exp)); }
3123  break;
3124 
3125  case 192:
3126 /* Line 1787 of yacc.c */
3127 #line 656 "parser/faustparser.y"
3128  { (yyval.exp) = cons((yyvsp[(1) - (5)].exp), cons(cons((yyvsp[(2) - (5)].exp),cons((yyvsp[(2) - (5)].exp),cons((yyvsp[(2) - (5)].exp),nil))), (yyvsp[(4) - (5)].exp))); }
3129  break;
3130 
3131  case 193:
3132 /* Line 1787 of yacc.c */
3133 #line 657 "parser/faustparser.y"
3134  { (yyval.exp) = cons((yyvsp[(1) - (7)].exp), cons(cons((yyvsp[(2) - (7)].exp),cons((yyvsp[(4) - (7)].exp),cons((yyvsp[(4) - (7)].exp),nil))), (yyvsp[(6) - (7)].exp))); }
3135  break;
3136 
3137  case 194:
3138 /* Line 1787 of yacc.c */
3139 #line 658 "parser/faustparser.y"
3140  { (yyval.exp) = cons((yyvsp[(1) - (9)].exp), cons(cons((yyvsp[(2) - (9)].exp),cons((yyvsp[(4) - (9)].exp),cons((yyvsp[(6) - (9)].exp),nil))), (yyvsp[(8) - (9)].exp))); }
3141  break;
3142 
3143  case 195:
3144 /* Line 1787 of yacc.c */
3145 #line 660 "parser/faustparser.y"
3146  { (yyval.exp) = cons((yyvsp[(1) - (4)].exp), cons(cons((yyvsp[(2) - (4)].exp),cons((yyvsp[(2) - (4)].exp),cons((yyvsp[(2) - (4)].exp),nil))), nil)); }
3147  break;
3148 
3149  case 196:
3150 /* Line 1787 of yacc.c */
3151 #line 661 "parser/faustparser.y"
3152  { (yyval.exp) = cons((yyvsp[(1) - (6)].exp), cons(cons((yyvsp[(2) - (6)].exp),cons((yyvsp[(4) - (6)].exp),cons((yyvsp[(4) - (6)].exp),nil))), nil)); }
3153  break;
3154 
3155  case 197:
3156 /* Line 1787 of yacc.c */
3157 #line 662 "parser/faustparser.y"
3158  { (yyval.exp) = cons((yyvsp[(1) - (8)].exp), cons(cons((yyvsp[(2) - (8)].exp),cons((yyvsp[(4) - (8)].exp),cons((yyvsp[(6) - (8)].exp),nil))), nil)); }
3159  break;
3160 
3161  case 198:
3162 /* Line 1787 of yacc.c */
3163 #line 665 "parser/faustparser.y"
3164  { (yyval.exp) = tree(yytext); }
3165  break;
3166 
3167  case 199:
3168 /* Line 1787 of yacc.c */
3169 #line 668 "parser/faustparser.y"
3170  { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); }
3171  break;
3172 
3173  case 200:
3174 /* Line 1787 of yacc.c */
3175 #line 669 "parser/faustparser.y"
3176  { (yyval.exp) = cons((yyvsp[(3) - (3)].exp),(yyvsp[(1) - (3)].exp)); }
3177  break;
3178 
3179  case 201:
3180 /* Line 1787 of yacc.c */
3181 #line 672 "parser/faustparser.y"
3182  { (yyval.exp) = cons((yyvsp[(1) - (1)].exp),nil); }
3183  break;
3184 
3185  case 202:
3186 /* Line 1787 of yacc.c */
3187 #line 673 "parser/faustparser.y"
3188  { (yyval.exp) = cons((yyvsp[(2) - (2)].exp),(yyvsp[(1) - (2)].exp)); }
3189  break;
3190 
3191  case 203:
3192 /* Line 1787 of yacc.c */
3193 #line 677 "parser/faustparser.y"
3194  { (yyval.exp) = cons((yyvsp[(2) - (6)].exp),(yyvsp[(5) - (6)].exp)); }
3195  break;
3196 
3197  case 204:
3198 /* Line 1787 of yacc.c */
3199 #line 680 "parser/faustparser.y"
3200  { (yyval.exp) = tree(0); }
3201  break;
3202 
3203  case 205:
3204 /* Line 1787 of yacc.c */
3205 #line 681 "parser/faustparser.y"
3206  { (yyval.exp) = tree(1); }
3207  break;
3208 
3209 
3210 /* Line 1787 of yacc.c */
3211 #line 3212 "parser/faustparser.cpp"
3212  default: break;
3213  }
3214  /* User semantic actions sometimes alter yychar, and that requires
3215  that yytoken be updated with the new translation. We take the
3216  approach of translating immediately before every use of yytoken.
3217  One alternative is translating here after every semantic action,
3218  but that translation would be missed if the semantic action invokes
3219  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3220  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3221  incorrect destructor might then be invoked immediately. In the
3222  case of YYERROR or YYBACKUP, subsequent parser actions might lead
3223  to an incorrect destructor call or verbose syntax error message
3224  before the lookahead is translated. */
3225  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3226 
3227  YYPOPSTACK (yylen);
3228  yylen = 0;
3229  YY_STACK_PRINT (yyss, yyssp);
3230 
3231  *++yyvsp = yyval;
3232 
3233  /* Now `shift' the result of the reduction. Determine what state
3234  that goes to, based on the state we popped back to and the rule
3235  number reduced by. */
3236 
3237  yyn = yyr1[yyn];
3238 
3239  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3240  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3241  yystate = yytable[yystate];
3242  else
3243  yystate = yydefgoto[yyn - YYNTOKENS];
3244 
3245  goto yynewstate;
3246 
3247 
3248 /*------------------------------------.
3249 | yyerrlab -- here on detecting error |
3250 `------------------------------------*/
3251 yyerrlab:
3252  /* Make sure we have latest lookahead translation. See comments at
3253  user semantic actions for why this is necessary. */
3254  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3255 
3256  /* If not already recovering from an error, report this error. */
3257  if (!yyerrstatus)
3258  {
3259  ++yynerrs;
3260 #if ! YYERROR_VERBOSE
3261  yyerror (YY_("syntax error"));
3262 #else
3263 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3264  yyssp, yytoken)
3265  {
3266  char const *yymsgp = YY_("syntax error");
3267  int yysyntax_error_status;
3268  yysyntax_error_status = YYSYNTAX_ERROR;
3269  if (yysyntax_error_status == 0)
3270  yymsgp = yymsg;
3271  else if (yysyntax_error_status == 1)
3272  {
3273  if (yymsg != yymsgbuf)
3274  YYSTACK_FREE (yymsg);
3275  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3276  if (!yymsg)
3277  {
3278  yymsg = yymsgbuf;
3279  yymsg_alloc = sizeof yymsgbuf;
3280  yysyntax_error_status = 2;
3281  }
3282  else
3283  {
3284  yysyntax_error_status = YYSYNTAX_ERROR;
3285  yymsgp = yymsg;
3286  }
3287  }
3288  yyerror (yymsgp);
3289  if (yysyntax_error_status == 2)
3290  goto yyexhaustedlab;
3291  }
3292 # undef YYSYNTAX_ERROR
3293 #endif
3294  }
3295 
3296 
3297 
3298  if (yyerrstatus == 3)
3299  {
3300  /* If just tried and failed to reuse lookahead token after an
3301  error, discard it. */
3302 
3303  if (yychar <= YYEOF)
3304  {
3305  /* Return failure if at end of input. */
3306  if (yychar == YYEOF)
3307  YYABORT;
3308  }
3309  else
3310  {
3311  yydestruct ("Error: discarding",
3312  yytoken, &yylval);
3313  yychar = YYEMPTY;
3314  }
3315  }
3316 
3317  /* Else will try to reuse lookahead token after shifting the error
3318  token. */
3319  goto yyerrlab1;
3320 
3321 
3322 /*---------------------------------------------------.
3323 | yyerrorlab -- error raised explicitly by YYERROR. |
3324 `---------------------------------------------------*/
3325 yyerrorlab:
3326 
3327  /* Pacify compilers like GCC when the user code never invokes
3328  YYERROR and the label yyerrorlab therefore never appears in user
3329  code. */
3330  if (/*CONSTCOND*/ 0)
3331  goto yyerrorlab;
3332 
3333  /* Do not reclaim the symbols of the rule which action triggered
3334  this YYERROR. */
3335  YYPOPSTACK (yylen);
3336  yylen = 0;
3337  YY_STACK_PRINT (yyss, yyssp);
3338  yystate = *yyssp;
3339  goto yyerrlab1;
3340 
3341 
3342 /*-------------------------------------------------------------.
3343 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3344 `-------------------------------------------------------------*/
3345 yyerrlab1:
3346  yyerrstatus = 3; /* Each real token shifted decrements this. */
3347 
3348  for (;;)
3349  {
3350  yyn = yypact[yystate];
3351  if (!yypact_value_is_default (yyn))
3352  {
3353  yyn += YYTERROR;
3354  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3355  {
3356  yyn = yytable[yyn];
3357  if (0 < yyn)
3358  break;
3359  }
3360  }
3361 
3362  /* Pop the current state because it cannot handle the error token. */
3363  if (yyssp == yyss)
3364  YYABORT;
3365 
3366 
3367  yydestruct ("Error: popping",
3368  yystos[yystate], yyvsp);
3369  YYPOPSTACK (1);
3370  yystate = *yyssp;
3371  YY_STACK_PRINT (yyss, yyssp);
3372  }
3373 
3375  *++yyvsp = yylval;
3377 
3378 
3379  /* Shift the error token. */
3380  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3381 
3382  yystate = yyn;
3383  goto yynewstate;
3384 
3385 
3386 /*-------------------------------------.
3387 | yyacceptlab -- YYACCEPT comes here. |
3388 `-------------------------------------*/
3389 yyacceptlab:
3390  yyresult = 0;
3391  goto yyreturn;
3392 
3393 /*-----------------------------------.
3394 | yyabortlab -- YYABORT comes here. |
3395 `-----------------------------------*/
3396 yyabortlab:
3397  yyresult = 1;
3398  goto yyreturn;
3399 
3400 #if !defined yyoverflow || YYERROR_VERBOSE
3401 /*-------------------------------------------------.
3402 | yyexhaustedlab -- memory exhaustion comes here. |
3403 `-------------------------------------------------*/
3404 yyexhaustedlab:
3405  yyerror (YY_("memory exhausted"));
3406  yyresult = 2;
3407  /* Fall through. */
3408 #endif
3409 
3410 yyreturn:
3411  if (yychar != YYEMPTY)
3412  {
3413  /* Make sure we have latest lookahead translation. See comments at
3414  user semantic actions for why this is necessary. */
3415  yytoken = YYTRANSLATE (yychar);
3416  yydestruct ("Cleanup: discarding lookahead",
3417  yytoken, &yylval);
3418  }
3419  /* Do not reclaim the symbols of the rule which action triggered
3420  this YYABORT or YYACCEPT. */
3421  YYPOPSTACK (yylen);
3422  YY_STACK_PRINT (yyss, yyssp);
3423  while (yyssp != yyss)
3424  {
3425  yydestruct ("Cleanup: popping",
3426  yystos[*yyssp], yyvsp);
3427  YYPOPSTACK (1);
3428  }
3429 #ifndef yyoverflow
3430  if (yyss != yyssa)
3431  YYSTACK_FREE (yyss);
3432 #endif
3433 #if YYERROR_VERBOSE
3434  if (yymsg != yymsgbuf)
3435  YYSTACK_FREE (yymsg);
3436 #endif
3437  /* Make sure YYID is used. */
3438  return YYID (yyresult);
3439 }
#define YYABORT
Tree sigIntCast(Tree t)
Definition: signals.cpp:159
Tree boxFVar(Tree type, Tree name, Tree file)
Definition: boxes.cpp:355
Tree sigAND(Tree x, Tree y)
Definition: signals.hh:158
#define YYTERROR
#define YYDPRINTF(Args)
void declareMetadata(Tree key, Tree value)
#define YYPOPSTACK(N)
Tree docMtd(Tree x)
Definition: doc.cpp:201
xtended * gExpPrim
Definition: expprim.cpp:61
Tree ffunction(Tree signature, Tree incfile, Tree libfile)
Definition: prim2.cpp:30
Tree boxPrim5(prim5 foo)
Definition: boxes.cpp:334
Tree formatDefinitions(Tree rldef)
Formats a list of raw definitions represented by triplets into abstractions or pa...
bool gLstDistributedSwitch
mdoc listing management.
Definition: doc.cpp:115
#define YY_REDUCE_PRINT(Rule)
static const yytype_int16 yydefgoto[]
xtended * gRemainderPrim
Tree boxCheckbox(Tree lbl)
Definition: boxes.cpp:371
Tree boxHBargraph(Tree lbl, Tree min, Tree max)
Definition: boxes.cpp:454
tvec gWaveForm
Definition: main.cpp:94
Tree cons(Tree a, Tree b)
Definition: list.hh:124
Tree sigEQ(Tree x, Tree y)
Definition: signals.hh:169
void declareDoc(Tree t)
#define YYFINAL
static const yytype_uint8 yyr1[]
Tree boxRec(Tree x, Tree y)
Definition: boxes.cpp:143
xtended * gAsinPrim
Definition: asinprim.cpp:59
#define YYSTACK_FREE
#define yytable_value_is_error(Yytable_value)
Tree sigXOR(Tree x, Tree y)
Definition: signals.hh:160
Tree boxNumEntry(Tree lbl, Tree cur, Tree min, Tree max, Tree step)
Definition: boxes.cpp:416
Tree boxEnvironment()
Definition: boxes.cpp:284
Tree sigGT(Tree x, Tree y)
Definition: signals.hh:165
xtended * gCosPrim
Definition: cosprim.cpp:59
Tree boxISeq(Tree x, Tree y, Tree z)
Definition: boxes.cpp:165
const char * yyfilename
Definition: errormsg.cpp:30
Tree sigGE(Tree x, Tree y)
Definition: signals.hh:167
CTree * exp
Tree boxPrim1(prim1 foo)
Definition: boxes.cpp:314
Tree boxFFun(Tree ff)
Definition: boxes.cpp:343
#define YYLEX
#define YYNTOKENS
Tree boxPrim3(prim3 foo)
Definition: boxes.cpp:324
Tree sigSelect2(Tree selector, Tree s1, Tree s2)
Definition: signals.cpp:115
Tree boxISum(Tree x, Tree y, Tree z)
Definition: boxes.cpp:166
#define YYINITDEPTH
Tree sigWriteReadTable(Tree n, Tree init, Tree widx, Tree wsig, Tree ridx)
Definition: signals.hh:99
Tree boxVSlider(Tree lbl, Tree cur, Tree min, Tree max, Tree step)
Definition: boxes.cpp:397
#define YY_STACK_PRINT(Bottom, Top)
Tree boxIdent(const char *name)
Definition: boxes.cpp:57
Tree sigPrefix(Tree t0, Tree t1)
Definition: signals.cpp:65
#define YYEMPTY
Tree boxHSlider(Tree lbl, Tree cur, Tree min, Tree max, Tree step)
Definition: boxes.cpp:377
Tree docTxt(const char *name)
Definition: doc.cpp:171
short int yytype_int16
Tree boxInt(int n)
Definition: boxes.cpp:75
int yyerr
Definition: main.cpp:83
xtended * gSqrtPrim
Definition: sqrtprim.cpp:67
Tree boxWire()
Definition: boxes.cpp:108
void setDefProp(Tree sym, const char *filename, int lineno)
Definition: errormsg.cpp:66
static void yydestruct(yymsg, yytype, yyvaluep) const char *yymsg
Tree docEqn(Tree x)
Definition: doc.cpp:185
xtended * gAbsPrim
Definition: absprim.cpp:77
Tree boxVBargraph(Tree lbl, Tree min, Tree max)
Definition: boxes.cpp:460
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
xtended * gRintPrim
Definition: rintprim.cpp:67
bool gStripDocSwitch
Definition: main.cpp:124
bool gLstDependenciesSwitch
mdoc listing management.
Definition: doc.cpp:113
Tree sigSub(Tree x, Tree y)
Definition: signals.hh:153
yytype_int16 yyss_alloc
static const yytype_uint8 yyr2[]
Tree boxButton(Tree lbl)
Definition: boxes.cpp:365
xtended * gMinPrim
Definition: minprim.cpp:147
Tree sigLeftShift(Tree x, Tree y)
Definition: signals.hh:162
Tree docLst()
Definition: doc.cpp:197
Tree boxWithLocalDef(Tree body, Tree ldef)
Definition: boxes.cpp:264
Tree boxCut()
Definition: boxes.cpp:104
Tree sigRightShift(Tree x, Tree y)
Definition: signals.hh:163
YYSTYPE yyvs_alloc
Tree unquote(char *str)
xtended * gAtan2Prim
Definition: atan2prim.cpp:61
string * cppstr
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
static const yytype_int16 yycheck[]
#define YYACCEPT
char * yytext
xtended * gAtanPrim
Definition: atanprim.cpp:59
static const yytype_int16 yypgoto[]
Tree sigNE(Tree x, Tree y)
Definition: signals.hh:170
#define YYTRANSLATE(YYX)
Tree boxMerge(Tree x, Tree y)
Definition: boxes.cpp:151
xtended * gFloorPrim
Definition: floorprim.cpp:61
Tree importFile(Tree filename)
Definition: boxes.cpp:300
Tree sigAdd(Tree x, Tree y)
Definition: signals.hh:152
Tree sigAttach(Tree t0, Tree t1)
Definition: signals.cpp:290
Tree checkRulelist(Tree lr)
Tree boxReal(double n)
Definition: boxes.cpp:76
xtended * gTanPrim
Definition: tanprim.cpp:59
static const yytype_int16 yypact[]
Tree boxPrim2(prim2 foo)
Definition: boxes.cpp:319
int yychar
Tree boxWaveform(const tvec &br)
Definition: boxes.cpp:92
Tree boxAccess(Tree exp, Tree id)
Definition: boxes.cpp:255
Tree boxLibrary(Tree filename)
Definition: boxes.cpp:294
Tree sigLE(Tree x, Tree y)
Definition: signals.hh:168
Tree sigFloatCast(Tree t)
Definition: signals.cpp:170
Tree sigFixDelay(Tree t0, Tree t1)
Definition: signals.cpp:61
static const yytype_uint8 yystos[]
Tree sigLT(Tree x, Tree y)
Definition: signals.hh:166
Tree boxSeq(Tree x, Tree y)
Definition: boxes.cpp:135
#define yypact_value_is_default(Yystate)
Tree boxFConst(Tree type, Tree name, Tree file)
Definition: boxes.cpp:349
Tree sigRem(Tree x, Tree y)
Definition: signals.hh:156
Tree tree(const Node &n)
Definition: tree.hh:186
Tree docNtc()
Definition: doc.cpp:193
#define YYMAXDEPTH
Definition: faustparser.cpp:84
Tree boxIPar(Tree x, Tree y, Tree z)
Definition: boxes.cpp:164
#define YYSYNTAX_ERROR
Tree boxHGroup(Tree lbl, Tree x)
Definition: boxes.cpp:436
#define YYLAST
YYSTYPE yylval
xtended * gAcosPrim
Definition: acosprim.cpp:58
#define YYSTACK_BYTES(N)
Tree box()
Definition: xtended.hh:27
Tree boxTGroup(Tree lbl, Tree x)
Definition: boxes.cpp:448
#define YYSTACK_ALLOC
void yyerror(const char *msg)
Definition: errormsg.cpp:34
Tree boxPar(Tree x, Tree y)
Definition: boxes.cpp:139
Tree gResult
Definition: main.cpp:86
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Tree docDgm(Tree x)
Definition: doc.cpp:189
#define YYEOF
Tree nil
Definition: list.cpp:116
Tree sigMul(Tree x, Tree y)
Definition: signals.hh:154
Tree sigSelect3(Tree selector, Tree s1, Tree s2, Tree s3)
Definition: signals.cpp:118
Tree boxPrim4(prim4 foo)
Definition: boxes.cpp:329
Tree sigOR(Tree x, Tree y)
Definition: signals.hh:159
xtended * gCeilPrim
Definition: ceilprim.cpp:61
Tree boxModifLocalDef(Tree body, Tree ldef)
Definition: boxes.cpp:274
Tree buildBoxAbstr(Tree largs, Tree body)
Definition: boxes.cpp:208
xtended * gPowPrim
Definition: powprim.cpp:77
Tree boxInputs(Tree x)
Definition: boxes.cpp:182
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Tree boxOutputs(Tree x)
Definition: boxes.cpp:183
static const yytype_int16 yytable[]
#define YY_(Msgid)
xtended * gLog10Prim
Definition: log10prim.cpp:67
Tree boxComponent(Tree filename)
Definition: boxes.cpp:289
static const yytype_uint8 yydefact[]
Tree sigReadOnlyTable(Tree n, Tree init, Tree ridx)
Definition: signals.hh:104
Tree sigDiv(Tree x, Tree y)
Definition: signals.hh:155
int yylineno
Tree boxSplit(Tree x, Tree y)
Definition: boxes.cpp:147
#define YYID(N)
Tree boxCase(Tree rules)
Definition: boxes.cpp:615
int yynerrs
Tree boxVGroup(Tree lbl, Tree x)
Definition: boxes.cpp:442
xtended * gFmodPrim
Definition: fmodprim.cpp:61
xtended * gSinPrim
Definition: sinprim.cpp:59
xtended * gMaxPrim
Definition: maxprim.cpp:121
#define YYSIZE_T
Tree sigDelay1(Tree t0)
Definition: signals.cpp:57
Tree buildBoxAppl(Tree fun, Tree revarglist)
Definition: boxes.cpp:227
Tree boxIProd(Tree x, Tree y, Tree z)
Definition: boxes.cpp:167
return yylen
xtended * gLogPrim
Definition: logprim.cpp:66

Here is the caller graph for this function:

void yyrestart ( FILE *  input_file)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
Note
This function does not reset the start condition to INITIAL .

Definition at line 2263 of file faustlexer.cpp.

References YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init_buffer(), yy_load_buffer_state(), yyensure_buffer_stack(), and yyin.

Referenced by input(), SourceReader::parse(), and yy_get_next_buffer().

2264 {
2265 
2266  if ( ! YY_CURRENT_BUFFER ){
2270  }
2271 
2272  yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2274 }
static void yyensure_buffer_stack(void)
YY_BUFFER_STATE yy_create_buffer(FILE *file, int size)
Allocate and initialize an input buffer state.
#define YY_CURRENT_BUFFER_LVALUE
Definition: faustlexer.cpp:284
#define YY_CURRENT_BUFFER
Definition: faustlexer.cpp:277
static void yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
#define YY_BUF_SIZE
Definition: faustlexer.cpp:145
static void yy_load_buffer_state(void)
FILE * yyin
Definition: faustlexer.cpp:351

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

vector<Tree> gDocVector

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

Definition at line 109 of file doc.cpp.

Referenced by declareDoc(), and printDoc().

bool gLatexDocSwitch

Definition at line 123 of file main.cpp.

Referenced by main().

string gMasterDocument
map<Tree, set<Tree> > gMetaDataSet

Definition at line 91 of file main.cpp.

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

Tree gResult

Definition at line 86 of file main.cpp.

Referenced by SourceReader::parse().

Tree gResult2

Definition at line 87 of file main.cpp.

Referenced by main().

int yydebug
int yyerr

Definition at line 83 of file main.cpp.

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

const char* yyfilename
FILE* yyin

Referenced by SourceReader::parse().

int yylineno

Referenced by SourceReader::parse().