Changeset 6603c1d


Ignore:
Timestamp:
Aug 15, 2016, 10:18:22 AM (9 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
b1848a0
Parents:
38736854 (diff), 797347f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Files:
20 edited

Legend:

Unmodified
Added
Removed
  • doc/LaTeXmacros/common.tex

    r38736854 r6603c1d  
    1111%% Created On       : Sat Apr  9 10:06:17 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Tue Aug  2 17:02:02 2016
    14 %% Update Count     : 228
     13%% Last Modified On : Sun Aug 14 08:27:29 2016
     14%% Update Count     : 231
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    153153        {\abbrevFont{etc}.\xspace}%
    154154}%
     155\newcommand{\etal}{%
     156        \@ifnextchar{.}{\abbrevFont{et~al}}%
     157                {\abbrevFont{et al}.\xspace}%
     158}%
    155159\makeatother
    156160
     
    251255literate={-}{\raisebox{-0.15ex}{\texttt{-}}}1 {^}{\raisebox{0.6ex}{$\scriptscriptstyle\land\,$}}1
    252256        {~}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}}1 {_}{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}1 {`}{\ttfamily\upshape\hspace*{-0.1ex}`}1
    253         {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2 {...}{$\dots$}2,
     257        {<-}{$\leftarrow$}2 {=>}{$\Rightarrow$}2,
    254258}%
    255259
  • doc/aaron_comp_II/comp_II.tex

    r38736854 r6603c1d  
    413413\subsection{Argument-Parameter Matching}
    414414The first axis for consideration is argument-parameter matching direction --- whether the type matching for a candidate function to a set of candidate arguments is directed by the argument types or the parameter types.
     415For programming languages without implicit conversions, argument-parameter matching is essentially the entirety of the expression resolution problem, and is generally referred to as ``overload resolution'' in the literature.
    415416All expression resolution algorithms form a DAG of interpretations, some explicitly, some implicitly; in this DAG, arcs point from function-call interpretations to argument interpretations, as below:
    416417\begin{figure}[h]
     
    422423
    423424double *f(int*, int*); // $f_d$
    424 char *f(char*, char*); // $f_c$
     425char *f(char*, int*); // $f_c$
    425426
    426427f( f( p, p ), p );
     
    463464Deciding when to switch between bottom-up and top-down resolution to minimize wasted work in a hybrid algorithm is a necessarily heuristic process, and though finding good heuristics for which subexpressions to swich matching strategies on is an open question, one reasonable approach might be to set a threshold $t$ for the number of candidate functions, and to use top-down resolution for any subexpression with fewer than $t$ candidate functions, to minimize the number of unmatchable argument interpretations computed, but to use bottom-up resolution for any subexpression with at least $t$ candidate functions, to reduce duplication in argument interpretation computation between the different candidate functions.
    464465
     466Ganzinger and Ripken~\cite{Ganzinger80} propose an approach (later refined by Pennello~\etal~\cite{Pennello80}) that uses a top-down filtering pass followed by a bottom-up filtering pass to reduce the number of candidate interpretations; they prove that for the Ada programming language a small number of such iterations is sufficient to converge to a solution for the expression resolution problem.
     467Persch~\etal~\cite{PW:overload} developed a similar two-pass approach where the bottom-up pass is followed by the top-down pass.
     468These algorithms differ from the hybrid approach under investigation in that they take multiple passes over the expression tree to yield a solution, and also in that they apply both filtering heuristics to all expression nodes; \CFA's polymorphic functions and implicit conversions make the approach of filtering out invalid types taken by all of these algorithms infeasible.
     469
    465470\subsubsection{Common Subexpression Caching}
    466471With any of these argument-parameter approaches, it may be a useful optimization to cache the resolution results for common subexpressions; in Figure~\ref{fig:res_dag} this optimization would result in the list of interpretations $[p_c, p_i]$ for ©p© only being calculated once, and re-used for each of the three instances of ©p©.
    467472
    468473\subsection{Implicit Conversion Application}
    469 Baker's and Cormack's algorithms do not account for implicit conversions\footnote{Baker does briefly comment on an approach for handling implicit conversions, but does not provide an implementable algorithm.}; both assume that there is at most one valid interpretation of a given expression for each distinct type.
    470 Integrating implicit conversion handling into their algorithms provides some choice of implementation approach.
     474With the exception of Bilson, the authors mentioned above do not account for implicit conversions in their algorithms\footnote{Baker does briefly comment on an approach for handling implicit conversions, but does not provide an implementable algorithm.}; all assume that there is at most one valid interpretation of a given expression for each distinct type.
     475Integrating implicit conversion handling into the presented argument-parameter matching algorithms thus provides some choice of implementation approach.
     476
     477Inference of polymorphic type variables can be considered a form of implicit conversion application, where monomorphic types are implicitly converted to instances of some polymorphic type\footnote{This ``conversion'' may not be implemented in any explicit way at runtime, but does need to be handled by the expression resolver as an inexact match between argument and parameter types.}.
     478This form of implicit conversion is particularly common in functional languages; Haskell's type classes~\cite{typeclass} are a particularly well-studied variant of this inference.
     479However, type classes arguably do not allow name overloading, as (at least in the Haskell implmentation) identifiers belonging to type classes may not be overloaded in any other context than an implementation of that type class; this provides a single (possibly polymorphic) interpretation of any identifier, simplifing the expression resolution problem relative to \CFA.
     480\CC~\cite{ANSI98:C++} includes both name overloading and implicit conversions in its expression resolution specification, though unlike \CFA it does complete type-checking on a generated monomorphization of template functions, where \CFA simply checks a list of type constraints.
     481The upcoming Concepts standard~\cite{C++concepts} defines a system of type constraints similar in principle to \CFA's.
     482Cormack and Wright~\cite{Cormack90} present an algorithm which integrates overload resolution with a polymorphic type inference approach very similar to \CFA's.
     483However, their algorithm does not account for implicit conversions other than polymorphic type binding and their discussion of their overload resolution algorithm is not sufficiently detailed to classify it with the other argument-parameter matching approaches\footnote{Their overload resolution algorithm is possibly a variant of Ganzinger and Ripken~\cite{Ganzinger80} or Pennello~\etal~\cite{Pennello80}, modified to allow for polymorphic type binding.}.
    471484
    472485\subsubsection{On Parameters}
    473 Bilson does account for implicit conversions in his algorithm, but it is unclear the approach is optimal.
     486Bilson does account for implicit conversions in his algorithm, but it is unclear if the approach is optimal.
    474487His algorithm integrates checking for valid implicit conversions into the argument-parameter-matching step, essentially trading more expensive matching for a smaller number of argument interpretations.
    475488This approach may result in the same subexpression being checked for a type match with the same type multiple times, though again memoization may mitigate this cost, and this approach does not generate implicit conversions that are not useful to match the containing function.
     
    484497
    485498\subsection{Candidate Set Generation}
    486 Cormack, Baker and Bilson all generate the complete set of candidate argument interpretations before attempting to match the containing function call expression.
     499All the algorithms discussed to this point generate the complete set of candidate argument interpretations before attempting to match the containing function call expression.
    487500However, given that the top-level expression interpretation that is ultimately chosen is the minimal-cost valid interpretation, any consideration of non-minimal-cost interpretations is in some sense wasted work.
    488501Under the assumption that that programmers generally write function calls with relatively low-cost interpretations, a possible work-saving heuristic is to generate only the lowest-cost argument interpretations first, attempt to find a valid top-level interpretation using them, and only if that fails generate the next higher-cost argument interpretations.
    489502
    490503\subsubsection{Eager}
    491 Within the eager approach taken by Cormack, Baker and Bilson, there are still variants to explore.
     504Within the eager approach taken by the existing top-down and bottom-up algorithms, there are still variants to explore.
    492505Cormack and Baker do not account for implict conversions, and thus do not account for the possibility of multiple valid interpretations with distinct costs; Bilson, on the other hand, sorts the list of interpretations to aid in finding minimal-cost interpretations.
    493506Sorting the lists of argument or function call interpretations by cost at some point during resolution may provide useful opportunities to short-circuit expression evaluation when a minimal-cost interpretation is found, though it is unclear if this short-circuiting behaviour justifies the cost of the sort.
     
    559572
    560573This proposed project should provide valuable data on how to implement a performant compiler for modern programming languages such as \CFA with powerful static type-systems, specifically targeting the feature interaction between name overloading and implicit conversions.
    561 This work is not limited in applicability to \CFA, but may also be useful for supporting efficient compilation of the upcoming ``Concepts'' standard~\cite{C++concepts} for \CC template constraints, for instance.
     574This work is not limited in applicability to \CFA, but may also be useful for supporting efficient compilation of the upcoming Concepts standard~\cite{C++concepts} for \CC template constraints, for instance.
    562575
    563576\appendix
  • doc/bibliography/cfa.bib

    r38736854 r6603c1d  
    46854685}
    46864686
     4687@article{Ganzinger80,
     4688        contributer = {a3moss@uwaterloo.ca},
     4689        author = {Ganzinger, Harald and Ripken, Knut},
     4690        title = {Operator Identification in {ADA}: Formal Specification, Complexity, and Concrete Implementation},
     4691        journal = {SIGPLAN Notices},
     4692        issue_date = {February 1980},
     4693        volume = {15},
     4694        number = {2},
     4695        month = feb,
     4696        year = {1980},
     4697        issn = {0362-1340},
     4698        pages = {30--42},
     4699        numpages = {13},
     4700        url = {http://doi.acm.org/10.1145/947586.947589},
     4701        doi = {10.1145/947586.947589},
     4702        publisher = {ACM},
     4703        address = {New York, NY, USA}
     4704}
     4705
    46874706@article{Ford82,
    46884707    keywords    = {},
     
    58515870}
    58525871
     5872@article{Pennello80,
     5873        contributer = {a3moss@uwaterloo.ca},
     5874        author = {Pennello, Tom and DeRemer, Frank and Meyers, Richard},
     5875        title = {A Simplified Operator Identification Scheme for {Ada}},
     5876        journal = {SIGPLAN Notices},
     5877        issue_date = {July-August 1980},
     5878        volume = {15},
     5879        number = {7 and 8},
     5880        month = jul,
     5881        year = {1980},
     5882        issn = {0362-1340},
     5883        pages = {82--87},
     5884        numpages = {6},
     5885        url = {http://doi.acm.org/10.1145/947680.947688},
     5886        doi = {10.1145/947680.947688},
     5887        publisher = {ACM},
     5888        address = {New York, NY, USA},
     5889}
     5890
    58535891@inproceedings{Dice10,
    58545892    keywords    = {hardware, synchronization, transactional memory},
  • doc/user/user.tex

    r38736854 r6603c1d  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Tue Aug  2 17:39:02 2016
    14 %% Update Count     : 1286
     13%% Last Modified On : Sun Aug 14 08:23:06 2016
     14%% Update Count     : 1323
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    317317
    318318\item
    319 \Indexc{-no-include-std}\index{compilation option!-no-include-std@©-no-include-std©}
     319\Indexc{-no-include-stdhdr}\index{compilation option!-no-include-stdhdr@©-no-include-stdhdr©}
    320320Do not supply ©extern "C"© wrappers for \Celeven standard include files (see~\VRef{s:StandardHeaders}).
    321321\textbf{This option is \emph{not} the default.}
     
    807807
    808808
     809\section{Backquote Identifiers}
     810\label{s:BackquoteIdentifiers}
     811
     812\CFA accommodates keyword clashes by syntactic transformations using the \CFA backquote escape-mechanism:
     813\begin{lstlisting}
     814int `otype` = 3;                                // make keyword an identifier
     815double `choose` = 3.5;
     816\end{lstlisting}
     817Programs can be converted easily by enclosing keyword identifiers in backquotes, and the backquotes can be removed later when the identifier name is changed to an non-keyword name.
     818Clashes in C header files (see~\VRef{s:StandardHeaders}) can be handled automatically using the preprocessor, ©#include_next© and ©-I filename©:
     819\begin{lstlisting}
     820// include file uses the CFA keyword "otype".
     821#if ! defined( otype )                  // nesting ?
     822#define otype `otype`
     823#define __CFA_BFD_H__
     824#endif // ! otype
     825
     826#include_next <bfd.h>                   // must have internal check for multiple expansion
     827
     828#if defined( otype ) && defined( __CFA_BFD_H__ )        // reset only if set
     829#undef otype
     830#undef __CFA_BFD_H__
     831#endif // otype && __CFA_BFD_H__
     832\end{lstlisting}
     833
     834
    809835\section{Type Operators}
    810836
     
    10111037Alternatively, prototype definitions can be eliminated by using a two-pass compilation, and implicitly creating header files for exports.
    10121038The former is easy to do, while the latter is more complex.
    1013 Currently, \CFA does \emph{not} attempt to support named arguments.
     1039
     1040Furthermore, named arguments do not work well in a \CFA-style programming-languages because they potentially introduces a new criteria for type matching.
     1041For example, it is technically possible to disambiguate between these two overloaded definitions of ©f© based on named arguments at the call site:
     1042\begin{lstlisting}
     1043int f( int i, int j );
     1044int f( int x, double y );
     1045
     1046f( j : 3, i : 4 );                              §\C{// 1st f}§
     1047f( x : 7, y : 8.1 );                    §\C{// 2nd f}§
     1048f( 4, 5 );                                              §\C{// ambiguous call}§
     1049\end{lstlisting}
     1050However, named arguments compound routine resolution in conjunction with conversions:
     1051\begin{lstlisting}
     1052f( i : 3, 5.7 );                                §\C{// ambiguous call ?}§
     1053\end{lstlisting}
     1054Depending on the cost associated with named arguments, this call could be resolvable or ambiguous.
     1055Adding named argument into the routine resolution algorithm does not seem worth the complexity.
     1056Therefore, \CFA does \emph{not} attempt to support named arguments.
    10141057
    10151058\item[Default Arguments]
     
    10211064the allowable positional calls are:
    10221065\begin{lstlisting}
    1023 p();                            §\C{// rewrite $\Rightarrow$ p( 1, 2, 3 )}§
    1024 p( 4 );                         §\C{// rewrite $\Rightarrow$ p( 4, 2, 3 )}§
    1025 p( 4, 4 );                      §\C{// rewrite $\Rightarrow$ p( 4, 4, 3 )}§
    1026 p( 4, 4, 4 );           §\C{// rewrite $\Rightarrow$ p( 4, 4, 4 )}§
     1066p();                                                    §\C{// rewrite $\Rightarrow$ p( 1, 2, 3 )}§
     1067p( 4 );                                                 §\C{// rewrite $\Rightarrow$ p( 4, 2, 3 )}§
     1068p( 4, 4 );                                              §\C{// rewrite $\Rightarrow$ p( 4, 4, 3 )}§
     1069p( 4, 4, 4 );                                   §\C{// rewrite $\Rightarrow$ p( 4, 4, 4 )}§
    10271070// empty arguments
    1028 p(  , 4, 4 );           §\C{// rewrite $\Rightarrow$ p( 1, 4, 4 )}§
    1029 p( 4,  , 4 );           §\C{// rewrite $\Rightarrow$ p( 4, 2, 4 )}§
    1030 p( 4, 4,   );           §\C{// rewrite $\Rightarrow$ p( 4, 4, 3 )}§
    1031 p( 4,  ,   );           §\C{// rewrite $\Rightarrow$ p( 4, 2, 3 )}§
    1032 p(  , 4,   );           §\C{// rewrite $\Rightarrow$ p( 1, 4, 3 )}§
    1033 p(  ,  , 4 );           §\C{// rewrite $\Rightarrow$ p( 1, 2, 4 )}§
    1034 p(  ,  ,   );           §\C{// rewrite $\Rightarrow$ p( 1, 2, 3 )}§
     1071p(  , 4, 4 );                                   §\C{// rewrite $\Rightarrow$ p( 1, 4, 4 )}§
     1072p( 4,  , 4 );                                   §\C{// rewrite $\Rightarrow$ p( 4, 2, 4 )}§
     1073p( 4, 4,   );                                   §\C{// rewrite $\Rightarrow$ p( 4, 4, 3 )}§
     1074p( 4,  ,   );                                   §\C{// rewrite $\Rightarrow$ p( 4, 2, 3 )}§
     1075p(  , 4,   );                                   §\C{// rewrite $\Rightarrow$ p( 1, 4, 3 )}§
     1076p(  ,  , 4 );                                   §\C{// rewrite $\Rightarrow$ p( 1, 2, 4 )}§
     1077p(  ,  ,   );                                   §\C{// rewrite $\Rightarrow$ p( 1, 2, 3 )}§
    10351078\end{lstlisting}
    10361079Here the missing arguments are inserted from the default values in the parameter list.
     
    10671110The conflict occurs because both named and ellipse arguments must appear after positional arguments, giving two possibilities:
    10681111\begin{lstlisting}
    1069 p( /* positional */, . . ., /* named */ );
    1070 p( /* positional */, /* named */, . . . );
     1112p( /* positional */, ... , /* named */ );
     1113p( /* positional */, /* named */, ... );
    10711114\end{lstlisting}
    10721115While it is possible to implement both approaches, the first possibly is more complex than the second, \eg:
    10731116\begin{lstlisting}
    1074 p( int x, int y, int z, . . . );
    1075 p( 1, 4, 5, 6, z : 3, y : 2 ); §\C{// assume p( /* positional */, . . ., /* named */ );}§
    1076 p( 1, z : 3, y : 2, 4, 5, 6 ); §\C{// assume p( /* positional */, /* named */, . . . );}§
     1117p( int x, int y, int z, ... );
     1118p( 1, 4, 5, 6, z : 3, y : 2 ); §\C{// assume p( /* positional */, ... , /* named */ );}§
     1119p( 1, z : 3, y : 2, 4, 5, 6 ); §\C{// assume p( /* positional */, /* named */, ... );}§
    10771120\end{lstlisting}
    10781121In the first call, it is necessary for the programmer to conceptually rewrite the call, changing named arguments into positional, before knowing where the ellipse arguments begin.
     
    10821125The problem is exacerbated with default arguments, \eg:
    10831126\begin{lstlisting}
    1084 void p( int x, int y = 2, int z = 3. . . );
    1085 p( 1, 4, 5, 6, z : 3 );         §\C{// assume p( /* positional */, . . ., /* named */ );}§
    1086 p( 1, z : 3, 4, 5, 6 );         §\C{// assume p( /* positional */, /* named */, . . . );}§
     1127void p( int x, int y = 2, int z = 3... );
     1128p( 1, 4, 5, 6, z : 3 );         §\C{// assume p( /* positional */, ... , /* named */ );}§
     1129p( 1, z : 3, 4, 5, 6 );         §\C{// assume p( /* positional */, /* named */, ... );}§
    10871130\end{lstlisting}
    10881131The first call is an error because arguments 4 and 5 are actually positional not ellipse arguments;
     
    11291172\subsection{Type Nesting}
    11301173
    1131 \CFA allows \Index{type nesting}, and type qualification of the nested types (see \VRef[Figure]{f:TypeNestingQualification}), where as C hoists\index{type hoisting} (refactors) nested types into the enclosing scope and has no type qualification.
     1174\CFA allows \Index{type nesting}, and type qualification of the nested typres (see \VRef[Figure]{f:TypeNestingQualification}), where as C hoists\index{type hoisting} (refactors) nested types into the enclosing scope and has no type qualification.
    11321175\begin{figure}
     1176\centering
    11331177\begin{tabular}{@{}l@{\hspace{3em}}l|l@{}}
    11341178\multicolumn{1}{c@{\hspace{3em}}}{\textbf{C Type Nesting}}      & \multicolumn{1}{c}{\textbf{C Implicit Hoisting}}      & \multicolumn{1}{|c}{\textbf{\CFA}}    \\
     
    13971441Mass assignment has the following form:
    13981442\begin{lstlisting}
    1399 [ §\emph{lvalue}§, ..., §\emph{lvalue}§ ] = §\emph{expr}§;
     1443[ §\emph{lvalue}§, ... , §\emph{lvalue}§ ] = §\emph{expr}§;
    14001444\end{lstlisting}
    14011445\index{lvalue}
     
    14371481Multiple assignment has the following form:
    14381482\begin{lstlisting}
    1439 [ §\emph{lvalue}§, . . ., §\emph{lvalue}§ ] = [ §\emph{expr}§, . . ., §\emph{expr}§ ];
     1483[ §\emph{lvalue}§, ... , §\emph{lvalue}§ ] = [ §\emph{expr}§, ... , §\emph{expr}§ ];
    14401484\end{lstlisting}
    14411485\index{lvalue}
     
    18731917\begin{lstlisting}
    18741918switch ( i ) {
    1875   ®case 1, 3, 5®:
     1919  case ®1, 3, 5®:
    18761920        ...
    1877   ®case 2, 4, 6®:
     1921  case ®2, 4, 6®:
    18781922        ...
    18791923}
     
    19061950\begin{lstlisting}
    19071951switch ( i ) {
    1908   ®case 1~5:®
     1952  case ®1~5:®
    19091953        ...
    1910   ®case 10~15:®
     1954  case ®10~15:®
    19111955        ...
    19121956}
     
    19151959\begin{lstlisting}
    19161960switch ( i )
    1917   case 1 ... 5:
     1961  case ®1 ... 5®:
    19181962        ...
    1919   case 10 ... 15:
     1963  case ®10 ... 15®:
    19201964        ...
    19211965}
     
    43694413
    43704414
     4415\section{Incompatible}
     4416
     4417The following incompatibles exist between \CFA and C, and are similar to Annex C for \CC~\cite{ANSI14:C++}.
     4418
     4419\begin{enumerate}
     4420\item
     4421\begin{description}
     4422\item[Change:] add new keywords \\
     4423New keywords are added to \CFA (see~\VRef{s:NewKeywords}).
     4424\item[Rationale:] keywords added to implement new semantics of \CFA.
     4425\item[Effect on original feature:] change to semantics of well-defined feature. \\
     4426Any ISO C programs using these keywords as identifiers are invalid \CFA programs.
     4427\item[Difficulty of converting:] keyword clashes are accommodated by syntactic transformations using the \CFA backquote escape-mechanism (see~\VRef{s:BackquoteIdentifiers}):
     4428\item[How widely used:] clashes among new \CFA keywords and existing identifiers are rare.
     4429\end{description}
     4430
     4431\item
     4432\begin{description}
     4433\item[Change:] type of character literal ©int© to ©char© to allow more intuitive overloading:
     4434\begin{lstlisting}
     4435int rtn( int i );
     4436int rtn( char c );
     4437rtn( 'x' );                                             §\C{// programmer expects 2nd rtn to be called}§
     4438\end{lstlisting}
     4439\item[Rationale:] it is more intuitive for the call to ©rtn© to match the second version of definition of ©rtn© rather than the first.
     4440In particular, output of ©char© variable now print a character rather than the decimal ASCII value of the character.
     4441\begin{lstlisting}
     4442sout | 'x' | " " | (int)'x' | endl;
     4443x 120
     4444\end{lstlisting}
     4445Having to cast ©'x'© to ©char© is non-intuitive.
     4446\item[Effect on original feature:] change to semantics of well-defined feature that depend on:
     4447\begin{lstlisting}
     4448sizeof( 'x' ) == sizeof( int )
     4449\end{lstlisting}
     4450no long work the same in \CFA programs.
     4451\item[Difficulty of converting:] simple
     4452\item[How widely used:] programs that depend upon ©sizeof( 'x' )© are rare and can be changed to ©sizeof(char)©.
     4453\end{description}
     4454
     4455\item
     4456\begin{description}
     4457\item[Change:] make string literals ©const©:
     4458\begin{lstlisting}
     4459char * p = "abc";                               §\C{// valid in C, deprecated in \CFA}§
     4460char * q = expr ? "abc" : "de"; §\C{// valid in C, invalid in \CFA}§
     4461\end{lstlisting}
     4462The type of a string literal is changed from ©[] char© to ©const [] char©.
     4463Similarly, the type of a wide string literal is changed from ©[] wchar_t© to ©const [] wchar_t©.
     4464\item[Rationale:] This change is a safety issue:
     4465\begin{lstlisting}
     4466char * p = "abc";
     4467p[0] = 'w';                                             §\C{// segment fault or change constant literal}§
     4468\end{lstlisting}
     4469The same problem occurs when passing a string literal to a routine that changes its argument.
     4470\item[Effect on original feature:] change to semantics of well-defined feature.
     4471\item[Difficulty of converting:] simple syntactic transformation, because string literals can be converted to ©char *©.
     4472\item[How widely used:] programs that have a legitimate reason to treat string literals as pointers to potentially modifiable memory are rare.
     4473\end{description}
     4474
     4475\item
     4476\begin{description}
     4477\item[Change:] remove \newterm{tentative definitions}, which only occurs at file scope:
     4478\begin{lstlisting}
     4479int i;                                                  §\C{// forward definition}§
     4480int *j = ®&i®;                                  §\C{// forward reference, valid in C, invalid in \CFA}§
     4481int i = 0;                                              §\C{// definition}§
     4482\end{lstlisting}
     4483is valid in C, and invalid in \CFA because duplicate overloaded object definitions at the same scope level are disallowed.
     4484This change makes it impossible to define mutually referential file-local static objects, if initializers are restricted to the syntactic forms of C. For example,
     4485\begin{lstlisting}
     4486struct X { int i; struct X *next; };
     4487static struct X a;                              §\C{// forward definition}§
     4488static struct X b = { 0, ®&a® };        §\C{// forward reference, valid in C, invalid in \CFA}§
     4489static struct X a = { 1, &b };  §\C{// definition}§
     4490\end{lstlisting}
     4491\item[Rationale:] avoids having different initialization rules for builtin types and userdefined types.
     4492\item[Effect on original feature:] change to semantics of well-defined feature.
     4493\item[Difficulty of converting:] the initializer for one of a set of mutually-referential file-local static objects must invoke a routine call to achieve the initialization.
     4494\item[How widely used:] seldom
     4495\end{description}
     4496
     4497\item
     4498\begin{description}
     4499\item[Change:] have ©struct© introduce a scope for nested types:
     4500\begin{lstlisting}
     4501enum ®Colour® { R, G, B, Y, C, M };
     4502struct Person {
     4503        enum ®Colour® { R, G, B };      §\C{// nested type}§
     4504        struct Face {                           §\C{// nested type}§
     4505                ®Colour® Eyes, Hair;    §\C{// type defined outside (1 level)}§
     4506        };
     4507        ß.ß®Colour® shirt;                      §\C{// type defined outside (top level)}§
     4508        ®Colour® pants;                         §\C{// type defined same level}§
     4509        Face looks[10];                         §\C{// type defined same level}§
     4510};
     4511®Colour® c = R;                                 §\C{// type/enum defined same level}§
     4512Personß.ß®Colour® pc = Personß.ßR;      §\C{// type/enum defined inside}§
     4513Personß.ßFace pretty;                   §\C{// type defined inside}§
     4514\end{lstlisting}
     4515In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing structure, i.e., the nested types are hoisted to the scope of the outer-most type, which is not useful and confusing.
     4516\CFA is C \emph{incompatible} on this issue, and provides semantics similar to \Index*[C++]{\CC}.
     4517Nested types are not hoisted and can be referenced using the field selection operator ``©.©'', unlike the \CC scope-resolution operator ``©::©''.
     4518\item[Rationale:] ©struct© scope is crucial to \CFA as an information structuring and hiding mechanism.
     4519\item[Effect on original feature:] change to semantics of well-defined feature.
     4520\item[Difficulty of converting:] Semantic transformation.
     4521\item[How widely used:] C programs rarely have nest types because they are equivalent to the hoisted version.
     4522\end{description}
     4523
     4524\item
     4525\begin{description}
     4526\item[Change:] In C++, the name of a nested class is local to its enclosing class.
     4527\item[Rationale:] C++ classes have member functions which require that classes establish scopes.
     4528\item[Difficulty of converting:] Semantic transformation. To make the struct type name visible in the scope of the enclosing struct, the struct tag could be declared in the scope of the enclosing struct, before the enclosing struct is defined. Example:
     4529\begin{lstlisting}
     4530struct Y;                                               §\C{// struct Y and struct X are at the same scope}§
     4531struct X {
     4532struct Y { /* ... */ } y;
     4533};
     4534\end{lstlisting}
     4535All the definitions of C struct types enclosed in other struct definitions and accessed outside the scope of the enclosing struct could be exported to the scope of the enclosing struct.
     4536Note: this is a consequence of the difference in scope rules, which is documented in 3.3.
     4537\item[How widely used:] Seldom.
     4538\end{description}
     4539
     4540\item
     4541\begin{description}
     4542\item[Change:] comma expression is disallowed as subscript
     4543\item[Rationale:] safety issue to prevent subscripting error for multidimensional arrays: ©x[i,j]© instead of ©x[i][j]©, and this syntactic form then taken by \CFA for new style arrays.
     4544\item[Effect on original feature:] change to semantics of well-defined feature.
     4545\item[Difficulty of converting:] semantic transformation of ©x[i,j]© to ©x[(i,j)]©
     4546\item[How widely used:] seldom.
     4547\end{description}
     4548\end{enumerate}
     4549
     4550
    43714551\section{New Keywords}
    43724552\label{s:NewKeywords}
    43734553
    43744554\begin{quote2}
    4375 \begin{tabular}{ll}
    4376 ©catch©                 & ©lvalue©              \\
    4377 ©catchResume©   &                               \\
    4378 ©choose©                & ©otype©               \\
    4379                                 &                               \\
    4380 ©disable©               & ©throw©               \\
    4381 ©dtype©                 & ©throwResume© \\
    4382                                 & ©trait©               \\
    4383 ©enable©                & ©try©                 \\
    4384                                 &                               \\
    4385 ©fallthrough©                                   \\
    4386 ©fallthru©                                              \\
    4387 ©finally©                                               \\
    4388 ©forall©                                                \\
    4389 ©ftype©                                                 \\
     4555\begin{tabular}{lll}
     4556©catch©                 & ©fallthrough© & ©otype©               \\
     4557©catchResume©   & ©fallthru©    & ©throw©               \\
     4558©choose©                & ©finally©             & ©throwResume© \\
     4559©disable©               & ©forall©              & ©trait©               \\
     4560©dtype©                 & ©ftype©               & ©try©                 \\
     4561©enable©                & ©lvalue©              &                               \\
    43904562\end{tabular}
    43914563\end{quote2}
     
    43954567\label{s:StandardHeaders}
    43964568
    4397 C prescribes the following standard header-files:
     4569C prescribes the following standard header-files~\cite[\S~7.1.2]{C11}:
    43984570\begin{quote2}
    43994571\begin{minipage}{\linewidth}
     
    44124584\end{minipage}
    44134585\end{quote2}
    4414 For the prescribed head-files, \CFA implicit wraps their includes in an ©extern "C"©;
     4586For the prescribed head-files, \CFA implicitly wraps their includes in an ©extern "C"©;
    44154587hence, names in these include files are not mangled\index{mangling!name} (see~\VRef{s:Interoperability}).
    44164588All other C header files must be explicitly wrapped in ©extern "C"© to prevent name mangling.
    4417 
    4418 
    4419 \section{Incompatible}
    4420 
    4421 The following incompatibles exist between \CFA and C, and are similar to Annex C for \CC~\cite{ANSI14:C++}.
    4422 
    4423 \begin{enumerate}
    4424 \item
    4425 \begin{description}
    4426 \item[Change:] add new keywords (see~\VRef{s:NewKeywords}) \\
    4427 New keywords are added to \CFA.
    4428 \item[Rationale:] keywords added to implement new semantics of \CFA.
    4429 \item[Effect on original feature:] change to semantics of well-defined feature. \\
    4430 Any ISO C programs using these keywords as identifiers are invalid \CFA programs.
    4431 \item[Difficulty of converting:] keyword clashes are accommodated by syntactic transformations using the \CFA backquote escape-mechanism:
    4432 \begin{lstlisting}
    4433 int `otype` = 3;                                // make keyword an identifier
    4434 double `choose` = 3.5;
    4435 \end{lstlisting}
    4436 Programs can be converted automatically by enclosing keyword identifiers in backquotes, and the backquotes can be remove later when the identifier name is changed.
    4437 Clashes in C system libraries (include files) can be handled automatically using preprocessor, ©#include_next© and ©-Ifilename©:
    4438 \begin{lstlisting}
    4439 // include file uses the CFA keyword "otype".
    4440 #if ! defined( otype )                  // nesting ?
    4441 #define otype `otype`
    4442 #define __CFA_BFD_H__
    4443 #endif // ! otype
    4444 
    4445 #include_next <bfd.h>                   // must have internal check for multiple expansion
    4446 
    4447 #if defined( otype ) && defined( __CFA_BFD_H__ )        // reset only if set
    4448 #undef otype
    4449 #undef __CFA_BFD_H__
    4450 #endif // otype && __CFA_BFD_H__
    4451 \end{lstlisting}
    4452 \item[How widely used:] clashes among new \CFA keywords and existing identifiers are rare.
    4453 \end{description}
    4454 
    4455 \item
    4456 \begin{description}
    4457 \item[Change:] type of character literal ©int© to ©char© to allow more intuitive overloading:
    4458 \begin{lstlisting}
    4459 int rtn( int i );
    4460 int rtn( char c );
    4461 rtn( 'x' );                                             // programmer expects 2nd rtn to be called
    4462 \end{lstlisting}
    4463 \item[Rationale:] it is more intuitive for the call to ©rtn© to match the second version of definition of ©rtn© rather than the first.
    4464 In particular, output of ©char© variable now print a character rather than the decimal ASCII value of the character.
    4465 \begin{lstlisting}
    4466 sout | 'x' | " " | (int)'x' | endl;
    4467 x 120
    4468 \end{lstlisting}
    4469 Having to cast ©'x'© to ©char© is non-intuitive.
    4470 \item[Effect on original feature:] change to semantics of well-defined feature that depend on:
    4471 \begin{lstlisting}
    4472 sizeof( 'x' ) == sizeof( int )
    4473 \end{lstlisting}
    4474 no long work the same in \CFA programs.
    4475 \item[Difficulty of converting:] simple
    4476 \item[How widely used:] programs that depend upon ©sizeof( 'x' )© are rare and can be changed to ©sizeof(char)©.
    4477 \end{description}
    4478 
    4479 \item
    4480 \begin{description}
    4481 \item[Change:] make string literals ©const©:
    4482 \begin{lstlisting}
    4483 char * p = "abc";                               // valid in C, deprecated in §\CFA§
    4484 char * q = expr ? "abc" : "de"; // valid in C, invalid in §\CFA§
    4485 \end{lstlisting}
    4486 The type of a string literal is changed from ©[] char© to ©const [] char©.
    4487 Similarly, the type of a wide string literal is changed from ©[] wchar_t© to ©const [] wchar_t©.
    4488 \item[Rationale:] This change is a safety issue:
    4489 \begin{lstlisting}
    4490 char * p = "abc";
    4491 p[0] = 'w';                                             // segment fault or change constant literal
    4492 \end{lstlisting}
    4493 The same problem occurs when passing a string literal to a routine that changes its argument.
    4494 \item[Effect on original feature:] change to semantics of well-defined feature.
    4495 \item[Difficulty of converting:] simple syntactic transformation, because string literals can be converted to ©char *©.
    4496 \item[How widely used:] programs that have a legitimate reason to treat string literals as pointers to potentially modifiable memory are rare.
    4497 \end{description}
    4498 
    4499 \item
    4500 \begin{description}
    4501 \item[Change:] remove \newterm{tentative definitions}, which only occurs at file scope:
    4502 \begin{lstlisting}
    4503 int i;                                                  // forward definition
    4504 int *j = ®&i®;                                  // forward reference, valid in C, invalid in §\CFA§
    4505 int i = 0;                                              // definition
    4506 \end{lstlisting}
    4507 is valid in C, and invalid in \CFA because duplicate overloaded object definitions at the same scope level are disallowed.
    4508 This change makes it impossible to define mutually referential file-local static objects, if initializers are restricted to the syntactic forms of C. For example,
    4509 \begin{lstlisting}
    4510 struct X { int i; struct X *next; };
    4511 static struct X a;                              // forward definition
    4512 static struct X b = { 0, ®&a® };        // forward reference, valid in C, invalid in §\CFA§
    4513 static struct X a = { 1, &b };  // definition
    4514 \end{lstlisting}
    4515 \item[Rationale:] avoids having different initialization rules for builtin types and userdefined types.
    4516 \item[Effect on original feature:] change to semantics of well-defined feature.
    4517 \item[Difficulty of converting:] the initializer for one of a set of mutually-referential file-local static objects must invoke a routine call to achieve the initialization.
    4518 \item[How widely used:] seldom
    4519 \end{description}
    4520 
    4521 \item
    4522 \begin{description}
    4523 \item[Change:] have ©struct© introduce a scope for nested types
    4524 In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing
    4525 Example:
    4526 \begin{lstlisting}
    4527 enum ®Colour® { R, G, B, Y, C, M };
    4528 struct Person {
    4529         enum ®Colour® { R, G, B };      // nested type
    4530         struct Face {                           // nested type
    4531                 ®Colour® Eyes, Hair;            // type defined outside (1 level)
    4532         };
    4533         ß.ß®Colour® shirt;                              // type defined outside (top level)
    4534         ®Colour® pants;                         // type defined same level
    4535         Face looks[10];                         // type defined same level
    4536 };
    4537 ®Colour® c = R;                                 // type/enum defined same level
    4538 Personß.ß®Colour® pc = Personß.ßR;      // type/enum defined inside
    4539 Personß.ßFace pretty;                           // type defined inside
    4540 \end{lstlisting}
    4541 \item[Rationale:] ©struct© scope is crucial to \CFA as an information structuring and hiding mechanism.
    4542 \item[Effect on original feature:] change to semantics of well-defined feature.
    4543 \item[Difficulty of converting:] Semantic transformation.
    4544 \item[How widely used:] C programs rarely have nest types because they are equivalent to the hoisted version.
    4545 
    4546 \CFA is C \emph{incompatible} on this issue, and provides semantics similar to \Index*[C++]{\CC}.
    4547 Nested types are not hoisted and can be referenced using the field selection operator ``©.©'', unlike the \CC scope-resolution operator ``©::©''.
    4548 Given that nested types in C are equivalent to not using them, \ie they are essentially useless, it is unlikely there are any realistic usages that break because of this incompatibility.
    4549 \end{description}
    4550 
    4551 \item
    4552 \begin{description}
    4553 \item[Change:] In C++, the name of a nested class is local to its enclosing class.
    4554 \item[Rationale:] C++ classes have member functions which require that classes establish scopes.
    4555 \item[Difficulty of converting:] Semantic transformation. To make the struct type name visible in the scope of the enclosing struct, the struct tag could be declared in the scope of the enclosing struct, before the enclosing struct is defined. Example:
    4556 \begin{lstlisting}
    4557 struct Y; // struct Y and struct X are at the same scope
    4558 struct X {
    4559 struct Y { /* ... */ } y;
    4560 };
    4561 \end{lstlisting}
    4562 All the definitions of C struct types enclosed in other struct definitions and accessed outside the scope of the enclosing struct could be exported to the scope of the enclosing struct.
    4563 Note: this is a consequence of the difference in scope rules, which is documented in 3.3.
    4564 \item[How widely used:] Seldom.
    4565 \end{description}
    4566 
    4567 \item
    4568 \begin{description}
    4569 \item[Change:] comma expression is disallowed as subscript
    4570 \item[Rationale:] safety issue to prevent subscripting error for multidimensional arrays: ©x[i,j]© instead of ©x[i][j]©, and this syntactic form then taken by \CFA for new style arrays.
    4571 \item[Effect on original feature:] change to semantics of well-defined feature.
    4572 \item[Difficulty of converting:] semantic transformation of ©x[i,j]© to ©x[(i,j)]©
    4573 \item[How widely used:] seldom.
    4574 \end{description}
    4575 \end{enumerate}
    45764589
    45774590
     
    47494762\subsection{malloc}
    47504763
     4764\leavevmode
    47514765\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    47524766forall( otype T ) T * malloc( void );§\indexc{malloc}§
     
    47654779forall( otype T ) T * memset( T * ptr );                                // remove when default value available
    47664780\end{lstlisting}
    4767 \
     4781
    47684782
    47694783\subsection{ato / strto}
    47704784
     4785\leavevmode
    47714786\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    47724787int ato( const char * ptr );§\indexc{ato}§
     
    47964811long double _Complex strto( const char * sptr, char ** eptr );
    47974812\end{lstlisting}
    4798 \
    47994813
    48004814
    48014815\subsection{bsearch / qsort}
    48024816
     4817\leavevmode
    48034818\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    48044819forall( otype T | { int ?<?( T, T ); } )
     
    48084823void qsort( const T * arr, size_t dimension );§\indexc{qsort}§
    48094824\end{lstlisting}
    4810 \
    48114825
    48124826
    48134827\subsection{abs}
    48144828
     4829\leavevmode
    48154830\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    48164831char abs( char );§\indexc{abs}§
     
    48254840long double abs( long double _Complex );
    48264841\end{lstlisting}
    4827 \
    48284842
    48294843
    48304844\subsection{random}
    48314845
     4846\leavevmode
    48324847\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    48334848void rand48seed( long int s );§\indexc{rand48seed}§
     
    48434858long double _Complex rand48();
    48444859\end{lstlisting}
    4845 \
    48464860
    48474861
    48484862\subsection{min / max / clamp / swap}
    48494863
     4864\leavevmode
    48504865\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    48514866forall( otype T | { int ?<?( T, T ); } )
     
    48614876void swap( T * t1, T * t2 );§\indexc{swap}§
    48624877\end{lstlisting}
    4863 \
    48644878
    48654879
     
    48724886\subsection{General}
    48734887
     4888\leavevmode
    48744889\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    48754890float fabs( float );§\indexc{fabs}§
     
    49174932long double nan( const char * );
    49184933\end{lstlisting}
    4919 \
    49204934
    49214935
    49224936\subsection{Exponential}
    49234937
     4938\leavevmode
    49244939\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    49254940float exp( float );§\indexc{exp}§
     
    49744989long double logb( long double );
    49754990\end{lstlisting}
    4976 \
    49774991
    49784992
    49794993\subsection{Power}
    49804994
     4995\leavevmode
    49814996\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    49824997float sqrt( float );§\indexc{sqrt}§
     
    50025017long double _Complex pow( long double _Complex, long double _Complex );
    50035018\end{lstlisting}
    5004 \
    50055019
    50065020
    50075021\subsection{Trigonometric}
    50085022
     5023\leavevmode
    50095024\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    50105025float sin( float );§\indexc{sin}§
     
    50585073long double atan( long double, long double );
    50595074\end{lstlisting}
    5060 \
    50615075
    50625076
    50635077\subsection{Hyperbolic}
    50645078
     5079\leavevmode
    50655080\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    50665081float sinh( float );§\indexc{sinh}§
     
    51065121long double _Complex atanh( long double _Complex );
    51075122\end{lstlisting}
    5108 \
    51095123
    51105124
    51115125\subsection{Error / Gamma}
    51125126
     5127\leavevmode
    51135128\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    51145129float erf( float );§\indexc{erf}§
     
    51375152long double tgamma( long double );
    51385153\end{lstlisting}
    5139 \
    51405154
    51415155
    51425156\subsection{Nearest Integer}
    51435157
     5158\leavevmode
    51445159\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    51455160float floor( float );§\indexc{floor}§
     
    51915206long long int llround( long double );
    51925207\end{lstlisting}
    5193 \
    51945208
    51955209
    51965210\subsection{Manipulation}
    51975211
     5212\leavevmode
    51985213\begin{lstlisting}[aboveskip=0pt,belowskip=0pt]
    51995214float copysign( float, float );§\indexc{copysign}§
     
    52325247long double scalbln( long double, long int );
    52335248\end{lstlisting}
    5234 \
    52355249
    52365250
  • src/Parser/DeclarationNode.cc

    r38736854 r6603c1d  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug  9 08:39:20 2016
    13 // Update Count     : 169
     12// Last Modified On : Sat Aug 13 18:56:58 2016
     13// Update Count     : 171
    1414//
    1515
     
    470470
    471471                // there may be typedefs chained onto the type
    472                 if ( o->get_link() ) {
    473                         set_link( o->get_link()->clone() );
     472                if ( o->get_next() ) {
     473                        set_last( o->get_next()->clone() );
    474474                } // if
    475475        } // if
     
    757757DeclarationNode *DeclarationNode::appendList( DeclarationNode *node ) {
    758758        if ( node != 0 ) {
    759                 set_link( node );
     759                set_last( node );
    760760        } // if
    761761        return this;
     
    794794                        errors.append( e );
    795795                } // try
    796                 cur = dynamic_cast<DeclarationNode *>( cur->get_link() );
     796                cur = dynamic_cast<DeclarationNode *>( cur->get_next() );
    797797        } // while
    798798        if ( ! errors.isEmpty() ) {
     
    831831                        errors.append( e );
    832832                } // try
    833                 cur = dynamic_cast< DeclarationNode *>( cur->get_link() );
     833                cur = dynamic_cast< DeclarationNode *>( cur->get_next() );
    834834        } // while
    835835        if ( ! errors.isEmpty() ) {
     
    848848                        errors.append( e );
    849849                } // try
    850                 cur = dynamic_cast< DeclarationNode *>( cur->get_link() );
     850                cur = dynamic_cast< DeclarationNode *>( cur->get_next() );
    851851        } // while
    852852        if ( ! errors.isEmpty() ) {
  • src/Parser/ExpressionNode.cc

    r38736854 r6603c1d  
    1010// Created On       : Sat May 16 13:17:07 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 10 11:07:38 2016
    13 // Update Count     : 486
     12// Last Modified On : Thu Aug 11 20:24:36 2016
     13// Update Count     : 487
    1414//
    1515
     
    309309
    310310//##############################################################################
    311  
    312 // ForCtlExprNode::ForCtlExprNode( ParseNode *init_, ExpressionNode *cond, ExpressionNode *incr ) throw ( SemanticError ) : condition( cond ), change( incr ) {
    313 //      if ( init_ == 0 )
    314 //              init = 0;
    315 //      else {
    316 //              DeclarationNode *decl;
    317 //              ExpressionNode *exp;
    318 
    319 //              if (( decl = dynamic_cast<DeclarationNode *>(init_) ) != 0)
    320 //                      init = new StatementNode( decl );
    321 //              else if (( exp = dynamic_cast<ExpressionNode *>( init_)) != 0)
    322 //                      init = new StatementNode( StatementNode::Exp, exp );
    323 //              else
    324 //                      throw SemanticError("Error in for control expression");
    325 //      }
    326 // }
    327 
    328 // ForCtlExprNode::ForCtlExprNode( const ForCtlExprNode &other )
    329 //      : ExpressionNode( other ), init( maybeClone( other.init ) ), condition( maybeClone( other.condition ) ), change( maybeClone( other.change ) ) {
    330 // }
    331 
    332 // ForCtlExprNode::~ForCtlExprNode() {
    333 //      delete init;
    334 //      delete condition;
    335 //      delete change;
    336 // }
    337 
    338 // Expression *ForCtlExprNode::build() const {
    339 //      // this shouldn't be used!
    340 //      assert( false );
    341 //      return 0;
    342 // }
    343 
    344 // void ForCtlExprNode::print( std::ostream &os, int indent ) const{
    345 //      os << string( indent,' ' ) << "For Control Expression -- :" << endl;
    346 
    347 //      os << string( indent + 2, ' ' ) << "initialization:" << endl;
    348 //      if ( init != 0 )
    349 //              init->printList( os, indent + 4 );
    350 
    351 //      os << string( indent + 2, ' ' ) << "condition: " << endl;
    352 //      if ( condition != 0 )
    353 //              condition->print( os, indent + 4 );
    354 //      os << string( indent + 2, ' ' ) << "increment: " << endl;
    355 //      if ( change != 0 )
    356 //              change->print( os, indent + 4 );
    357 // }
    358 
    359 // void ForCtlExprNode::printOneLine( std::ostream &, int indent ) const {
    360 //      assert( false );
    361 // }
    362 
    363 //##############################################################################
    364311
    365312Expression *build_typevalue( DeclarationNode *decl ) {
  • src/Parser/InitializerNode.cc

    r38736854 r6603c1d  
    1010// Created On       : Sat May 16 13:20:24 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jul  4 15:37:15 2016
    13 // Update Count     : 15
     12// Last Modified On : Sat Aug 13 18:55:11 2016
     13// Update Count     : 18
    1414//
    1515
     
    2525        : expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
    2626        if ( aggrp )
    27                 kids = dynamic_cast< InitializerNode *>( get_link() );
     27                kids = dynamic_cast< InitializerNode *>( get_next() );
    2828
    2929        if ( kids != 0 )
    30                 set_link( 0 );
     30                set_last( 0 );
    3131}
    3232
     
    3434        : expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
    3535        if ( init != 0 )
    36                 set_link(init);
     36                set_last( init );
    3737
    3838        if ( aggrp )
    39                 kids = dynamic_cast< InitializerNode *>( get_link() );
     39                kids = dynamic_cast< InitializerNode *>( get_next() );
    4040
    4141        if ( kids != 0 )
     
    5858                        while ( curdes != 0) {
    5959                                curdes->printOneLine(os);
    60                                 curdes = (ExpressionNode *)(curdes->get_link());
     60                                curdes = (ExpressionNode *)(curdes->get_next());
    6161                                if ( curdes ) os << ", ";
    6262                        } // while
     
    7272
    7373        InitializerNode *moreInit;
    74         if  ( get_link() != 0 && ((moreInit = dynamic_cast< InitializerNode * >( get_link() ) ) != 0) )
     74        if  ( get_next() != 0 && ((moreInit = dynamic_cast< InitializerNode * >( get_next() ) ) != 0) )
    7575                moreInit->printOneLine( os );
    7676}
  • src/Parser/ParseNode.cc

    r38736854 r6603c1d  
    1010// Created On       : Sat May 16 13:26:29 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Aug  7 23:32:47 2016
    13 // Update Count     : 94
     12// Last Modified On : Sat Aug 13 18:55:35 2016
     13// Update Count     : 98
    1414//
    1515
     
    3131        ParseNode *current = this;
    3232
    33         while ( current->get_link() != 0 )
    34         current = current->get_link();
    35 
     33        while ( current->get_next() != 0 )
     34        current = current->get_next();
    3635        return current;
    3736}
    3837
    39 ParseNode *ParseNode::set_link( ParseNode *next_ ) {
     38ParseNode *ParseNode::set_last( ParseNode *next_ ) {
    4039        if ( next_ != 0 ) get_last()->next = next_;
    4140        return this;
     
    5453
    5554ParseNode &ParseNode::operator,( ParseNode &p ) {
    56         set_link( &p );
    57 
     55        set_last( &p );
    5856        return *this;
    5957}
  • src/Parser/ParseNode.h

    r38736854 r6603c1d  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 11 12:24:11 2016
    13 // Update Count     : 443
     12// Last Modified On : Sun Aug 14 16:29:20 2016
     13// Update Count     : 483
    1414//
    1515
     
    4545        virtual ~ParseNode();
    4646
    47         ParseNode *get_link() const { return next; }
     47        ParseNode *get_next() const { return next; }
     48        ParseNode *set_next( ParseNode *newlink ) { next = newlink; return this; }
    4849        ParseNode *get_last();
    49         ParseNode *set_link( ParseNode * );
    50         void set_next( ParseNode *newlink ) { next = newlink; }
     50        ParseNode *set_last( ParseNode * );
    5151
    5252        virtual ParseNode *clone() const { return 0; };
     
    9292        ExpressionNode *expr;
    9393        bool aggregate;
    94         ExpressionNode *designator; // may be list
     94        ExpressionNode *designator;                                                     // may be list
    9595        InitializerNode *kids;
    9696        bool maybeConstructed;
     
    336336
    337337        StatementNode();
    338         StatementNode( const std::string *name );
    339         StatementNode( Type t, ExpressionNode *control = 0, StatementNode *block = 0 );
    340         StatementNode( Type t, std::string *target );
    341338        StatementNode( DeclarationNode *decl );
    342 
    343339        ~StatementNode();
    344 
    345         static StatementNode *newCatchStmt( DeclarationNode *d = 0, StatementNode *s = 0, bool catchRestP = false );
    346 
    347         StatementNode *set_block( StatementNode *b ) { block = b; return this; }
    348         StatementNode *get_block() const { return block; }
    349 
    350         void set_control( ExpressionNode *c ) { control = c; }
    351         ExpressionNode *get_control() const { return control; }
    352340
    353341        StatementNode::Type get_type() const { return type; }
     
    357345
    358346        void addDeclaration( DeclarationNode *newDecl ) { decl = newDecl; }
    359         void setCatchRest( bool newVal ) { isCatchRest = newVal; }
    360 
    361         std::string get_target() const;
    362 
    363         // StatementNode *add_controlexp( ExpressionNode * );
    364         StatementNode *append_block( StatementNode * );
     347
    365348        virtual StatementNode *append_last_case( StatementNode * );
    366349
    367         void print( std::ostream &os, int indent = 0) const;
     350        virtual void print( std::ostream &os, int indent = 0) const {}
    368351        virtual StatementNode *clone() const;
    369352        virtual Statement *build() const;
    370   private:
     353  public:
    371354        static const char *StType[];
    372355        Type type;
    373         ExpressionNode *control;
    374         StatementNode *block;
    375356        std::list<std::string> labels;
    376         std::string *target;                            // target label for jump statements
    377357        DeclarationNode *decl;
    378         bool isCatchRest;
    379358}; // StatementNode
    380359
    381360class StatementNode2 : public StatementNode {
    382361  public:
    383         StatementNode2() {}
     362        StatementNode2() { stmt = nullptr; }
    384363        StatementNode2( Statement *stmt ) : stmt( stmt ) {}
     364        StatementNode2( DeclarationNode *decl );
    385365        virtual ~StatementNode2() {}
    386366
     
    392372                return this;
    393373        }
     374        virtual std::list<std::string> get_labels() const { assert( false ); return StatementNode::get_labels(); }
     375
    394376        virtual StatementNode *append_last_case( StatementNode * );
    395         virtual std::list<std::string> get_labels() const { assert( false ); return StatementNode::get_labels(); }
    396377
    397378        virtual void print( std::ostream &os, int indent = 0 ) {}
     
    401382}; // StatementNode
    402383
     384Statement *build_expr( ExpressionNode *ctl );
     385
    403386struct ForCtl {
    404387        ForCtl( ExpressionNode *expr, ExpressionNode *condition, ExpressionNode *change ) :
    405                 init( new StatementNode( StatementNode::Exp, expr ) ), condition( condition ), change( change ) {}
     388                init( new StatementNode2( build_expr( expr ) ) ), condition( condition ), change( change ) {}
    406389        ForCtl( DeclarationNode *decl, ExpressionNode *condition, ExpressionNode *change ) :
    407                 init( new StatementNode( decl ) ), condition( condition ), change( change ) {}
     390                init( new StatementNode2( decl ) ), condition( condition ), change( change ) {}
    408391
    409392        StatementNode *init;
     
    412395};
    413396
    414 Statement *build_expr( ExpressionNode *ctl );
    415397Statement *build_if( ExpressionNode *ctl, StatementNode *then_stmt, StatementNode *else_stmt );
    416398Statement *build_switch( ExpressionNode *ctl, StatementNode *stmt );
     
    423405Statement *build_return( ExpressionNode *ctl );
    424406Statement *build_throw( ExpressionNode *ctl );
     407Statement *build_try( StatementNode *try_stmt, StatementNode *catch_stmt, StatementNode *finally_stmt );
     408Statement *build_catch( DeclarationNode *decl, StatementNode *stmt, bool catchAny = false );
     409Statement *build_finally( StatementNode *stmt );
    425410
    426411//##############################################################################
     
    429414  public:
    430415        CompoundStmtNode();
    431         CompoundStmtNode( const std::string * );
    432416        CompoundStmtNode( StatementNode * );
    433417        ~CompoundStmtNode();
     
    445429class AsmStmtNode : public StatementNode {
    446430  public:
    447         AsmStmtNode( Type, bool voltile, ConstantExpr *instruction, ExpressionNode *output = 0, ExpressionNode *input = 0, ExpressionNode *clobber = 0, LabelNode *gotolabels = 0 );
     431        AsmStmtNode( bool voltile, ConstantExpr *instruction, ExpressionNode *output = 0, ExpressionNode *input = 0, ExpressionNode *clobber = 0, LabelNode *gotolabels = 0 );
    448432        ~AsmStmtNode();
    449433
    450         void print( std::ostream &os, int indent = 0 ) const;
     434        void print( std::ostream &os, int indent = 0 ) const {}
    451435        Statement *build() const;
    452436  private:
     
    477461                        errors.append( e );
    478462                } // try
    479                 cur = dynamic_cast< NodeType *>( cur->get_link() );
     463                cur = dynamic_cast< NodeType *>( cur->get_next() );
    480464        } // while
    481465        if ( ! errors.isEmpty() ) {
  • src/Parser/StatementNode.cc

    r38736854 r6603c1d  
    1010// Created On       : Sat May 16 14:59:41 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 11 16:19:45 2016
    13 // Update Count     : 210
     12// Last Modified On : Sun Aug 14 13:10:54 2016
     13// Update Count     : 288
    1414//
    1515
     
    3434};
    3535
    36 StatementNode::StatementNode() : ParseNode(), control( 0 ), block( 0 ), labels( 0 ), target( 0 ), decl( 0 ), isCatchRest ( false ) {}
    37 
    38 StatementNode::StatementNode( const string *name ) : ParseNode( name ), control( 0 ), block( 0 ), labels( 0 ), target( 0 ), decl( 0 ), isCatchRest ( false ) {}
    39 
    40 StatementNode::StatementNode( DeclarationNode *decl ) : type( Decl ), control( 0 ), block( 0 ), labels( 0 ), target( 0 ), isCatchRest ( false ) {
     36StatementNode::StatementNode() : ParseNode(), labels( 0 ), decl( 0 ) {}
     37
     38StatementNode::StatementNode( DeclarationNode *decl ) : type( Decl ), labels( 0 ) {
     39        assert( false );
    4140        if ( decl ) {
    4241                if ( DeclarationNode *agg = decl->extractAggregate() ) {
     
    4645                        nextStmt->decl = decl;
    4746                        next = nextStmt;
    48                         if ( decl->get_link() ) {
    49                                 next->set_next( new StatementNode( dynamic_cast< DeclarationNode* >( decl->get_link() ) ) );
     47                        if ( decl->get_next() ) {
     48                                next->set_next( new StatementNode( dynamic_cast<DeclarationNode *>( decl->get_next() ) ) );
    5049                                decl->set_next( 0 );
    5150                        } // if
    5251                } else {
    53                         if ( decl->get_link() ) {
    54                                 next = new StatementNode( dynamic_cast< DeclarationNode* >( decl->get_link() ) );
     52                        if ( decl->get_next() ) {
     53                                next = new StatementNode( dynamic_cast<DeclarationNode *>( decl->get_next() ) );
    5554                                decl->set_next( 0 );
    5655                        } // if
     
    6059}
    6160
    62 StatementNode::StatementNode( Type t, ExpressionNode *ctrl_label, StatementNode *block ) : type( t ), control( ctrl_label ), block( block ), labels( 0 ), target( 0 ), decl( 0 ), isCatchRest ( false ) {
    63         this->control = ( t == Default ) ? 0 : control;
    64 }
    65 
    66 StatementNode::StatementNode( Type t, string *target ) : type( t ), control( 0 ), block( 0 ), labels( 0 ), target( target ), decl( 0 ), isCatchRest ( false ) {}
     61StatementNode2::StatementNode2( DeclarationNode *decl ) {
     62        if ( decl ) {
     63                DeclarationNode *agg = decl->extractAggregate();
     64                if ( agg ) {
     65                        StatementNode *nextStmt = new StatementNode;
     66                        nextStmt->type = Decl;
     67                        nextStmt->decl = decl;
     68                        next = nextStmt;
     69                        if ( decl->get_next() ) {
     70                                next->set_next( new StatementNode2( dynamic_cast<DeclarationNode *>(decl->get_next()) ) );
     71                                decl->set_next( 0 );
     72                        } // if
     73                } else {
     74                        if ( decl->get_next() ) {
     75                                next = new StatementNode2( dynamic_cast<DeclarationNode *>( decl->get_next() ) );
     76                                decl->set_next( 0 );
     77                        } // if
     78                        agg = decl;
     79                } // if
     80                stmt = new DeclStmt( noLabels, maybeBuild<Declaration>(agg) );
     81        } else {
     82                assert( false );
     83        } // if
     84}
    6785
    6886StatementNode::~StatementNode() {
    69         delete control;
    70         delete block;
    71         delete target;
    7287        delete decl;
    7388}
    7489
    75 StatementNode * StatementNode::newCatchStmt( DeclarationNode *d, StatementNode *s, bool catchRestP ) {
    76         StatementNode *ret = new StatementNode( StatementNode::Catch, 0, s );
    77         ret->addDeclaration( d );
    78         ret->setCatchRest( catchRestP );
    79 
    80         return ret;
    81 }
    82 
    83 std::string StatementNode::get_target() const{
    84         if ( target )
    85                 return *target;
    86 
    87         return string("");
    88 }
    89 
    9090StatementNode * StatementNode::clone() const {
    91         StatementNode *newnode = new StatementNode( type, maybeClone( control ), maybeClone( block ) );
    92         if ( target ) {
    93                 newnode->target = new string( *target );
    94         } else {
    95                 newnode->target = 0;
    96         } // if
    97         newnode->decl = maybeClone( decl );
    98         return newnode;
     91        assert( false );
     92        return 0;
    9993}
    10094
     
    107101}
    108102
    109 StatementNode *StatementNode::append_block( StatementNode *stmt ) {
    110         if ( stmt != 0 ) {
    111                 if ( block == 0 )
    112                         block = stmt;
    113                 else
    114                         block->set_link( stmt );
    115         } // if
    116         return this;
    117 }
    118 
    119103StatementNode *StatementNode::append_last_case( StatementNode *stmt ) {
    120104        assert( false );
    121         if ( stmt != 0 ) {
    122                 StatementNode *next = ( StatementNode *)get_link();
    123                 if ( next && ( next->get_type() == StatementNode::Case || next->get_type() == StatementNode::Default ) )
    124                         next->append_last_case( stmt );
    125                 else
    126                         if ( block == 0 )
    127                                 block = stmt;
    128                         else
    129                                 block->set_link( stmt );
    130         } // if
    131105        return this;
    132106}
     
    134108StatementNode *StatementNode2::append_last_case( StatementNode *stmt ) {
    135109        StatementNode *prev = this;
    136         for ( StatementNode * curr = prev; curr != nullptr; curr = (StatementNode *)curr->get_link() ) {
     110        // find end of list and maintain previous pointer
     111        for ( StatementNode * curr = prev; curr != nullptr; curr = (StatementNode *)curr->get_next() ) {
    137112                StatementNode2 *node = dynamic_cast<StatementNode2 *>(curr);
    138113                assert( node );
     
    140115                prev = curr;
    141116        } // for
     117        // conver from StatementNode list to Statement list
    142118        StatementNode2 *node = dynamic_cast<StatementNode2 *>(prev);
    143119        std::list<Statement *> stmts;
    144120        buildList( stmt, stmts );
    145         CaseStmt * caseStmt;
    146         caseStmt = dynamic_cast<CaseStmt *>(node->stmt);
     121        // splice any new Statements to end of currents Statements
     122        CaseStmt * caseStmt = dynamic_cast<CaseStmt *>(node->stmt);
    147123        caseStmt->get_statements().splice( caseStmt->get_statements().end(), stmts );
    148124        return this;
    149125}
    150126
    151 void StatementNode::print( std::ostream &os, int indent ) const {
    152         if ( ! labels.empty() ) {
    153                 std::list<std::string>::const_iterator i;
    154 
    155                 os << string( indent, ' ' );
    156                 for ( i = labels.begin(); i != labels.end(); i++ )
    157                         os << *i << ":";
    158                 os << endl;
    159         } // if
    160 
     127Statement *StatementNode::build() const {
    161128        switch ( type ) {
    162129          case Decl:
    163                 decl->print( os, indent );
    164                 break;
     130                return new DeclStmt( noLabels, maybeBuild< Declaration >( decl ) );
     131                assert( false );
    165132          case Exp:
    166                 if ( control ) {
    167                         os << string( indent, ' ' );
    168                         control->print( os, indent );
    169                         os << endl;
    170                 } else
    171                         os << string( indent, ' ' ) << "Null Statement" << endl;
    172                 break;
    173           default:
    174                 os << string( indent, ' ' ) << StatementNode::StType[type] << endl;
    175                 if ( type == Catch ) {
    176                         if ( decl ) {
    177                                 os << string( indent + ParseNode::indent_by, ' ' ) << "Declaration: " << endl;
    178                                 decl->print( os, indent + 2 * ParseNode::indent_by );
    179                         } else if ( isCatchRest ) {
    180                                 os << string( indent + ParseNode::indent_by, ' ' ) << "Catches the rest " << endl;
    181                         } else {
    182                                 ; // should never reach here
    183                         } // if
    184                 } // if
    185                 if ( control ) {
    186                         os << string( indent + ParseNode::indent_by, ' ' ) << "Control: " << endl;
    187                         control->printList( os, indent + 2 * ParseNode::indent_by );
    188                 } // if
    189                 if ( block ) {
    190                         os << string( indent + ParseNode::indent_by, ' ' ) << "Cases: " << endl;
    191                         block->printList( os, indent + 2 * ParseNode::indent_by );
    192                 } // if
    193                 if ( target ) {
    194                         os << string( indent + ParseNode::indent_by, ' ' ) << "Target: " << get_target() << endl;
    195                 } // if
    196                 break;
    197         } // switch
    198 }
    199 
    200 Statement *StatementNode::build() const {
    201         std::list<Statement *> branches;
    202         std::list<Expression *> exps;
    203         std::list<Label> labs;
    204 
    205         if ( ! labels.empty() ) {
    206                 std::back_insert_iterator< std::list<Label> > lab_it( labs );
    207                 copy( labels.begin(), labels.end(), lab_it );
    208         } // if
    209 
    210         // try {
    211         buildList<Statement, StatementNode>( get_block(), branches );
    212 
    213         switch ( type ) {
    214           case Decl:
    215                 return new DeclStmt( labs, maybeBuild< Declaration >( decl ) );
    216           case Exp:
    217                 {
    218                         Expression *e = maybeBuild< Expression >( get_control() );
    219 
    220                         if ( e )
    221                                 return new ExprStmt( labs, e );
    222                         else
    223                                 return new NullStmt( labs );
    224                 }
    225                 assert( false );
    226133          case If:
    227                 // {
    228                 //      Statement *thenb = 0, *elseb = 0;
    229                 //      assert( branches.size() >= 1 );
    230 
    231                 //      thenb = branches.front();
    232                 //      branches.pop_front();
    233                 //      if ( ! branches.empty() ) {
    234                 //              elseb = branches.front();
    235                 //              branches.pop_front();
    236                 //      } // if
    237                 //      return new IfStmt( labs, notZeroExpr( maybeBuild<Expression>(get_control()) ), thenb, elseb );
    238                 // }
    239                 assert( false );
    240134          case Switch:
    241                 // return new SwitchStmt( labs, maybeBuild<Expression>(get_control()), branches );
    242                 assert( false );
    243135          case Case:
    244                 //return new CaseStmt( labs, maybeBuild<Expression>(get_control() ), branches );
    245                 assert( false );
    246136          case Default:
    247                 //return new CaseStmt( labs, 0, branches, true );
    248                 assert( false );
    249137          case While:
    250                 // assert( branches.size() == 1 );
    251                 // return new WhileStmt( labs, notZeroExpr( maybeBuild<Expression>(get_control()) ), branches.front() );
    252                 assert( false );
    253138          case Do:
    254                 // assert( branches.size() == 1 );
    255                 // return new WhileStmt( labs, notZeroExpr( maybeBuild<Expression>(get_control()) ), branches.front(), true );
    256                 assert( false );
    257139          case For:
    258                 // {
    259                 //      assert( branches.size() == 1 );
    260 
    261                 //      ForCtlExprNode *ctl = dynamic_cast<ForCtlExprNode *>( get_control() );
    262                 //      assert( ctl != 0 );
    263 
    264                 //      std::list<Statement *> init;
    265                 //      if ( ctl->get_init() != 0 ) {
    266                 //              buildList( ctl->get_init(), init );
    267                 //      } // if
    268 
    269                 //      Expression *cond = 0;
    270                 //      if ( ctl->get_condition() != 0 )
    271                 //              cond = notZeroExpr( maybeBuild<Expression>(ctl->get_condition()) );
    272 
    273                 //      Expression *incr = 0;
    274                 //      if ( ctl->get_change() != 0 )
    275                 //              incr = maybeBuild<Expression>(ctl->get_change());
    276 
    277                 //      return new ForStmt( labs, init, cond, incr, branches.front() );
    278                 // }
    279                 assert( false );
    280140          case Goto:
    281                 // {
    282                 //      if ( get_target() == "" ) {                                     // computed goto
    283                 //              assert( get_control() != 0 );
    284                 //              return new BranchStmt( labs, maybeBuild<Expression>(get_control()), BranchStmt::Goto );
    285                 //      } // if
    286 
    287                 //      return new BranchStmt( labs, get_target(), BranchStmt::Goto );
    288                 // }
    289                 assert( false );
    290141          case Break:
    291                 // return new BranchStmt( labs, get_target(), BranchStmt::Break );
    292                 assert( false );
    293142          case Continue:
    294                 // return new BranchStmt( labs, get_target(), BranchStmt::Continue );
    295                 assert( false );
    296143          case Return:
    297144          case Throw :
    298                 // buildList( get_control(), exps );
    299                 // if ( exps.size() ==0 )
    300                 //      return new ReturnStmt( labs, 0, type == Throw );
    301                 // if ( exps.size() > 0 )
    302                 //      return new ReturnStmt( labs, exps.back(), type == Throw );
     145          case Try:
     146          case Catch:
     147          case Finally:
     148          case Asm:
     149          default:
    303150                assert( false );
    304           case Try:
    305                 {
    306                         assert( branches.size() >= 0 );
    307                         CompoundStmt *tryBlock = dynamic_cast<CompoundStmt *>( branches.front());
    308                         branches.pop_front();
    309                         FinallyStmt *finallyBlock = 0;
    310                         if ( ( finallyBlock = dynamic_cast<FinallyStmt *>( branches.back())) ) {
    311                                 branches.pop_back();
    312                         } // if
    313                         return new TryStmt( labs, tryBlock, branches, finallyBlock );
    314                 }
    315           case Catch:
    316                 {
    317                         assert( branches.size() == 1 );
    318 
    319                         return new CatchStmt( labs, maybeBuild< Declaration >( decl ), branches.front(), isCatchRest );
    320                 }
    321           case Finally:
    322                 {
    323                         assert( branches.size() == 1 );
    324                         CompoundStmt *block = dynamic_cast<CompoundStmt *>( branches.front() );
    325                         assert( block != 0 );
    326 
    327                         return new FinallyStmt( labs, block );
    328                 }
    329           case Asm:
    330                 assert( false );
    331           default:
    332                 // shouldn't be here
    333151                return 0;
    334152        } // switch
     
    422240}
    423241
     242Statement *build_try( StatementNode *try_stmt, StatementNode *catch_stmt, StatementNode *finally_stmt ) {
     243        std::list<Statement *> branches;
     244        buildList<Statement, StatementNode>( catch_stmt, branches );
     245        CompoundStmt *tryBlock = dynamic_cast<CompoundStmt *>(maybeBuild<Statement>(try_stmt));
     246        assert( tryBlock );
     247        FinallyStmt *finallyBlock = dynamic_cast<FinallyStmt *>(maybeBuild<Statement>(finally_stmt) );
     248        return new TryStmt( noLabels, tryBlock, branches, finallyBlock );
     249}
     250Statement *build_catch( DeclarationNode *decl, StatementNode *stmt, bool catchAny ) {
     251        std::list<Statement *> branches;
     252        buildList<Statement, StatementNode>( stmt, branches );
     253        assert( branches.size() == 1 );
     254        return new CatchStmt( noLabels, maybeBuild<Declaration>(decl), branches.front(), catchAny );
     255}
     256Statement *build_finally( StatementNode *stmt ) {
     257        std::list<Statement *> branches;
     258        buildList<Statement, StatementNode>( stmt, branches );
     259        assert( branches.size() == 1 );
     260        return new FinallyStmt( noLabels, dynamic_cast<CompoundStmt *>( branches.front() ) );
     261}
     262
    424263
    425264CompoundStmtNode::CompoundStmtNode() : first( 0 ), last( 0 ) {}
    426 
    427 CompoundStmtNode::CompoundStmtNode( const string *name_ ) : StatementNode( name_ ), first( 0 ), last( 0 ) {}
    428265
    429266CompoundStmtNode::CompoundStmtNode( StatementNode *stmt ) : first( stmt ) {
     
    441278void CompoundStmtNode::add_statement( StatementNode *stmt ) {
    442279        if ( stmt != 0 ) {
    443                 last->set_link( stmt );
    444                 last = ( StatementNode *)( stmt->get_link());
     280                last->set_last( stmt );
     281                last = ( StatementNode *)( stmt->get_next());
    445282        } // if
    446283}
     
    467304
    468305
    469 AsmStmtNode::AsmStmtNode( Type t, bool voltile, ConstantExpr *instruction, ExpressionNode *output, ExpressionNode *input, ExpressionNode *clobber, LabelNode *gotolabels ) :
    470         StatementNode( t ), voltile( voltile ), instruction( instruction ), output( output ), input( input ), clobber( clobber ) {
     306AsmStmtNode::AsmStmtNode( bool voltile, ConstantExpr *instruction, ExpressionNode *output, ExpressionNode *input, ExpressionNode *clobber, LabelNode *gotolabels ) :
     307        voltile( voltile ), instruction( instruction ), output( output ), input( input ), clobber( clobber ) {
     308        type = Asm;
    471309        if ( gotolabels ) {
    472310                this->gotolabels = gotolabels->get_labels();
     
    477315AsmStmtNode::~AsmStmtNode() {
    478316        delete output; delete input; delete clobber;
    479 }
    480 
    481 void AsmStmtNode::print( std::ostream &os, int indent ) const {
    482         StatementNode::print( os, indent );                                     // print statement labels
    483         os << string( indent + ParseNode::indent_by, ' ' ) << "volatile:" << voltile << endl;
    484         if ( instruction ) {
    485                 os << string( indent + ParseNode::indent_by, ' ' ) << "Instruction:" << endl;
    486 //              instruction->printList( os, indent + 2 * ParseNode::indent_by );
    487         } // if
    488         if ( output ) {
    489                 os << string( indent + ParseNode::indent_by, ' ' ) << "Output:" << endl;
    490                 output->printList( os, indent + 2 * ParseNode::indent_by );
    491         } // if
    492         if ( input ) {
    493                 os << string( indent + ParseNode::indent_by, ' ' ) << "Input:" << endl;
    494                 input->printList( os, indent + 2 * ParseNode::indent_by );
    495         } // if
    496         if ( clobber ) {
    497                 os << string( indent + ParseNode::indent_by, ' ' ) << "Clobber:" << endl;
    498 //              clobber->printList( os, indent + 2 * ParseNode::indent_by );
    499         } // if
    500         if ( ! gotolabels.empty() ) {
    501                 os << string( indent + ParseNode::indent_by, ' ' ) << "Goto Labels:" << endl;
    502                 os << string( indent + 2 * ParseNode::indent_by, ' ' );
    503                 for ( std::list<Label>::const_iterator i = gotolabels.begin();; ) {
    504                         os << *i;
    505                         i++;
    506                   if ( i == gotolabels.end() ) break;
    507                         os << ", ";
    508                 }
    509                 os << endl;
    510         } // if
    511317}
    512318
     
    528334}
    529335
     336// Statement *build_asm( bool voltile, ConstantExpr *instruction, ExpressionNode *output = 0, ExpressionNode *input = 0, ExpressionNode *clobber = 0, LabelNode *gotolabels = 0 ) {
     337//      std::list<Label> labs;
     338
     339//      if ( ! get_labels().empty() ) {
     340//              std::back_insert_iterator< std::list<Label> > lab_it( labs );
     341//              copy( get_labels().begin(), get_labels().end(), lab_it );
     342//      } // if
     343
     344//      std::list< Expression * > out, in;
     345//      std::list< ConstantExpr * > clob;
     346//      buildList( output, out );
     347//      buildList( input, in );
     348//      buildList( clobber, clob );
     349//      std::list< Label > gotolabs = gotolabels;
     350//      return new AsmStmt( labs, voltile, instruction, out, in, clob, gotolabs );
     351// }
     352
    530353// Local Variables: //
    531354// tab-width: 4 //
  • src/Parser/TypeData.cc

    r38736854 r6603c1d  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Aug  7 07:51:48 2016
    13 // Update Count     : 58
     12// Last Modified On : Sat Aug 13 18:38:41 2016
     13// Update Count     : 59
    1414//
    1515
     
    495495                        decl = new FunctionDecl( name, sc, linkage, buildFunction(), 0, isInline, isNoreturn );
    496496                } // if
    497                 for ( DeclarationNode *cur = function->idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_link() ) ) {
     497                for ( DeclarationNode *cur = function->idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_next() ) ) {
    498498                        if ( cur->get_name() != "" ) {
    499499                                decl->get_oldIdents().insert( decl->get_oldIdents().end(), cur->get_name() );
     
    909909        buildList( enumeration->constants, ret->get_members() );
    910910        std::list< Declaration * >::iterator members = ret->get_members().begin();
    911         for ( const DeclarationNode *cur = enumeration->constants; cur != NULL; cur = dynamic_cast<DeclarationNode *>( cur->get_link() ), ++members ) {
     911        for ( const DeclarationNode *cur = enumeration->constants; cur != NULL; cur = dynamic_cast<DeclarationNode *>( cur->get_next() ), ++members ) {
    912912                if ( cur->get_enumeratorValue() != NULL ) {
    913913                        ObjectDecl *member = dynamic_cast<ObjectDecl *>(*members);
  • src/Parser/parser.cc

    r38736854 r6603c1d  
    10201020static const yytype_uint16 yyrline[] =
    10211021{
    1022        0,   299,   299,   305,   314,   315,   316,   320,   321,   322,
    1023      326,   327,   331,   332,   336,   337,   341,   342,   353,   355,
    1024      357,   359,   364,   365,   371,   375,   377,   378,   380,   381,
    1025      383,   385,   387,   396,   397,   403,   404,   408,   409,   413,
    1026      417,   419,   421,   423,   428,   431,   433,   435,   440,   453,
    1027      455,   457,   459,   461,   463,   465,   467,   469,   471,   473,
    1028      480,   481,   487,   488,   489,   490,   494,   495,   497,   502,
    1029      503,   505,   507,   512,   513,   515,   520,   521,   523,   528,
    1030      529,   531,   533,   535,   540,   541,   543,   548,   549,   554,
    1031      555,   560,   561,   566,   567,   572,   573,   578,   579,   582,
    1032      584,   589,   594,   595,   597,   603,   604,   608,   609,   610,
    1033      611,   612,   613,   614,   615,   616,   617,   618,   624,   626,
    1034      628,   630,   635,   636,   641,   642,   648,   649,   655,   656,
    1035      657,   658,   659,   660,   661,   662,   663,   673,   680,   682,
    1036      692,   693,   698,   700,   706,   708,   712,   713,   718,   723,
    1037      726,   728,   730,   740,   742,   753,   754,   756,   761,   763,
    1038      767,   768,   773,   774,   778,   783,   784,   788,   790,   796,
    1039      797,   801,   803,   805,   807,   813,   814,   818,   820,   825,
    1040      827,   829,   834,   836,   841,   843,   847,   850,   854,   857,
    1041      861,   863,   865,   867,   872,   874,   876,   885,   887,   889,
    1042      891,   893,   898,   900,   902,   904,   909,   922,   923,   928,
    1043      930,   935,   939,   941,   943,   945,   947,   953,   954,   960,
    1044      961,   965,   966,   971,   973,   979,   980,   982,   987,   989,
    1045      996,   998,  1002,  1003,  1008,  1010,  1014,  1015,  1019,  1021,
    1046     1025,  1026,  1030,  1031,  1035,  1036,  1051,  1052,  1053,  1054,
    1047     1055,  1059,  1064,  1071,  1081,  1086,  1091,  1099,  1104,  1109,
    1048     1114,  1119,  1127,  1149,  1154,  1161,  1163,  1170,  1175,  1180,
    1049     1191,  1196,  1201,  1206,  1211,  1220,  1225,  1233,  1234,  1235,
    1050     1236,  1242,  1247,  1255,  1256,  1257,  1258,  1262,  1263,  1264,
    1051     1265,  1270,  1271,  1280,  1281,  1286,  1287,  1292,  1294,  1296,
    1052     1298,  1300,  1303,  1302,  1314,  1315,  1317,  1327,  1328,  1333,
    1053     1337,  1339,  1341,  1343,  1345,  1347,  1349,  1351,  1356,  1358,
    1054     1360,  1362,  1364,  1366,  1368,  1370,  1372,  1374,  1376,  1378,
    1055     1380,  1386,  1387,  1389,  1391,  1393,  1398,  1399,  1405,  1406,
    1056     1408,  1410,  1415,  1417,  1419,  1421,  1426,  1427,  1429,  1431,
    1057     1436,  1437,  1439,  1444,  1445,  1447,  1449,  1454,  1456,  1458,
    1058     1463,  1464,  1468,  1470,  1476,  1475,  1479,  1481,  1486,  1488,
    1059     1494,  1495,  1500,  1501,  1503,  1504,  1513,  1514,  1516,  1518,
    1060     1523,  1525,  1531,  1532,  1534,  1537,  1540,  1545,  1546,  1551,
    1061     1556,  1560,  1562,  1568,  1567,  1574,  1576,  1582,  1583,  1591,
    1062     1592,  1596,  1597,  1598,  1600,  1602,  1609,  1610,  1612,  1614,
    1063     1619,  1620,  1626,  1627,  1631,  1632,  1637,  1638,  1639,  1641,
    1064     1649,  1650,  1652,  1655,  1657,  1661,  1662,  1663,  1665,  1667,
    1065     1671,  1676,  1684,  1685,  1694,  1696,  1701,  1702,  1703,  1707,
    1066     1708,  1709,  1713,  1714,  1715,  1719,  1720,  1721,  1726,  1727,
    1067     1728,  1729,  1735,  1736,  1738,  1743,  1744,  1749,  1750,  1751,
    1068     1752,  1753,  1768,  1769,  1774,  1775,  1781,  1783,  1786,  1788,
    1069     1790,  1813,  1814,  1816,  1818,  1823,  1824,  1826,  1831,  1836,
    1070     1837,  1843,  1842,  1846,  1850,  1852,  1854,  1860,  1861,  1866,
    1071     1871,  1873,  1878,  1880,  1881,  1883,  1888,  1890,  1892,  1897,
    1072     1899,  1904,  1909,  1917,  1923,  1922,  1936,  1937,  1942,  1943,
    1073     1947,  1952,  1957,  1965,  1970,  1981,  1982,  1993,  1994,  2000,
    1074     2001,  2005,  2006,  2007,  2010,  2009,  2020,  2029,  2035,  2041,
    1075     2050,  2056,  2062,  2068,  2074,  2082,  2088,  2096,  2102,  2111,
    1076     2112,  2113,  2117,  2121,  2123,  2128,  2129,  2133,  2134,  2139,
    1077     2145,  2146,  2149,  2151,  2152,  2156,  2157,  2158,  2159,  2193,
    1078     2195,  2196,  2198,  2203,  2208,  2213,  2215,  2217,  2222,  2224,
    1079     2226,  2228,  2233,  2235,  2244,  2246,  2247,  2252,  2254,  2256,
    1080     2261,  2263,  2265,  2270,  2272,  2274,  2283,  2284,  2285,  2289,
    1081     2291,  2293,  2298,  2300,  2302,  2307,  2309,  2311,  2326,  2328,
    1082     2329,  2331,  2336,  2337,  2342,  2344,  2346,  2351,  2353,  2355,
    1083     2357,  2362,  2364,  2366,  2376,  2378,  2379,  2381,  2386,  2388,
    1084     2390,  2395,  2397,  2399,  2401,  2406,  2408,  2410,  2441,  2443,
    1085     2444,  2446,  2451,  2456,  2464,  2466,  2468,  2473,  2475,  2480,
    1086     2482,  2496,  2497,  2499,  2504,  2506,  2508,  2510,  2512,  2517,
    1087     2518,  2520,  2522,  2527,  2529,  2531,  2537,  2539,  2541,  2545,
    1088     2547,  2549,  2551,  2565,  2566,  2568,  2573,  2575,  2577,  2579,
    1089     2581,  2586,  2587,  2589,  2591,  2596,  2598,  2600,  2606,  2607,
    1090     2609,  2618,  2621,  2623,  2626,  2628,  2630,  2643,  2644,  2646,
    1091     2651,  2653,  2655,  2657,  2659,  2664,  2665,  2667,  2669,  2674,
    1092     2676,  2684,  2685,  2686,  2691,  2692,  2696,  2698,  2700,  2702,
    1093     2704,  2706,  2713,  2715,  2717,  2719,  2721,  2723,  2725,  2727,
    1094     2729,  2731,  2736,  2738,  2740,  2745,  2771,  2772,  2774,  2778,
    1095     2779,  2783,  2785,  2787,  2789,  2791,  2793,  2800,  2802,  2804,
    1096     2806,  2808,  2810,  2815,  2820,  2822,  2824,  2842,  2844,  2849,
    1097     2850
     1022       0,   298,   298,   304,   313,   314,   315,   319,   320,   321,
     1023     325,   326,   330,   331,   335,   336,   340,   341,   352,   354,
     1024     356,   358,   363,   364,   370,   374,   376,   377,   379,   380,
     1025     382,   384,   386,   395,   396,   402,   403,   407,   408,   412,
     1026     416,   418,   420,   422,   427,   430,   432,   434,   439,   452,
     1027     454,   456,   458,   460,   462,   464,   466,   468,   470,   472,
     1028     479,   480,   486,   487,   488,   489,   493,   494,   496,   501,
     1029     502,   504,   506,   511,   512,   514,   519,   520,   522,   527,
     1030     528,   530,   532,   534,   539,   540,   542,   547,   548,   553,
     1031     554,   559,   560,   565,   566,   571,   572,   577,   578,   581,
     1032     583,   588,   593,   594,   596,   602,   603,   607,   608,   609,
     1033     610,   611,   612,   613,   614,   615,   616,   617,   623,   625,
     1034     627,   629,   634,   635,   640,   641,   647,   648,   654,   655,
     1035     656,   657,   658,   659,   660,   661,   662,   672,   679,   681,
     1036     691,   692,   697,   699,   705,   707,   711,   712,   717,   722,
     1037     725,   727,   729,   739,   741,   752,   753,   755,   759,   761,
     1038     765,   766,   771,   772,   776,   781,   782,   786,   788,   794,
     1039     795,   799,   801,   803,   805,   811,   812,   816,   818,   823,
     1040     825,   827,   832,   834,   839,   841,   845,   848,   852,   855,
     1041     859,   861,   863,   865,   870,   872,   874,   879,   881,   883,
     1042     885,   887,   892,   894,   896,   898,   903,   915,   916,   921,
     1043     923,   928,   932,   934,   936,   938,   940,   946,   947,   953,
     1044     954,   958,   959,   964,   966,   972,   973,   975,   980,   982,
     1045     989,   991,   995,   996,  1001,  1003,  1007,  1008,  1012,  1014,
     1046    1018,  1019,  1023,  1024,  1028,  1029,  1044,  1045,  1046,  1047,
     1047    1048,  1052,  1057,  1064,  1074,  1079,  1084,  1092,  1097,  1102,
     1048    1107,  1112,  1120,  1142,  1147,  1154,  1156,  1163,  1168,  1173,
     1049    1184,  1189,  1194,  1199,  1204,  1213,  1218,  1226,  1227,  1228,
     1050    1229,  1235,  1240,  1248,  1249,  1250,  1251,  1255,  1256,  1257,
     1051    1258,  1263,  1264,  1273,  1274,  1279,  1280,  1285,  1287,  1289,
     1052    1291,  1293,  1296,  1295,  1307,  1308,  1310,  1320,  1321,  1326,
     1053    1330,  1332,  1334,  1336,  1338,  1340,  1342,  1344,  1349,  1351,
     1054    1353,  1355,  1357,  1359,  1361,  1363,  1365,  1367,  1369,  1371,
     1055    1373,  1379,  1380,  1382,  1384,  1386,  1391,  1392,  1398,  1399,
     1056    1401,  1403,  1408,  1410,  1412,  1414,  1419,  1420,  1422,  1424,
     1057    1429,  1430,  1432,  1437,  1438,  1440,  1442,  1447,  1449,  1451,
     1058    1456,  1457,  1461,  1463,  1469,  1468,  1472,  1474,  1479,  1481,
     1059    1487,  1488,  1493,  1494,  1496,  1497,  1506,  1507,  1509,  1511,
     1060    1516,  1518,  1524,  1525,  1527,  1530,  1533,  1538,  1539,  1544,
     1061    1549,  1553,  1555,  1561,  1560,  1567,  1569,  1575,  1576,  1584,
     1062    1585,  1589,  1590,  1591,  1593,  1595,  1602,  1603,  1605,  1607,
     1063    1612,  1613,  1619,  1620,  1624,  1625,  1630,  1631,  1632,  1634,
     1064    1642,  1643,  1645,  1648,  1650,  1654,  1655,  1656,  1658,  1660,
     1065    1664,  1669,  1677,  1678,  1687,  1689,  1694,  1695,  1696,  1700,
     1066    1701,  1702,  1706,  1707,  1708,  1712,  1713,  1714,  1719,  1720,
     1067    1721,  1722,  1728,  1729,  1731,  1736,  1737,  1742,  1743,  1744,
     1068    1745,  1746,  1761,  1762,  1767,  1768,  1774,  1776,  1779,  1781,
     1069    1783,  1806,  1807,  1809,  1811,  1816,  1817,  1819,  1824,  1829,
     1070    1830,  1836,  1835,  1839,  1843,  1845,  1847,  1853,  1854,  1859,
     1071    1864,  1866,  1871,  1873,  1874,  1876,  1881,  1883,  1885,  1890,
     1072    1892,  1897,  1902,  1910,  1916,  1915,  1929,  1930,  1935,  1936,
     1073    1940,  1945,  1950,  1958,  1963,  1974,  1975,  1986,  1987,  1993,
     1074    1994,  1998,  1999,  2000,  2003,  2002,  2013,  2022,  2028,  2034,
     1075    2043,  2049,  2055,  2061,  2067,  2075,  2081,  2089,  2095,  2104,
     1076    2105,  2106,  2110,  2114,  2116,  2121,  2122,  2126,  2127,  2132,
     1077    2138,  2139,  2142,  2144,  2145,  2149,  2150,  2151,  2152,  2186,
     1078    2188,  2189,  2191,  2196,  2201,  2206,  2208,  2210,  2215,  2217,
     1079    2219,  2221,  2226,  2228,  2237,  2239,  2240,  2245,  2247,  2249,
     1080    2254,  2256,  2258,  2263,  2265,  2267,  2276,  2277,  2278,  2282,
     1081    2284,  2286,  2291,  2293,  2295,  2300,  2302,  2304,  2319,  2321,
     1082    2322,  2324,  2329,  2330,  2335,  2337,  2339,  2344,  2346,  2348,
     1083    2350,  2355,  2357,  2359,  2369,  2371,  2372,  2374,  2379,  2381,
     1084    2383,  2388,  2390,  2392,  2394,  2399,  2401,  2403,  2434,  2436,
     1085    2437,  2439,  2444,  2449,  2457,  2459,  2461,  2466,  2468,  2473,
     1086    2475,  2489,  2490,  2492,  2497,  2499,  2501,  2503,  2505,  2510,
     1087    2511,  2513,  2515,  2520,  2522,  2524,  2530,  2532,  2534,  2538,
     1088    2540,  2542,  2544,  2558,  2559,  2561,  2566,  2568,  2570,  2572,
     1089    2574,  2579,  2580,  2582,  2584,  2589,  2591,  2593,  2599,  2600,
     1090    2602,  2611,  2614,  2616,  2619,  2621,  2623,  2636,  2637,  2639,
     1091    2644,  2646,  2648,  2650,  2652,  2657,  2658,  2660,  2662,  2667,
     1092    2669,  2677,  2678,  2679,  2684,  2685,  2689,  2691,  2693,  2695,
     1093    2697,  2699,  2706,  2708,  2710,  2712,  2714,  2716,  2718,  2720,
     1094    2722,  2724,  2729,  2731,  2733,  2738,  2764,  2765,  2767,  2771,
     1095    2772,  2776,  2778,  2780,  2782,  2784,  2786,  2793,  2795,  2797,
     1096    2799,  2801,  2803,  2808,  2813,  2815,  2817,  2835,  2837,  2842,
     1097    2843
    10981098};
    10991099#endif
     
    49604960
    49614961/* Line 1806 of yacc.c  */
    4962 #line 299 "parser.yy"
     4962#line 298 "parser.yy"
    49634963    {
    49644964                        typedefTable.enterScope();
     
    49694969
    49704970/* Line 1806 of yacc.c  */
    4971 #line 305 "parser.yy"
     4971#line 304 "parser.yy"
    49724972    {
    49734973                        typedefTable.leaveScope();
     
    49784978
    49794979/* Line 1806 of yacc.c  */
     4980#line 313 "parser.yy"
     4981    { (yyval.en) = new ExpressionNode( build_constantInteger( *(yyvsp[(1) - (1)].tok) ) ); }
     4982    break;
     4983
     4984  case 5:
     4985
     4986/* Line 1806 of yacc.c  */
    49804987#line 314 "parser.yy"
    4981     { (yyval.en) = new ExpressionNode( build_constantInteger( *(yyvsp[(1) - (1)].tok) ) ); }
    4982     break;
    4983 
    4984   case 5:
     4988    { (yyval.en) = new ExpressionNode( build_constantFloat( *(yyvsp[(1) - (1)].tok) ) ); }
     4989    break;
     4990
     4991  case 6:
    49854992
    49864993/* Line 1806 of yacc.c  */
    49874994#line 315 "parser.yy"
    4988     { (yyval.en) = new ExpressionNode( build_constantFloat( *(yyvsp[(1) - (1)].tok) ) ); }
    4989     break;
    4990 
    4991   case 6:
    4992 
    4993 /* Line 1806 of yacc.c  */
    4994 #line 316 "parser.yy"
    49954995    { (yyval.en) = new ExpressionNode( build_constantChar( *(yyvsp[(1) - (1)].tok) ) ); }
    49964996    break;
     
    49994999
    50005000/* Line 1806 of yacc.c  */
    5001 #line 341 "parser.yy"
     5001#line 340 "parser.yy"
    50025002    { (yyval.constant) = build_constantStr( *(yyvsp[(1) - (1)].tok) ); }
    50035003    break;
     
    50065006
    50075007/* Line 1806 of yacc.c  */
    5008 #line 343 "parser.yy"
     5008#line 342 "parser.yy"
    50095009    {
    50105010                        appendStr( (yyvsp[(1) - (2)].constant)->get_constant()->get_value(), (yyvsp[(2) - (2)].tok) );
     
    50175017
    50185018/* Line 1806 of yacc.c  */
    5019 #line 354 "parser.yy"
     5019#line 353 "parser.yy"
    50205020    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (1)].tok) ) ); }
    50215021    break;
     
    50245024
    50255025/* Line 1806 of yacc.c  */
    5026 #line 356 "parser.yy"
     5026#line 355 "parser.yy"
    50275027    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (1)].tok) ) ); }
    50285028    break;
     
    50315031
    50325032/* Line 1806 of yacc.c  */
    5033 #line 358 "parser.yy"
     5033#line 357 "parser.yy"
    50345034    { (yyval.en) = (yyvsp[(2) - (3)].en); }
    50355035    break;
     
    50385038
    50395039/* Line 1806 of yacc.c  */
    5040 #line 360 "parser.yy"
     5040#line 359 "parser.yy"
    50415041    { (yyval.en) = new ExpressionNode( build_valexpr( (yyvsp[(2) - (3)].sn) ) ); }
    50425042    break;
     
    50455045
    50465046/* Line 1806 of yacc.c  */
    5047 #line 370 "parser.yy"
     5047#line 369 "parser.yy"
    50485048    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Index, (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en) ) ); }
    50495049    break;
     
    50525052
    50535053/* Line 1806 of yacc.c  */
    5054 #line 372 "parser.yy"
     5054#line 371 "parser.yy"
    50555055    { (yyval.en) = new ExpressionNode( build_func( (yyvsp[(1) - (4)].en), (yyvsp[(3) - (4)].en) ) ); }
    50565056    break;
     
    50595059
    50605060/* Line 1806 of yacc.c  */
    5061 #line 376 "parser.yy"
     5061#line 375 "parser.yy"
    50625062    { (yyval.en) = new ExpressionNode( build_fieldSel( (yyvsp[(1) - (3)].en), build_varref( (yyvsp[(3) - (3)].tok) ) ) ); }
    50635063    break;
     
    50665066
    50675067/* Line 1806 of yacc.c  */
    5068 #line 379 "parser.yy"
     5068#line 378 "parser.yy"
    50695069    { (yyval.en) = new ExpressionNode( build_pfieldSel( (yyvsp[(1) - (3)].en), build_varref( (yyvsp[(3) - (3)].tok) ) ) ); }
    50705070    break;
     
    50735073
    50745074/* Line 1806 of yacc.c  */
    5075 #line 382 "parser.yy"
     5075#line 381 "parser.yy"
    50765076    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::IncrPost, (yyvsp[(1) - (2)].en) ) ); }
    50775077    break;
     
    50805080
    50815081/* Line 1806 of yacc.c  */
    5082 #line 384 "parser.yy"
     5082#line 383 "parser.yy"
    50835083    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::DecrPost, (yyvsp[(1) - (2)].en) ) ); }
    50845084    break;
     
    50875087
    50885088/* Line 1806 of yacc.c  */
    5089 #line 386 "parser.yy"
     5089#line 385 "parser.yy"
    50905090    { (yyval.en) = new ExpressionNode( build_compoundLiteral( (yyvsp[(2) - (7)].decl), new InitializerNode( (yyvsp[(5) - (7)].in), true ) ) ); }
    50915091    break;
     
    50945094
    50955095/* Line 1806 of yacc.c  */
    5096 #line 388 "parser.yy"
     5096#line 387 "parser.yy"
    50975097    {
    50985098                        Token fn;
    50995099                        fn.str = new std::string( "?{}" ); // location undefined
    5100                         (yyval.en) = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(1) - (4)].en) )->set_link( (yyvsp[(3) - (4)].en) ) ) );
     5100                        (yyval.en) = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(1) - (4)].en) )->set_last( (yyvsp[(3) - (4)].en) ) ) );
    51015101                }
    51025102    break;
     
    51055105
    51065106/* Line 1806 of yacc.c  */
    5107 #line 398 "parser.yy"
    5108     { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) )); }
     5107#line 397 "parser.yy"
     5108    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) )); }
    51095109    break;
    51105110
     
    51125112
    51135113/* Line 1806 of yacc.c  */
    5114 #line 403 "parser.yy"
     5114#line 402 "parser.yy"
    51155115    { (yyval.en) = 0; }
    51165116    break;
     
    51195119
    51205120/* Line 1806 of yacc.c  */
    5121 #line 409 "parser.yy"
    5122     { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); }
     5121#line 408 "parser.yy"
     5122    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) ); }
    51235123    break;
    51245124
     
    51265126
    51275127/* Line 1806 of yacc.c  */
    5128 #line 414 "parser.yy"
     5128#line 413 "parser.yy"
    51295129    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (1)].tok) ) ); }
    51305130    break;
     
    51335133
    51345134/* Line 1806 of yacc.c  */
    5135 #line 418 "parser.yy"
     5135#line 417 "parser.yy"
    51365136    { (yyval.en) = new ExpressionNode( build_fieldSel( (yyvsp[(3) - (3)].en), build_varref( (yyvsp[(1) - (3)].tok) ) ) ); }
    51375137    break;
     
    51405140
    51415141/* Line 1806 of yacc.c  */
    5142 #line 420 "parser.yy"
     5142#line 419 "parser.yy"
    51435143    { (yyval.en) = new ExpressionNode( build_fieldSel( (yyvsp[(5) - (7)].en), build_varref( (yyvsp[(1) - (7)].tok) ) ) ); }
    51445144    break;
     
    51475147
    51485148/* Line 1806 of yacc.c  */
    5149 #line 422 "parser.yy"
     5149#line 421 "parser.yy"
    51505150    { (yyval.en) = new ExpressionNode( build_pfieldSel( (yyvsp[(3) - (3)].en), build_varref( (yyvsp[(1) - (3)].tok) ) ) ); }
    51515151    break;
     
    51545154
    51555155/* Line 1806 of yacc.c  */
    5156 #line 424 "parser.yy"
     5156#line 423 "parser.yy"
    51575157    { (yyval.en) = new ExpressionNode( build_pfieldSel( (yyvsp[(5) - (7)].en), build_varref( (yyvsp[(1) - (7)].tok) ) ) ); }
    51585158    break;
     
    51615161
    51625162/* Line 1806 of yacc.c  */
    5163 #line 432 "parser.yy"
     5163#line 431 "parser.yy"
    51645164    { (yyval.en) = (yyvsp[(1) - (1)].en); }
    51655165    break;
     
    51685168
    51695169/* Line 1806 of yacc.c  */
    5170 #line 434 "parser.yy"
     5170#line 433 "parser.yy"
    51715171    { (yyval.en) = new ExpressionNode( (yyvsp[(1) - (1)].constant) ); }
    51725172    break;
     
    51755175
    51765176/* Line 1806 of yacc.c  */
    5177 #line 436 "parser.yy"
     5177#line 435 "parser.yy"
    51785178    { (yyval.en) = (yyvsp[(2) - (2)].en)->set_extension( true ); }
    51795179    break;
     
    51825182
    51835183/* Line 1806 of yacc.c  */
    5184 #line 441 "parser.yy"
     5184#line 440 "parser.yy"
    51855185    {
    51865186                        switch ( (yyvsp[(1) - (2)].op) ) {
     
    52005200
    52015201/* Line 1806 of yacc.c  */
    5202 #line 454 "parser.yy"
     5202#line 453 "parser.yy"
    52035203    { (yyval.en) = new ExpressionNode( build_unary_val( (yyvsp[(1) - (2)].op), (yyvsp[(2) - (2)].en) ) ); }
    52045204    break;
     
    52075207
    52085208/* Line 1806 of yacc.c  */
    5209 #line 456 "parser.yy"
     5209#line 455 "parser.yy"
    52105210    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::Incr, (yyvsp[(2) - (2)].en) ) ); }
    52115211    break;
     
    52145214
    52155215/* Line 1806 of yacc.c  */
    5216 #line 458 "parser.yy"
     5216#line 457 "parser.yy"
    52175217    { (yyval.en) = new ExpressionNode( build_unary_ptr( OperKinds::Decr, (yyvsp[(2) - (2)].en) ) ); }
    52185218    break;
     
    52215221
    52225222/* Line 1806 of yacc.c  */
    5223 #line 460 "parser.yy"
     5223#line 459 "parser.yy"
    52245224    { (yyval.en) = new ExpressionNode( build_sizeOfexpr( (yyvsp[(2) - (2)].en) ) ); }
    52255225    break;
     
    52285228
    52295229/* Line 1806 of yacc.c  */
    5230 #line 462 "parser.yy"
     5230#line 461 "parser.yy"
    52315231    { (yyval.en) = new ExpressionNode( build_sizeOftype( (yyvsp[(3) - (4)].decl) ) ); }
    52325232    break;
     
    52355235
    52365236/* Line 1806 of yacc.c  */
    5237 #line 464 "parser.yy"
     5237#line 463 "parser.yy"
    52385238    { (yyval.en) = new ExpressionNode( build_alignOfexpr( (yyvsp[(2) - (2)].en) ) ); }
    52395239    break;
     
    52425242
    52435243/* Line 1806 of yacc.c  */
    5244 #line 466 "parser.yy"
     5244#line 465 "parser.yy"
    52455245    { (yyval.en) = new ExpressionNode( build_alignOftype( (yyvsp[(3) - (4)].decl) ) ); }
    52465246    break;
     
    52495249
    52505250/* Line 1806 of yacc.c  */
    5251 #line 468 "parser.yy"
     5251#line 467 "parser.yy"
    52525252    { (yyval.en) = new ExpressionNode( build_offsetOf( (yyvsp[(3) - (6)].decl), build_varref( (yyvsp[(5) - (6)].tok) ) ) ); }
    52535253    break;
     
    52565256
    52575257/* Line 1806 of yacc.c  */
    5258 #line 470 "parser.yy"
     5258#line 469 "parser.yy"
    52595259    { (yyval.en) = new ExpressionNode( build_attrexpr( build_varref( (yyvsp[(1) - (1)].tok) ), nullptr ) ); }
    52605260    break;
     
    52635263
    52645264/* Line 1806 of yacc.c  */
    5265 #line 472 "parser.yy"
     5265#line 471 "parser.yy"
    52665266    { (yyval.en) = new ExpressionNode( build_attrexpr( build_varref( (yyvsp[(1) - (4)].tok) ), (yyvsp[(3) - (4)].en) ) ); }
    52675267    break;
     
    52705270
    52715271/* Line 1806 of yacc.c  */
    5272 #line 474 "parser.yy"
     5272#line 473 "parser.yy"
    52735273    { (yyval.en) = new ExpressionNode( build_attrtype( build_varref( (yyvsp[(1) - (4)].tok) ), (yyvsp[(3) - (4)].decl) ) ); }
    52745274    break;
     
    52775277
    52785278/* Line 1806 of yacc.c  */
     5279#line 479 "parser.yy"
     5280    { (yyval.op) = OperKinds::PointTo; }
     5281    break;
     5282
     5283  case 61:
     5284
     5285/* Line 1806 of yacc.c  */
    52795286#line 480 "parser.yy"
    5280     { (yyval.op) = OperKinds::PointTo; }
    5281     break;
    5282 
    5283   case 61:
    5284 
    5285 /* Line 1806 of yacc.c  */
    5286 #line 481 "parser.yy"
    52875287    { (yyval.op) = OperKinds::AddressOf; }
    52885288    break;
     
    52915291
    52925292/* Line 1806 of yacc.c  */
     5293#line 486 "parser.yy"
     5294    { (yyval.op) = OperKinds::UnPlus; }
     5295    break;
     5296
     5297  case 63:
     5298
     5299/* Line 1806 of yacc.c  */
    52935300#line 487 "parser.yy"
    5294     { (yyval.op) = OperKinds::UnPlus; }
    5295     break;
    5296 
    5297   case 63:
     5301    { (yyval.op) = OperKinds::UnMinus; }
     5302    break;
     5303
     5304  case 64:
    52985305
    52995306/* Line 1806 of yacc.c  */
    53005307#line 488 "parser.yy"
    5301     { (yyval.op) = OperKinds::UnMinus; }
    5302     break;
    5303 
    5304   case 64:
     5308    { (yyval.op) = OperKinds::Neg; }
     5309    break;
     5310
     5311  case 65:
    53055312
    53065313/* Line 1806 of yacc.c  */
    53075314#line 489 "parser.yy"
    5308     { (yyval.op) = OperKinds::Neg; }
    5309     break;
    5310 
    5311   case 65:
    5312 
    5313 /* Line 1806 of yacc.c  */
    5314 #line 490 "parser.yy"
    53155315    { (yyval.op) = OperKinds::BitNeg; }
    53165316    break;
     
    53195319
    53205320/* Line 1806 of yacc.c  */
    5321 #line 496 "parser.yy"
     5321#line 495 "parser.yy"
    53225322    { (yyval.en) = new ExpressionNode( build_cast( (yyvsp[(2) - (4)].decl), (yyvsp[(4) - (4)].en) ) ); }
    53235323    break;
     
    53265326
    53275327/* Line 1806 of yacc.c  */
    5328 #line 498 "parser.yy"
     5328#line 497 "parser.yy"
    53295329    { (yyval.en) = new ExpressionNode( build_cast( (yyvsp[(2) - (4)].decl), (yyvsp[(4) - (4)].en) ) ); }
    53305330    break;
     
    53335333
    53345334/* Line 1806 of yacc.c  */
    5335 #line 504 "parser.yy"
     5335#line 503 "parser.yy"
    53365336    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Mul, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53375337    break;
     
    53405340
    53415341/* Line 1806 of yacc.c  */
    5342 #line 506 "parser.yy"
     5342#line 505 "parser.yy"
    53435343    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Div, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53445344    break;
     
    53475347
    53485348/* Line 1806 of yacc.c  */
    5349 #line 508 "parser.yy"
     5349#line 507 "parser.yy"
    53505350    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Mod, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53515351    break;
     
    53545354
    53555355/* Line 1806 of yacc.c  */
    5356 #line 514 "parser.yy"
     5356#line 513 "parser.yy"
    53575357    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Plus, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53585358    break;
     
    53615361
    53625362/* Line 1806 of yacc.c  */
    5363 #line 516 "parser.yy"
     5363#line 515 "parser.yy"
    53645364    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Minus, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53655365    break;
     
    53685368
    53695369/* Line 1806 of yacc.c  */
    5370 #line 522 "parser.yy"
     5370#line 521 "parser.yy"
    53715371    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::LShift, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53725372    break;
     
    53755375
    53765376/* Line 1806 of yacc.c  */
    5377 #line 524 "parser.yy"
     5377#line 523 "parser.yy"
    53785378    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::RShift, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53795379    break;
     
    53825382
    53835383/* Line 1806 of yacc.c  */
    5384 #line 530 "parser.yy"
     5384#line 529 "parser.yy"
    53855385    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::LThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53865386    break;
     
    53895389
    53905390/* Line 1806 of yacc.c  */
    5391 #line 532 "parser.yy"
     5391#line 531 "parser.yy"
    53925392    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::GThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    53935393    break;
     
    53965396
    53975397/* Line 1806 of yacc.c  */
    5398 #line 534 "parser.yy"
     5398#line 533 "parser.yy"
    53995399    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::LEThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54005400    break;
     
    54035403
    54045404/* Line 1806 of yacc.c  */
    5405 #line 536 "parser.yy"
     5405#line 535 "parser.yy"
    54065406    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::GEThan, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54075407    break;
     
    54105410
    54115411/* Line 1806 of yacc.c  */
    5412 #line 542 "parser.yy"
     5412#line 541 "parser.yy"
    54135413    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Eq, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54145414    break;
     
    54175417
    54185418/* Line 1806 of yacc.c  */
    5419 #line 544 "parser.yy"
     5419#line 543 "parser.yy"
    54205420    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Neq, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54215421    break;
     
    54245424
    54255425/* Line 1806 of yacc.c  */
    5426 #line 550 "parser.yy"
     5426#line 549 "parser.yy"
    54275427    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::BitAnd, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54285428    break;
     
    54315431
    54325432/* Line 1806 of yacc.c  */
    5433 #line 556 "parser.yy"
     5433#line 555 "parser.yy"
    54345434    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::Xor, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54355435    break;
     
    54385438
    54395439/* Line 1806 of yacc.c  */
    5440 #line 562 "parser.yy"
     5440#line 561 "parser.yy"
    54415441    { (yyval.en) = new ExpressionNode( build_binary_val( OperKinds::BitOr, (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54425442    break;
     
    54455445
    54465446/* Line 1806 of yacc.c  */
    5447 #line 568 "parser.yy"
     5447#line 567 "parser.yy"
    54485448    { (yyval.en) = new ExpressionNode( build_and_or( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en), true ) ); }
    54495449    break;
     
    54525452
    54535453/* Line 1806 of yacc.c  */
    5454 #line 574 "parser.yy"
     5454#line 573 "parser.yy"
    54555455    { (yyval.en) = new ExpressionNode( build_and_or( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en), false ) ); }
    54565456    break;
     
    54595459
    54605460/* Line 1806 of yacc.c  */
    5461 #line 580 "parser.yy"
     5461#line 579 "parser.yy"
    54625462    { (yyval.en) = new ExpressionNode( build_cond( (yyvsp[(1) - (5)].en), (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].en) ) ); }
    54635463    break;
     
    54665466
    54675467/* Line 1806 of yacc.c  */
    5468 #line 583 "parser.yy"
     5468#line 582 "parser.yy"
    54695469    { (yyval.en) = new ExpressionNode( build_cond( (yyvsp[(1) - (4)].en), (yyvsp[(1) - (4)].en), (yyvsp[(4) - (4)].en) ) ); }
    54705470    break;
     
    54735473
    54745474/* Line 1806 of yacc.c  */
    5475 #line 585 "parser.yy"
     5475#line 584 "parser.yy"
    54765476    { (yyval.en) = new ExpressionNode( build_cond( (yyvsp[(1) - (5)].en), (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].en) ) ); }
    54775477    break;
     
    54805480
    54815481/* Line 1806 of yacc.c  */
    5482 #line 596 "parser.yy"
     5482#line 595 "parser.yy"
    54835483    { (yyval.en) = new ExpressionNode( build_binary_ptr( (yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    54845484    break;
     
    54875487
    54885488/* Line 1806 of yacc.c  */
    5489 #line 598 "parser.yy"
     5489#line 597 "parser.yy"
    54905490    { (yyval.en) = ( (yyvsp[(2) - (2)].en) == 0 ) ? (yyvsp[(1) - (2)].en) : new ExpressionNode( build_binary_ptr( OperKinds::Assign, (yyvsp[(1) - (2)].en), (yyvsp[(2) - (2)].en) ) ); }
    54915491    break;
     
    54945494
    54955495/* Line 1806 of yacc.c  */
    5496 #line 603 "parser.yy"
     5496#line 602 "parser.yy"
    54975497    { (yyval.en) = nullptr; }
    54985498    break;
     
    55015501
    55025502/* Line 1806 of yacc.c  */
     5503#line 607 "parser.yy"
     5504    { (yyval.op) = OperKinds::Assign; }
     5505    break;
     5506
     5507  case 108:
     5508
     5509/* Line 1806 of yacc.c  */
    55035510#line 608 "parser.yy"
    5504     { (yyval.op) = OperKinds::Assign; }
    5505     break;
    5506 
    5507   case 108:
     5511    { (yyval.op) = OperKinds::MulAssn; }
     5512    break;
     5513
     5514  case 109:
    55085515
    55095516/* Line 1806 of yacc.c  */
    55105517#line 609 "parser.yy"
    5511     { (yyval.op) = OperKinds::MulAssn; }
    5512     break;
    5513 
    5514   case 109:
     5518    { (yyval.op) = OperKinds::DivAssn; }
     5519    break;
     5520
     5521  case 110:
    55155522
    55165523/* Line 1806 of yacc.c  */
    55175524#line 610 "parser.yy"
    5518     { (yyval.op) = OperKinds::DivAssn; }
    5519     break;
    5520 
    5521   case 110:
     5525    { (yyval.op) = OperKinds::ModAssn; }
     5526    break;
     5527
     5528  case 111:
    55225529
    55235530/* Line 1806 of yacc.c  */
    55245531#line 611 "parser.yy"
    5525     { (yyval.op) = OperKinds::ModAssn; }
    5526     break;
    5527 
    5528   case 111:
     5532    { (yyval.op) = OperKinds::PlusAssn; }
     5533    break;
     5534
     5535  case 112:
    55295536
    55305537/* Line 1806 of yacc.c  */
    55315538#line 612 "parser.yy"
    5532     { (yyval.op) = OperKinds::PlusAssn; }
    5533     break;
    5534 
    5535   case 112:
     5539    { (yyval.op) = OperKinds::MinusAssn; }
     5540    break;
     5541
     5542  case 113:
    55365543
    55375544/* Line 1806 of yacc.c  */
    55385545#line 613 "parser.yy"
    5539     { (yyval.op) = OperKinds::MinusAssn; }
    5540     break;
    5541 
    5542   case 113:
     5546    { (yyval.op) = OperKinds::LSAssn; }
     5547    break;
     5548
     5549  case 114:
    55435550
    55445551/* Line 1806 of yacc.c  */
    55455552#line 614 "parser.yy"
    5546     { (yyval.op) = OperKinds::LSAssn; }
    5547     break;
    5548 
    5549   case 114:
     5553    { (yyval.op) = OperKinds::RSAssn; }
     5554    break;
     5555
     5556  case 115:
    55505557
    55515558/* Line 1806 of yacc.c  */
    55525559#line 615 "parser.yy"
    5553     { (yyval.op) = OperKinds::RSAssn; }
    5554     break;
    5555 
    5556   case 115:
     5560    { (yyval.op) = OperKinds::AndAssn; }
     5561    break;
     5562
     5563  case 116:
    55575564
    55585565/* Line 1806 of yacc.c  */
    55595566#line 616 "parser.yy"
    5560     { (yyval.op) = OperKinds::AndAssn; }
    5561     break;
    5562 
    5563   case 116:
     5567    { (yyval.op) = OperKinds::ERAssn; }
     5568    break;
     5569
     5570  case 117:
    55645571
    55655572/* Line 1806 of yacc.c  */
    55665573#line 617 "parser.yy"
    5567     { (yyval.op) = OperKinds::ERAssn; }
    5568     break;
    5569 
    5570   case 117:
    5571 
    5572 /* Line 1806 of yacc.c  */
    5573 #line 618 "parser.yy"
    55745574    { (yyval.op) = OperKinds::OrAssn; }
    55755575    break;
     
    55785578
    55795579/* Line 1806 of yacc.c  */
    5580 #line 625 "parser.yy"
     5580#line 624 "parser.yy"
    55815581    { (yyval.en) = new ExpressionNode( build_tuple() ); }
    55825582    break;
     
    55855585
    55865586/* Line 1806 of yacc.c  */
    5587 #line 627 "parser.yy"
     5587#line 626 "parser.yy"
    55885588    { (yyval.en) = new ExpressionNode( build_tuple( (yyvsp[(3) - (5)].en) ) ); }
    55895589    break;
     
    55925592
    55935593/* Line 1806 of yacc.c  */
    5594 #line 629 "parser.yy"
    5595     { (yyval.en) = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_link( (yyvsp[(4) - (6)].en) ) ) ); }
     5594#line 628 "parser.yy"
     5595    { (yyval.en) = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( (yyvsp[(4) - (6)].en) ) ) ); }
    55965596    break;
    55975597
     
    55995599
    56005600/* Line 1806 of yacc.c  */
    5601 #line 631 "parser.yy"
    5602     { (yyval.en) = new ExpressionNode( build_tuple( (ExpressionNode *)(yyvsp[(3) - (7)].en)->set_link( (yyvsp[(5) - (7)].en) ) ) ); }
     5601#line 630 "parser.yy"
     5602    { (yyval.en) = new ExpressionNode( build_tuple( (ExpressionNode *)(yyvsp[(3) - (7)].en)->set_last( (yyvsp[(5) - (7)].en) ) ) ); }
    56035603    break;
    56045604
     
    56065606
    56075607/* Line 1806 of yacc.c  */
    5608 #line 637 "parser.yy"
    5609     { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); }
     5608#line 636 "parser.yy"
     5609    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) ); }
    56105610    break;
    56115611
     
    56135613
    56145614/* Line 1806 of yacc.c  */
    5615 #line 643 "parser.yy"
     5615#line 642 "parser.yy"
    56165616    { (yyval.en) = new ExpressionNode( build_comma( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    56175617    break;
     
    56205620
    56215621/* Line 1806 of yacc.c  */
    5622 #line 648 "parser.yy"
     5622#line 647 "parser.yy"
    56235623    { (yyval.en) = 0; }
    56245624    break;
     
    56275627
    56285628/* Line 1806 of yacc.c  */
    5629 #line 657 "parser.yy"
     5629#line 656 "parser.yy"
    56305630    { (yyval.sn) = (yyvsp[(1) - (1)].sn); }
    56315631    break;
     
    56345634
    56355635/* Line 1806 of yacc.c  */
    5636 #line 664 "parser.yy"
     5636#line 663 "parser.yy"
    56375637    {
    56385638                        Token fn;
    56395639                        fn.str = new std::string( "^?{}" ); // location undefined
    5640                         (yyval.sn) = new StatementNode2( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(2) - (6)].en) )->set_link( (yyvsp[(4) - (6)].en) ) ) ) ) );
     5640                        (yyval.sn) = new StatementNode2( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( (yyvsp[(2) - (6)].en) )->set_last( (yyvsp[(4) - (6)].en) ) ) ) ) );
    56415641                }
    56425642    break;
     
    56455645
    56465646/* Line 1806 of yacc.c  */
    5647 #line 674 "parser.yy"
     5647#line 673 "parser.yy"
    56485648    {
    56495649                        (yyval.sn) = (yyvsp[(4) - (4)].sn)->add_label( (yyvsp[(1) - (4)].tok) );
     
    56545654
    56555655/* Line 1806 of yacc.c  */
    5656 #line 681 "parser.yy"
     5656#line 680 "parser.yy"
    56575657    { (yyval.sn) = new CompoundStmtNode( (StatementNode *)0 ); }
    56585658    break;
     
    56615661
    56625662/* Line 1806 of yacc.c  */
    5663 #line 688 "parser.yy"
     5663#line 687 "parser.yy"
    56645664    { (yyval.sn) = new CompoundStmtNode( (yyvsp[(5) - (7)].sn) ); }
    56655665    break;
     
    56685668
    56695669/* Line 1806 of yacc.c  */
    5670 #line 694 "parser.yy"
    5671     { if ( (yyvsp[(1) - (3)].sn) != 0 ) { (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(3) - (3)].sn) ); (yyval.sn) = (yyvsp[(1) - (3)].sn); } }
     5670#line 693 "parser.yy"
     5671    { if ( (yyvsp[(1) - (3)].sn) != 0 ) { (yyvsp[(1) - (3)].sn)->set_last( (yyvsp[(3) - (3)].sn) ); (yyval.sn) = (yyvsp[(1) - (3)].sn); } }
    56725672    break;
    56735673
     
    56755675
    56765676/* Line 1806 of yacc.c  */
    5677 #line 699 "parser.yy"
    5678     { (yyval.sn) = new StatementNode( (yyvsp[(1) - (1)].decl) ); }
     5677#line 698 "parser.yy"
     5678    { (yyval.sn) = new StatementNode2( (yyvsp[(1) - (1)].decl) ); }
    56795679    break;
    56805680
     
    56825682
    56835683/* Line 1806 of yacc.c  */
    5684 #line 701 "parser.yy"
     5684#line 700 "parser.yy"
    56855685    {   // mark all fields in list
    5686                         for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() )
     5686                        for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_next() )
    56875687                                iter->set_extension( true );
    5688                         (yyval.sn) = new StatementNode( (yyvsp[(2) - (2)].decl) );
     5688                        (yyval.sn) = new StatementNode2( (yyvsp[(2) - (2)].decl) );
    56895689                }
    56905690    break;
     
    56935693
    56945694/* Line 1806 of yacc.c  */
    5695 #line 707 "parser.yy"
    5696     { (yyval.sn) = new StatementNode( (yyvsp[(1) - (1)].decl) ); }
     5695#line 706 "parser.yy"
     5696    { (yyval.sn) = new StatementNode2( (yyvsp[(1) - (1)].decl) ); }
    56975697    break;
    56985698
     
    57005700
    57015701/* Line 1806 of yacc.c  */
    5702 #line 714 "parser.yy"
    5703     { if ( (yyvsp[(1) - (2)].sn) != 0 ) { (yyvsp[(1) - (2)].sn)->set_link( (yyvsp[(2) - (2)].sn) ); (yyval.sn) = (yyvsp[(1) - (2)].sn); } }
     5702#line 713 "parser.yy"
     5703    { if ( (yyvsp[(1) - (2)].sn) != 0 ) { (yyvsp[(1) - (2)].sn)->set_last( (yyvsp[(2) - (2)].sn) ); (yyval.sn) = (yyvsp[(1) - (2)].sn); } }
    57045704    break;
    57055705
     
    57075707
    57085708/* Line 1806 of yacc.c  */
    5709 #line 719 "parser.yy"
     5709#line 718 "parser.yy"
    57105710    { (yyval.sn) = new StatementNode2( build_expr( (yyvsp[(1) - (2)].en) ) ); }
    57115711    break;
     
    57145714
    57155715/* Line 1806 of yacc.c  */
    5716 #line 725 "parser.yy"
     5716#line 724 "parser.yy"
    57175717    { (yyval.sn) = new StatementNode2( build_if( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn), nullptr ) ); }
    57185718    break;
     
    57215721
    57225722/* Line 1806 of yacc.c  */
    5723 #line 727 "parser.yy"
     5723#line 726 "parser.yy"
    57245724    { (yyval.sn) = new StatementNode2( build_if( (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].sn), (yyvsp[(7) - (7)].sn) ) ); }
    57255725    break;
     
    57285728
    57295729/* Line 1806 of yacc.c  */
    5730 #line 729 "parser.yy"
     5730#line 728 "parser.yy"
    57315731    { (yyval.sn) = new StatementNode2( build_switch( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ) ); }
    57325732    break;
     
    57355735
    57365736/* Line 1806 of yacc.c  */
    5737 #line 731 "parser.yy"
     5737#line 730 "parser.yy"
    57385738    {
    57395739                        StatementNode *sw = new StatementNode2( build_switch( (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ) );
     
    57435743                        // therefore, are removed from the grammar even though C allows it. The change also applies to choose
    57445744                        // statement.
    5745                         (yyval.sn) = (yyvsp[(7) - (9)].decl) != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( (yyvsp[(7) - (9)].decl) ))->set_link( sw )) ) : sw;
     5745                        (yyval.sn) = (yyvsp[(7) - (9)].decl) != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode2( (yyvsp[(7) - (9)].decl) ))->set_last( sw )) ) : sw;
    57465746                }
    57475747    break;
     
    57505750
    57515751/* Line 1806 of yacc.c  */
    5752 #line 741 "parser.yy"
     5752#line 740 "parser.yy"
    57535753    { (yyval.sn) = new StatementNode2( build_switch( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ) ); }
    57545754    break;
     
    57575757
    57585758/* Line 1806 of yacc.c  */
    5759 #line 743 "parser.yy"
     5759#line 742 "parser.yy"
    57605760    {
    57615761                        StatementNode *sw = new StatementNode2( build_switch( (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ) );
    5762                         (yyval.sn) = (yyvsp[(7) - (9)].decl) != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( (yyvsp[(7) - (9)].decl) ))->set_link( sw )) ) : sw;
     5762                        (yyval.sn) = (yyvsp[(7) - (9)].decl) != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode2( (yyvsp[(7) - (9)].decl) ))->set_last( sw )) ) : sw;
    57635763                }
    57645764    break;
     
    57675767
    57685768/* Line 1806 of yacc.c  */
    5769 #line 753 "parser.yy"
     5769#line 752 "parser.yy"
    57705770    { (yyval.en) = (yyvsp[(1) - (1)].en); }
    57715771    break;
     
    57745774
    57755775/* Line 1806 of yacc.c  */
    5776 #line 755 "parser.yy"
     5776#line 754 "parser.yy"
    57775777    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    57785778    break;
     
    57815781
    57825782/* Line 1806 of yacc.c  */
     5783#line 759 "parser.yy"
     5784    { (yyval.sn) = new StatementNode2( build_case( (yyvsp[(1) - (1)].en) ) ); }
     5785    break;
     5786
     5787  case 159:
     5788
     5789/* Line 1806 of yacc.c  */
    57835790#line 761 "parser.yy"
    5784     { (yyval.sn) = new StatementNode2( build_case( (yyvsp[(1) - (1)].en) ) ); }
    5785     break;
    5786 
    5787   case 159:
    5788 
    5789 /* Line 1806 of yacc.c  */
    5790 #line 763 "parser.yy"
    5791     { (yyval.sn) = (StatementNode *)((yyvsp[(1) - (3)].sn)->set_link( new StatementNode2( build_case( (yyvsp[(3) - (3)].en) ) ) ) ); }
     5791    { (yyval.sn) = (StatementNode *)((yyvsp[(1) - (3)].sn)->set_last( new StatementNode2( build_case( (yyvsp[(3) - (3)].en) ) ) ) ); }
    57925792    break;
    57935793
     
    57955795
    57965796/* Line 1806 of yacc.c  */
    5797 #line 767 "parser.yy"
     5797#line 765 "parser.yy"
    57985798    { (yyval.sn) = (yyvsp[(2) - (3)].sn); }
    57995799    break;
     
    58025802
    58035803/* Line 1806 of yacc.c  */
    5804 #line 768 "parser.yy"
     5804#line 766 "parser.yy"
    58055805    { (yyval.sn) = new StatementNode2( build_default() ); }
    58065806    break;
     
    58095809
    58105810/* Line 1806 of yacc.c  */
    5811 #line 774 "parser.yy"
    5812     { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (2)].sn)->set_link( (yyvsp[(2) - (2)].sn) )); }
     5811#line 772 "parser.yy"
     5812    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (2)].sn)->set_last( (yyvsp[(2) - (2)].sn) )); }
    58135813    break;
    58145814
     
    58165816
    58175817/* Line 1806 of yacc.c  */
    5818 #line 778 "parser.yy"
     5818#line 776 "parser.yy"
    58195819    { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(2) - (2)].sn) ) ); }
    58205820    break;
     
    58235823
    58245824/* Line 1806 of yacc.c  */
    5825 #line 783 "parser.yy"
     5825#line 781 "parser.yy"
    58265826    { (yyval.sn) = 0; }
    58275827    break;
     
    58305830
    58315831/* Line 1806 of yacc.c  */
     5832#line 787 "parser.yy"
     5833    { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(2) - (2)].sn) ) ); }
     5834    break;
     5835
     5836  case 168:
     5837
     5838/* Line 1806 of yacc.c  */
    58325839#line 789 "parser.yy"
    5833     { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(2) - (2)].sn) ) ); }
    5834     break;
    5835 
    5836   case 168:
    5837 
    5838 /* Line 1806 of yacc.c  */
    5839 #line 791 "parser.yy"
    5840     { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(3) - (3)].sn) ) ) ) ); }
     5840    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_last( (yyvsp[(2) - (3)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(3) - (3)].sn) ) ) ) ); }
    58415841    break;
    58425842
     
    58445844
    58455845/* Line 1806 of yacc.c  */
    5846 #line 796 "parser.yy"
     5846#line 794 "parser.yy"
    58475847    { (yyval.sn) = 0; }
    58485848    break;
     
    58515851
    58525852/* Line 1806 of yacc.c  */
     5853#line 800 "parser.yy"
     5854    { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); }
     5855    break;
     5856
     5857  case 172:
     5858
     5859/* Line 1806 of yacc.c  */
    58535860#line 802 "parser.yy"
    5854     { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); }
    5855     break;
    5856 
    5857   case 172:
     5861    { (yyval.sn) = (yyvsp[(1) - (3)].sn)->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*(yyvsp[(2) - (3)].sn), *(yyvsp[(3) - (3)].sn) ) ) ) ); }
     5862    break;
     5863
     5864  case 173:
    58585865
    58595866/* Line 1806 of yacc.c  */
    58605867#line 804 "parser.yy"
    5861     { (yyval.sn) = (yyvsp[(1) - (3)].sn)->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*(yyvsp[(2) - (3)].sn), *(yyvsp[(3) - (3)].sn) ) ) ) ); }
    5862     break;
    5863 
    5864   case 173:
     5868    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_last( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); }
     5869    break;
     5870
     5871  case 174:
    58655872
    58665873/* Line 1806 of yacc.c  */
    58675874#line 806 "parser.yy"
    5868     { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); }
    5869     break;
    5870 
    5871   case 174:
    5872 
    5873 /* Line 1806 of yacc.c  */
    5874 #line 808 "parser.yy"
    5875     { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (4)].sn)->set_link( (yyvsp[(2) - (4)].sn)->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*(yyvsp[(3) - (4)].sn), *(yyvsp[(4) - (4)].sn) ) ) ) ) ) ); }
     5875    { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (4)].sn)->set_last( (yyvsp[(2) - (4)].sn)->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*(yyvsp[(3) - (4)].sn), *(yyvsp[(4) - (4)].sn) ) ) ) ) ) ); }
    58765876    break;
    58775877
     
    58795879
    58805880/* Line 1806 of yacc.c  */
    5881 #line 813 "parser.yy"
     5881#line 811 "parser.yy"
    58825882    { (yyval.sn) = new StatementNode2( build_branch( "", BranchStmt::Break ) ); }
    58835883    break;
    58845884
    58855885  case 177:
     5886
     5887/* Line 1806 of yacc.c  */
     5888#line 817 "parser.yy"
     5889    { (yyval.sn) = 0; }
     5890    break;
     5891
     5892  case 178:
    58865893
    58875894/* Line 1806 of yacc.c  */
     
    58905897    break;
    58915898
    5892   case 178:
    5893 
    5894 /* Line 1806 of yacc.c  */
    5895 #line 821 "parser.yy"
    5896     { (yyval.sn) = 0; }
    5897     break;
    5898 
    58995899  case 179:
    59005900
    59015901/* Line 1806 of yacc.c  */
     5902#line 824 "parser.yy"
     5903    { (yyval.sn) = new StatementNode2( build_while( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ) ); }
     5904    break;
     5905
     5906  case 180:
     5907
     5908/* Line 1806 of yacc.c  */
    59025909#line 826 "parser.yy"
    5903     { (yyval.sn) = new StatementNode2( build_while( (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ) ); }
    5904     break;
    5905 
    5906   case 180:
     5910    { (yyval.sn) = new StatementNode2( build_while( (yyvsp[(5) - (7)].en), (yyvsp[(2) - (7)].sn) ) ); }
     5911    break;
     5912
     5913  case 181:
    59075914
    59085915/* Line 1806 of yacc.c  */
    59095916#line 828 "parser.yy"
    5910     { (yyval.sn) = new StatementNode2( build_while( (yyvsp[(5) - (7)].en), (yyvsp[(2) - (7)].sn) ) ); }
    5911     break;
    5912 
    5913   case 181:
    5914 
    5915 /* Line 1806 of yacc.c  */
    5916 #line 830 "parser.yy"
    59175917    { (yyval.sn) = new StatementNode2( build_for( (yyvsp[(4) - (6)].fctl), (yyvsp[(6) - (6)].sn) ) ); }
    59185918    break;
     
    59215921
    59225922/* Line 1806 of yacc.c  */
     5923#line 833 "parser.yy"
     5924    { (yyval.fctl) = new ForCtl( (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].en) ); }
     5925    break;
     5926
     5927  case 183:
     5928
     5929/* Line 1806 of yacc.c  */
    59235930#line 835 "parser.yy"
    5924     { (yyval.fctl) = new ForCtl( (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].en) ); }
    5925     break;
    5926 
    5927   case 183:
    5928 
    5929 /* Line 1806 of yacc.c  */
    5930 #line 837 "parser.yy"
    59315931    { (yyval.fctl) = new ForCtl( (yyvsp[(1) - (4)].decl), (yyvsp[(2) - (4)].en), (yyvsp[(4) - (4)].en) ); }
    59325932    break;
     
    59355935
    59365936/* Line 1806 of yacc.c  */
    5937 #line 842 "parser.yy"
     5937#line 840 "parser.yy"
    59385938    { (yyval.sn) = new StatementNode2( build_branch( *(yyvsp[(2) - (3)].tok), BranchStmt::Goto ) ); }
    59395939    break;
     
    59425942
    59435943/* Line 1806 of yacc.c  */
    5944 #line 846 "parser.yy"
     5944#line 844 "parser.yy"
    59455945    { (yyval.sn) = new StatementNode2( build_computedgoto( (yyvsp[(3) - (4)].en) ) ); }
    59465946    break;
     
    59495949
    59505950/* Line 1806 of yacc.c  */
    5951 #line 849 "parser.yy"
     5951#line 847 "parser.yy"
    59525952    { (yyval.sn) = new StatementNode2( build_branch( "", BranchStmt::Continue ) ); }
    59535953    break;
     
    59565956
    59575957/* Line 1806 of yacc.c  */
    5958 #line 853 "parser.yy"
     5958#line 851 "parser.yy"
    59595959    { (yyval.sn) = new StatementNode2( build_branch( *(yyvsp[(2) - (3)].tok), BranchStmt::Continue ) ); delete (yyvsp[(2) - (3)].tok); }
    59605960    break;
     
    59635963
    59645964/* Line 1806 of yacc.c  */
    5965 #line 856 "parser.yy"
     5965#line 854 "parser.yy"
    59665966    { (yyval.sn) = new StatementNode2( build_branch( "", BranchStmt::Break ) ); }
    59675967    break;
     
    59705970
    59715971/* Line 1806 of yacc.c  */
     5972#line 858 "parser.yy"
     5973    { (yyval.sn) = new StatementNode2( build_branch( *(yyvsp[(2) - (3)].tok), BranchStmt::Break ) ); delete (yyvsp[(2) - (3)].tok); }
     5974    break;
     5975
     5976  case 190:
     5977
     5978/* Line 1806 of yacc.c  */
    59725979#line 860 "parser.yy"
    5973     { (yyval.sn) = new StatementNode2( build_branch( *(yyvsp[(2) - (3)].tok), BranchStmt::Break ) ); delete (yyvsp[(2) - (3)].tok); }
    5974     break;
    5975 
    5976   case 190:
     5980    { (yyval.sn) = new StatementNode2( build_return( (yyvsp[(2) - (3)].en) ) ); }
     5981    break;
     5982
     5983  case 191:
    59775984
    59785985/* Line 1806 of yacc.c  */
    59795986#line 862 "parser.yy"
    5980     { (yyval.sn) = new StatementNode2( build_return( (yyvsp[(2) - (3)].en) ) ); }
    5981     break;
    5982 
    5983   case 191:
     5987    { (yyval.sn) = new StatementNode2( build_throw( (yyvsp[(2) - (3)].en) ) ); }
     5988    break;
     5989
     5990  case 192:
    59845991
    59855992/* Line 1806 of yacc.c  */
     
    59885995    break;
    59895996
    5990   case 192:
     5997  case 193:
    59915998
    59925999/* Line 1806 of yacc.c  */
    59936000#line 866 "parser.yy"
    5994     { (yyval.sn) = new StatementNode2( build_throw( (yyvsp[(2) - (3)].en) ) ); }
    5995     break;
    5996 
    5997   case 193:
    5998 
    5999 /* Line 1806 of yacc.c  */
    6000 #line 868 "parser.yy"
    60016001    { (yyval.sn) = new StatementNode2( build_throw( (yyvsp[(2) - (5)].en) ) ); }
    60026002    break;
     
    60056005
    60066006/* Line 1806 of yacc.c  */
     6007#line 871 "parser.yy"
     6008    { (yyval.sn) = new StatementNode2( build_try( (yyvsp[(2) - (3)].sn), (yyvsp[(3) - (3)].sn), 0 ) ); }
     6009    break;
     6010
     6011  case 195:
     6012
     6013/* Line 1806 of yacc.c  */
    60076014#line 873 "parser.yy"
    6008     { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); }
    6009     break;
    6010 
    6011   case 195:
     6015    { (yyval.sn) = new StatementNode2( build_try( (yyvsp[(2) - (3)].sn), 0, (yyvsp[(3) - (3)].sn) ) ); }
     6016    break;
     6017
     6018  case 196:
    60126019
    60136020/* Line 1806 of yacc.c  */
    60146021#line 875 "parser.yy"
    6015     { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); }
    6016     break;
    6017 
    6018   case 196:
    6019 
    6020 /* Line 1806 of yacc.c  */
    6021 #line 877 "parser.yy"
     6022    { (yyval.sn) = new StatementNode2( build_try( (yyvsp[(2) - (4)].sn), (yyvsp[(3) - (4)].sn), (yyvsp[(4) - (4)].sn) ) ); }
     6023    break;
     6024
     6025  case 198:
     6026
     6027/* Line 1806 of yacc.c  */
     6028#line 882 "parser.yy"
     6029    { (yyval.sn) = new StatementNode2( build_catch( 0, (yyvsp[(5) - (5)].sn), true ) ); }
     6030    break;
     6031
     6032  case 199:
     6033
     6034/* Line 1806 of yacc.c  */
     6035#line 884 "parser.yy"
     6036    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (6)].sn)->set_last( new StatementNode2( build_catch( 0, (yyvsp[(6) - (6)].sn), true ) ) ); }
     6037    break;
     6038
     6039  case 200:
     6040
     6041/* Line 1806 of yacc.c  */
     6042#line 886 "parser.yy"
     6043    { (yyval.sn) = new StatementNode2( build_catch( 0, (yyvsp[(5) - (5)].sn), true ) ); }
     6044    break;
     6045
     6046  case 201:
     6047
     6048/* Line 1806 of yacc.c  */
     6049#line 888 "parser.yy"
     6050    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (6)].sn)->set_last( new StatementNode2( build_catch( 0, (yyvsp[(6) - (6)].sn), true ) ) ); }
     6051    break;
     6052
     6053  case 202:
     6054
     6055/* Line 1806 of yacc.c  */
     6056#line 893 "parser.yy"
     6057    { (yyval.sn) = new StatementNode2( build_catch( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ) ); }
     6058    break;
     6059
     6060  case 203:
     6061
     6062/* Line 1806 of yacc.c  */
     6063#line 895 "parser.yy"
     6064    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (10)].sn)->set_last( new StatementNode2( build_catch( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ) ); }
     6065    break;
     6066
     6067  case 204:
     6068
     6069/* Line 1806 of yacc.c  */
     6070#line 897 "parser.yy"
     6071    { (yyval.sn) = new StatementNode2( build_catch( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ) ); }
     6072    break;
     6073
     6074  case 205:
     6075
     6076/* Line 1806 of yacc.c  */
     6077#line 899 "parser.yy"
     6078    { (yyval.sn) = (StatementNode *)(yyvsp[(1) - (10)].sn)->set_last( new StatementNode2( build_catch( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ) ); }
     6079    break;
     6080
     6081  case 206:
     6082
     6083/* Line 1806 of yacc.c  */
     6084#line 904 "parser.yy"
    60226085    {
    6023                         (yyvsp[(3) - (4)].pn)->set_link( (yyvsp[(4) - (4)].pn) );
    6024                         (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (4)].sn),*(yyvsp[(3) - (4)].pn) ))));
     6086                        (yyval.sn) = new StatementNode2( build_finally( (yyvsp[(2) - (2)].sn) ) );
    60256087                }
    60266088    break;
    60276089
    6028   case 198:
    6029 
    6030 /* Line 1806 of yacc.c  */
    6031 #line 888 "parser.yy"
    6032     { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); }
    6033     break;
    6034 
    6035   case 199:
    6036 
    6037 /* Line 1806 of yacc.c  */
    6038 #line 890 "parser.yy"
    6039     { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); }
    6040     break;
    6041 
    6042   case 200:
    6043 
    6044 /* Line 1806 of yacc.c  */
    6045 #line 892 "parser.yy"
    6046     { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); }
    6047     break;
    6048 
    6049   case 201:
    6050 
    6051 /* Line 1806 of yacc.c  */
    6052 #line 894 "parser.yy"
    6053     { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); }
    6054     break;
    6055 
    6056   case 202:
    6057 
    6058 /* Line 1806 of yacc.c  */
    6059 #line 899 "parser.yy"
    6060     { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); }
    6061     break;
    6062 
    6063   case 203:
    6064 
    6065 /* Line 1806 of yacc.c  */
    6066 #line 901 "parser.yy"
    6067     { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); }
    6068     break;
    6069 
    6070   case 204:
    6071 
    6072 /* Line 1806 of yacc.c  */
    6073 #line 903 "parser.yy"
    6074     { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); }
    6075     break;
    6076 
    6077   case 205:
    6078 
    6079 /* Line 1806 of yacc.c  */
    6080 #line 905 "parser.yy"
    6081     { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); }
    6082     break;
    6083 
    6084   case 206:
    6085 
    6086 /* Line 1806 of yacc.c  */
    6087 #line 910 "parser.yy"
    6088     {
    6089                         (yyval.pn) = new StatementNode( StatementNode::Finally, 0, (yyvsp[(2) - (2)].sn) );
    6090                         std::cout << "Just created a finally node" << std::endl;
    6091                 }
    6092     break;
    6093 
    60946090  case 208:
    60956091
    60966092/* Line 1806 of yacc.c  */
    6097 #line 924 "parser.yy"
     6093#line 917 "parser.yy"
    60986094    {
    60996095                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    61056101
    61066102/* Line 1806 of yacc.c  */
    6107 #line 929 "parser.yy"
     6103#line 922 "parser.yy"
    61086104    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    61096105    break;
     
    61126108
    61136109/* Line 1806 of yacc.c  */
    6114 #line 931 "parser.yy"
     6110#line 924 "parser.yy"
    61156111    {
    61166112                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    61226118
    61236119/* Line 1806 of yacc.c  */
    6124 #line 940 "parser.yy"
    6125     { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (6)].flag), (yyvsp[(4) - (6)].constant), 0 ); }
     6120#line 933 "parser.yy"
     6121    { (yyval.sn) = new AsmStmtNode( (yyvsp[(2) - (6)].flag), (yyvsp[(4) - (6)].constant), 0 ); }
    61266122    break;
    61276123
     
    61296125
    61306126/* Line 1806 of yacc.c  */
    6131 #line 942 "parser.yy"
    6132     { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (8)].flag), (yyvsp[(4) - (8)].constant), (yyvsp[(6) - (8)].en) ); }
     6127#line 935 "parser.yy"
     6128    { (yyval.sn) = new AsmStmtNode( (yyvsp[(2) - (8)].flag), (yyvsp[(4) - (8)].constant), (yyvsp[(6) - (8)].en) ); }
    61336129    break;
    61346130
     
    61366132
    61376133/* Line 1806 of yacc.c  */
    6138 #line 944 "parser.yy"
    6139     { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (10)].flag), (yyvsp[(4) - (10)].constant), (yyvsp[(6) - (10)].en), (yyvsp[(8) - (10)].en) ); }
     6134#line 937 "parser.yy"
     6135    { (yyval.sn) = new AsmStmtNode( (yyvsp[(2) - (10)].flag), (yyvsp[(4) - (10)].constant), (yyvsp[(6) - (10)].en), (yyvsp[(8) - (10)].en) ); }
    61406136    break;
    61416137
     
    61436139
    61446140/* Line 1806 of yacc.c  */
     6141#line 939 "parser.yy"
     6142    { (yyval.sn) = new AsmStmtNode( (yyvsp[(2) - (12)].flag), (yyvsp[(4) - (12)].constant), (yyvsp[(6) - (12)].en), (yyvsp[(8) - (12)].en), (yyvsp[(10) - (12)].en) ); }
     6143    break;
     6144
     6145  case 216:
     6146
     6147/* Line 1806 of yacc.c  */
     6148#line 941 "parser.yy"
     6149    { (yyval.sn) = new AsmStmtNode( (yyvsp[(2) - (14)].flag), (yyvsp[(5) - (14)].constant), 0, (yyvsp[(8) - (14)].en), (yyvsp[(10) - (14)].en), (yyvsp[(12) - (14)].label) ); }
     6150    break;
     6151
     6152  case 217:
     6153
     6154/* Line 1806 of yacc.c  */
    61456155#line 946 "parser.yy"
    6146     { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (12)].flag), (yyvsp[(4) - (12)].constant), (yyvsp[(6) - (12)].en), (yyvsp[(8) - (12)].en), (yyvsp[(10) - (12)].en) ); }
    6147     break;
    6148 
    6149   case 216:
     6156    { (yyval.flag) = false; }
     6157    break;
     6158
     6159  case 218:
    61506160
    61516161/* Line 1806 of yacc.c  */
    61526162#line 948 "parser.yy"
    6153     { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (14)].flag), (yyvsp[(5) - (14)].constant), 0, (yyvsp[(8) - (14)].en), (yyvsp[(10) - (14)].en), (yyvsp[(12) - (14)].label) ); }
    6154     break;
    6155 
    6156   case 217:
     6163    { (yyval.flag) = true; }
     6164    break;
     6165
     6166  case 219:
    61576167
    61586168/* Line 1806 of yacc.c  */
    61596169#line 953 "parser.yy"
    6160     { (yyval.flag) = false; }
    6161     break;
    6162 
    6163   case 218:
    6164 
    6165 /* Line 1806 of yacc.c  */
    6166 #line 955 "parser.yy"
    6167     { (yyval.flag) = true; }
    6168     break;
    6169 
    6170   case 219:
     6170    { (yyval.en) = 0; }
     6171    break;
     6172
     6173  case 222:
    61716174
    61726175/* Line 1806 of yacc.c  */
    61736176#line 960 "parser.yy"
     6177    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) ); }
     6178    break;
     6179
     6180  case 223:
     6181
     6182/* Line 1806 of yacc.c  */
     6183#line 965 "parser.yy"
     6184    { (yyval.en) = new ExpressionNode( build_asm( 0, (yyvsp[(1) - (4)].constant), (yyvsp[(3) - (4)].en) ) ); }
     6185    break;
     6186
     6187  case 224:
     6188
     6189/* Line 1806 of yacc.c  */
     6190#line 967 "parser.yy"
     6191    { (yyval.en) = new ExpressionNode( build_asm( (yyvsp[(2) - (7)].en), (yyvsp[(4) - (7)].constant), (yyvsp[(6) - (7)].en) ) ); }
     6192    break;
     6193
     6194  case 225:
     6195
     6196/* Line 1806 of yacc.c  */
     6197#line 972 "parser.yy"
    61746198    { (yyval.en) = 0; }
    61756199    break;
    61766200
    6177   case 222:
    6178 
    6179 /* Line 1806 of yacc.c  */
    6180 #line 967 "parser.yy"
    6181     { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); }
    6182     break;
    6183 
    6184   case 223:
    6185 
    6186 /* Line 1806 of yacc.c  */
    6187 #line 972 "parser.yy"
    6188     { (yyval.en) = new ExpressionNode( build_asm( 0, (yyvsp[(1) - (4)].constant), (yyvsp[(3) - (4)].en) ) ); }
    6189     break;
    6190 
    6191   case 224:
     6201  case 226:
    61926202
    61936203/* Line 1806 of yacc.c  */
    61946204#line 974 "parser.yy"
    6195     { (yyval.en) = new ExpressionNode( build_asm( (yyvsp[(2) - (7)].en), (yyvsp[(4) - (7)].constant), (yyvsp[(6) - (7)].en) ) ); }
    6196     break;
    6197 
    6198   case 225:
    6199 
    6200 /* Line 1806 of yacc.c  */
    6201 #line 979 "parser.yy"
    6202     { (yyval.en) = 0; }
    6203     break;
    6204 
    6205   case 226:
     6205    { (yyval.en) = new ExpressionNode( (yyvsp[(1) - (1)].constant) ); }
     6206    break;
     6207
     6208  case 227:
     6209
     6210/* Line 1806 of yacc.c  */
     6211#line 976 "parser.yy"
     6212    { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_last( new ExpressionNode( (yyvsp[(3) - (3)].constant) ) ); }
     6213    break;
     6214
     6215  case 228:
    62066216
    62076217/* Line 1806 of yacc.c  */
    62086218#line 981 "parser.yy"
    6209     { (yyval.en) = new ExpressionNode( (yyvsp[(1) - (1)].constant) ); }
    6210     break;
    6211 
    6212   case 227:
     6219    { (yyval.label) = new LabelNode(); (yyval.label)->append_label( (yyvsp[(1) - (1)].tok) ); }
     6220    break;
     6221
     6222  case 229:
    62136223
    62146224/* Line 1806 of yacc.c  */
    62156225#line 983 "parser.yy"
    6216     { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( new ExpressionNode( (yyvsp[(3) - (3)].constant) ) ); }
    6217     break;
    6218 
    6219   case 228:
    6220 
    6221 /* Line 1806 of yacc.c  */
    6222 #line 988 "parser.yy"
    6223     { (yyval.label) = new LabelNode(); (yyval.label)->append_label( (yyvsp[(1) - (1)].tok) ); }
    6224     break;
    6225 
    6226   case 229:
     6226    { (yyval.label) = (yyvsp[(1) - (3)].label); (yyvsp[(1) - (3)].label)->append_label( (yyvsp[(3) - (3)].tok) ); }
     6227    break;
     6228
     6229  case 230:
    62276230
    62286231/* Line 1806 of yacc.c  */
    62296232#line 990 "parser.yy"
    6230     { (yyval.label) = (yyvsp[(1) - (3)].label); (yyvsp[(1) - (3)].label)->append_label( (yyvsp[(3) - (3)].tok) ); }
    6231     break;
    6232 
    6233   case 230:
     6233    { (yyval.decl) = 0; }
     6234    break;
     6235
     6236  case 233:
    62346237
    62356238/* Line 1806 of yacc.c  */
    62366239#line 997 "parser.yy"
     6240    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
     6241    break;
     6242
     6243  case 234:
     6244
     6245/* Line 1806 of yacc.c  */
     6246#line 1002 "parser.yy"
    62376247    { (yyval.decl) = 0; }
    62386248    break;
    62396249
    6240   case 233:
    6241 
    6242 /* Line 1806 of yacc.c  */
    6243 #line 1004 "parser.yy"
     6250  case 237:
     6251
     6252/* Line 1806 of yacc.c  */
     6253#line 1009 "parser.yy"
    62446254    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
    62456255    break;
    62466256
    6247   case 234:
    6248 
    6249 /* Line 1806 of yacc.c  */
    6250 #line 1009 "parser.yy"
    6251     { (yyval.decl) = 0; }
    6252     break;
    6253 
    6254   case 237:
    6255 
    6256 /* Line 1806 of yacc.c  */
    6257 #line 1016 "parser.yy"
    6258     { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
    6259     break;
    6260 
    62616257  case 242:
    62626258
    62636259/* Line 1806 of yacc.c  */
    6264 #line 1030 "parser.yy"
     6260#line 1023 "parser.yy"
    62656261    {}
    62666262    break;
     
    62696265
    62706266/* Line 1806 of yacc.c  */
    6271 #line 1031 "parser.yy"
     6267#line 1024 "parser.yy"
    62726268    {}
    62736269    break;
     
    62766272
    62776273/* Line 1806 of yacc.c  */
    6278 #line 1060 "parser.yy"
     6274#line 1053 "parser.yy"
    62796275    {
    62806276                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    62866282
    62876283/* Line 1806 of yacc.c  */
    6288 #line 1067 "parser.yy"
     6284#line 1060 "parser.yy"
    62896285    {
    62906286                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    62966292
    62976293/* Line 1806 of yacc.c  */
    6298 #line 1072 "parser.yy"
     6294#line 1065 "parser.yy"
    62996295    {
    63006296                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (6)].tok), TypedefTable::ID );
     
    63066302
    63076303/* Line 1806 of yacc.c  */
    6308 #line 1082 "parser.yy"
     6304#line 1075 "parser.yy"
    63096305    {
    63106306                        typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) );
     
    63166312
    63176313/* Line 1806 of yacc.c  */
    6318 #line 1087 "parser.yy"
     6314#line 1080 "parser.yy"
    63196315    {
    63206316                        typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) );
     
    63266322
    63276323/* Line 1806 of yacc.c  */
    6328 #line 1092 "parser.yy"
     6324#line 1085 "parser.yy"
    63296325    {
    63306326                        typedefTable.setNextIdentifier( *(yyvsp[(3) - (4)].tok) );
     
    63366332
    63376333/* Line 1806 of yacc.c  */
    6338 #line 1100 "parser.yy"
     6334#line 1093 "parser.yy"
    63396335    {
    63406336                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63466342
    63476343/* Line 1806 of yacc.c  */
    6348 #line 1105 "parser.yy"
     6344#line 1098 "parser.yy"
    63496345    {
    63506346                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63566352
    63576353/* Line 1806 of yacc.c  */
    6358 #line 1110 "parser.yy"
     6354#line 1103 "parser.yy"
    63596355    {
    63606356                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63666362
    63676363/* Line 1806 of yacc.c  */
    6368 #line 1115 "parser.yy"
     6364#line 1108 "parser.yy"
    63696365    {
    63706366                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    63766372
    63776373/* Line 1806 of yacc.c  */
    6378 #line 1120 "parser.yy"
     6374#line 1113 "parser.yy"
    63796375    {
    63806376                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::ID );
     
    63866382
    63876383/* Line 1806 of yacc.c  */
    6388 #line 1128 "parser.yy"
     6384#line 1121 "parser.yy"
    63896385    {
    63906386                        (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(3) - (8)].tok), DeclarationNode::newTuple( 0 ), (yyvsp[(6) - (8)].decl), 0, true );
     
    63956391
    63966392/* Line 1806 of yacc.c  */
    6397 #line 1151 "parser.yy"
     6393#line 1144 "parser.yy"
    63986394    {
    63996395                        (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true );
     
    64046400
    64056401/* Line 1806 of yacc.c  */
    6406 #line 1155 "parser.yy"
     6402#line 1148 "parser.yy"
    64076403    {
    64086404                        (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true );
     
    64136409
    64146410/* Line 1806 of yacc.c  */
    6415 #line 1162 "parser.yy"
     6411#line 1155 "parser.yy"
    64166412    { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }
    64176413    break;
     
    64206416
    64216417/* Line 1806 of yacc.c  */
    6422 #line 1166 "parser.yy"
     6418#line 1159 "parser.yy"
    64236419    { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (9)].decl)->appendList( (yyvsp[(7) - (9)].decl) ) ); }
    64246420    break;
     
    64276423
    64286424/* Line 1806 of yacc.c  */
    6429 #line 1171 "parser.yy"
     6425#line 1164 "parser.yy"
    64306426    {
    64316427                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64376433
    64386434/* Line 1806 of yacc.c  */
    6439 #line 1176 "parser.yy"
     6435#line 1169 "parser.yy"
    64406436    {
    64416437                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64476443
    64486444/* Line 1806 of yacc.c  */
    6449 #line 1181 "parser.yy"
     6445#line 1174 "parser.yy"
    64506446    {
    64516447                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::TD );
     
    64576453
    64586454/* Line 1806 of yacc.c  */
    6459 #line 1192 "parser.yy"
     6455#line 1185 "parser.yy"
    64606456    {
    64616457                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64676463
    64686464/* Line 1806 of yacc.c  */
    6469 #line 1197 "parser.yy"
     6465#line 1190 "parser.yy"
    64706466    {
    64716467                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64776473
    64786474/* Line 1806 of yacc.c  */
    6479 #line 1202 "parser.yy"
     6475#line 1195 "parser.yy"
    64806476    {
    64816477                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64876483
    64886484/* Line 1806 of yacc.c  */
    6489 #line 1207 "parser.yy"
     6485#line 1200 "parser.yy"
    64906486    {
    64916487                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    64976493
    64986494/* Line 1806 of yacc.c  */
    6499 #line 1212 "parser.yy"
     6495#line 1205 "parser.yy"
    65006496    {
    65016497                        typedefTable.addToEnclosingScope( TypedefTable::TD );
     
    65076503
    65086504/* Line 1806 of yacc.c  */
    6509 #line 1221 "parser.yy"
     6505#line 1214 "parser.yy"
    65106506    {
    65116507                        typedefTable.addToEnclosingScope( *(yyvsp[(2) - (4)].tok), TypedefTable::TD );
     
    65176513
    65186514/* Line 1806 of yacc.c  */
    6519 #line 1226 "parser.yy"
     6515#line 1219 "parser.yy"
    65206516    {
    65216517                        typedefTable.addToEnclosingScope( *(yyvsp[(5) - (7)].tok), TypedefTable::TD );
     
    65276523
    65286524/* Line 1806 of yacc.c  */
    6529 #line 1243 "parser.yy"
     6525#line 1236 "parser.yy"
    65306526    {
    65316527                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    65376533
    65386534/* Line 1806 of yacc.c  */
    6539 #line 1248 "parser.yy"
     6535#line 1241 "parser.yy"
    65406536    {
    65416537                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    65476543
    65486544/* Line 1806 of yacc.c  */
    6549 #line 1270 "parser.yy"
     6545#line 1263 "parser.yy"
    65506546    { (yyval.decl) = 0; }
    65516547    break;
     
    65546550
    65556551/* Line 1806 of yacc.c  */
    6556 #line 1282 "parser.yy"
     6552#line 1275 "parser.yy"
    65576553    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    65586554    break;
     
    65616557
    65626558/* Line 1806 of yacc.c  */
    6563 #line 1293 "parser.yy"
     6559#line 1286 "parser.yy"
    65646560    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Const ); }
    65656561    break;
     
    65686564
    65696565/* Line 1806 of yacc.c  */
    6570 #line 1295 "parser.yy"
     6566#line 1288 "parser.yy"
    65716567    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Restrict ); }
    65726568    break;
     
    65756571
    65766572/* Line 1806 of yacc.c  */
    6577 #line 1297 "parser.yy"
     6573#line 1290 "parser.yy"
    65786574    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Volatile ); }
    65796575    break;
     
    65826578
    65836579/* Line 1806 of yacc.c  */
    6584 #line 1299 "parser.yy"
     6580#line 1292 "parser.yy"
    65856581    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); }
    65866582    break;
     
    65896585
    65906586/* Line 1806 of yacc.c  */
    6591 #line 1301 "parser.yy"
     6587#line 1294 "parser.yy"
    65926588    { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Atomic ); }
    65936589    break;
     
    65966592
    65976593/* Line 1806 of yacc.c  */
    6598 #line 1303 "parser.yy"
     6594#line 1296 "parser.yy"
    65996595    {
    66006596                        typedefTable.enterScope();
     
    66056601
    66066602/* Line 1806 of yacc.c  */
    6607 #line 1307 "parser.yy"
     6603#line 1300 "parser.yy"
    66086604    {
    66096605                        typedefTable.leaveScope();
     
    66156611
    66166612/* Line 1806 of yacc.c  */
    6617 #line 1316 "parser.yy"
     6613#line 1309 "parser.yy"
    66186614    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    66196615    break;
     
    66226618
    66236619/* Line 1806 of yacc.c  */
    6624 #line 1318 "parser.yy"
     6620#line 1311 "parser.yy"
    66256621    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    66266622    break;
     
    66296625
    66306626/* Line 1806 of yacc.c  */
    6631 #line 1329 "parser.yy"
     6627#line 1322 "parser.yy"
    66326628    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    66336629    break;
     
    66366632
    66376633/* Line 1806 of yacc.c  */
    6638 #line 1338 "parser.yy"
     6634#line 1331 "parser.yy"
    66396635    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Extern ); }
    66406636    break;
     
    66436639
    66446640/* Line 1806 of yacc.c  */
    6645 #line 1340 "parser.yy"
     6641#line 1333 "parser.yy"
    66466642    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Static ); }
    66476643    break;
     
    66506646
    66516647/* Line 1806 of yacc.c  */
    6652 #line 1342 "parser.yy"
     6648#line 1335 "parser.yy"
    66536649    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Auto ); }
    66546650    break;
     
    66576653
    66586654/* Line 1806 of yacc.c  */
    6659 #line 1344 "parser.yy"
     6655#line 1337 "parser.yy"
    66606656    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Register ); }
    66616657    break;
     
    66646660
    66656661/* Line 1806 of yacc.c  */
    6666 #line 1346 "parser.yy"
     6662#line 1339 "parser.yy"
    66676663    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Inline ); }
    66686664    break;
     
    66716667
    66726668/* Line 1806 of yacc.c  */
    6673 #line 1348 "parser.yy"
     6669#line 1341 "parser.yy"
    66746670    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); }
    66756671    break;
     
    66786674
    66796675/* Line 1806 of yacc.c  */
     6676#line 1343 "parser.yy"
     6677    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); }
     6678    break;
     6679
     6680  case 317:
     6681
     6682/* Line 1806 of yacc.c  */
     6683#line 1345 "parser.yy"
     6684    { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
     6685    break;
     6686
     6687  case 318:
     6688
     6689/* Line 1806 of yacc.c  */
    66806690#line 1350 "parser.yy"
    6681     { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); }
    6682     break;
    6683 
    6684   case 317:
     6691    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); }
     6692    break;
     6693
     6694  case 319:
    66856695
    66866696/* Line 1806 of yacc.c  */
    66876697#line 1352 "parser.yy"
    6688     { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); }
    6689     break;
    6690 
    6691   case 318:
    6692 
    6693 /* Line 1806 of yacc.c  */
    6694 #line 1357 "parser.yy"
    6695     { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); }
    6696     break;
    6697 
    6698   case 319:
    6699 
    6700 /* Line 1806 of yacc.c  */
    6701 #line 1359 "parser.yy"
    67026698    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Double ); }
    67036699    break;
     
    67066702
    67076703/* Line 1806 of yacc.c  */
    6708 #line 1361 "parser.yy"
     6704#line 1354 "parser.yy"
    67096705    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Float ); }
    67106706    break;
     
    67136709
    67146710/* Line 1806 of yacc.c  */
    6715 #line 1363 "parser.yy"
     6711#line 1356 "parser.yy"
    67166712    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Int ); }
    67176713    break;
     
    67206716
    67216717/* Line 1806 of yacc.c  */
    6722 #line 1365 "parser.yy"
     6718#line 1358 "parser.yy"
    67236719    { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Long ); }
    67246720    break;
     
    67276723
    67286724/* Line 1806 of yacc.c  */
    6729 #line 1367 "parser.yy"
     6725#line 1360 "parser.yy"
    67306726    { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Short ); }
    67316727    break;
     
    67346730
    67356731/* Line 1806 of yacc.c  */
    6736 #line 1369 "parser.yy"
     6732#line 1362 "parser.yy"
    67376733    { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Signed ); }
    67386734    break;
     
    67416737
    67426738/* Line 1806 of yacc.c  */
    6743 #line 1371 "parser.yy"
     6739#line 1364 "parser.yy"
    67446740    { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Unsigned ); }
    67456741    break;
     
    67486744
    67496745/* Line 1806 of yacc.c  */
    6750 #line 1373 "parser.yy"
     6746#line 1366 "parser.yy"
    67516747    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Void ); }
    67526748    break;
     
    67556751
    67566752/* Line 1806 of yacc.c  */
    6757 #line 1375 "parser.yy"
     6753#line 1368 "parser.yy"
    67586754    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Bool ); }
    67596755    break;
     
    67626758
    67636759/* Line 1806 of yacc.c  */
    6764 #line 1377 "parser.yy"
     6760#line 1370 "parser.yy"
    67656761    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Complex ); }
    67666762    break;
     
    67696765
    67706766/* Line 1806 of yacc.c  */
    6771 #line 1379 "parser.yy"
     6767#line 1372 "parser.yy"
    67726768    { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Imaginary ); }
    67736769    break;
     
    67766772
    67776773/* Line 1806 of yacc.c  */
     6774#line 1374 "parser.yy"
     6775    { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); }
     6776    break;
     6777
     6778  case 332:
     6779
     6780/* Line 1806 of yacc.c  */
    67786781#line 1381 "parser.yy"
    6779     { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); }
    6780     break;
    6781 
    6782   case 332:
    6783 
    6784 /* Line 1806 of yacc.c  */
    6785 #line 1388 "parser.yy"
    67866782    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    67876783    break;
     
    67906786
    67916787/* Line 1806 of yacc.c  */
    6792 #line 1390 "parser.yy"
     6788#line 1383 "parser.yy"
    67936789    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    67946790    break;
     
    67976793
    67986794/* Line 1806 of yacc.c  */
    6799 #line 1392 "parser.yy"
     6795#line 1385 "parser.yy"
    68006796    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    68016797    break;
     
    68046800
    68056801/* Line 1806 of yacc.c  */
    6806 #line 1394 "parser.yy"
     6802#line 1387 "parser.yy"
    68076803    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addType( (yyvsp[(1) - (3)].decl) ); }
    68086804    break;
     
    68116807
    68126808/* Line 1806 of yacc.c  */
     6809#line 1393 "parser.yy"
     6810    { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
     6811    break;
     6812
     6813  case 339:
     6814
     6815/* Line 1806 of yacc.c  */
    68136816#line 1400 "parser.yy"
    6814     { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    6815     break;
    6816 
    6817   case 339:
    6818 
    6819 /* Line 1806 of yacc.c  */
    6820 #line 1407 "parser.yy"
    68216817    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    68226818    break;
     
    68256821
    68266822/* Line 1806 of yacc.c  */
     6823#line 1402 "parser.yy"
     6824    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     6825    break;
     6826
     6827  case 341:
     6828
     6829/* Line 1806 of yacc.c  */
     6830#line 1404 "parser.yy"
     6831    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); }
     6832    break;
     6833
     6834  case 342:
     6835
     6836/* Line 1806 of yacc.c  */
    68276837#line 1409 "parser.yy"
     6838    { (yyval.decl) = (yyvsp[(3) - (4)].decl); }
     6839    break;
     6840
     6841  case 343:
     6842
     6843/* Line 1806 of yacc.c  */
     6844#line 1411 "parser.yy"
     6845    { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); }
     6846    break;
     6847
     6848  case 344:
     6849
     6850/* Line 1806 of yacc.c  */
     6851#line 1413 "parser.yy"
     6852    { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); }
     6853    break;
     6854
     6855  case 345:
     6856
     6857/* Line 1806 of yacc.c  */
     6858#line 1415 "parser.yy"
     6859    { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
     6860    break;
     6861
     6862  case 347:
     6863
     6864/* Line 1806 of yacc.c  */
     6865#line 1421 "parser.yy"
     6866    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
     6867    break;
     6868
     6869  case 348:
     6870
     6871/* Line 1806 of yacc.c  */
     6872#line 1423 "parser.yy"
    68286873    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    68296874    break;
    68306875
    6831   case 341:
    6832 
    6833 /* Line 1806 of yacc.c  */
    6834 #line 1411 "parser.yy"
    6835     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); }
    6836     break;
    6837 
    6838   case 342:
    6839 
    6840 /* Line 1806 of yacc.c  */
    6841 #line 1416 "parser.yy"
    6842     { (yyval.decl) = (yyvsp[(3) - (4)].decl); }
    6843     break;
    6844 
    6845   case 343:
    6846 
    6847 /* Line 1806 of yacc.c  */
    6848 #line 1418 "parser.yy"
    6849     { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); }
    6850     break;
    6851 
    6852   case 344:
    6853 
    6854 /* Line 1806 of yacc.c  */
    6855 #line 1420 "parser.yy"
    6856     { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); }
    6857     break;
    6858 
    6859   case 345:
    6860 
    6861 /* Line 1806 of yacc.c  */
    6862 #line 1422 "parser.yy"
    6863     { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
    6864     break;
    6865 
    6866   case 347:
    6867 
    6868 /* Line 1806 of yacc.c  */
    6869 #line 1428 "parser.yy"
     6876  case 349:
     6877
     6878/* Line 1806 of yacc.c  */
     6879#line 1425 "parser.yy"
     6880    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
     6881    break;
     6882
     6883  case 351:
     6884
     6885/* Line 1806 of yacc.c  */
     6886#line 1431 "parser.yy"
    68706887    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    68716888    break;
    68726889
    6873   case 348:
    6874 
    6875 /* Line 1806 of yacc.c  */
    6876 #line 1430 "parser.yy"
     6890  case 352:
     6891
     6892/* Line 1806 of yacc.c  */
     6893#line 1433 "parser.yy"
    68776894    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    68786895    break;
    68796896
    6880   case 349:
    6881 
    6882 /* Line 1806 of yacc.c  */
    6883 #line 1432 "parser.yy"
     6897  case 354:
     6898
     6899/* Line 1806 of yacc.c  */
     6900#line 1439 "parser.yy"
     6901    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
     6902    break;
     6903
     6904  case 355:
     6905
     6906/* Line 1806 of yacc.c  */
     6907#line 1441 "parser.yy"
     6908    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     6909    break;
     6910
     6911  case 356:
     6912
     6913/* Line 1806 of yacc.c  */
     6914#line 1443 "parser.yy"
    68846915    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    68856916    break;
    68866917
    6887   case 351:
    6888 
    6889 /* Line 1806 of yacc.c  */
    6890 #line 1438 "parser.yy"
    6891     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    6892     break;
    6893 
    6894   case 352:
    6895 
    6896 /* Line 1806 of yacc.c  */
    6897 #line 1440 "parser.yy"
     6918  case 357:
     6919
     6920/* Line 1806 of yacc.c  */
     6921#line 1448 "parser.yy"
     6922    { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); }
     6923    break;
     6924
     6925  case 358:
     6926
     6927/* Line 1806 of yacc.c  */
     6928#line 1450 "parser.yy"
     6929    { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
     6930    break;
     6931
     6932  case 359:
     6933
     6934/* Line 1806 of yacc.c  */
     6935#line 1452 "parser.yy"
    68986936    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    68996937    break;
    69006938
    6901   case 354:
    6902 
    6903 /* Line 1806 of yacc.c  */
    6904 #line 1446 "parser.yy"
    6905     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    6906     break;
    6907 
    6908   case 355:
    6909 
    6910 /* Line 1806 of yacc.c  */
    6911 #line 1448 "parser.yy"
    6912     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    6913     break;
    6914 
    6915   case 356:
    6916 
    6917 /* Line 1806 of yacc.c  */
    6918 #line 1450 "parser.yy"
    6919     { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    6920     break;
    6921 
    6922   case 357:
    6923 
    6924 /* Line 1806 of yacc.c  */
    6925 #line 1455 "parser.yy"
    6926     { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); }
    6927     break;
    6928 
    6929   case 358:
    6930 
    6931 /* Line 1806 of yacc.c  */
    6932 #line 1457 "parser.yy"
    6933     { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    6934     break;
    6935 
    6936   case 359:
    6937 
    6938 /* Line 1806 of yacc.c  */
    6939 #line 1459 "parser.yy"
    6940     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    6941     break;
    6942 
    69436939  case 362:
    69446940
    69456941/* Line 1806 of yacc.c  */
    6946 #line 1469 "parser.yy"
     6942#line 1462 "parser.yy"
    69476943    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (4)].aggKey), 0, 0, (yyvsp[(3) - (4)].decl), true ); }
    69486944    break;
     
    69516947
    69526948/* Line 1806 of yacc.c  */
    6953 #line 1471 "parser.yy"
     6949#line 1464 "parser.yy"
    69546950    {
    69556951                        typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) );
     
    69616957
    69626958/* Line 1806 of yacc.c  */
    6963 #line 1476 "parser.yy"
     6959#line 1469 "parser.yy"
    69646960    { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); }
    69656961    break;
     
    69686964
    69696965/* Line 1806 of yacc.c  */
    6970 #line 1478 "parser.yy"
     6966#line 1471 "parser.yy"
    69716967    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (6)].aggKey), (yyvsp[(2) - (6)].tok), 0, (yyvsp[(5) - (6)].decl), true ); }
    69726968    break;
     
    69756971
    69766972/* Line 1806 of yacc.c  */
     6973#line 1473 "parser.yy"
     6974    { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), 0, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl), false ); }
     6975    break;
     6976
     6977  case 367:
     6978
     6979/* Line 1806 of yacc.c  */
     6980#line 1475 "parser.yy"
     6981    { (yyval.decl) = (yyvsp[(2) - (2)].decl); }
     6982    break;
     6983
     6984  case 368:
     6985
     6986/* Line 1806 of yacc.c  */
    69776987#line 1480 "parser.yy"
    6978     { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), 0, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl), false ); }
    6979     break;
    6980 
    6981   case 367:
     6988    { (yyval.aggKey) = DeclarationNode::Struct; }
     6989    break;
     6990
     6991  case 369:
    69826992
    69836993/* Line 1806 of yacc.c  */
    69846994#line 1482 "parser.yy"
    6985     { (yyval.decl) = (yyvsp[(2) - (2)].decl); }
    6986     break;
    6987 
    6988   case 368:
     6995    { (yyval.aggKey) = DeclarationNode::Union; }
     6996    break;
     6997
     6998  case 370:
    69896999
    69907000/* Line 1806 of yacc.c  */
    69917001#line 1487 "parser.yy"
    6992     { (yyval.aggKey) = DeclarationNode::Struct; }
    6993     break;
    6994 
    6995   case 369:
     7002    { (yyval.decl) = 0; }
     7003    break;
     7004
     7005  case 371:
    69967006
    69977007/* Line 1806 of yacc.c  */
    69987008#line 1489 "parser.yy"
    6999     { (yyval.aggKey) = DeclarationNode::Union; }
    7000     break;
    7001 
    7002   case 370:
    7003 
    7004 /* Line 1806 of yacc.c  */
    7005 #line 1494 "parser.yy"
    7006     { (yyval.decl) = 0; }
    7007     break;
    7008 
    7009   case 371:
    7010 
    7011 /* Line 1806 of yacc.c  */
    7012 #line 1496 "parser.yy"
    70137009    { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); }
    70147010    break;
     
    70177013
    70187014/* Line 1806 of yacc.c  */
    7019 #line 1502 "parser.yy"
     7015#line 1495 "parser.yy"
    70207016    { (yyval.decl) = (yyvsp[(2) - (3)].decl)->set_extension( true ); }
    70217017    break;
     
    70247020
    70257021/* Line 1806 of yacc.c  */
    7026 #line 1505 "parser.yy"
     7022#line 1498 "parser.yy"
    70277023    {   // mark all fields in list
    7028                         for ( DeclarationNode *iter = (yyvsp[(2) - (3)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() )
     7024                        for ( DeclarationNode *iter = (yyvsp[(2) - (3)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_next() )
    70297025                                iter->set_extension( true );
    70307026                        (yyval.decl) = (yyvsp[(2) - (3)].decl);
     
    70357031
    70367032/* Line 1806 of yacc.c  */
    7037 #line 1515 "parser.yy"
     7033#line 1508 "parser.yy"
    70387034    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addName( (yyvsp[(2) - (2)].tok) ); }
    70397035    break;
     
    70427038
    70437039/* Line 1806 of yacc.c  */
     7040#line 1510 "parser.yy"
     7041    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); }
     7042    break;
     7043
     7044  case 379:
     7045
     7046/* Line 1806 of yacc.c  */
     7047#line 1512 "parser.yy"
     7048    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) ); }
     7049    break;
     7050
     7051  case 380:
     7052
     7053/* Line 1806 of yacc.c  */
    70447054#line 1517 "parser.yy"
    7045     { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); }
    7046     break;
    7047 
    7048   case 379:
     7055    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
     7056    break;
     7057
     7058  case 381:
    70497059
    70507060/* Line 1806 of yacc.c  */
    70517061#line 1519 "parser.yy"
    7052     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) ); }
    7053     break;
    7054 
    7055   case 380:
     7062    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(1) - (4)].decl)->cloneBaseType( (yyvsp[(4) - (4)].decl) ) ); }
     7063    break;
     7064
     7065  case 382:
    70567066
    70577067/* Line 1806 of yacc.c  */
    70587068#line 1524 "parser.yy"
    7059     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    7060     break;
    7061 
    7062   case 381:
     7069    { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ }
     7070    break;
     7071
     7072  case 383:
    70637073
    70647074/* Line 1806 of yacc.c  */
    70657075#line 1526 "parser.yy"
    7066     { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(1) - (4)].decl)->cloneBaseType( (yyvsp[(4) - (4)].decl) ) ); }
    7067     break;
    7068 
    7069   case 382:
    7070 
    7071 /* Line 1806 of yacc.c  */
    7072 #line 1531 "parser.yy"
    7073     { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ }
    7074     break;
    7075 
    7076   case 383:
    7077 
    7078 /* Line 1806 of yacc.c  */
    7079 #line 1533 "parser.yy"
    70807076    { (yyval.decl) = DeclarationNode::newBitfield( (yyvsp[(1) - (1)].en) ); }
    70817077    break;
     
    70847080
    70857081/* Line 1806 of yacc.c  */
    7086 #line 1536 "parser.yy"
     7082#line 1529 "parser.yy"
    70877083    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }
    70887084    break;
     
    70917087
    70927088/* Line 1806 of yacc.c  */
    7093 #line 1539 "parser.yy"
     7089#line 1532 "parser.yy"
    70947090    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }
    70957091    break;
     
    70987094
    70997095/* Line 1806 of yacc.c  */
     7096#line 1538 "parser.yy"
     7097    { (yyval.en) = 0; }
     7098    break;
     7099
     7100  case 388:
     7101
     7102/* Line 1806 of yacc.c  */
     7103#line 1540 "parser.yy"
     7104    { (yyval.en) = (yyvsp[(1) - (1)].en); }
     7105    break;
     7106
     7107  case 389:
     7108
     7109/* Line 1806 of yacc.c  */
    71007110#line 1545 "parser.yy"
    7101     { (yyval.en) = 0; }
    7102     break;
    7103 
    7104   case 388:
    7105 
    7106 /* Line 1806 of yacc.c  */
    7107 #line 1547 "parser.yy"
    7108     { (yyval.en) = (yyvsp[(1) - (1)].en); }
    7109     break;
    7110 
    7111   case 389:
    7112 
    7113 /* Line 1806 of yacc.c  */
    7114 #line 1552 "parser.yy"
    71157111    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    71167112    break;
     
    71197115
    71207116/* Line 1806 of yacc.c  */
    7121 #line 1561 "parser.yy"
     7117#line 1554 "parser.yy"
    71227118    { (yyval.decl) = DeclarationNode::newEnum( 0, (yyvsp[(3) - (5)].decl) ); }
    71237119    break;
     
    71267122
    71277123/* Line 1806 of yacc.c  */
    7128 #line 1563 "parser.yy"
     7124#line 1556 "parser.yy"
    71297125    {
    71307126                        typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) );
     
    71367132
    71377133/* Line 1806 of yacc.c  */
     7134#line 1561 "parser.yy"
     7135    { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); }
     7136    break;
     7137
     7138  case 394:
     7139
     7140/* Line 1806 of yacc.c  */
     7141#line 1563 "parser.yy"
     7142    { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(2) - (7)].tok), (yyvsp[(5) - (7)].decl) ); }
     7143    break;
     7144
     7145  case 395:
     7146
     7147/* Line 1806 of yacc.c  */
    71387148#line 1568 "parser.yy"
    7139     { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); }
    7140     break;
    7141 
    7142   case 394:
     7149    { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); }
     7150    break;
     7151
     7152  case 396:
    71437153
    71447154/* Line 1806 of yacc.c  */
    71457155#line 1570 "parser.yy"
    7146     { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(2) - (7)].tok), (yyvsp[(5) - (7)].decl) ); }
    7147     break;
    7148 
    7149   case 395:
     7156    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); }
     7157    break;
     7158
     7159  case 397:
    71507160
    71517161/* Line 1806 of yacc.c  */
    71527162#line 1575 "parser.yy"
    7153     { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); }
    7154     break;
    7155 
    7156   case 396:
     7163    { (yyval.en) = 0; }
     7164    break;
     7165
     7166  case 398:
    71577167
    71587168/* Line 1806 of yacc.c  */
    71597169#line 1577 "parser.yy"
    7160     { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); }
    7161     break;
    7162 
    7163   case 397:
    7164 
    7165 /* Line 1806 of yacc.c  */
    7166 #line 1582 "parser.yy"
    7167     { (yyval.en) = 0; }
    7168     break;
    7169 
    7170   case 398:
     7170    { (yyval.en) = (yyvsp[(2) - (2)].en); }
     7171    break;
     7172
     7173  case 399:
    71717174
    71727175/* Line 1806 of yacc.c  */
    71737176#line 1584 "parser.yy"
    7174     { (yyval.en) = (yyvsp[(2) - (2)].en); }
    7175     break;
    7176 
    7177   case 399:
    7178 
    7179 /* Line 1806 of yacc.c  */
    7180 #line 1591 "parser.yy"
    71817177    { (yyval.decl) = 0; }
    71827178    break;
     
    71857181
    71867182/* Line 1806 of yacc.c  */
    7187 #line 1599 "parser.yy"
     7183#line 1592 "parser.yy"
    71887184    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    71897185    break;
     
    71927188
    71937189/* Line 1806 of yacc.c  */
    7194 #line 1601 "parser.yy"
     7190#line 1594 "parser.yy"
    71957191    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    71967192    break;
     
    71997195
    72007196/* Line 1806 of yacc.c  */
    7201 #line 1603 "parser.yy"
     7197#line 1596 "parser.yy"
    72027198    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    72037199    break;
     
    72067202
    72077203/* Line 1806 of yacc.c  */
    7208 #line 1611 "parser.yy"
     7204#line 1604 "parser.yy"
    72097205    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72107206    break;
     
    72137209
    72147210/* Line 1806 of yacc.c  */
    7215 #line 1613 "parser.yy"
     7211#line 1606 "parser.yy"
    72167212    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72177213    break;
     
    72207216
    72217217/* Line 1806 of yacc.c  */
    7222 #line 1615 "parser.yy"
     7218#line 1608 "parser.yy"
    72237219    { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); }
    72247220    break;
     
    72277223
    72287224/* Line 1806 of yacc.c  */
    7229 #line 1621 "parser.yy"
     7225#line 1614 "parser.yy"
    72307226    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72317227    break;
     
    72347230
    72357231/* Line 1806 of yacc.c  */
     7232#line 1619 "parser.yy"
     7233    { (yyval.decl) = 0; }
     7234    break;
     7235
     7236  case 415:
     7237
     7238/* Line 1806 of yacc.c  */
    72367239#line 1626 "parser.yy"
    7237     { (yyval.decl) = 0; }
    7238     break;
    7239 
    7240   case 415:
     7240    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
     7241    break;
     7242
     7243  case 418:
    72417244
    72427245/* Line 1806 of yacc.c  */
    72437246#line 1633 "parser.yy"
    7244     { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }
    7245     break;
    7246 
    7247   case 418:
    7248 
    7249 /* Line 1806 of yacc.c  */
    7250 #line 1640 "parser.yy"
    72517247    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72527248    break;
     
    72557251
    72567252/* Line 1806 of yacc.c  */
    7257 #line 1642 "parser.yy"
     7253#line 1635 "parser.yy"
    72587254    { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }
    72597255    break;
     
    72627258
    72637259/* Line 1806 of yacc.c  */
    7264 #line 1651 "parser.yy"
     7260#line 1644 "parser.yy"
    72657261    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); }
    72667262    break;
     
    72697265
    72707266/* Line 1806 of yacc.c  */
    7271 #line 1654 "parser.yy"
     7267#line 1647 "parser.yy"
    72727268    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); }
    72737269    break;
     
    72767272
    72777273/* Line 1806 of yacc.c  */
    7278 #line 1656 "parser.yy"
     7274#line 1649 "parser.yy"
    72797275    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addName( (yyvsp[(3) - (4)].tok) )->addQualifiers( (yyvsp[(1) - (4)].decl) ); }
    72807276    break;
     
    72837279
    72847280/* Line 1806 of yacc.c  */
    7285 #line 1666 "parser.yy"
     7281#line 1659 "parser.yy"
    72867282    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    72877283    break;
     
    72907286
    72917287/* Line 1806 of yacc.c  */
    7292 #line 1672 "parser.yy"
     7288#line 1665 "parser.yy"
    72937289    {
    72947290                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    73007296
    73017297/* Line 1806 of yacc.c  */
    7302 #line 1677 "parser.yy"
     7298#line 1670 "parser.yy"
    73037299    {
    73047300                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    73107306
    73117307/* Line 1806 of yacc.c  */
    7312 #line 1686 "parser.yy"
     7308#line 1679 "parser.yy"
    73137309    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    73147310    break;
     
    73177313
    73187314/* Line 1806 of yacc.c  */
    7319 #line 1695 "parser.yy"
     7315#line 1688 "parser.yy"
    73207316    { (yyval.decl) = DeclarationNode::newName( (yyvsp[(1) - (1)].tok) ); }
    73217317    break;
     
    73247320
    73257321/* Line 1806 of yacc.c  */
    7326 #line 1697 "parser.yy"
     7322#line 1690 "parser.yy"
    73277323    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( DeclarationNode::newName( (yyvsp[(3) - (3)].tok) ) ); }
    73287324    break;
     
    73317327
    73327328/* Line 1806 of yacc.c  */
    7333 #line 1722 "parser.yy"
     7329#line 1715 "parser.yy"
    73347330    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    73357331    break;
     
    73387334
    73397335/* Line 1806 of yacc.c  */
     7336#line 1723 "parser.yy"
     7337    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
     7338    break;
     7339
     7340  case 452:
     7341
     7342/* Line 1806 of yacc.c  */
     7343#line 1728 "parser.yy"
     7344    { (yyval.in) = 0; }
     7345    break;
     7346
     7347  case 453:
     7348
     7349/* Line 1806 of yacc.c  */
    73407350#line 1730 "parser.yy"
    7341     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }
    7342     break;
    7343 
    7344   case 452:
    7345 
    7346 /* Line 1806 of yacc.c  */
    7347 #line 1735 "parser.yy"
     7351    { (yyval.in) = (yyvsp[(2) - (2)].in); }
     7352    break;
     7353
     7354  case 454:
     7355
     7356/* Line 1806 of yacc.c  */
     7357#line 1732 "parser.yy"
     7358    { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); }
     7359    break;
     7360
     7361  case 455:
     7362
     7363/* Line 1806 of yacc.c  */
     7364#line 1736 "parser.yy"
     7365    { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); }
     7366    break;
     7367
     7368  case 456:
     7369
     7370/* Line 1806 of yacc.c  */
     7371#line 1737 "parser.yy"
     7372    { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); }
     7373    break;
     7374
     7375  case 457:
     7376
     7377/* Line 1806 of yacc.c  */
     7378#line 1742 "parser.yy"
    73487379    { (yyval.in) = 0; }
    73497380    break;
    73507381
    7351   case 453:
    7352 
    7353 /* Line 1806 of yacc.c  */
    7354 #line 1737 "parser.yy"
    7355     { (yyval.in) = (yyvsp[(2) - (2)].in); }
    7356     break;
    7357 
    7358   case 454:
    7359 
    7360 /* Line 1806 of yacc.c  */
    7361 #line 1739 "parser.yy"
    7362     { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); }
    7363     break;
    7364 
    7365   case 455:
    7366 
    7367 /* Line 1806 of yacc.c  */
    7368 #line 1743 "parser.yy"
    7369     { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); }
    7370     break;
    7371 
    7372   case 456:
     7382  case 459:
    73737383
    73747384/* Line 1806 of yacc.c  */
    73757385#line 1744 "parser.yy"
    7376     { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); }
    7377     break;
    7378 
    7379   case 457:
    7380 
    7381 /* Line 1806 of yacc.c  */
    7382 #line 1749 "parser.yy"
    7383     { (yyval.in) = 0; }
    7384     break;
    7385 
    7386   case 459:
    7387 
    7388 /* Line 1806 of yacc.c  */
    7389 #line 1751 "parser.yy"
    73907386    { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); }
    73917387    break;
     
    73947390
    73957391/* Line 1806 of yacc.c  */
    7396 #line 1752 "parser.yy"
    7397     { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (3)].in)->set_link( (yyvsp[(3) - (3)].in) ) ); }
     7392#line 1745 "parser.yy"
     7393    { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (3)].in)->set_last( (yyvsp[(3) - (3)].in) ) ); }
    73987394    break;
    73997395
     
    74017397
    74027398/* Line 1806 of yacc.c  */
    7403 #line 1754 "parser.yy"
    7404     { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (4)].in)->set_link( (yyvsp[(4) - (4)].in)->set_designators( (yyvsp[(3) - (4)].en) ) ) ); }
     7399#line 1747 "parser.yy"
     7400    { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (4)].in)->set_last( (yyvsp[(4) - (4)].in)->set_designators( (yyvsp[(3) - (4)].en) ) ) ); }
    74057401    break;
    74067402
     
    74087404
    74097405/* Line 1806 of yacc.c  */
    7410 #line 1770 "parser.yy"
     7406#line 1763 "parser.yy"
    74117407    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(1) - (2)].tok) ) ); }
    74127408    break;
     
    74157411
    74167412/* Line 1806 of yacc.c  */
    7417 #line 1776 "parser.yy"
    7418     { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (2)].en)->set_link( (yyvsp[(2) - (2)].en) ) ); }
     7413#line 1769 "parser.yy"
     7414    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (2)].en)->set_last( (yyvsp[(2) - (2)].en) ) ); }
    74197415    break;
    74207416
     
    74227418
    74237419/* Line 1806 of yacc.c  */
     7420#line 1775 "parser.yy"
     7421    { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(2) - (2)].tok) ) ); }
     7422    break;
     7423
     7424  case 467:
     7425
     7426/* Line 1806 of yacc.c  */
     7427#line 1778 "parser.yy"
     7428    { (yyval.en) = (yyvsp[(3) - (5)].en); }
     7429    break;
     7430
     7431  case 468:
     7432
     7433/* Line 1806 of yacc.c  */
     7434#line 1780 "parser.yy"
     7435    { (yyval.en) = (yyvsp[(3) - (5)].en); }
     7436    break;
     7437
     7438  case 469:
     7439
     7440/* Line 1806 of yacc.c  */
    74247441#line 1782 "parser.yy"
    7425     { (yyval.en) = new ExpressionNode( build_varref( (yyvsp[(2) - (2)].tok) ) ); }
    7426     break;
    7427 
    7428   case 467:
    7429 
    7430 /* Line 1806 of yacc.c  */
    7431 #line 1785 "parser.yy"
    7432     { (yyval.en) = (yyvsp[(3) - (5)].en); }
    7433     break;
    7434 
    7435   case 468:
    7436 
    7437 /* Line 1806 of yacc.c  */
    7438 #line 1787 "parser.yy"
    7439     { (yyval.en) = (yyvsp[(3) - (5)].en); }
    7440     break;
    7441 
    7442   case 469:
    7443 
    7444 /* Line 1806 of yacc.c  */
    7445 #line 1789 "parser.yy"
    74467442    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].en) ) ); }
    74477443    break;
     
    74507446
    74517447/* Line 1806 of yacc.c  */
    7452 #line 1791 "parser.yy"
     7448#line 1784 "parser.yy"
    74537449    { (yyval.en) = (yyvsp[(4) - (6)].en); }
    74547450    break;
     
    74577453
    74587454/* Line 1806 of yacc.c  */
    7459 #line 1815 "parser.yy"
     7455#line 1808 "parser.yy"
    74607456    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    74617457    break;
     
    74647460
    74657461/* Line 1806 of yacc.c  */
    7466 #line 1817 "parser.yy"
     7462#line 1810 "parser.yy"
    74677463    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    74687464    break;
     
    74717467
    74727468/* Line 1806 of yacc.c  */
    7473 #line 1819 "parser.yy"
     7469#line 1812 "parser.yy"
    74747470    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }
    74757471    break;
     
    74787474
    74797475/* Line 1806 of yacc.c  */
     7476#line 1818 "parser.yy"
     7477    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
     7478    break;
     7479
     7480  case 477:
     7481
     7482/* Line 1806 of yacc.c  */
     7483#line 1820 "parser.yy"
     7484    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     7485    break;
     7486
     7487  case 478:
     7488
     7489/* Line 1806 of yacc.c  */
    74807490#line 1825 "parser.yy"
    7481     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    7482     break;
    7483 
    7484   case 477:
    7485 
    7486 /* Line 1806 of yacc.c  */
    7487 #line 1827 "parser.yy"
    7488     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    7489     break;
    7490 
    7491   case 478:
    7492 
    7493 /* Line 1806 of yacc.c  */
    7494 #line 1832 "parser.yy"
    74957491    { (yyval.decl) = DeclarationNode::newFromTypeGen( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); }
    74967492    break;
     
    74997495
    75007496/* Line 1806 of yacc.c  */
     7497#line 1831 "parser.yy"
     7498    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(3) - (4)].decl) ); }
     7499    break;
     7500
     7501  case 481:
     7502
     7503/* Line 1806 of yacc.c  */
     7504#line 1836 "parser.yy"
     7505    { typedefTable.addToEnclosingScope( *(yyvsp[(2) - (2)].tok), TypedefTable::TD ); }
     7506    break;
     7507
     7508  case 482:
     7509
     7510/* Line 1806 of yacc.c  */
    75017511#line 1838 "parser.yy"
    7502     { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(3) - (4)].decl) ); }
    7503     break;
    7504 
    7505   case 481:
    7506 
    7507 /* Line 1806 of yacc.c  */
    7508 #line 1843 "parser.yy"
    7509     { typedefTable.addToEnclosingScope( *(yyvsp[(2) - (2)].tok), TypedefTable::TD ); }
    7510     break;
    7511 
    7512   case 482:
    7513 
    7514 /* Line 1806 of yacc.c  */
    7515 #line 1845 "parser.yy"
    75167512    { (yyval.decl) = DeclarationNode::newTypeParam( (yyvsp[(1) - (4)].tclass), (yyvsp[(2) - (4)].tok) )->addAssertions( (yyvsp[(4) - (4)].decl) ); }
    75177513    break;
     
    75207516
    75217517/* Line 1806 of yacc.c  */
    7522 #line 1851 "parser.yy"
     7518#line 1844 "parser.yy"
    75237519    { (yyval.tclass) = DeclarationNode::Type; }
    75247520    break;
     
    75277523
    75287524/* Line 1806 of yacc.c  */
     7525#line 1846 "parser.yy"
     7526    { (yyval.tclass) = DeclarationNode::Ftype; }
     7527    break;
     7528
     7529  case 486:
     7530
     7531/* Line 1806 of yacc.c  */
     7532#line 1848 "parser.yy"
     7533    { (yyval.tclass) = DeclarationNode::Dtype; }
     7534    break;
     7535
     7536  case 487:
     7537
     7538/* Line 1806 of yacc.c  */
    75297539#line 1853 "parser.yy"
    7530     { (yyval.tclass) = DeclarationNode::Ftype; }
    7531     break;
    7532 
    7533   case 486:
     7540    { (yyval.decl) = 0; }
     7541    break;
     7542
     7543  case 488:
    75347544
    75357545/* Line 1806 of yacc.c  */
    75367546#line 1855 "parser.yy"
    7537     { (yyval.tclass) = DeclarationNode::Dtype; }
    7538     break;
    7539 
    7540   case 487:
     7547    { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); }
     7548    break;
     7549
     7550  case 489:
    75417551
    75427552/* Line 1806 of yacc.c  */
    75437553#line 1860 "parser.yy"
    7544     { (yyval.decl) = 0; }
    7545     break;
    7546 
    7547   case 488:
    7548 
    7549 /* Line 1806 of yacc.c  */
    7550 #line 1862 "parser.yy"
    7551     { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); }
    7552     break;
    7553 
    7554   case 489:
    7555 
    7556 /* Line 1806 of yacc.c  */
    7557 #line 1867 "parser.yy"
    75587554    {
    75597555                        typedefTable.openTrait( *(yyvsp[(2) - (5)].tok) );
     
    75657561
    75667562/* Line 1806 of yacc.c  */
     7563#line 1865 "parser.yy"
     7564    { (yyval.decl) = (yyvsp[(4) - (5)].decl); }
     7565    break;
     7566
     7567  case 491:
     7568
     7569/* Line 1806 of yacc.c  */
     7570#line 1867 "parser.yy"
     7571    { (yyval.decl) = 0; }
     7572    break;
     7573
     7574  case 492:
     7575
     7576/* Line 1806 of yacc.c  */
    75677577#line 1872 "parser.yy"
    7568     { (yyval.decl) = (yyvsp[(4) - (5)].decl); }
    7569     break;
    7570 
    7571   case 491:
    7572 
    7573 /* Line 1806 of yacc.c  */
    7574 #line 1874 "parser.yy"
    7575     { (yyval.decl) = 0; }
    7576     break;
    7577 
    7578   case 492:
    7579 
    7580 /* Line 1806 of yacc.c  */
    7581 #line 1879 "parser.yy"
    75827578    { (yyval.en) = new ExpressionNode( build_typevalue( (yyvsp[(1) - (1)].decl) ) ); }
    75837579    break;
     
    75867582
    75877583/* Line 1806 of yacc.c  */
     7584#line 1875 "parser.yy"
     7585    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( new ExpressionNode( build_typevalue( (yyvsp[(3) - (3)].decl) ) ) ) ); }
     7586    break;
     7587
     7588  case 495:
     7589
     7590/* Line 1806 of yacc.c  */
     7591#line 1877 "parser.yy"
     7592    { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_last( (yyvsp[(3) - (3)].en) )); }
     7593    break;
     7594
     7595  case 496:
     7596
     7597/* Line 1806 of yacc.c  */
    75887598#line 1882 "parser.yy"
    7589     { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( new ExpressionNode( build_typevalue( (yyvsp[(3) - (3)].decl) ) ) ) ); }
    7590     break;
    7591 
    7592   case 495:
     7599    { (yyval.decl) = (yyvsp[(2) - (2)].decl); }
     7600    break;
     7601
     7602  case 497:
    75937603
    75947604/* Line 1806 of yacc.c  */
    75957605#line 1884 "parser.yy"
    7596     { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) )); }
    7597     break;
    7598 
    7599   case 496:
    7600 
    7601 /* Line 1806 of yacc.c  */
    7602 #line 1889 "parser.yy"
    7603     { (yyval.decl) = (yyvsp[(2) - (2)].decl); }
    7604     break;
    7605 
    7606   case 497:
     7606    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); }
     7607    break;
     7608
     7609  case 498:
     7610
     7611/* Line 1806 of yacc.c  */
     7612#line 1886 "parser.yy"
     7613    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); }
     7614    break;
     7615
     7616  case 499:
    76077617
    76087618/* Line 1806 of yacc.c  */
    76097619#line 1891 "parser.yy"
    7610     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); }
    7611     break;
    7612 
    7613   case 498:
     7620    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); }
     7621    break;
     7622
     7623  case 500:
    76147624
    76157625/* Line 1806 of yacc.c  */
    76167626#line 1893 "parser.yy"
    7617     { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); }
    7618     break;
    7619 
    7620   case 499:
     7627    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addAssertions( (yyvsp[(2) - (4)].decl) )->addType( (yyvsp[(4) - (4)].decl) ); }
     7628    break;
     7629
     7630  case 501:
    76217631
    76227632/* Line 1806 of yacc.c  */
    76237633#line 1898 "parser.yy"
    7624     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); }
    7625     break;
    7626 
    7627   case 500:
    7628 
    7629 /* Line 1806 of yacc.c  */
    7630 #line 1900 "parser.yy"
    7631     { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addAssertions( (yyvsp[(2) - (4)].decl) )->addType( (yyvsp[(4) - (4)].decl) ); }
    7632     break;
    7633 
    7634   case 501:
    7635 
    7636 /* Line 1806 of yacc.c  */
    7637 #line 1905 "parser.yy"
    76387634    {
    76397635                        typedefTable.addToEnclosingScope( *(yyvsp[(1) - (1)].tok), TypedefTable::TD );
     
    76457641
    76467642/* Line 1806 of yacc.c  */
    7647 #line 1910 "parser.yy"
     7643#line 1903 "parser.yy"
    76487644    {
    76497645                        typedefTable.addToEnclosingScope( *(yyvsp[(1) - (6)].tok), TypedefTable::TG );
     
    76557651
    76567652/* Line 1806 of yacc.c  */
    7657 #line 1918 "parser.yy"
     7653#line 1911 "parser.yy"
    76587654    {
    76597655                        typedefTable.addToEnclosingScope( *(yyvsp[(2) - (9)].tok), TypedefTable::ID );
     
    76657661
    76667662/* Line 1806 of yacc.c  */
    7667 #line 1923 "parser.yy"
     7663#line 1916 "parser.yy"
    76687664    {
    76697665                        typedefTable.enterTrait( *(yyvsp[(2) - (8)].tok) );
     
    76757671
    76767672/* Line 1806 of yacc.c  */
    7677 #line 1928 "parser.yy"
     7673#line 1921 "parser.yy"
    76787674    {
    76797675                        typedefTable.leaveTrait();
     
    76867682
    76877683/* Line 1806 of yacc.c  */
    7688 #line 1938 "parser.yy"
     7684#line 1931 "parser.yy"
    76897685    { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); }
    76907686    break;
     
    76937689
    76947690/* Line 1806 of yacc.c  */
    7695 #line 1948 "parser.yy"
     7691#line 1941 "parser.yy"
    76967692    {
    76977693                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77037699
    77047700/* Line 1806 of yacc.c  */
    7705 #line 1953 "parser.yy"
     7701#line 1946 "parser.yy"
    77067702    {
    77077703                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77137709
    77147710/* Line 1806 of yacc.c  */
    7715 #line 1958 "parser.yy"
     7711#line 1951 "parser.yy"
    77167712    {
    77177713                        typedefTable.addToEnclosingScope2( *(yyvsp[(5) - (5)].tok), TypedefTable::ID );
     
    77237719
    77247720/* Line 1806 of yacc.c  */
    7725 #line 1966 "parser.yy"
     7721#line 1959 "parser.yy"
    77267722    {
    77277723                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77337729
    77347730/* Line 1806 of yacc.c  */
    7735 #line 1971 "parser.yy"
     7731#line 1964 "parser.yy"
    77367732    {
    77377733                        typedefTable.addToEnclosingScope2( TypedefTable::ID );
     
    77437739
    77447740/* Line 1806 of yacc.c  */
    7745 #line 1981 "parser.yy"
     7741#line 1974 "parser.yy"
    77467742    {}
    77477743    break;
     
    77507746
    77517747/* Line 1806 of yacc.c  */
    7752 #line 1983 "parser.yy"
     7748#line 1976 "parser.yy"
    77537749    {
    77547750                        if ( theTree ) {
     
    77637759
    77647760/* Line 1806 of yacc.c  */
    7765 #line 1995 "parser.yy"
     7761#line 1988 "parser.yy"
    77667762    { (yyval.decl) = ( (yyvsp[(1) - (3)].decl) != NULL ) ? (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ) : (yyvsp[(3) - (3)].decl); }
    77677763    break;
     
    77707766
    77717767/* Line 1806 of yacc.c  */
    7772 #line 2000 "parser.yy"
     7768#line 1993 "parser.yy"
    77737769    { (yyval.decl) = 0; }
    77747770    break;
     
    77777773
    77787774/* Line 1806 of yacc.c  */
    7779 #line 2008 "parser.yy"
     7775#line 2001 "parser.yy"
    77807776    {}
    77817777    break;
     
    77847780
    77857781/* Line 1806 of yacc.c  */
    7786 #line 2010 "parser.yy"
     7782#line 2003 "parser.yy"
    77877783    {
    77887784                        linkageStack.push( linkage );
     
    77947790
    77957791/* Line 1806 of yacc.c  */
    7796 #line 2015 "parser.yy"
     7792#line 2008 "parser.yy"
    77977793    {
    77987794                        linkage = linkageStack.top();
     
    78057801
    78067802/* Line 1806 of yacc.c  */
    7807 #line 2021 "parser.yy"
     7803#line 2014 "parser.yy"
    78087804    {   // mark all fields in list
    7809                         for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() )
     7805                        for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_next() )
    78107806                                iter->set_extension( true );
    78117807                        (yyval.decl) = (yyvsp[(2) - (2)].decl);
     
    78167812
    78177813/* Line 1806 of yacc.c  */
    7818 #line 2036 "parser.yy"
     7814#line 2029 "parser.yy"
    78197815    {
    78207816                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78277823
    78287824/* Line 1806 of yacc.c  */
    7829 #line 2042 "parser.yy"
     7825#line 2035 "parser.yy"
    78307826    {
    78317827                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78387834
    78397835/* Line 1806 of yacc.c  */
    7840 #line 2051 "parser.yy"
     7836#line 2044 "parser.yy"
    78417837    {
    78427838                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78497845
    78507846/* Line 1806 of yacc.c  */
    7851 #line 2057 "parser.yy"
     7847#line 2050 "parser.yy"
    78527848    {
    78537849                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78607856
    78617857/* Line 1806 of yacc.c  */
    7862 #line 2063 "parser.yy"
     7858#line 2056 "parser.yy"
    78637859    {
    78647860                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78717867
    78727868/* Line 1806 of yacc.c  */
    7873 #line 2069 "parser.yy"
     7869#line 2062 "parser.yy"
    78747870    {
    78757871                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78827878
    78837879/* Line 1806 of yacc.c  */
    7884 #line 2075 "parser.yy"
     7880#line 2068 "parser.yy"
    78857881    {
    78867882                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    78937889
    78947890/* Line 1806 of yacc.c  */
    7895 #line 2083 "parser.yy"
     7891#line 2076 "parser.yy"
    78967892    {
    78977893                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79047900
    79057901/* Line 1806 of yacc.c  */
    7906 #line 2089 "parser.yy"
     7902#line 2082 "parser.yy"
    79077903    {
    79087904                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79157911
    79167912/* Line 1806 of yacc.c  */
    7917 #line 2097 "parser.yy"
     7913#line 2090 "parser.yy"
    79187914    {
    79197915                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79267922
    79277923/* Line 1806 of yacc.c  */
    7928 #line 2103 "parser.yy"
     7924#line 2096 "parser.yy"
    79297925    {
    79307926                        typedefTable.addToEnclosingScope( TypedefTable::ID );
     
    79377933
    79387934/* Line 1806 of yacc.c  */
    7939 #line 2118 "parser.yy"
     7935#line 2111 "parser.yy"
    79407936    { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); }
    79417937    break;
     
    79447940
    79457941/* Line 1806 of yacc.c  */
     7942#line 2121 "parser.yy"
     7943    { (yyval.decl) = 0; }
     7944    break;
     7945
     7946  case 548:
     7947
     7948/* Line 1806 of yacc.c  */
    79467949#line 2128 "parser.yy"
     7950    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
     7951    break;
     7952
     7953  case 549:
     7954
     7955/* Line 1806 of yacc.c  */
     7956#line 2134 "parser.yy"
    79477957    { (yyval.decl) = 0; }
    79487958    break;
    79497959
    7950   case 548:
    7951 
    7952 /* Line 1806 of yacc.c  */
    7953 #line 2135 "parser.yy"
    7954     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    7955     break;
    7956 
    7957   case 549:
    7958 
    7959 /* Line 1806 of yacc.c  */
    7960 #line 2141 "parser.yy"
    7961     { (yyval.decl) = 0; }
    7962     break;
    7963 
    79647960  case 555:
    79657961
    79667962/* Line 1806 of yacc.c  */
    7967 #line 2156 "parser.yy"
     7963#line 2149 "parser.yy"
    79687964    {}
    79697965    break;
     
    79727968
    79737969/* Line 1806 of yacc.c  */
    7974 #line 2157 "parser.yy"
     7970#line 2150 "parser.yy"
    79757971    {}
    79767972    break;
     
    79797975
    79807976/* Line 1806 of yacc.c  */
    7981 #line 2158 "parser.yy"
     7977#line 2151 "parser.yy"
    79827978    {}
    79837979    break;
     
    79867982
    79877983/* Line 1806 of yacc.c  */
    7988 #line 2159 "parser.yy"
     7984#line 2152 "parser.yy"
    79897985    {}
    79907986    break;
     
    79937989
    79947990/* Line 1806 of yacc.c  */
    7995 #line 2194 "parser.yy"
     7991#line 2187 "parser.yy"
    79967992    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    79977993    break;
     
    80007996
    80017997/* Line 1806 of yacc.c  */
     7998#line 2190 "parser.yy"
     7999    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8000    break;
     8001
     8002  case 562:
     8003
     8004/* Line 1806 of yacc.c  */
     8005#line 2192 "parser.yy"
     8006    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8007    break;
     8008
     8009  case 563:
     8010
     8011/* Line 1806 of yacc.c  */
    80028012#line 2197 "parser.yy"
    8003     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8004     break;
    8005 
    8006   case 562:
    8007 
    8008 /* Line 1806 of yacc.c  */
    8009 #line 2199 "parser.yy"
    8010     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8011     break;
    8012 
    8013   case 563:
    8014 
    8015 /* Line 1806 of yacc.c  */
    8016 #line 2204 "parser.yy"
    80178013    {
    80188014                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    80248020
    80258021/* Line 1806 of yacc.c  */
     8022#line 2202 "parser.yy"
     8023    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8024    break;
     8025
     8026  case 565:
     8027
     8028/* Line 1806 of yacc.c  */
     8029#line 2207 "parser.yy"
     8030    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
     8031    break;
     8032
     8033  case 566:
     8034
     8035/* Line 1806 of yacc.c  */
    80268036#line 2209 "parser.yy"
     8037    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
     8038    break;
     8039
     8040  case 567:
     8041
     8042/* Line 1806 of yacc.c  */
     8043#line 2211 "parser.yy"
    80278044    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    80288045    break;
    80298046
    8030   case 565:
    8031 
    8032 /* Line 1806 of yacc.c  */
    8033 #line 2214 "parser.yy"
    8034     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    8035     break;
    8036 
    8037   case 566:
     8047  case 568:
    80388048
    80398049/* Line 1806 of yacc.c  */
    80408050#line 2216 "parser.yy"
    8041     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    8042     break;
    8043 
    8044   case 567:
     8051    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
     8052    break;
     8053
     8054  case 569:
    80458055
    80468056/* Line 1806 of yacc.c  */
    80478057#line 2218 "parser.yy"
     8058    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8059    break;
     8060
     8061  case 570:
     8062
     8063/* Line 1806 of yacc.c  */
     8064#line 2220 "parser.yy"
     8065    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8066    break;
     8067
     8068  case 571:
     8069
     8070/* Line 1806 of yacc.c  */
     8071#line 2222 "parser.yy"
    80488072    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    80498073    break;
    80508074
    8051   case 568:
    8052 
    8053 /* Line 1806 of yacc.c  */
    8054 #line 2223 "parser.yy"
    8055     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    8056     break;
    8057 
    8058   case 569:
    8059 
    8060 /* Line 1806 of yacc.c  */
    8061 #line 2225 "parser.yy"
    8062     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8063     break;
    8064 
    8065   case 570:
     8075  case 572:
    80668076
    80678077/* Line 1806 of yacc.c  */
    80688078#line 2227 "parser.yy"
    8069     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8070     break;
    8071 
    8072   case 571:
     8079    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
     8080    break;
     8081
     8082  case 573:
    80738083
    80748084/* Line 1806 of yacc.c  */
     
    80778087    break;
    80788088
    8079   case 572:
    8080 
    8081 /* Line 1806 of yacc.c  */
    8082 #line 2234 "parser.yy"
     8089  case 574:
     8090
     8091/* Line 1806 of yacc.c  */
     8092#line 2238 "parser.yy"
     8093    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8094    break;
     8095
     8096  case 576:
     8097
     8098/* Line 1806 of yacc.c  */
     8099#line 2241 "parser.yy"
     8100    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8101    break;
     8102
     8103  case 577:
     8104
     8105/* Line 1806 of yacc.c  */
     8106#line 2246 "parser.yy"
     8107    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
     8108    break;
     8109
     8110  case 578:
     8111
     8112/* Line 1806 of yacc.c  */
     8113#line 2248 "parser.yy"
    80838114    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    80848115    break;
    80858116
    8086   case 573:
    8087 
    8088 /* Line 1806 of yacc.c  */
    8089 #line 2236 "parser.yy"
     8117  case 579:
     8118
     8119/* Line 1806 of yacc.c  */
     8120#line 2250 "parser.yy"
    80908121    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    80918122    break;
    80928123
    8093   case 574:
    8094 
    8095 /* Line 1806 of yacc.c  */
    8096 #line 2245 "parser.yy"
     8124  case 580:
     8125
     8126/* Line 1806 of yacc.c  */
     8127#line 2255 "parser.yy"
     8128    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
     8129    break;
     8130
     8131  case 581:
     8132
     8133/* Line 1806 of yacc.c  */
     8134#line 2257 "parser.yy"
     8135    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
     8136    break;
     8137
     8138  case 582:
     8139
     8140/* Line 1806 of yacc.c  */
     8141#line 2259 "parser.yy"
     8142    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8143    break;
     8144
     8145  case 583:
     8146
     8147/* Line 1806 of yacc.c  */
     8148#line 2264 "parser.yy"
     8149    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8150    break;
     8151
     8152  case 584:
     8153
     8154/* Line 1806 of yacc.c  */
     8155#line 2266 "parser.yy"
     8156    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8157    break;
     8158
     8159  case 585:
     8160
     8161/* Line 1806 of yacc.c  */
     8162#line 2268 "parser.yy"
     8163    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8164    break;
     8165
     8166  case 589:
     8167
     8168/* Line 1806 of yacc.c  */
     8169#line 2283 "parser.yy"
     8170    { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); }
     8171    break;
     8172
     8173  case 590:
     8174
     8175/* Line 1806 of yacc.c  */
     8176#line 2285 "parser.yy"
     8177    { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); }
     8178    break;
     8179
     8180  case 591:
     8181
     8182/* Line 1806 of yacc.c  */
     8183#line 2287 "parser.yy"
     8184    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8185    break;
     8186
     8187  case 592:
     8188
     8189/* Line 1806 of yacc.c  */
     8190#line 2292 "parser.yy"
     8191    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
     8192    break;
     8193
     8194  case 593:
     8195
     8196/* Line 1806 of yacc.c  */
     8197#line 2294 "parser.yy"
     8198    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
     8199    break;
     8200
     8201  case 594:
     8202
     8203/* Line 1806 of yacc.c  */
     8204#line 2296 "parser.yy"
     8205    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8206    break;
     8207
     8208  case 595:
     8209
     8210/* Line 1806 of yacc.c  */
     8211#line 2301 "parser.yy"
     8212    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8213    break;
     8214
     8215  case 596:
     8216
     8217/* Line 1806 of yacc.c  */
     8218#line 2303 "parser.yy"
     8219    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8220    break;
     8221
     8222  case 597:
     8223
     8224/* Line 1806 of yacc.c  */
     8225#line 2305 "parser.yy"
     8226    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8227    break;
     8228
     8229  case 598:
     8230
     8231/* Line 1806 of yacc.c  */
     8232#line 2320 "parser.yy"
    80978233    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    80988234    break;
    80998235
    8100   case 576:
    8101 
    8102 /* Line 1806 of yacc.c  */
    8103 #line 2248 "parser.yy"
     8236  case 600:
     8237
     8238/* Line 1806 of yacc.c  */
     8239#line 2323 "parser.yy"
    81048240    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    81058241    break;
    81068242
    8107   case 577:
    8108 
    8109 /* Line 1806 of yacc.c  */
    8110 #line 2253 "parser.yy"
     8243  case 601:
     8244
     8245/* Line 1806 of yacc.c  */
     8246#line 2325 "parser.yy"
     8247    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8248    break;
     8249
     8250  case 603:
     8251
     8252/* Line 1806 of yacc.c  */
     8253#line 2331 "parser.yy"
     8254    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8255    break;
     8256
     8257  case 604:
     8258
     8259/* Line 1806 of yacc.c  */
     8260#line 2336 "parser.yy"
     8261    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
     8262    break;
     8263
     8264  case 605:
     8265
     8266/* Line 1806 of yacc.c  */
     8267#line 2338 "parser.yy"
     8268    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
     8269    break;
     8270
     8271  case 606:
     8272
     8273/* Line 1806 of yacc.c  */
     8274#line 2340 "parser.yy"
     8275    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8276    break;
     8277
     8278  case 607:
     8279
     8280/* Line 1806 of yacc.c  */
     8281#line 2345 "parser.yy"
     8282    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
     8283    break;
     8284
     8285  case 608:
     8286
     8287/* Line 1806 of yacc.c  */
     8288#line 2347 "parser.yy"
     8289    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8290    break;
     8291
     8292  case 609:
     8293
     8294/* Line 1806 of yacc.c  */
     8295#line 2349 "parser.yy"
     8296    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8297    break;
     8298
     8299  case 610:
     8300
     8301/* Line 1806 of yacc.c  */
     8302#line 2351 "parser.yy"
     8303    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8304    break;
     8305
     8306  case 611:
     8307
     8308/* Line 1806 of yacc.c  */
     8309#line 2356 "parser.yy"
    81118310    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    81128311    break;
    81138312
    8114   case 578:
    8115 
    8116 /* Line 1806 of yacc.c  */
    8117 #line 2255 "parser.yy"
     8313  case 612:
     8314
     8315/* Line 1806 of yacc.c  */
     8316#line 2358 "parser.yy"
    81188317    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    81198318    break;
    81208319
    8121   case 579:
    8122 
    8123 /* Line 1806 of yacc.c  */
    8124 #line 2257 "parser.yy"
     8320  case 613:
     8321
     8322/* Line 1806 of yacc.c  */
     8323#line 2360 "parser.yy"
    81258324    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81268325    break;
    81278326
    8128   case 580:
    8129 
    8130 /* Line 1806 of yacc.c  */
    8131 #line 2262 "parser.yy"
     8327  case 614:
     8328
     8329/* Line 1806 of yacc.c  */
     8330#line 2370 "parser.yy"
     8331    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8332    break;
     8333
     8334  case 616:
     8335
     8336/* Line 1806 of yacc.c  */
     8337#line 2373 "parser.yy"
     8338    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8339    break;
     8340
     8341  case 617:
     8342
     8343/* Line 1806 of yacc.c  */
     8344#line 2375 "parser.yy"
     8345    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8346    break;
     8347
     8348  case 618:
     8349
     8350/* Line 1806 of yacc.c  */
     8351#line 2380 "parser.yy"
    81328352    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    81338353    break;
    81348354
    8135   case 581:
    8136 
    8137 /* Line 1806 of yacc.c  */
    8138 #line 2264 "parser.yy"
     8355  case 619:
     8356
     8357/* Line 1806 of yacc.c  */
     8358#line 2382 "parser.yy"
    81398359    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    81408360    break;
    81418361
    8142   case 582:
    8143 
    8144 /* Line 1806 of yacc.c  */
    8145 #line 2266 "parser.yy"
     8362  case 620:
     8363
     8364/* Line 1806 of yacc.c  */
     8365#line 2384 "parser.yy"
    81468366    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81478367    break;
    81488368
    8149   case 583:
    8150 
    8151 /* Line 1806 of yacc.c  */
    8152 #line 2271 "parser.yy"
     8369  case 621:
     8370
     8371/* Line 1806 of yacc.c  */
     8372#line 2389 "parser.yy"
     8373    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
     8374    break;
     8375
     8376  case 622:
     8377
     8378/* Line 1806 of yacc.c  */
     8379#line 2391 "parser.yy"
    81538380    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    81548381    break;
    81558382
    8156   case 584:
    8157 
    8158 /* Line 1806 of yacc.c  */
    8159 #line 2273 "parser.yy"
     8383  case 623:
     8384
     8385/* Line 1806 of yacc.c  */
     8386#line 2393 "parser.yy"
    81608387    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    81618388    break;
    81628389
    8163   case 585:
    8164 
    8165 /* Line 1806 of yacc.c  */
    8166 #line 2275 "parser.yy"
     8390  case 624:
     8391
     8392/* Line 1806 of yacc.c  */
     8393#line 2395 "parser.yy"
    81678394    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81688395    break;
    81698396
    8170   case 589:
    8171 
    8172 /* Line 1806 of yacc.c  */
    8173 #line 2290 "parser.yy"
    8174     { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); }
    8175     break;
    8176 
    8177   case 590:
    8178 
    8179 /* Line 1806 of yacc.c  */
    8180 #line 2292 "parser.yy"
    8181     { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); }
    8182     break;
    8183 
    8184   case 591:
    8185 
    8186 /* Line 1806 of yacc.c  */
    8187 #line 2294 "parser.yy"
     8397  case 625:
     8398
     8399/* Line 1806 of yacc.c  */
     8400#line 2400 "parser.yy"
     8401    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
     8402    break;
     8403
     8404  case 626:
     8405
     8406/* Line 1806 of yacc.c  */
     8407#line 2402 "parser.yy"
     8408    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
     8409    break;
     8410
     8411  case 627:
     8412
     8413/* Line 1806 of yacc.c  */
     8414#line 2404 "parser.yy"
    81888415    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    81898416    break;
    81908417
    8191   case 592:
    8192 
    8193 /* Line 1806 of yacc.c  */
    8194 #line 2299 "parser.yy"
    8195     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    8196     break;
    8197 
    8198   case 593:
    8199 
    8200 /* Line 1806 of yacc.c  */
    8201 #line 2301 "parser.yy"
    8202     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    8203     break;
    8204 
    8205   case 594:
    8206 
    8207 /* Line 1806 of yacc.c  */
    8208 #line 2303 "parser.yy"
    8209     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8210     break;
    8211 
    8212   case 595:
    8213 
    8214 /* Line 1806 of yacc.c  */
    8215 #line 2308 "parser.yy"
    8216     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8217     break;
    8218 
    8219   case 596:
    8220 
    8221 /* Line 1806 of yacc.c  */
    8222 #line 2310 "parser.yy"
    8223     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8224     break;
    8225 
    8226   case 597:
    8227 
    8228 /* Line 1806 of yacc.c  */
    8229 #line 2312 "parser.yy"
    8230     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8231     break;
    8232 
    8233   case 598:
    8234 
    8235 /* Line 1806 of yacc.c  */
    8236 #line 2327 "parser.yy"
     8418  case 628:
     8419
     8420/* Line 1806 of yacc.c  */
     8421#line 2435 "parser.yy"
    82378422    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    82388423    break;
    82398424
    8240   case 600:
    8241 
    8242 /* Line 1806 of yacc.c  */
    8243 #line 2330 "parser.yy"
     8425  case 630:
     8426
     8427/* Line 1806 of yacc.c  */
     8428#line 2438 "parser.yy"
    82448429    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    82458430    break;
    82468431
    8247   case 601:
    8248 
    8249 /* Line 1806 of yacc.c  */
    8250 #line 2332 "parser.yy"
     8432  case 631:
     8433
     8434/* Line 1806 of yacc.c  */
     8435#line 2440 "parser.yy"
    82518436    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    82528437    break;
    82538438
    8254   case 603:
    8255 
    8256 /* Line 1806 of yacc.c  */
    8257 #line 2338 "parser.yy"
    8258     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8259     break;
    8260 
    8261   case 604:
    8262 
    8263 /* Line 1806 of yacc.c  */
    8264 #line 2343 "parser.yy"
    8265     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    8266     break;
    8267 
    8268   case 605:
    8269 
    8270 /* Line 1806 of yacc.c  */
    8271 #line 2345 "parser.yy"
    8272     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    8273     break;
    8274 
    8275   case 606:
    8276 
    8277 /* Line 1806 of yacc.c  */
    8278 #line 2347 "parser.yy"
    8279     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8280     break;
    8281 
    8282   case 607:
    8283 
    8284 /* Line 1806 of yacc.c  */
    8285 #line 2352 "parser.yy"
    8286     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    8287     break;
    8288 
    8289   case 608:
    8290 
    8291 /* Line 1806 of yacc.c  */
    8292 #line 2354 "parser.yy"
    8293     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8294     break;
    8295 
    8296   case 609:
    8297 
    8298 /* Line 1806 of yacc.c  */
    8299 #line 2356 "parser.yy"
    8300     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8301     break;
    8302 
    8303   case 610:
    8304 
    8305 /* Line 1806 of yacc.c  */
    8306 #line 2358 "parser.yy"
    8307     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8308     break;
    8309 
    8310   case 611:
    8311 
    8312 /* Line 1806 of yacc.c  */
    8313 #line 2363 "parser.yy"
    8314     { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    8315     break;
    8316 
    8317   case 612:
    8318 
    8319 /* Line 1806 of yacc.c  */
    8320 #line 2365 "parser.yy"
    8321     { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    8322     break;
    8323 
    8324   case 613:
    8325 
    8326 /* Line 1806 of yacc.c  */
    8327 #line 2367 "parser.yy"
    8328     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8329     break;
    8330 
    8331   case 614:
    8332 
    8333 /* Line 1806 of yacc.c  */
    8334 #line 2377 "parser.yy"
    8335     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8336     break;
    8337 
    8338   case 616:
    8339 
    8340 /* Line 1806 of yacc.c  */
    8341 #line 2380 "parser.yy"
    8342     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8343     break;
    8344 
    8345   case 617:
    8346 
    8347 /* Line 1806 of yacc.c  */
    8348 #line 2382 "parser.yy"
    8349     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8350     break;
    8351 
    8352   case 618:
    8353 
    8354 /* Line 1806 of yacc.c  */
    8355 #line 2387 "parser.yy"
    8356     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    8357     break;
    8358 
    8359   case 619:
    8360 
    8361 /* Line 1806 of yacc.c  */
    8362 #line 2389 "parser.yy"
    8363     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    8364     break;
    8365 
    8366   case 620:
    8367 
    8368 /* Line 1806 of yacc.c  */
    8369 #line 2391 "parser.yy"
    8370     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8371     break;
    8372 
    8373   case 621:
    8374 
    8375 /* Line 1806 of yacc.c  */
    8376 #line 2396 "parser.yy"
    8377     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    8378     break;
    8379 
    8380   case 622:
    8381 
    8382 /* Line 1806 of yacc.c  */
    8383 #line 2398 "parser.yy"
    8384     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8385     break;
    8386 
    8387   case 623:
    8388 
    8389 /* Line 1806 of yacc.c  */
    8390 #line 2400 "parser.yy"
    8391     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8392     break;
    8393 
    8394   case 624:
    8395 
    8396 /* Line 1806 of yacc.c  */
    8397 #line 2402 "parser.yy"
    8398     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8399     break;
    8400 
    8401   case 625:
    8402 
    8403 /* Line 1806 of yacc.c  */
    8404 #line 2407 "parser.yy"
    8405     { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    8406     break;
    8407 
    8408   case 626:
    8409 
    8410 /* Line 1806 of yacc.c  */
    8411 #line 2409 "parser.yy"
    8412     { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    8413     break;
    8414 
    8415   case 627:
    8416 
    8417 /* Line 1806 of yacc.c  */
    8418 #line 2411 "parser.yy"
    8419     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8420     break;
    8421 
    8422   case 628:
    8423 
    8424 /* Line 1806 of yacc.c  */
    8425 #line 2442 "parser.yy"
    8426     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8427     break;
    8428 
    8429   case 630:
     8439  case 632:
    84308440
    84318441/* Line 1806 of yacc.c  */
    84328442#line 2445 "parser.yy"
    8433     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8434     break;
    8435 
    8436   case 631:
    8437 
    8438 /* Line 1806 of yacc.c  */
    8439 #line 2447 "parser.yy"
    8440     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8441     break;
    8442 
    8443   case 632:
    8444 
    8445 /* Line 1806 of yacc.c  */
    8446 #line 2452 "parser.yy"
    84478443    {
    84488444                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    84548450
    84558451/* Line 1806 of yacc.c  */
    8456 #line 2457 "parser.yy"
     8452#line 2450 "parser.yy"
    84578453    {
    84588454                        typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) );
     
    84648460
    84658461/* Line 1806 of yacc.c  */
    8466 #line 2465 "parser.yy"
     8462#line 2458 "parser.yy"
    84678463    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    84688464    break;
     
    84718467
    84728468/* Line 1806 of yacc.c  */
     8469#line 2460 "parser.yy"
     8470    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
     8471    break;
     8472
     8473  case 636:
     8474
     8475/* Line 1806 of yacc.c  */
     8476#line 2462 "parser.yy"
     8477    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8478    break;
     8479
     8480  case 637:
     8481
     8482/* Line 1806 of yacc.c  */
    84738483#line 2467 "parser.yy"
     8484    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
     8485    break;
     8486
     8487  case 638:
     8488
     8489/* Line 1806 of yacc.c  */
     8490#line 2469 "parser.yy"
     8491    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8492    break;
     8493
     8494  case 639:
     8495
     8496/* Line 1806 of yacc.c  */
     8497#line 2474 "parser.yy"
     8498    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
     8499    break;
     8500
     8501  case 640:
     8502
     8503/* Line 1806 of yacc.c  */
     8504#line 2476 "parser.yy"
     8505    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
     8506    break;
     8507
     8508  case 642:
     8509
     8510/* Line 1806 of yacc.c  */
     8511#line 2491 "parser.yy"
     8512    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8513    break;
     8514
     8515  case 643:
     8516
     8517/* Line 1806 of yacc.c  */
     8518#line 2493 "parser.yy"
     8519    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8520    break;
     8521
     8522  case 644:
     8523
     8524/* Line 1806 of yacc.c  */
     8525#line 2498 "parser.yy"
     8526    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
     8527    break;
     8528
     8529  case 645:
     8530
     8531/* Line 1806 of yacc.c  */
     8532#line 2500 "parser.yy"
     8533    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
     8534    break;
     8535
     8536  case 646:
     8537
     8538/* Line 1806 of yacc.c  */
     8539#line 2502 "parser.yy"
     8540    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
     8541    break;
     8542
     8543  case 647:
     8544
     8545/* Line 1806 of yacc.c  */
     8546#line 2504 "parser.yy"
    84748547    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    84758548    break;
    84768549
    8477   case 636:
    8478 
    8479 /* Line 1806 of yacc.c  */
    8480 #line 2469 "parser.yy"
     8550  case 648:
     8551
     8552/* Line 1806 of yacc.c  */
     8553#line 2506 "parser.yy"
    84818554    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    84828555    break;
    84838556
    8484   case 637:
    8485 
    8486 /* Line 1806 of yacc.c  */
    8487 #line 2474 "parser.yy"
     8557  case 650:
     8558
     8559/* Line 1806 of yacc.c  */
     8560#line 2512 "parser.yy"
     8561    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8562    break;
     8563
     8564  case 651:
     8565
     8566/* Line 1806 of yacc.c  */
     8567#line 2514 "parser.yy"
     8568    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8569    break;
     8570
     8571  case 652:
     8572
     8573/* Line 1806 of yacc.c  */
     8574#line 2516 "parser.yy"
     8575    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8576    break;
     8577
     8578  case 653:
     8579
     8580/* Line 1806 of yacc.c  */
     8581#line 2521 "parser.yy"
     8582    { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); }
     8583    break;
     8584
     8585  case 654:
     8586
     8587/* Line 1806 of yacc.c  */
     8588#line 2523 "parser.yy"
     8589    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
     8590    break;
     8591
     8592  case 655:
     8593
     8594/* Line 1806 of yacc.c  */
     8595#line 2525 "parser.yy"
     8596    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8597    break;
     8598
     8599  case 656:
     8600
     8601/* Line 1806 of yacc.c  */
     8602#line 2531 "parser.yy"
     8603    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
     8604    break;
     8605
     8606  case 657:
     8607
     8608/* Line 1806 of yacc.c  */
     8609#line 2533 "parser.yy"
     8610    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); }
     8611    break;
     8612
     8613  case 659:
     8614
     8615/* Line 1806 of yacc.c  */
     8616#line 2539 "parser.yy"
     8617    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); }
     8618    break;
     8619
     8620  case 660:
     8621
     8622/* Line 1806 of yacc.c  */
     8623#line 2541 "parser.yy"
     8624    { (yyval.decl) = DeclarationNode::newVarArray( 0 ); }
     8625    break;
     8626
     8627  case 661:
     8628
     8629/* Line 1806 of yacc.c  */
     8630#line 2543 "parser.yy"
     8631    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); }
     8632    break;
     8633
     8634  case 662:
     8635
     8636/* Line 1806 of yacc.c  */
     8637#line 2545 "parser.yy"
     8638    { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); }
     8639    break;
     8640
     8641  case 664:
     8642
     8643/* Line 1806 of yacc.c  */
     8644#line 2560 "parser.yy"
     8645    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8646    break;
     8647
     8648  case 665:
     8649
     8650/* Line 1806 of yacc.c  */
     8651#line 2562 "parser.yy"
     8652    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8653    break;
     8654
     8655  case 666:
     8656
     8657/* Line 1806 of yacc.c  */
     8658#line 2567 "parser.yy"
     8659    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
     8660    break;
     8661
     8662  case 667:
     8663
     8664/* Line 1806 of yacc.c  */
     8665#line 2569 "parser.yy"
     8666    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
     8667    break;
     8668
     8669  case 668:
     8670
     8671/* Line 1806 of yacc.c  */
     8672#line 2571 "parser.yy"
     8673    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
     8674    break;
     8675
     8676  case 669:
     8677
     8678/* Line 1806 of yacc.c  */
     8679#line 2573 "parser.yy"
     8680    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
     8681    break;
     8682
     8683  case 670:
     8684
     8685/* Line 1806 of yacc.c  */
     8686#line 2575 "parser.yy"
     8687    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8688    break;
     8689
     8690  case 672:
     8691
     8692/* Line 1806 of yacc.c  */
     8693#line 2581 "parser.yy"
     8694    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8695    break;
     8696
     8697  case 673:
     8698
     8699/* Line 1806 of yacc.c  */
     8700#line 2583 "parser.yy"
     8701    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8702    break;
     8703
     8704  case 674:
     8705
     8706/* Line 1806 of yacc.c  */
     8707#line 2585 "parser.yy"
     8708    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8709    break;
     8710
     8711  case 675:
     8712
     8713/* Line 1806 of yacc.c  */
     8714#line 2590 "parser.yy"
     8715    { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); }
     8716    break;
     8717
     8718  case 676:
     8719
     8720/* Line 1806 of yacc.c  */
     8721#line 2592 "parser.yy"
     8722    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
     8723    break;
     8724
     8725  case 677:
     8726
     8727/* Line 1806 of yacc.c  */
     8728#line 2594 "parser.yy"
     8729    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8730    break;
     8731
     8732  case 679:
     8733
     8734/* Line 1806 of yacc.c  */
     8735#line 2601 "parser.yy"
    84888736    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    84898737    break;
    84908738
    8491   case 638:
    8492 
    8493 /* Line 1806 of yacc.c  */
    8494 #line 2476 "parser.yy"
     8739  case 681:
     8740
     8741/* Line 1806 of yacc.c  */
     8742#line 2612 "parser.yy"
     8743    { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
     8744    break;
     8745
     8746  case 682:
     8747
     8748/* Line 1806 of yacc.c  */
     8749#line 2615 "parser.yy"
     8750    { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
     8751    break;
     8752
     8753  case 683:
     8754
     8755/* Line 1806 of yacc.c  */
     8756#line 2617 "parser.yy"
     8757    { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); }
     8758    break;
     8759
     8760  case 684:
     8761
     8762/* Line 1806 of yacc.c  */
     8763#line 2620 "parser.yy"
     8764    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
     8765    break;
     8766
     8767  case 685:
     8768
     8769/* Line 1806 of yacc.c  */
     8770#line 2622 "parser.yy"
     8771    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); }
     8772    break;
     8773
     8774  case 686:
     8775
     8776/* Line 1806 of yacc.c  */
     8777#line 2624 "parser.yy"
     8778    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); }
     8779    break;
     8780
     8781  case 688:
     8782
     8783/* Line 1806 of yacc.c  */
     8784#line 2638 "parser.yy"
     8785    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8786    break;
     8787
     8788  case 689:
     8789
     8790/* Line 1806 of yacc.c  */
     8791#line 2640 "parser.yy"
     8792    { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
     8793    break;
     8794
     8795  case 690:
     8796
     8797/* Line 1806 of yacc.c  */
     8798#line 2645 "parser.yy"
     8799    { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
     8800    break;
     8801
     8802  case 691:
     8803
     8804/* Line 1806 of yacc.c  */
     8805#line 2647 "parser.yy"
     8806    { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
     8807    break;
     8808
     8809  case 692:
     8810
     8811/* Line 1806 of yacc.c  */
     8812#line 2649 "parser.yy"
     8813    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
     8814    break;
     8815
     8816  case 693:
     8817
     8818/* Line 1806 of yacc.c  */
     8819#line 2651 "parser.yy"
     8820    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
     8821    break;
     8822
     8823  case 694:
     8824
     8825/* Line 1806 of yacc.c  */
     8826#line 2653 "parser.yy"
     8827    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8828    break;
     8829
     8830  case 696:
     8831
     8832/* Line 1806 of yacc.c  */
     8833#line 2659 "parser.yy"
    84958834    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    84968835    break;
    84978836
    8498   case 639:
    8499 
    8500 /* Line 1806 of yacc.c  */
    8501 #line 2481 "parser.yy"
    8502     { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }
    8503     break;
    8504 
    8505   case 640:
    8506 
    8507 /* Line 1806 of yacc.c  */
    8508 #line 2483 "parser.yy"
     8837  case 697:
     8838
     8839/* Line 1806 of yacc.c  */
     8840#line 2661 "parser.yy"
     8841    { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
     8842    break;
     8843
     8844  case 698:
     8845
     8846/* Line 1806 of yacc.c  */
     8847#line 2663 "parser.yy"
     8848    { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
     8849    break;
     8850
     8851  case 699:
     8852
     8853/* Line 1806 of yacc.c  */
     8854#line 2668 "parser.yy"
    85098855    { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    85108856    break;
    85118857
    8512   case 642:
    8513 
    8514 /* Line 1806 of yacc.c  */
    8515 #line 2498 "parser.yy"
    8516     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8517     break;
    8518 
    8519   case 643:
    8520 
    8521 /* Line 1806 of yacc.c  */
    8522 #line 2500 "parser.yy"
    8523     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8524     break;
    8525 
    8526   case 644:
    8527 
    8528 /* Line 1806 of yacc.c  */
    8529 #line 2505 "parser.yy"
    8530     { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    8531     break;
    8532 
    8533   case 645:
    8534 
    8535 /* Line 1806 of yacc.c  */
    8536 #line 2507 "parser.yy"
    8537     { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    8538     break;
    8539 
    8540   case 646:
    8541 
    8542 /* Line 1806 of yacc.c  */
    8543 #line 2509 "parser.yy"
    8544     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    8545     break;
    8546 
    8547   case 647:
    8548 
    8549 /* Line 1806 of yacc.c  */
    8550 #line 2511 "parser.yy"
    8551     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    8552     break;
    8553 
    8554   case 648:
    8555 
    8556 /* Line 1806 of yacc.c  */
    8557 #line 2513 "parser.yy"
    8558     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8559     break;
    8560 
    8561   case 650:
    8562 
    8563 /* Line 1806 of yacc.c  */
    8564 #line 2519 "parser.yy"
    8565     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8566     break;
    8567 
    8568   case 651:
    8569 
    8570 /* Line 1806 of yacc.c  */
    8571 #line 2521 "parser.yy"
    8572     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8573     break;
    8574 
    8575   case 652:
    8576 
    8577 /* Line 1806 of yacc.c  */
    8578 #line 2523 "parser.yy"
    8579     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8580     break;
    8581 
    8582   case 653:
    8583 
    8584 /* Line 1806 of yacc.c  */
    8585 #line 2528 "parser.yy"
    8586     { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); }
    8587     break;
    8588 
    8589   case 654:
    8590 
    8591 /* Line 1806 of yacc.c  */
    8592 #line 2530 "parser.yy"
    8593     { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    8594     break;
    8595 
    8596   case 655:
    8597 
    8598 /* Line 1806 of yacc.c  */
    8599 #line 2532 "parser.yy"
    8600     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8601     break;
    8602 
    8603   case 656:
    8604 
    8605 /* Line 1806 of yacc.c  */
    8606 #line 2538 "parser.yy"
    8607     { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
    8608     break;
    8609 
    8610   case 657:
    8611 
    8612 /* Line 1806 of yacc.c  */
    8613 #line 2540 "parser.yy"
    8614     { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); }
    8615     break;
    8616 
    8617   case 659:
    8618 
    8619 /* Line 1806 of yacc.c  */
    8620 #line 2546 "parser.yy"
    8621     { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); }
    8622     break;
    8623 
    8624   case 660:
    8625 
    8626 /* Line 1806 of yacc.c  */
    8627 #line 2548 "parser.yy"
    8628     { (yyval.decl) = DeclarationNode::newVarArray( 0 ); }
    8629     break;
    8630 
    8631   case 661:
    8632 
    8633 /* Line 1806 of yacc.c  */
    8634 #line 2550 "parser.yy"
    8635     { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); }
    8636     break;
    8637 
    8638   case 662:
    8639 
    8640 /* Line 1806 of yacc.c  */
    8641 #line 2552 "parser.yy"
    8642     { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); }
    8643     break;
    8644 
    8645   case 664:
    8646 
    8647 /* Line 1806 of yacc.c  */
    8648 #line 2567 "parser.yy"
    8649     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8650     break;
    8651 
    8652   case 665:
    8653 
    8654 /* Line 1806 of yacc.c  */
    8655 #line 2569 "parser.yy"
    8656     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8657     break;
    8658 
    8659   case 666:
    8660 
    8661 /* Line 1806 of yacc.c  */
    8662 #line 2574 "parser.yy"
    8663     { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    8664     break;
    8665 
    8666   case 667:
    8667 
    8668 /* Line 1806 of yacc.c  */
    8669 #line 2576 "parser.yy"
    8670     { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    8671     break;
    8672 
    8673   case 668:
    8674 
    8675 /* Line 1806 of yacc.c  */
    8676 #line 2578 "parser.yy"
    8677     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    8678     break;
    8679 
    8680   case 669:
    8681 
    8682 /* Line 1806 of yacc.c  */
    8683 #line 2580 "parser.yy"
    8684     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    8685     break;
    8686 
    8687   case 670:
    8688 
    8689 /* Line 1806 of yacc.c  */
    8690 #line 2582 "parser.yy"
    8691     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8692     break;
    8693 
    8694   case 672:
    8695 
    8696 /* Line 1806 of yacc.c  */
    8697 #line 2588 "parser.yy"
    8698     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8699     break;
    8700 
    8701   case 673:
    8702 
    8703 /* Line 1806 of yacc.c  */
    8704 #line 2590 "parser.yy"
    8705     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8706     break;
    8707 
    8708   case 674:
    8709 
    8710 /* Line 1806 of yacc.c  */
    8711 #line 2592 "parser.yy"
    8712     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8713     break;
    8714 
    8715   case 675:
    8716 
    8717 /* Line 1806 of yacc.c  */
    8718 #line 2597 "parser.yy"
    8719     { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); }
    8720     break;
    8721 
    8722   case 676:
    8723 
    8724 /* Line 1806 of yacc.c  */
    8725 #line 2599 "parser.yy"
    8726     { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    8727     break;
    8728 
    8729   case 677:
    8730 
    8731 /* Line 1806 of yacc.c  */
    8732 #line 2601 "parser.yy"
    8733     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8734     break;
    8735 
    8736   case 679:
    8737 
    8738 /* Line 1806 of yacc.c  */
    8739 #line 2608 "parser.yy"
    8740     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }
    8741     break;
    8742 
    8743   case 681:
    8744 
    8745 /* Line 1806 of yacc.c  */
    8746 #line 2619 "parser.yy"
    8747     { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }
    8748     break;
    8749 
    8750   case 682:
    8751 
    8752 /* Line 1806 of yacc.c  */
    8753 #line 2622 "parser.yy"
    8754     { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
    8755     break;
    8756 
    8757   case 683:
    8758 
    8759 /* Line 1806 of yacc.c  */
    8760 #line 2624 "parser.yy"
    8761     { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); }
    8762     break;
    8763 
    8764   case 684:
    8765 
    8766 /* Line 1806 of yacc.c  */
    8767 #line 2627 "parser.yy"
    8768     { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
    8769     break;
    8770 
    8771   case 685:
    8772 
    8773 /* Line 1806 of yacc.c  */
    8774 #line 2629 "parser.yy"
    8775     { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); }
    8776     break;
    8777 
    8778   case 686:
    8779 
    8780 /* Line 1806 of yacc.c  */
    8781 #line 2631 "parser.yy"
    8782     { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); }
    8783     break;
    8784 
    8785   case 688:
    8786 
    8787 /* Line 1806 of yacc.c  */
    8788 #line 2645 "parser.yy"
    8789     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8790     break;
    8791 
    8792   case 689:
    8793 
    8794 /* Line 1806 of yacc.c  */
    8795 #line 2647 "parser.yy"
    8796     { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }
    8797     break;
    8798 
    8799   case 690:
    8800 
    8801 /* Line 1806 of yacc.c  */
    8802 #line 2652 "parser.yy"
    8803     { (yyval.decl) = DeclarationNode::newPointer( 0 ); }
    8804     break;
    8805 
    8806   case 691:
    8807 
    8808 /* Line 1806 of yacc.c  */
    8809 #line 2654 "parser.yy"
    8810     { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }
    8811     break;
    8812 
    8813   case 692:
    8814 
    8815 /* Line 1806 of yacc.c  */
    8816 #line 2656 "parser.yy"
    8817     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }
    8818     break;
    8819 
    8820   case 693:
    8821 
    8822 /* Line 1806 of yacc.c  */
    8823 #line 2658 "parser.yy"
    8824     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }
    8825     break;
    8826 
    8827   case 694:
    8828 
    8829 /* Line 1806 of yacc.c  */
    8830 #line 2660 "parser.yy"
    8831     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8832     break;
    8833 
    8834   case 696:
    8835 
    8836 /* Line 1806 of yacc.c  */
    8837 #line 2666 "parser.yy"
    8838     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8839     break;
    8840 
    8841   case 697:
    8842 
    8843 /* Line 1806 of yacc.c  */
    8844 #line 2668 "parser.yy"
    8845     { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }
    8846     break;
    8847 
    8848   case 698:
     8858  case 700:
    88498859
    88508860/* Line 1806 of yacc.c  */
     
    88538863    break;
    88548864
    8855   case 699:
    8856 
    8857 /* Line 1806 of yacc.c  */
    8858 #line 2675 "parser.yy"
    8859     { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }
    8860     break;
    8861 
    8862   case 700:
    8863 
    8864 /* Line 1806 of yacc.c  */
    8865 #line 2677 "parser.yy"
    8866     { (yyval.decl) = (yyvsp[(2) - (3)].decl); }
    8867     break;
    8868 
    88698865  case 703:
    88708866
    88718867/* Line 1806 of yacc.c  */
    8872 #line 2687 "parser.yy"
     8868#line 2680 "parser.yy"
    88738869    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    88748870    break;
     
    88778873
    88788874/* Line 1806 of yacc.c  */
    8879 #line 2697 "parser.yy"
     8875#line 2690 "parser.yy"
    88808876    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    88818877    break;
     
    88848880
    88858881/* Line 1806 of yacc.c  */
    8886 #line 2699 "parser.yy"
     8882#line 2692 "parser.yy"
    88878883    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    88888884    break;
     
    88918887
    88928888/* Line 1806 of yacc.c  */
    8893 #line 2701 "parser.yy"
     8889#line 2694 "parser.yy"
    88948890    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    88958891    break;
     
    88988894
    88998895/* Line 1806 of yacc.c  */
    8900 #line 2703 "parser.yy"
     8896#line 2696 "parser.yy"
    89018897    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    89028898    break;
     
    89058901
    89068902/* Line 1806 of yacc.c  */
    8907 #line 2705 "parser.yy"
     8903#line 2698 "parser.yy"
    89088904    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    89098905    break;
     
    89128908
    89138909/* Line 1806 of yacc.c  */
     8910#line 2700 "parser.yy"
     8911    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
     8912    break;
     8913
     8914  case 712:
     8915
     8916/* Line 1806 of yacc.c  */
    89148917#line 2707 "parser.yy"
     8918    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
     8919    break;
     8920
     8921  case 713:
     8922
     8923/* Line 1806 of yacc.c  */
     8924#line 2709 "parser.yy"
     8925    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
     8926    break;
     8927
     8928  case 714:
     8929
     8930/* Line 1806 of yacc.c  */
     8931#line 2711 "parser.yy"
     8932    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
     8933    break;
     8934
     8935  case 715:
     8936
     8937/* Line 1806 of yacc.c  */
     8938#line 2713 "parser.yy"
     8939    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
     8940    break;
     8941
     8942  case 716:
     8943
     8944/* Line 1806 of yacc.c  */
     8945#line 2715 "parser.yy"
     8946    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
     8947    break;
     8948
     8949  case 717:
     8950
     8951/* Line 1806 of yacc.c  */
     8952#line 2717 "parser.yy"
     8953    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
     8954    break;
     8955
     8956  case 718:
     8957
     8958/* Line 1806 of yacc.c  */
     8959#line 2719 "parser.yy"
     8960    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
     8961    break;
     8962
     8963  case 719:
     8964
     8965/* Line 1806 of yacc.c  */
     8966#line 2721 "parser.yy"
     8967    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
     8968    break;
     8969
     8970  case 720:
     8971
     8972/* Line 1806 of yacc.c  */
     8973#line 2723 "parser.yy"
     8974    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
     8975    break;
     8976
     8977  case 721:
     8978
     8979/* Line 1806 of yacc.c  */
     8980#line 2725 "parser.yy"
     8981    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
     8982    break;
     8983
     8984  case 722:
     8985
     8986/* Line 1806 of yacc.c  */
     8987#line 2730 "parser.yy"
     8988    { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
     8989    break;
     8990
     8991  case 723:
     8992
     8993/* Line 1806 of yacc.c  */
     8994#line 2732 "parser.yy"
     8995    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
     8996    break;
     8997
     8998  case 724:
     8999
     9000/* Line 1806 of yacc.c  */
     9001#line 2737 "parser.yy"
     9002    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); }
     9003    break;
     9004
     9005  case 725:
     9006
     9007/* Line 1806 of yacc.c  */
     9008#line 2739 "parser.yy"
     9009    { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); }
     9010    break;
     9011
     9012  case 727:
     9013
     9014/* Line 1806 of yacc.c  */
     9015#line 2766 "parser.yy"
     9016    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
     9017    break;
     9018
     9019  case 731:
     9020
     9021/* Line 1806 of yacc.c  */
     9022#line 2777 "parser.yy"
     9023    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     9024    break;
     9025
     9026  case 732:
     9027
     9028/* Line 1806 of yacc.c  */
     9029#line 2779 "parser.yy"
    89159030    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    89169031    break;
    89179032
    8918   case 712:
    8919 
    8920 /* Line 1806 of yacc.c  */
    8921 #line 2714 "parser.yy"
     9033  case 733:
     9034
     9035/* Line 1806 of yacc.c  */
     9036#line 2781 "parser.yy"
     9037    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     9038    break;
     9039
     9040  case 734:
     9041
     9042/* Line 1806 of yacc.c  */
     9043#line 2783 "parser.yy"
     9044    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
     9045    break;
     9046
     9047  case 735:
     9048
     9049/* Line 1806 of yacc.c  */
     9050#line 2785 "parser.yy"
     9051    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
     9052    break;
     9053
     9054  case 736:
     9055
     9056/* Line 1806 of yacc.c  */
     9057#line 2787 "parser.yy"
     9058    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
     9059    break;
     9060
     9061  case 737:
     9062
     9063/* Line 1806 of yacc.c  */
     9064#line 2794 "parser.yy"
    89229065    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    89239066    break;
    89249067
    8925   case 713:
    8926 
    8927 /* Line 1806 of yacc.c  */
    8928 #line 2716 "parser.yy"
     9068  case 738:
     9069
     9070/* Line 1806 of yacc.c  */
     9071#line 2796 "parser.yy"
     9072    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
     9073    break;
     9074
     9075  case 739:
     9076
     9077/* Line 1806 of yacc.c  */
     9078#line 2798 "parser.yy"
    89299079    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    89309080    break;
    89319081
    8932   case 714:
    8933 
    8934 /* Line 1806 of yacc.c  */
    8935 #line 2718 "parser.yy"
     9082  case 740:
     9083
     9084/* Line 1806 of yacc.c  */
     9085#line 2800 "parser.yy"
     9086    { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
     9087    break;
     9088
     9089  case 741:
     9090
     9091/* Line 1806 of yacc.c  */
     9092#line 2802 "parser.yy"
    89369093    { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    89379094    break;
    89389095
    8939   case 715:
    8940 
    8941 /* Line 1806 of yacc.c  */
    8942 #line 2720 "parser.yy"
    8943     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
    8944     break;
    8945 
    8946   case 716:
    8947 
    8948 /* Line 1806 of yacc.c  */
    8949 #line 2722 "parser.yy"
     9096  case 742:
     9097
     9098/* Line 1806 of yacc.c  */
     9099#line 2804 "parser.yy"
    89509100    { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    89519101    break;
    89529102
    8953   case 717:
    8954 
    8955 /* Line 1806 of yacc.c  */
    8956 #line 2724 "parser.yy"
    8957     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    8958     break;
    8959 
    8960   case 718:
    8961 
    8962 /* Line 1806 of yacc.c  */
    8963 #line 2726 "parser.yy"
    8964     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    8965     break;
    8966 
    8967   case 719:
    8968 
    8969 /* Line 1806 of yacc.c  */
    8970 #line 2728 "parser.yy"
    8971     { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    8972     break;
    8973 
    8974   case 720:
    8975 
    8976 /* Line 1806 of yacc.c  */
    8977 #line 2730 "parser.yy"
    8978     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); }
    8979     break;
    8980 
    8981   case 721:
    8982 
    8983 /* Line 1806 of yacc.c  */
    8984 #line 2732 "parser.yy"
    8985     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    8986     break;
    8987 
    8988   case 722:
    8989 
    8990 /* Line 1806 of yacc.c  */
    8991 #line 2737 "parser.yy"
    8992     { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }
    8993     break;
    8994 
    8995   case 723:
    8996 
    8997 /* Line 1806 of yacc.c  */
    8998 #line 2739 "parser.yy"
    8999     { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }
    9000     break;
    9001 
    9002   case 724:
    9003 
    9004 /* Line 1806 of yacc.c  */
    9005 #line 2744 "parser.yy"
    9006     { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); }
    9007     break;
    9008 
    9009   case 725:
    9010 
    9011 /* Line 1806 of yacc.c  */
    9012 #line 2746 "parser.yy"
    9013     { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); }
    9014     break;
    9015 
    9016   case 727:
    9017 
    9018 /* Line 1806 of yacc.c  */
    9019 #line 2773 "parser.yy"
    9020     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }
    9021     break;
    9022 
    9023   case 731:
    9024 
    9025 /* Line 1806 of yacc.c  */
    9026 #line 2784 "parser.yy"
    9027     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    9028     break;
    9029 
    9030   case 732:
    9031 
    9032 /* Line 1806 of yacc.c  */
    9033 #line 2786 "parser.yy"
    9034     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    9035     break;
    9036 
    9037   case 733:
    9038 
    9039 /* Line 1806 of yacc.c  */
    9040 #line 2788 "parser.yy"
    9041     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    9042     break;
    9043 
    9044   case 734:
    9045 
    9046 /* Line 1806 of yacc.c  */
    9047 #line 2790 "parser.yy"
    9048     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    9049     break;
    9050 
    9051   case 735:
    9052 
    9053 /* Line 1806 of yacc.c  */
    9054 #line 2792 "parser.yy"
    9055     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
    9056     break;
    9057 
    9058   case 736:
    9059 
    9060 /* Line 1806 of yacc.c  */
    9061 #line 2794 "parser.yy"
    9062     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }
    9063     break;
    9064 
    9065   case 737:
    9066 
    9067 /* Line 1806 of yacc.c  */
    9068 #line 2801 "parser.yy"
    9069     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    9070     break;
    9071 
    9072   case 738:
    9073 
    9074 /* Line 1806 of yacc.c  */
    9075 #line 2803 "parser.yy"
    9076     { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    9077     break;
    9078 
    9079   case 739:
    9080 
    9081 /* Line 1806 of yacc.c  */
    9082 #line 2805 "parser.yy"
    9083     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    9084     break;
    9085 
    9086   case 740:
    9087 
    9088 /* Line 1806 of yacc.c  */
    9089 #line 2807 "parser.yy"
    9090     { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    9091     break;
    9092 
    9093   case 741:
     9103  case 743:
    90949104
    90959105/* Line 1806 of yacc.c  */
    90969106#line 2809 "parser.yy"
    9097     { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
    9098     break;
    9099 
    9100   case 742:
    9101 
    9102 /* Line 1806 of yacc.c  */
    9103 #line 2811 "parser.yy"
    9104     { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }
    9105     break;
    9106 
    9107   case 743:
     9107    { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }
     9108    break;
     9109
     9110  case 744:
     9111
     9112/* Line 1806 of yacc.c  */
     9113#line 2814 "parser.yy"
     9114    { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); }
     9115    break;
     9116
     9117  case 745:
    91089118
    91099119/* Line 1806 of yacc.c  */
    91109120#line 2816 "parser.yy"
    9111     { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }
    9112     break;
    9113 
    9114   case 744:
    9115 
    9116 /* Line 1806 of yacc.c  */
    9117 #line 2821 "parser.yy"
    9118     { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); }
    9119     break;
    9120 
    9121   case 745:
    9122 
    9123 /* Line 1806 of yacc.c  */
    9124 #line 2823 "parser.yy"
    91259121    { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); }
    91269122    break;
     
    91299125
    91309126/* Line 1806 of yacc.c  */
    9131 #line 2825 "parser.yy"
     9127#line 2818 "parser.yy"
    91329128    { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); }
    91339129    break;
     
    91369132
    91379133/* Line 1806 of yacc.c  */
    9138 #line 2849 "parser.yy"
     9134#line 2842 "parser.yy"
    91399135    { (yyval.en) = 0; }
    91409136    break;
     
    91439139
    91449140/* Line 1806 of yacc.c  */
    9145 #line 2851 "parser.yy"
     9141#line 2844 "parser.yy"
    91469142    { (yyval.en) = (yyvsp[(2) - (2)].en); }
    91479143    break;
     
    91509146
    91519147/* Line 1806 of yacc.c  */
    9152 #line 9153 "Parser/parser.cc"
     9148#line 9149 "Parser/parser.cc"
    91539149      default: break;
    91549150    }
     
    93819377
    93829378/* Line 2067 of yacc.c  */
    9383 #line 2854 "parser.yy"
     9379#line 2847 "parser.yy"
    93849380
    93859381// ----end of grammar----
  • src/Parser/parser.yy

    r38736854 r6603c1d  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 11 18:02:57 2016
    13 // Update Count     : 1861
     12// Last Modified On : Sun Aug 14 11:03:22 2016
     13// Update Count     : 1879
    1414//
    1515
     
    143143%type<en> constant_expression                   assignment_expression           assignment_expression_opt
    144144%type<en> comma_expression                              comma_expression_opt
    145 //%type<en> argument_expression_list            argument_expression                     for_control_expression          assignment_opt
    146145%type<en> argument_expression_list              argument_expression                     assignment_opt
    147146%type<fctl> for_control_expression
     
    162161%type<sn> case_value_list                               case_label                                      case_label_list
    163162%type<sn> switch_clause_list_opt                switch_clause_list                      choose_clause_list_opt          choose_clause_list
    164 %type<pn> handler_list                                  handler_clause                          finally_clause
     163%type<sn> handler_list                                  handler_clause                          finally_clause
    165164
    166165// declarations
     
    389388                        Token fn;
    390389                        fn.str = new std::string( "?{}" ); // location undefined
    391                         $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_link( $3 ) ) );
     390                        $$ = new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $1 )->set_last( $3 ) ) );
    392391                }
    393392        ;
     
    396395        argument_expression
    397396        | argument_expression_list ',' argument_expression
    398                 { $$ = (ExpressionNode *)( $1->set_link( $3 )); }
     397                { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
    399398        ;
    400399
     
    407406field_list:                                                                                             // CFA, tuple field selector
    408407        field
    409         | field_list ',' field                                          { $$ = (ExpressionNode *)$1->set_link( $3 ); }
     408        | field_list ',' field                                          { $$ = (ExpressionNode *)$1->set_last( $3 ); }
    410409        ;
    411410
     
    627626                { $$ = new ExpressionNode( build_tuple( $3 ) ); }
    628627        | '[' push ',' tuple_expression_list pop ']'
    629                 { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_link( $4 ) ) ); }
     628                { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( $4 ) ) ); }
    630629        | '[' push assignment_expression ',' tuple_expression_list pop ']'
    631                 { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$3->set_link( $5 ) ) ); }
     630                { $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$3->set_last( $5 ) ) ); }
    632631        ;
    633632
     
    635634        assignment_expression_opt
    636635        | tuple_expression_list ',' assignment_expression_opt
    637                 { $$ = (ExpressionNode *)$1->set_link( $3 ); }
     636                { $$ = (ExpressionNode *)$1->set_last( $3 ); }
    638637        ;
    639638
     
    665664                        Token fn;
    666665                        fn.str = new std::string( "^?{}" ); // location undefined
    667                         $$ = new StatementNode2( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_link( $4 ) ) ) ) );
     666                        $$ = new StatementNode2( build_expr( new ExpressionNode( build_func( new ExpressionNode( build_varref( fn ) ), (ExpressionNode *)( $2 )->set_last( $4 ) ) ) ) );
    668667                }
    669668        ;
     
    692691        block_item
    693692        | block_item_list push block_item
    694                 { if ( $1 != 0 ) { $1->set_link( $3 ); $$ = $1; } }
     693                { if ( $1 != 0 ) { $1->set_last( $3 ); $$ = $1; } }
    695694        ;
    696695
    697696block_item:
    698697        declaration                                                                                     // CFA, new & old style declarations
    699                 { $$ = new StatementNode( $1 ); }
     698                { $$ = new StatementNode2( $1 ); }
    700699        | EXTENSION declaration                                                         // GCC
    701700                {       // mark all fields in list
    702                         for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() )
     701                        for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_next() )
    703702                                iter->set_extension( true );
    704                         $$ = new StatementNode( $2 );
     703                        $$ = new StatementNode2( $2 );
    705704                }
    706705        | function_definition
    707                 { $$ = new StatementNode( $1 ); }
     706                { $$ = new StatementNode2( $1 ); }
    708707        | statement pop
    709708        ;
     
    712711        statement
    713712        | statement_list statement
    714                 { if ( $1 != 0 ) { $1->set_link( $2 ); $$ = $1; } }
     713                { if ( $1 != 0 ) { $1->set_last( $2 ); $$ = $1; } }
    715714        ;
    716715
     
    736735                        // therefore, are removed from the grammar even though C allows it. The change also applies to choose
    737736                        // statement.
    738                         $$ = $7 != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( $7 ))->set_link( sw )) ) : sw;
     737                        $$ = $7 != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode2( $7 ))->set_last( sw )) ) : sw;
    739738                }
    740739        | CHOOSE '(' comma_expression ')' case_clause           // CFA
     
    743742                {
    744743                        StatementNode *sw = new StatementNode2( build_switch( $3, $8 ) );
    745                         $$ = $7 != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( $7 ))->set_link( sw )) ) : sw;
     744                        $$ = $7 != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode2( $7 ))->set_last( sw )) ) : sw;
    746745                }
    747746        ;
     
    758757
    759758case_value_list:                                                                                // CFA
    760         //case_value                                                                    { $$ = new StatementNode( StatementNode::Case, $1, 0 ); }
    761759        case_value                                                                      { $$ = new StatementNode2( build_case( $1 ) ); }
    762760                // convert case list, e.g., "case 1, 3, 5:" into "case 1: case 3: case 5"
    763         | case_value_list ',' case_value                        { $$ = (StatementNode *)($1->set_link( new StatementNode2( build_case( $3 ) ) ) ); }
     761        | case_value_list ',' case_value                        { $$ = (StatementNode *)($1->set_last( new StatementNode2( build_case( $3 ) ) ) ); }
    764762        ;
    765763
     
    772770case_label_list:                                                                                // CFA
    773771        case_label
    774         | case_label_list case_label                            { $$ = (StatementNode *)( $1->set_link( $2 )); }
     772        | case_label_list case_label                            { $$ = (StatementNode *)( $1->set_last( $2 )); }
    775773        ;
    776774
     
    789787                { $$ = $1->append_last_case( new CompoundStmtNode( $2 ) ); }
    790788        | switch_clause_list case_label_list statement_list
    791                 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case( new CompoundStmtNode( $3 ) ) ) ); }
     789                { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( new CompoundStmtNode( $3 ) ) ) ); }
    792790        ;
    793791
     
    804802                { $$ = $1->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*$2, *$3 ) ) ) ); }
    805803        | choose_clause_list case_label_list fall_through
    806                 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case( $3 ))); }
     804                { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( $3 ))); }
    807805        | choose_clause_list case_label_list statement_list fall_through_opt
    808                 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*$3, *$4 ) ) ) ) ) ); }
     806                { $$ = (StatementNode *)( $1->set_last( $2->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*$3, *$4 ) ) ) ) ) ); }
    809807        ;
    810808
     
    871869exception_statement:
    872870        TRY compound_statement handler_list
    873                 { $$ = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*$2,*$3 )))); }
     871                { $$ = new StatementNode2( build_try( $2, $3, 0 ) ); }
    874872        | TRY compound_statement finally_clause
    875                 { $$ = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*$2,*$3 )))); }
     873                { $$ = new StatementNode2( build_try( $2, 0, $3 ) ); }
    876874        | TRY compound_statement handler_list finally_clause
    877                 {
    878                         $3->set_link( $4 );
    879                         $$ = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*$2,*$3 ))));
    880                 }
     875                { $$ = new StatementNode2( build_try( $2, $3, $4 ) ); }
    881876        ;
    882877
    883878handler_list:
    884                 // There must be at least one catch clause
    885879        handler_clause
    886880                // ISO/IEC 9899:1999 Section 15.3(6 ) If present, a "..." handler shall be the last handler for its try block.
    887881        | CATCH '(' ELLIPSIS ')' compound_statement
    888                 { $$ = StatementNode::newCatchStmt( 0, $5, true ); }
     882                { $$ = new StatementNode2( build_catch( 0, $5, true ) ); }
    889883        | handler_clause CATCH '(' ELLIPSIS ')' compound_statement
    890                 { $$ = $1->set_link( StatementNode::newCatchStmt( 0, $6, true ) ); }
     884                { $$ = (StatementNode *)$1->set_last( new StatementNode2( build_catch( 0, $6, true ) ) ); }
    891885        | CATCHRESUME '(' ELLIPSIS ')' compound_statement
    892                 { $$ = StatementNode::newCatchStmt( 0, $5, true ); }
     886                { $$ = new StatementNode2( build_catch( 0, $5, true ) ); }
    893887        | handler_clause CATCHRESUME '(' ELLIPSIS ')' compound_statement
    894                 { $$ = $1->set_link( StatementNode::newCatchStmt( 0, $6, true ) ); }
     888                { $$ = (StatementNode *)$1->set_last( new StatementNode2( build_catch( 0, $6, true ) ) ); }
    895889        ;
    896890
    897891handler_clause:
    898892        CATCH '(' push push exception_declaration pop ')' compound_statement pop
    899                 { $$ = StatementNode::newCatchStmt( $5, $8 ); }
     893                { $$ = new StatementNode2( build_catch( $5, $8 ) ); }
    900894        | handler_clause CATCH '(' push push exception_declaration pop ')' compound_statement pop
    901                 { $$ = $1->set_link( StatementNode::newCatchStmt( $6, $9 ) ); }
     895        { $$ = (StatementNode *)$1->set_last( new StatementNode2( build_catch( $6, $9 ) ) ); }
    902896        | CATCHRESUME '(' push push exception_declaration pop ')' compound_statement pop
    903                 { $$ = StatementNode::newCatchStmt( $5, $8 ); }
     897                { $$ = new StatementNode2( build_catch( $5, $8 ) ); }
    904898        | handler_clause CATCHRESUME '(' push push exception_declaration pop ')' compound_statement pop
    905                 { $$ = $1->set_link( StatementNode::newCatchStmt( $6, $9 ) ); }
     899                { $$ = (StatementNode *)$1->set_last( new StatementNode2( build_catch( $6, $9 ) ) ); }
    906900        ;
    907901
     
    909903        FINALLY compound_statement
    910904                {
    911                         $$ = new StatementNode( StatementNode::Finally, 0, $2 );
    912                         std::cout << "Just created a finally node" << std::endl;
     905                        $$ = new StatementNode2( build_finally( $2 ) );
    913906                }
    914907        ;
     
    938931asm_statement:
    939932        ASM asm_volatile_opt '(' string_literal_list ')' ';'
    940                 { $$ = new AsmStmtNode( StatementNode::Asm, $2, $4, 0 ); }
     933                { $$ = new AsmStmtNode( $2, $4, 0 ); }
    941934        | ASM asm_volatile_opt '(' string_literal_list ':' asm_operands_opt ')' ';' // remaining GCC
    942                 { $$ = new AsmStmtNode( StatementNode::Asm, $2, $4, $6 ); }
     935                { $$ = new AsmStmtNode( $2, $4, $6 ); }
    943936        | ASM asm_volatile_opt '(' string_literal_list ':' asm_operands_opt ':' asm_operands_opt ')' ';'
    944                 { $$ = new AsmStmtNode( StatementNode::Asm, $2, $4, $6, $8 ); }
     937                { $$ = new AsmStmtNode( $2, $4, $6, $8 ); }
    945938        | ASM asm_volatile_opt '(' string_literal_list ':' asm_operands_opt ':' asm_operands_opt ':' asm_clobbers_list_opt ')' ';'
    946                 { $$ = new AsmStmtNode( StatementNode::Asm, $2, $4, $6, $8, $10 ); }
     939                { $$ = new AsmStmtNode( $2, $4, $6, $8, $10 ); }
    947940        | ASM asm_volatile_opt GOTO '(' string_literal_list ':' ':' asm_operands_opt ':' asm_clobbers_list_opt ':' label_list ')' ';'
    948                 { $$ = new AsmStmtNode( StatementNode::Asm, $2, $5, 0, $8, $10, $12 ); }
     941                { $$ = new AsmStmtNode( $2, $5, 0, $8, $10, $12 ); }
    949942        ;
    950943
     
    965958        asm_operand
    966959        | asm_operands_list ',' asm_operand
    967                 { $$ = (ExpressionNode *)$1->set_link( $3 ); }
     960                { $$ = (ExpressionNode *)$1->set_last( $3 ); }
    968961        ;
    969962
     
    981974                { $$ = new ExpressionNode( $1 ); }
    982975        | asm_clobbers_list_opt ',' string_literal_list
    983         { $$ = (ExpressionNode *)$1->set_link( new ExpressionNode( $3 ) ); }
     976        { $$ = (ExpressionNode *)$1->set_last( new ExpressionNode( $3 ) ); }
    984977        ;
    985978
     
    15041497        | EXTENSION field_declaring_list ';'                            // GCC
    15051498                {       // mark all fields in list
    1506                         for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() )
     1499                        for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_next() )
    15071500                                iter->set_extension( true );
    15081501                        $$ = $2;
     
    17501743        | initializer
    17511744        | designation initializer                                       { $$ = $2->set_designators( $1 ); }
    1752         | initializer_list ',' initializer                      { $$ = (InitializerNode *)( $1->set_link( $3 ) ); }
     1745        | initializer_list ',' initializer                      { $$ = (InitializerNode *)( $1->set_last( $3 ) ); }
    17531746        | initializer_list ',' designation initializer
    1754                 { $$ = (InitializerNode *)( $1->set_link( $4->set_designators( $3 ) ) ); }
     1747                { $$ = (InitializerNode *)( $1->set_last( $4->set_designators( $3 ) ) ); }
    17551748        ;
    17561749
     
    17741767        designator
    17751768        | designator_list designator
    1776                 { $$ = (ExpressionNode *)( $1->set_link( $2 ) ); }
     1769                { $$ = (ExpressionNode *)( $1->set_last( $2 ) ); }
    17771770        //| designator_list designator                                          { $$ = new ExpressionNode( $1, $2 ); }
    17781771        ;
     
    18801873        | assignment_expression
    18811874        | type_name_list ',' type_name
    1882                 { $$ = (ExpressionNode *)( $1->set_link( new ExpressionNode( build_typevalue( $3 ) ) ) ); }
     1875                { $$ = (ExpressionNode *)( $1->set_last( new ExpressionNode( build_typevalue( $3 ) ) ) ); }
    18831876        | type_name_list ',' assignment_expression
    1884                 { $$ = (ExpressionNode *)( $1->set_link( $3 )); }
     1877                { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
    18851878        ;
    18861879
     
    20202013        | EXTENSION external_definition
    20212014                {       // mark all fields in list
    2022                         for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_link() )
     2015                        for ( DeclarationNode *iter = $2; iter != NULL; iter = (DeclarationNode *)iter->get_next() )
    20232016                                iter->set_extension( true );
    20242017                        $$ = $2;
  • src/SynTree/Statement.cc

    r38736854 r6603c1d  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug  4 11:25:20 2016
    13 // Update Count     : 61
     12// Last Modified On : Fri Aug 12 13:58:48 2016
     13// Update Count     : 62
    1414//
    1515
     
    309309}
    310310
    311 CatchStmt::CatchStmt( std::list<Label> labels, Declaration *_decl, Statement *_body, bool isCatchRest ) :
    312         Statement( labels ), decl ( _decl ), body( _body ), catchRest ( isCatchRest ) {
     311CatchStmt::CatchStmt( std::list<Label> labels, Declaration *_decl, Statement *_body, bool catchAny ) :
     312        Statement( labels ), decl ( _decl ), body( _body ), catchRest ( catchAny ) {
    313313}
    314314
  • src/SynTree/Statement.h

    r38736854 r6603c1d  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug  4 11:26:02 2016
    13 // Update Count     : 64
     12// Last Modified On : Fri Aug 12 13:57:46 2016
     13// Update Count     : 65
    1414//
    1515
     
    314314class CatchStmt : public Statement {
    315315  public:
    316         CatchStmt( std::list<Label> labels, Declaration *decl, Statement *body, bool isCatchRest = false );
     316        CatchStmt( std::list<Label> labels, Declaration *decl, Statement *body, bool catchAny = false );
    317317        CatchStmt( const CatchStmt &other );
    318318        virtual ~CatchStmt();
  • src/tests/.expect/32/extension.txt

    r38736854 r6603c1d  
    100100    ((void)((__extension__ __a__i_2 , __extension__ __b__i_2) , __extension__ __c__i_2));
    101101}
    102 __attribute__ ((constructor(),)) static void _init_extension(void){
    103     int _global_init0;
    104     ((void)((*((int *)(&__a__i_1)))=_global_init0) /* ?{} */);
    105     int _global_init1;
    106     ((void)((*((int *)(&__b__i_1)))=_global_init1) /* ?{} */);
    107     int _global_init2;
    108     ((void)((*((int *)(&__c__i_1)))=_global_init2) /* ?{} */);
    109 }
    110 __attribute__ ((destructor(),)) static void _destroy_extension(void){
    111     ((void)((*((int *)(&__c__i_1)))) /* ^?{} */);
    112     ((void)((*((int *)(&__b__i_1)))) /* ^?{} */);
    113     ((void)((*((int *)(&__a__i_1)))) /* ^?{} */);
    114 }
  • src/tests/.expect/32/gccExtensions.txt

    r38736854 r6603c1d  
    55extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
     7extern int __x__i_1;
    78int main(int __argc__i_1, const char **__argv__PPCc_1){
    89    asm ( "nop" :  :  :  );
    910    asm ( "nop" :  :  :  );
    1011    asm ( "nop" :  :  :  );
     12    static int __y__i_2;
     13    int __src__i_2;
     14    int __dst__i_2;
     15    asm volatile ( "mov %1, %0\n\tadd $1, %0" :  :  :  );
     16    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) :  :  );
     17    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) : "r" ( __src__i_2 ) :  );
     18    asm ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ), "=r" ( __src__i_2 ) : [ __src__i_2 ] "r" ( __dst__i_2 ) : "r0" );
    1119    double _Complex __c1__Xd_2;
    1220    double _Complex __c2__Xd_2;
     
    151159    struct s4 __y2__3ss4_2;
    152160    ((void)___constructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));
    153     int __m1__A0i_2[((long unsigned int )10)];
    154     int __m2__A0A0i_2[((long unsigned int )10)][((long unsigned int )10)];
    155     int __m3__A0A0i_2[((long unsigned int )10)][((long unsigned int )10)];
     161    int __m1__A0i_2[((unsigned int )10)];
     162    int __m2__A0A0i_2[((unsigned int )10)][((unsigned int )10)];
     163    int __m3__A0A0i_2[((unsigned int )10)][((unsigned int )10)];
    156164    int _retVal0 = { 0 };
    157165    ((void)(_retVal0=0) /* ?{} */);
  • src/tests/.expect/64/gccExtensions.txt

    r38736854 r6603c1d  
    55extern void exit(int __status);
    66extern int printf(const char *__restrict __format, ...);
     7extern int __x__i_1;
    78int main(int __argc__i_1, const char **__argv__PPCc_1){
    89    asm ( "nop" :  :  :  );
    910    asm ( "nop" :  :  :  );
    1011    asm ( "nop" :  :  :  );
     12    static int __y__i_2;
     13    int __src__i_2;
     14    int __dst__i_2;
     15    asm volatile ( "mov %1, %0\n\tadd $1, %0" :  :  :  );
     16    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) :  :  );
     17    asm volatile ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ) : "r" ( __src__i_2 ) :  );
     18    asm ( "mov %1, %0\n\tadd $1, %0" : "=r" ( __dst__i_2 ), "=r" ( __src__i_2 ) : [ __src__i_2 ] "r" ( __dst__i_2 ) : "r0" );
    1119    double _Complex __c1__Xd_2;
    1220    double _Complex __c2__Xd_2;
  • src/tests/exception.c

    r38736854 r6603c1d  
    1111        x/4;
    1212    } catch( int ) {
    13     } catch( int x ) {
     13    } catch( float x ) {
    1414    } catch( struct { int i; } ) {
    1515    } catch( struct { int i; } x ) {
     
    2121    } catch( * struct { int i; } x ) {
    2222    } catch( ... ) {
    23 //    } finally {
     23    } finally {
    2424    } // try
    2525}
  • src/tests/gccExtensions.c

    r38736854 r6603c1d  
     1//
     2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
     3//
     4// The contents of this file are covered under the licence agreement in the
     5// file "LICENCE" distributed with Cforall.
     6//
     7// gccExtensions.c --
     8//
     9// Author           : Peter A. Buhr
     10// Created On       : Sun Aug 14 17:28:17 2016
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Sun Aug 14 17:36:28 2016
     13// Update Count     : 3
     14//
     15
     16extern int x asm( "xx" );
     17
    118int main(int argc, char const *argv[]) {
    219        asm( "nop" );
     
    421        __asm__( "nop" );
    522
     23        static int y asm( "yy" );
     24//      static * int z asm( "zz" );                                                     // CFA declaration
     25
     26        int src;
     27        int dst;
     28
     29        asm volatile ( "mov %1, %0\n\t"
     30                                   "add $1, %0" : : : );
     31
     32        asm volatile ( "mov %1, %0\n\t"
     33                                   "add $1, %0"
     34                                   : "=" "r" (dst));
     35
     36        asm volatile ( "mov %1, %0\n\t"
     37                                   "add $1, %0"
     38                                   : "=r" (dst)
     39                                   : "r" (src));
     40
     41        asm ( "mov %1, %0\n\t"
     42                  "add $1, %0"
     43                  : "=r" (dst), "=r" (src)
     44                  : [src] "r" (dst)
     45                  : "r0");
     46#if 0
     47  L1: L2:
     48        asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5"
     49                           : /* No outputs. */
     50                           : "r"(src), "r"(&dst)
     51                           : "r5", "memory"
     52                           : L1, L2 );
     53#endif
    654        __complex__ c1;
    755        _Complex c2;
     
    57105        return 0;
    58106}
     107
     108// Local Variables: //
     109// tab-width: 4 //
     110// compile-command: "cfa gccExtensions.c" //
     111// End: //
Note: See TracChangeset for help on using the changeset viewer.