Changes in / [d1b9d78:8884112]
- Files:
-
- 2 added
- 41 edited
-
Jenkins/FullBuild (modified) (1 diff)
-
Jenkinsfile (modified) (2 diffs)
-
doc/LaTeXmacros/common.tex (modified) (2 diffs)
-
doc/user/user.tex (modified) (26 diffs)
-
src/ControlStruct/CaseRangeMutator.cc (modified) (3 diffs)
-
src/ControlStruct/CaseRangeMutator.h (modified) (2 diffs)
-
src/ControlStruct/ChooseMutator.cc (added)
-
src/ControlStruct/ChooseMutator.h (added)
-
src/ControlStruct/LabelFixer.h (modified) (2 diffs)
-
src/ControlStruct/MLEMutator.cc (modified) (2 diffs)
-
src/ControlStruct/MLEMutator.h (modified) (2 diffs)
-
src/ControlStruct/Mutate.cc (modified) (4 diffs)
-
src/ControlStruct/module.mk (modified) (2 diffs)
-
src/GenPoly/DeclMutator.cc (modified) (2 diffs)
-
src/GenPoly/DeclMutator.h (modified) (2 diffs)
-
src/GenPoly/PolyMutator.cc (modified) (2 diffs)
-
src/GenPoly/PolyMutator.h (modified) (2 diffs)
-
src/InitTweak/FixInit.cc (modified) (2 diffs)
-
src/Makefile.in (modified) (6 diffs)
-
src/Parser/ParseNode.cc (modified) (2 diffs)
-
src/Parser/StatementNode.cc (modified) (2 diffs)
-
src/Parser/TypeData.cc (modified) (2 diffs)
-
src/Parser/parser.cc (modified) (172 diffs)
-
src/Parser/parser.yy (modified) (11 diffs)
-
src/ResolvExpr/Resolver.cc (modified) (3 diffs)
-
src/SymTab/AddVisit.h (modified) (2 diffs)
-
src/SymTab/Autogen.cc (modified) (3 diffs)
-
src/SymTab/Indexer.cc (modified) (2 diffs)
-
src/SymTab/Validate.cc (modified) (6 diffs)
-
src/SynTree/AddStmtVisitor.cc (modified) (2 diffs)
-
src/SynTree/AddStmtVisitor.h (modified) (2 diffs)
-
src/SynTree/Mutator.cc (modified) (2 diffs)
-
src/SynTree/Mutator.h (modified) (2 diffs)
-
src/SynTree/Statement.cc (modified) (2 diffs)
-
src/SynTree/Statement.h (modified) (2 diffs)
-
src/SynTree/SynTree.h (modified) (2 diffs)
-
src/SynTree/Visitor.cc (modified) (2 diffs)
-
src/SynTree/Visitor.h (modified) (2 diffs)
-
src/examples/includes.c (modified) (4 diffs)
-
src/libcfa/iostream (modified) (3 diffs)
-
src/libcfa/iostream.c (modified) (2 diffs)
-
src/tests/.expect/gccExtensions.txt (modified) (4 diffs)
-
src/tests/switch.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/FullBuild
rd1b9d78 r8884112 36 36 wrap([$class: 'TimestamperBuildWrapper']) { 37 37 38 stage 'Build' 39 40 parallel ( 41 x64: { node ('master') { 42 build job: 'Cforall/master', \ 43 parameters: [ \ 44 [$class: 'BooleanParameterValue', \ 45 name: 'isFullBuild', \ 46 value: true], \ 47 [$class: 'StringParameterValue', \ 48 name: 'buildArchitecture', \ 49 value: '64-bit'] \ 50 ] 51 }}, 52 x32: { node ('master') { 53 build job: 'Cforall/master', \ 54 parameters: [ \ 55 [$class: 'BooleanParameterValue', \ 56 name: 'isFullBuild', \ 57 value: true], \ 58 [$class: 'StringParameterValue', \ 59 name: 'buildArchitecture', \ 60 value: '32-bit'] \ 61 ] 62 }} 63 ) 38 build job: 'Cforall/master', \ 39 parameters: [ \ 40 [$class: 'BooleanParameterValue', \ 41 name: 'isFullBuild', \ 42 value: true], \ 43 [$class: 'StringParameterValue', \ 44 name: 'buildArchitecture', \ 45 value: '64-bit'] \ 46 ] 64 47 65 48 //Push latest changes to do-lang repo -
Jenkinsfile
rd1b9d78 r8884112 204 204 205 205 finally { 206 echo 'Build Completed'207 208 206 //Send email with final results if this is not a full build 209 207 if( !bIsFullBuild ) { 210 echo 'Notifying users of result'211 208 email(currentBuild.result, log_needed) 212 209 } … … 222 219 //Routine responsible of sending the email notification once the build is completed 223 220 //=========================================================================================================== 221 def notify_result(boolean bIsFullBuild, Exception err, String status, boolean log) { 222 echo 'Build completed, sending result notification' 223 if(bIsFullBuild) { 224 email(status, log) 225 } 226 } 227 224 228 //Standard build email notification 225 229 def email(String status, boolean log) { -
doc/LaTeXmacros/common.tex
rd1b9d78 r8884112 11 11 %% Created On : Sat Apr 9 10:06:17 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Tue Jul 12 20:37:57201614 %% Update Count : 20 613 %% Last Modified On : Sun Jul 10 12:34:09 2016 14 %% Update Count : 205 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 238 238 \lstMakeShortInline© % single-character for \lstinline 239 239 240 \let\Oldthebibliography\thebibliography241 \renewcommand\thebibliography[1]{242 \Oldthebibliography{#1}243 \setlength{\parskip}{0pt} % reduce vertical spacing between references244 \setlength{\itemsep}{5pt plus 0.3ex}245 }%246 247 240 % Local Variables: % 248 241 % tab-width: 4 % -
doc/user/user.tex
rd1b9d78 r8884112 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Wed Jul 13 08:14:39 201614 %% Update Count : 12 4713 %% Last Modified On : Sun Jul 10 12:52:09 2016 14 %% Update Count : 1200 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 294 294 \item 295 295 \Indexc{-nodebug}\index{compilation option!-nodebug@©-nodebug©} 296 The program is linked with the non-debugging version of the runtime system, so the execution of the program is faster.296 The program is linked with the non-debugging version of the unikernel or multikernel, so the execution of the program is faster. 297 297 \Emph{However, no runtime checks or ©assert©s are performed so errors usually result in abnormal program termination.} 298 298 … … 721 721 ®&®crc = &cx; §\C{// error, cannot change crc}§ 722 722 \end{lstlisting} 723 Hence, for type ©& const©, there is no pointer assignment, so ©&rc = &x© is disallowed, and \emph{the address value cannot be ©0© unless an arbitrary pointer is assigned to the reference}, e.g.: 724 \begin{lstlisting} 725 int & const r = *0; §\C{// where 0 is the int * zero}§ 726 \end{lstlisting} 727 Otherwise, the compiler is managing the addresses for type ©& const© not the programmer, and by a programming discipline of only using references with references, address errors can be prevented. 723 Hence, for type ©& const©, there is no pointer assignment, so ©&rc = &x© is disallowed, and \emph{the address value cannot be ©0© unless an arbitrary pointer is assigned to the reference}. 724 In effect, the compiler is managing the addresses for type ©& const© not the programmer, and by a programming discipline of only using references with references, address errors can be prevented. 728 725 729 726 \Index{Initialization} is different than \Index{assignment} because initialization occurs on the empty (uninitialized) storage on an object, while assignment occurs on possibly initialized storage of an object. … … 738 735 \begin{lstlisting} 739 736 int & f( int & rp ); §\C{// reference parameter and return}§ 740 z = f( x ) + f( y ); §\C{// reference operator added , temporaries needed for call results}§737 z = f( x ) + f( y ); §\C{// reference operator added}§ 741 738 \end{lstlisting} 742 739 Within routine ©f©, it is possible to change the argument by changing the corresponding parameter, and parameter ©rp© can be locally reassigned within ©f©. 743 Since ©?+?© takes its arguments by value, the references returned from ©f© are used to initialize compiler generated temporaries with value semantics that copy from the references.740 The return reference from ©f© is copied into a compiler generated temporary, which is treated as an initialization. 744 741 745 742 When a pointer/reference parameter has a ©const© value (immutable), it is possible to pass literals and expressions. … … 1649 1646 \end{lstlisting} 1650 1647 The ability to fall-through to the next clause \emph{is} a useful form of control flow, specifically when a sequence of case actions compound: 1651 \begin{quote2}1652 \begin{tabular}{@{}l@{\hspace{3em}}l@{}}1653 1648 \begin{lstlisting} 1654 1649 switch ( argc ) { … … 1663 1658 } 1664 1659 \end{lstlisting} 1665 &1666 \begin{lstlisting}1667 1668 if ( argc == 3 ) {1669 // open output file1670 ®// open input file1671 ®} else if ( argc == 2 ) {1672 ®// open input file1673 1674 ®} else {1675 // usage message1676 }1677 \end{lstlisting}1678 \end{tabular}1679 \end{quote2}1680 1660 In this example, case 2 is always done if case 3 is done. 1681 1661 This control flow is difficult to simulate with if statements or a ©switch© statement without fall-through as code must be duplicated or placed in a separate routine. … … 1692 1672 \end{lstlisting} 1693 1673 However, this situation is handled in other languages without fall-through by allowing a list of case values. 1694 While fall-through itself is not a problem, the problem occurs when fall-through is the default, as this semantics is unintuitive to manyprogrammers and is different from virtually all other programming languages with a ©switch© statement.1674 While fall-through itself is not a problem, the problem occurs when fall-through is the default, as this semantics is not intuitive to most programmers and is different from virtually all other programming languages with a ©switch© statement. 1695 1675 Hence, default fall-through semantics results in a large number of programming errors as programmers often forget the ©break© statement at the end of a ©case© clause, resulting in inadvertent fall-through. 1696 1676 … … 1702 1682 if ( j < k ) { 1703 1683 ... 1704 ®case 1:® // transfer into "if" statement 1705 ... 1706 } // if 1707 case 2: 1684 case 1: // transfer into "if" statement 1685 if ( j < m ) { 1686 ... 1687 case 2: // transfer into "if" statement 1688 ... 1689 } 1690 } 1691 case 3: 1708 1692 while ( j < 5 ) { 1709 1693 ... 1710 ®case 3:®// transfer into "while" statement1694 case 4: // transfer into "while" statement 1711 1695 ... 1712 } // while1713 } // switch1696 } 1697 } 1714 1698 \end{lstlisting} 1715 1699 The problem with this usage is branching into control structures, which is known to cause both comprehension and technical difficulties. … … 1750 1734 \begin{lstlisting} 1751 1735 switch ( x ) { 1752 ®int y = 1;®§\C{// unreachable initialization}§1753 ®x = 7;® §\C{// unreachable code without label/branch}§1736 int y = 1; §\C{// unreachable initialization}§ 1737 x = 7; §\C{// unreachable code}§ 1754 1738 case 3: ... 1739 y = 3; 1755 1740 ... 1756 ®int z = 0;® §\C{// unreachable initialization, cannot appear after case}§1757 z = 2;1758 case 3:1759 ®x = z;® §\C{// without fall through, z is uninitialized}§1760 1741 } 1761 1742 \end{lstlisting} 1762 1743 While the declaration of the local variable ©y© is useful and its scope is across all ©case© clauses, the initialization for such a variable is defined to never be executed because control always transfers over it. 1763 Furthermore, any statements before the first ©case© clause can only be executed if labelled and transferred to using a ©goto©, either from outside or inside of the ©switch©. 1764 As mentioned, transfer into control structures should be forbidden; 1765 transfers from within the ©switch© body using a ©goto© are equally unpalatable. 1766 As well, the declaration of ©z© is cannot occur after the ©case© because a label can only be attached to a statement, and without a fall through to case 3, ©z© is uninitialized. 1744 Furthermore, any statements before the first ©case© clause can only be executed if labelled and transfered to using a ©goto©, either from outside or inside of the ©switch©. 1745 As mentioned, transfer into control structures should be forbidden. 1746 Transfers from within the ©switch© body using a ©goto© are equally unpalatable. 1767 1747 \end{enumerate} 1768 1769 1748 Before discussing potential language changes to deal with these problems, it is worth observing that in a typical C program: 1770 1749 \begin{itemize} … … 1778 1757 and there is only a medium amount of fall-through from one ©case© clause to the next, and most of these result from a list of case values executing common code, rather than a sequence of case actions that compound. 1779 1758 \end{itemize} 1780 These observations help to put the suggested changes to the ©switch©into perspective.1759 These observations help to put the effects of suggested changes into perspective. 1781 1760 \begin{enumerate} 1782 1761 \item … … 1788 1767 still work. 1789 1768 Nevertheless, reversing the default action would have a non-trivial effect on case actions that compound, such as the above example of processing shell arguments. 1790 Therefore, to preserve backwards compatibility, it is necessary to introduce a new kind of ©switch© statement, called ©choose©, with no implicit fall-through semantics and an explicit fall-through if the last statement of a case-clause ends with the new keyword ©fallthru©, e.g.: 1769 Therefore, to preserve backwards compatibility, it is necessary to introduce a new kind of ©switch© statement, called ©choose©, with no fall-through semantics. 1770 The ©choose© statement is identical to the new ©switch© statement, except there is no implicit fall-through between case-clauses and the ©break© statement applies to the enclosing loop construct (as for the ©continue© statement in a ©switch© statement). 1771 It is still possible to fall-through if a case-clause ends with the new keyword ©fallthru©, e.g.: 1791 1772 \begin{lstlisting} 1792 1773 ®choose® ( i ) { 1793 case 1: case 2: case3:1774 case 3: 1794 1775 ... 1795 ®// implicit end of switch (break) 1796 ®case 5: 1797 ... 1798 ®fallthru®; §\C{// explicit fall through}§ 1776 ®fallthru®; §\C{// explicit fall through}§ 1777 case 5: 1778 ... §\C{// implicit end of switch}§ 1799 1779 case 7: 1800 1780 ... 1801 ®break® §\C{// explicit end ofswitch}§1781 ®break® §\C{// transfer to end of enclosing loop / switch}§ 1802 1782 default: 1803 1783 j = 3; 1804 1784 } 1805 1785 \end{lstlisting} 1806 Like the ©switch© statement, the ©choose© statement retains the fall-through semantics for a list of ©case© clauses; 1807 the implicit ©break© is applied only at the end of the \emph{statements} following a ©case© clause. 1808 The explicit ©fallthru© is retained because it is a C-idiom most C programmers expect, and its absence might discourage programmers from using the ©choose© statement. 1809 As well, allowing an explicit ©break© from the ©choose© is a carry over from the ©switch© statement, and expected by C programmers. 1810 \item 1811 \Index*{Duff's device} is eliminated from both ©switch© and ©choose© statements, and only invalidates a small amount of very questionable code. 1812 Hence, the ©case© clause must appear at the same nesting level as the ©switch©/©choose© body, as is done in most other programming languages with ©switch© statements. 1786 The ability to fall-through is retained because it is a sufficient C-idiom that most C programmers simply expect it, and its absence might discourage these programmers from using the ©choose© statement. 1787 \item 1788 Eliminating \Index*{Duff's device} is straightforward and only invalidates a small amount of very questionable code. 1789 The solution is to allow ©case© clauses to only appear at the same nesting level as the ©switch© body, as is done in most other programming languages with ©switch© statements. 1813 1790 \item 1814 1791 The issue of ©default© at locations other than at the end of the cause clause can be solved by using good programming style, and there are a few reasonable situations involving fall-through where the ©default© clause needs to appear is locations other than at the end. 1815 Therefore, no change is made for this issue. 1816 \item 1817 Dealing with unreachable code in a ©switch©/©choose© body is solved by restricting declarations and associated initialization to the start of statement body, which is executed \emph{before} the transfer to the appropriate ©case© clause.\footnote{ 1818 Essentially, these declarations are hoisted before the statement and both declarations and statement are surrounded by a compound statement.} and precluding statements before the first ©case© clause. 1819 Further declaration in the statement body are disallowed. 1820 \begin{lstlisting} 1821 switch ( x ) { 1822 ®int i = 0;® §\C{// allowed}§ 1792 Therefore, no language change is made for this issue. 1793 \item 1794 Dealing with unreachable code at the start of a ©switch© statement is solved by defining the declaration-list, including any associated initialization, at the start of a ©switch© statement body to be executed \emph{before} the transfer to the appropriate ©case© clause. 1795 This semantics is the same as for declarations at the start of a loop body, which are executed before each iteration of the loop body. 1796 As well, statements cannot appear before the first ©case© clause. 1797 The change is compatible for declarations with initialization in this context because existing code cannot assume the initialization has occurred. 1798 The change is incompatible for statements, but any existing code using it is highly questionable, as in: 1799 \begin{lstlisting} 1800 switch ( i ) { 1801 L: x = 5; §\C{// questionable code}§ 1823 1802 case 0: 1824 1803 ... 1825 ®int i = 0;® §\C{// disallowed}§ 1826 case 1: 1827 { 1828 ®int i = 0;® §\C{// allowed in any compound statement}§ 1829 ... 1830 } 1831 ... 1832 } 1833 \end{lstlisting} 1804 } 1805 \end{lstlisting} 1806 The statement after the ©switch© can never be executed unless it is labelled. 1807 If it is labelled, it must be transfered to from outside or inside the ©switch© statement, neither of which is acceptable control flow. 1834 1808 \end{enumerate} 1835 1809 … … 1913 1887 \section{Exception Handling} 1914 1888 1915 Exception handling provides two mechani sm: change of control flow from a raise to a handler, and communication from the raise to the handler.1889 Exception handling provides two mechanim: change of control flow from a raise to a handler, and commumication from the riase to the handler. 1916 1890 \begin{lstlisting} 1917 1891 exception void h( int i ); … … 2166 2140 A facility that let programmers declare specific constants..const Rational 12., for instance. would not be much of an improvement. 2167 2141 Some facility for defining the creation of values of programmer-defined types from arbitrary integer tokens would be needed. 2168 The complexity of such a feature does not seem worth the gain.2142 The complexity of such a feature doesn.t seem worth the gain. 2169 2143 2170 2144 For example, to define the constants for a complex type, the programmer would define the following: … … 2694 2668 } s; 2695 2669 \end{lstlisting} 2696 The problem occurs in acces sing these fields using the selection operation ``©.©'':2670 The problem occurs in accesing these fields using the selection operation ``©.©'': 2697 2671 \begin{lstlisting} 2698 2672 s.0 = 0; // ambiguity with floating constant .0 … … 2704 2678 ®s.§\textvisiblespace§1® = 1; 2705 2679 \end{lstlisting} 2706 While this sy ntax is awkward, it is unlikely many programmers will name fields of a structure 0 or 1.2680 While this sytact is awkward, it is unlikely many programers will name fields of a structure 0 or 1. 2707 2681 Like the \Index*[C++]{\CC} lexical problem with closing template-syntax, e.g, ©Foo<Bar<int®>>®©, this issue can be solved with a more powerful lexer/parser. 2708 2682 … … 3016 2990 In \CFA, multiple definitions are not necessary. 3017 2991 Within a module, all of the module's global definitions are visible throughout the module. 3018 For example, the following code compiles, even though ©isOdd©was not declared before being called:2992 For example, the following code compiles, even though isOdd was not declared before being called: 3019 2993 \begin{lstlisting} 3020 2994 bool isEven(unsigned int x) { … … 4356 4330 \item[Difficulty of converting:] keyword clashes are accommodated by syntactic transformations using the \CFA backquote escape-mechanism: 4357 4331 \begin{lstlisting} 4358 int `otype` = 3; // make keyword an i dentifier4332 int `otype` = 3; // make keyword an indentifier 4359 4333 double `choose` = 3.5; 4360 4334 \end{lstlisting} … … 4493 4467 \begin{description} 4494 4468 \item[Change:] comma expression is disallowed as subscript 4495 \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 sty le arrays.4469 \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 styple arrays. 4496 4470 \item[Effect on original feature:] change to semantics of well-defined feature. 4497 4471 \item[Difficulty of converting:] semantic transformation of ©x[i,j]© to ©x[(i,j)]© … … 4505 4479 \index{input/output library} 4506 4480 4507 The goal for the \CFA I/O is to make I/O as simple as possible in the common cases, while fully supporting pol ymorphism and user defined types in a consistent way.4481 The goal for the \CFA I/O is to make I/O as simple as possible in the common cases, while fully supporting polmorphism and user defined types in a consistent way. 4508 4482 The common case is printing out a sequence of variables separated by whitespace. 4509 4483 \begin{quote2} … … 4542 4516 Finally, the logical-or operator has a link with the Shell pipe-operator for moving data, although data flows in the opposite direction. 4543 4517 4544 The implicit sep arator\index{I/O separator} character (space/blank) is a separator not a terminator.4518 The implicit seperator\index{I/O separator} character (space/blank) is a separator not a terminator. 4545 4519 The rules for implicitly adding the separator are: 4546 4520 \begin{enumerate} 4547 4521 \item 4548 A sep arator does not appear at the start or end of a line.4522 A seperator does not appear at the start or end of a line. 4549 4523 \begin{lstlisting}[belowskip=0pt] 4550 4524 sout | 1 | 2 | 3 | endl; … … 4554 4528 \end{lstlisting} 4555 4529 \item 4556 A sep arator does not appear before or after a character literal or variable.4530 A seperator does not appear before or after a character literal or variable. 4557 4531 \begin{lstlisting} 4558 4532 sout | '1' | '2' | '3' | endl; … … 4560 4534 \end{lstlisting} 4561 4535 \item 4562 A sep arator does not appear before or after a null (empty) C string4536 A seperator does not appear before or after a null (empty) C string 4563 4537 \begin{lstlisting} 4564 4538 sout | 1 | "" | 2 | "" | 3 | endl; … … 4567 4541 which is a local mechanism to disable insertion of the separator character. 4568 4542 \item 4569 A sep arator does not appear before a C string starting with the (extended) \Index{ASCII}\index{ASCII!extended} characters: \lstinline[mathescape=off]@([{$£¥¡¿«@4543 A seperator does not appear before a C string starting with the (extended) \Index{ASCII}\index{ASCII!extended} characters: \lstinline[mathescape=off]@([{$£¥¡¿«@ 4570 4544 %$ 4571 4545 \begin{lstlisting}[mathescape=off] … … 4770 4744 4771 4745 4772 \subsection{min / max / clamp /swap}4746 \subsection{min / max / swap} 4773 4747 4774 4748 \begin{lstlisting}[aboveskip=0pt,belowskip=0pt] … … 4778 4752 forall( otype T | { int ?>?( T, T ); } ) 4779 4753 T max( const T t1, const T t2 );§\indexc{max}§ 4780 4781 forall( otype T | { T min( T, T ); T max( T, T ); } )4782 T clamp( T value, T min_val, T max_val );§\indexc{clamp}§4783 4754 4784 4755 forall( otype T ) … … 5165 5136 When creating and computing with rational numbers, results are constantly reduced to keep the numerator and denominator as small as possible. 5166 5137 5167 \begin{lstlisting}[ belowskip=0pt]5138 \begin{lstlisting}[aboveskip=0pt,belowskip=0pt] 5168 5139 // implementation 5169 5140 struct Rational {§\indexc{Rational}§ -
src/ControlStruct/CaseRangeMutator.cc
rd1b9d78 r8884112 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 12 17:35:13201613 // Update Count : 912 // Last Modified On : Thu Jun 30 13:28:55 2016 13 // Update Count : 8 14 14 // 15 15 … … 28 28 29 29 namespace ControlStruct { 30 Statement *CaseRangeMutator::mutate( ChooseStmt *chooseStmt ) { 31 // There shouldn't be any `choose' statements by now, throw an exception or something. 32 throw( 0 ) ; /* FIXME */ 33 } 34 30 35 Statement *CaseRangeMutator::mutate( SwitchStmt *switchStmt ) { 31 36 std::list< Statement * > &cases = switchStmt->get_branches(); … … 64 69 65 70 return switchStmt; 71 } 72 73 Statement *CaseRangeMutator::mutate( FallthruStmt *fallthruStmt ) { 74 //delete fallthruStmt; 75 return new NullStmt(); 66 76 } 67 77 -
src/ControlStruct/CaseRangeMutator.h
rd1b9d78 r8884112 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:35:30 201613 // Update Count : 412 // Last Modified On : Tue May 19 15:22:51 2015 13 // Update Count : 3 14 14 // 15 15 … … 27 27 CaseRangeMutator() {} 28 28 29 virtual Statement *mutate( ChooseStmt * ); 29 30 virtual Statement *mutate( SwitchStmt * ); 31 virtual Statement *mutate( FallthruStmt * ); 30 32 virtual Statement *mutate( CaseStmt * ); 31 33 private: -
src/ControlStruct/LabelFixer.h
rd1b9d78 r8884112 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:36:16201613 // Update Count : 3 312 // Last Modified On : Mon Jan 25 21:22:22 2016 13 // Update Count : 32 14 14 // 15 15 … … 46 46 virtual void visit( ForStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); } 47 47 virtual void visit( SwitchStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); } 48 virtual void visit( ChooseStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); } 49 virtual void visit( FallthruStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); } 48 50 virtual void visit( CaseStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); } 49 51 virtual void visit( ReturnStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); } -
src/ControlStruct/MLEMutator.cc
rd1b9d78 r8884112 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:36:51201613 // Update Count : 19 712 // Last Modified On : Wed Jul 6 17:40:02 2016 13 // Update Count : 196 14 14 // 15 15 … … 248 248 return handleSwitchStmt( switchStmt ); 249 249 } 250 251 Statement *MLEMutator::mutate( ChooseStmt *switchStmt ) { 252 return handleSwitchStmt( switchStmt ); 253 } 250 254 } // namespace ControlStruct 251 255 -
src/ControlStruct/MLEMutator.h
rd1b9d78 r8884112 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:37:01201613 // Update Count : 3 412 // Last Modified On : Wed Jul 6 18:16:26 2016 13 // Update Count : 33 14 14 // 15 15 … … 42 42 virtual Statement *mutate( IfStmt *ifStmt ) override; 43 43 virtual Statement *mutate( SwitchStmt *switchStmt ) override; 44 virtual Statement *mutate( ChooseStmt *switchStmt ) override; 44 45 45 46 Statement *mutateLoop( Statement *bodyLoop, Entry &e ); -
src/ControlStruct/Mutate.cc
rd1b9d78 r8884112 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:37:45 201613 // Update Count : 811 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jul 15 14:50:04 2015 13 // Update Count : 7 14 14 // 15 15 … … 20 20 21 21 #include "Mutate.h" 22 #include "ChooseMutator.h" 22 23 #include "LabelFixer.h" 23 24 #include "MLEMutator.h" … … 38 39 ForExprMutator formut; 39 40 40 // normalizes label definitions and generates multi-level exit labels 41 // transform choose statements into switch statements 42 ChooseMutator chmut; 43 44 // normalizes label definitions and generates multi-level 45 // exit labels 41 46 LabelFixer lfix; 42 47 43 48 // expand case ranges and turn fallthru into a null statement 44 CaseRangeMutator ranges; 49 CaseRangeMutator ranges; // has to run after ChooseMutator 45 50 46 51 //ExceptMutator exc; … … 48 53 49 54 mutateAll( translationUnit, formut ); 55 mutateAll( translationUnit, chmut ); 50 56 acceptAll( translationUnit, lfix ); 51 57 mutateAll( translationUnit, ranges ); -
src/ControlStruct/module.mk
rd1b9d78 r8884112 11 11 ## Created On : Mon Jun 1 17:49:17 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Tue Jul 12 17:40:31 201614 ## Update Count : 213 ## Last Modified On : Mon Jun 1 17:51:45 2015 14 ## Update Count : 1 15 15 ############################################################################### 16 16 … … 20 20 ControlStruct/CaseRangeMutator.cc \ 21 21 ControlStruct/Mutate.cc \ 22 ControlStruct/ChooseMutator.cc \ 22 23 ControlStruct/ForExprMutator.cc \ 23 24 ControlStruct/LabelTypeChecker.cc -
src/GenPoly/DeclMutator.cc
rd1b9d78 r8884112 9 9 // Author : Aaron B. Moss 10 10 // Created On : Fri Nov 27 14:44:00 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:38:46 201613 // Update Count : 211 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Fri Nov 27 14:44:00 2015 13 // Update Count : 1 14 14 // 15 15 … … 167 167 } 168 168 169 Statement* DeclMutator::mutate(ChooseStmt *chooseStmt) { 170 chooseStmt->set_condition( maybeMutate( chooseStmt->get_condition(), *this ) ); 171 mutateAll( chooseStmt->get_branches(), *this ); 172 return chooseStmt; 173 } 174 169 175 Statement* DeclMutator::mutate(CaseStmt *caseStmt) { 170 176 caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) ); -
src/GenPoly/DeclMutator.h
rd1b9d78 r8884112 9 9 // Author : Aaron B. Moss 10 10 // Created On : Fri Nov 27 14:44:00 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:39:01 201613 // Update Count : 211 // Last Modified By : Aaron B. Moss 12 // Last Modified On : Fri Nov 27 14:44:00 2015 13 // Update Count : 1 14 14 // 15 15 … … 36 36 virtual Statement* mutate(ForStmt *forStmt); 37 37 virtual Statement* mutate(SwitchStmt *switchStmt); 38 virtual Statement* mutate(ChooseStmt *chooseStmt); 38 39 virtual Statement* mutate(CaseStmt *caseStmt); 39 40 virtual Statement* mutate(TryStmt *tryStmt); -
src/GenPoly/PolyMutator.cc
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:39:32201613 // Update Count : 1 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon May 02 14:50:58 2016 13 // Update Count : 11 14 14 // 15 15 … … 104 104 } 105 105 106 Statement * PolyMutator::mutate(ChooseStmt *switchStmt) { 107 mutateStatementList( switchStmt->get_branches() ); 108 switchStmt->set_condition( mutateExpression( switchStmt->get_condition() ) ); 109 return switchStmt; 110 } 111 106 112 Statement * PolyMutator::mutate(CaseStmt *caseStmt) { 107 113 mutateStatementList( caseStmt->get_statements() ); -
src/GenPoly/PolyMutator.h
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:39:41 201613 // Update Count : 611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Dec 08 15:19:05 2015 13 // Update Count : 5 14 14 // 15 15 … … 37 37 virtual Statement* mutate(ForStmt *forStmt); 38 38 virtual Statement* mutate(SwitchStmt *switchStmt); 39 virtual Statement* mutate(ChooseStmt *chooseStmt); 39 40 virtual Statement* mutate(CaseStmt *caseStmt); 40 41 virtual Statement* mutate(TryStmt *returnStmt); -
src/InitTweak/FixInit.cc
rd1b9d78 r8884112 10 10 // Created On : Wed Jan 13 16:29:30 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:41:15201613 // Update Count : 3 412 // Last Modified On : Wed Jul 6 17:34:46 2016 13 // Update Count : 33 14 14 // 15 15 … … 118 118 virtual void visit( ForStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); } 119 119 virtual void visit( SwitchStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); } 120 virtual void visit( ChooseStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); } 121 virtual void visit( FallthruStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); } 120 122 virtual void visit( CaseStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); } 121 123 virtual void visit( BranchStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); } -
src/Makefile.in
rd1b9d78 r8884112 110 110 ControlStruct/driver_cfa_cpp-CaseRangeMutator.$(OBJEXT) \ 111 111 ControlStruct/driver_cfa_cpp-Mutate.$(OBJEXT) \ 112 ControlStruct/driver_cfa_cpp-ChooseMutator.$(OBJEXT) \ 112 113 ControlStruct/driver_cfa_cpp-ForExprMutator.$(OBJEXT) \ 113 114 ControlStruct/driver_cfa_cpp-LabelTypeChecker.$(OBJEXT) \ … … 373 374 ControlStruct/LabelGenerator.cc ControlStruct/LabelFixer.cc \ 374 375 ControlStruct/MLEMutator.cc ControlStruct/CaseRangeMutator.cc \ 375 ControlStruct/Mutate.cc ControlStruct/ForExprMutator.cc \ 376 ControlStruct/Mutate.cc ControlStruct/ChooseMutator.cc \ 377 ControlStruct/ForExprMutator.cc \ 376 378 ControlStruct/LabelTypeChecker.cc Designators/Processor.cc \ 377 379 GenPoly/Box.cc GenPoly/GenPoly.cc GenPoly/PolyMutator.cc \ … … 548 550 ControlStruct/$(DEPDIR)/$(am__dirstamp) 549 551 ControlStruct/driver_cfa_cpp-Mutate.$(OBJEXT): \ 552 ControlStruct/$(am__dirstamp) \ 553 ControlStruct/$(DEPDIR)/$(am__dirstamp) 554 ControlStruct/driver_cfa_cpp-ChooseMutator.$(OBJEXT): \ 550 555 ControlStruct/$(am__dirstamp) \ 551 556 ControlStruct/$(DEPDIR)/$(am__dirstamp) … … 821 826 -rm -f Common/driver_cfa_cpp-UniqueName.$(OBJEXT) 822 827 -rm -f ControlStruct/driver_cfa_cpp-CaseRangeMutator.$(OBJEXT) 828 -rm -f ControlStruct/driver_cfa_cpp-ChooseMutator.$(OBJEXT) 823 829 -rm -f ControlStruct/driver_cfa_cpp-ForExprMutator.$(OBJEXT) 824 830 -rm -f ControlStruct/driver_cfa_cpp-LabelFixer.$(OBJEXT) … … 931 937 @AMDEP_TRUE@@am__include@ @am__quote@Common/$(DEPDIR)/driver_cfa_cpp-UniqueName.Po@am__quote@ 932 938 @AMDEP_TRUE@@am__include@ @am__quote@ControlStruct/$(DEPDIR)/driver_cfa_cpp-CaseRangeMutator.Po@am__quote@ 939 @AMDEP_TRUE@@am__include@ @am__quote@ControlStruct/$(DEPDIR)/driver_cfa_cpp-ChooseMutator.Po@am__quote@ 933 940 @AMDEP_TRUE@@am__include@ @am__quote@ControlStruct/$(DEPDIR)/driver_cfa_cpp-ForExprMutator.Po@am__quote@ 934 941 @AMDEP_TRUE@@am__include@ @am__quote@ControlStruct/$(DEPDIR)/driver_cfa_cpp-LabelFixer.Po@am__quote@ … … 1240 1247 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o ControlStruct/driver_cfa_cpp-Mutate.obj `if test -f 'ControlStruct/Mutate.cc'; then $(CYGPATH_W) 'ControlStruct/Mutate.cc'; else $(CYGPATH_W) '$(srcdir)/ControlStruct/Mutate.cc'; fi` 1241 1248 1249 ControlStruct/driver_cfa_cpp-ChooseMutator.o: ControlStruct/ChooseMutator.cc 1250 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ControlStruct/driver_cfa_cpp-ChooseMutator.o -MD -MP -MF ControlStruct/$(DEPDIR)/driver_cfa_cpp-ChooseMutator.Tpo -c -o ControlStruct/driver_cfa_cpp-ChooseMutator.o `test -f 'ControlStruct/ChooseMutator.cc' || echo '$(srcdir)/'`ControlStruct/ChooseMutator.cc 1251 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ControlStruct/$(DEPDIR)/driver_cfa_cpp-ChooseMutator.Tpo ControlStruct/$(DEPDIR)/driver_cfa_cpp-ChooseMutator.Po 1252 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ControlStruct/ChooseMutator.cc' object='ControlStruct/driver_cfa_cpp-ChooseMutator.o' libtool=no @AMDEPBACKSLASH@ 1253 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1254 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o ControlStruct/driver_cfa_cpp-ChooseMutator.o `test -f 'ControlStruct/ChooseMutator.cc' || echo '$(srcdir)/'`ControlStruct/ChooseMutator.cc 1255 1256 ControlStruct/driver_cfa_cpp-ChooseMutator.obj: ControlStruct/ChooseMutator.cc 1257 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ControlStruct/driver_cfa_cpp-ChooseMutator.obj -MD -MP -MF ControlStruct/$(DEPDIR)/driver_cfa_cpp-ChooseMutator.Tpo -c -o ControlStruct/driver_cfa_cpp-ChooseMutator.obj `if test -f 'ControlStruct/ChooseMutator.cc'; then $(CYGPATH_W) 'ControlStruct/ChooseMutator.cc'; else $(CYGPATH_W) '$(srcdir)/ControlStruct/ChooseMutator.cc'; fi` 1258 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ControlStruct/$(DEPDIR)/driver_cfa_cpp-ChooseMutator.Tpo ControlStruct/$(DEPDIR)/driver_cfa_cpp-ChooseMutator.Po 1259 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ControlStruct/ChooseMutator.cc' object='ControlStruct/driver_cfa_cpp-ChooseMutator.obj' libtool=no @AMDEPBACKSLASH@ 1260 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 1261 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o ControlStruct/driver_cfa_cpp-ChooseMutator.obj `if test -f 'ControlStruct/ChooseMutator.cc'; then $(CYGPATH_W) 'ControlStruct/ChooseMutator.cc'; else $(CYGPATH_W) '$(srcdir)/ControlStruct/ChooseMutator.cc'; fi` 1262 1242 1263 ControlStruct/driver_cfa_cpp-ForExprMutator.o: ControlStruct/ForExprMutator.cc 1243 1264 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ControlStruct/driver_cfa_cpp-ForExprMutator.o -MD -MP -MF ControlStruct/$(DEPDIR)/driver_cfa_cpp-ForExprMutator.Tpo -c -o ControlStruct/driver_cfa_cpp-ForExprMutator.o `test -f 'ControlStruct/ForExprMutator.cc' || echo '$(srcdir)/'`ControlStruct/ForExprMutator.cc -
src/Parser/ParseNode.cc
rd1b9d78 r8884112 10 10 // Created On : Sat May 16 13:26:29 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 12 17:19:57201613 // Update Count : 5 312 // Last Modified On : Thu Jun 30 21:13:12 2016 13 // Update Count : 52 14 14 // 15 15 … … 196 196 197 197 ParseNode *ParseNode::set_link( ParseNode *next_ ) { 198 if ( next_ != 0 ) get_last()->next = next_; 198 if ( next_ == 0 ) return this; 199 get_last()->next = next_; 199 200 return this; 200 201 } -
src/Parser/StatementNode.cc
rd1b9d78 r8884112 10 10 // Created On : Sat May 16 14:59:41 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 12 17:21:02201613 // Update Count : 13 312 // Last Modified On : Thu Jun 9 14:18:46 2016 13 // Update Count : 132 14 14 // 15 15 … … 254 254 case Switch: 255 255 return new SwitchStmt( labs, maybeBuild<Expression>(get_control()), branches ); 256 case Choose: 257 return new ChooseStmt( labs, maybeBuild<Expression>(get_control()), branches ); 258 case Fallthru: 259 return new FallthruStmt( labs ); 256 260 case Case: 257 261 return new CaseStmt( labs, maybeBuild<Expression>(get_control()), branches ); -
src/Parser/TypeData.cc
rd1b9d78 r8884112 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 15:12:51 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:21:49201613 // Update Count : 5011 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Apr 06 16:57:53 2016 13 // Update Count : 49 14 14 // 15 15 … … 845 845 assert( false ); 846 846 } // switch 847 847 // buildList( aggregate->params, at->get_parameters() ); 848 848 buildList( aggregate->fields, at->get_members() ); 849 849 850 850 return at; 851 851 } 852 853 /// namespace { 854 /// Type* 855 /// makeType( Declaration* decl ) 856 /// { 857 /// if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( decl ) ) { 858 /// return dwt->get_type()->clone(); 859 /// } else { 860 /// return 0; 861 /// } 862 /// } 863 /// } 852 864 853 865 ReferenceToType *TypeData::buildAggInst() const { -
src/Parser/parser.cc
rd1b9d78 r8884112 1031 1031 631, 632, 638, 639, 640, 641, 642, 643, 644, 645, 1032 1032 646, 656, 663, 665, 675, 676, 681, 683, 689, 691, 1033 695, 696, 701, 706, 709, 711, 713, 7 22, 724, 735,1034 7 36, 738, 742, 743, 748, 749, 754, 755, 759, 764,1035 7 65, 769, 771, 777, 778, 782, 784, 786, 788, 794,1036 7 95, 799, 801, 806, 808, 810, 815, 817, 822, 824,1037 8 28, 831, 835, 838, 842, 844, 848, 850, 857, 859,1038 8 61, 870, 872, 874, 876, 878, 883, 885, 887, 889,1039 8 94, 907, 908, 913, 915, 920, 924, 926, 928, 930,1040 9 32, 938, 939, 945, 946, 950, 951, 956, 958, 964,1041 9 65, 967, 972, 974, 981, 983, 987, 988, 993, 995,1042 99 9, 1000, 1004, 1006, 1010, 1011, 1015, 1016, 1020, 1021,1043 10 36, 1037, 1038, 1039, 1040, 1044, 1049, 1056, 1066, 1071,1044 10 76, 1084, 1089, 1094, 1099, 1104, 1112, 1134, 1139, 1146,1045 11 48, 1155, 1160, 1165, 1176, 1181, 1186, 1191, 1196, 1205,1046 12 10, 1218, 1219, 1220, 1221, 1227, 1232, 1240, 1241, 1242,1047 12 43, 1247, 1248, 1249, 1250, 1255, 1256, 1265, 1266, 1271,1048 12 72, 1277, 1279, 1281, 1283, 1285, 1288, 1287, 1299, 1300,1049 1 302, 1312, 1313, 1318, 1322, 1324, 1326, 1328, 1330, 1332,1050 13 34, 1336, 1341, 1343, 1345, 1347, 1349, 1351, 1353, 1355,1051 13 57, 1359, 1361, 1363, 1365, 1371, 1372, 1374, 1376, 1378,1052 13 83, 1384, 1390, 1391, 1393, 1395, 1400, 1402, 1404, 1406,1053 14 11, 1412, 1414, 1416, 1421, 1422, 1424, 1429, 1430, 1432,1054 14 34, 1439, 1441, 1443, 1448, 1449, 1453, 1455, 1461, 1460,1055 14 64, 1466, 1471, 1473, 1478, 1480, 1485, 1486, 1488, 1489,1056 14 98, 1499, 1501, 1503, 1508, 1510, 1516, 1517, 1519, 1522,1057 15 25, 1530, 1531, 1536, 1541, 1545, 1547, 1553, 1552, 1559,1058 15 61, 1567, 1568, 1576, 1577, 1581, 1582, 1583, 1585, 1587,1059 15 94, 1595, 1597, 1599, 1604, 1605, 1611, 1612, 1616, 1617,1060 16 22, 1623, 1624, 1626, 1634, 1635, 1637, 1640, 1642, 1646,1061 16 47, 1648, 1650, 1652, 1656, 1661, 1669, 1670, 1679, 1681,1062 16 86, 1687, 1688, 1692, 1693, 1694, 1698, 1699, 1700, 1704,1063 1 705, 1706, 1711, 1712, 1713, 1714, 1720, 1721, 1723, 1728,1064 172 9, 1734, 1735, 1736, 1737, 1738, 1753, 1754, 1759, 1760,1065 17 68, 1770, 1772, 1775, 1777, 1779, 1802, 1803, 1805, 1807,1066 18 12, 1813, 1815, 1820, 1825, 1826, 1832, 1831, 1835, 1839,1067 18 41, 1843, 1849, 1850, 1855, 1860, 1862, 1867, 1869, 1870,1068 18 72, 1877, 1879, 1881, 1886, 1888, 1893, 1898, 1906, 1912,1069 19 11, 1925, 1926, 1931, 1932, 1936, 1941, 1946, 1954, 1959,1070 19 70, 1971, 1982, 1983, 1989, 1990, 1994, 1995, 1996, 1999,1071 19 98, 2009, 2018, 2024, 2030, 2039, 2045, 2051, 2057, 2063,1072 20 71, 2077, 2085, 2091, 2100, 2101, 2102, 2106, 2110, 2112,1073 21 17, 2118, 2122, 2123, 2128, 2134, 2135, 2138, 2140, 2141,1074 21 45, 2146, 2147, 2148, 2182, 2184, 2185, 2187, 2192, 2197,1075 2 202, 2204, 2206, 2211, 2213, 2215, 2217, 2222, 2224, 2233,1076 22 35, 2236, 2241, 2243, 2245, 2250, 2252, 2254, 2259, 2261,1077 22 63, 2272, 2273, 2274, 2278, 2280, 2282, 2287, 2289, 2291,1078 22 96, 2298, 2300, 2315, 2317, 2318, 2320, 2325, 2326, 2331,1079 23 33, 2335, 2340, 2342, 2344, 2346, 2351, 2353, 2355, 2365,1080 23 67, 2368, 2370, 2375, 2377, 2379, 2384, 2386, 2388, 2390,1081 23 95, 2397, 2399, 2430, 2432, 2433, 2435, 2440, 2445, 2453,1082 24 55, 2457, 2462, 2464, 2469, 2471, 2485, 2486, 2488, 2493,1083 24 95, 2497, 2499, 2501, 2506, 2507, 2509, 2511, 2516, 2518,1084 25 20, 2526, 2528, 2530, 2534, 2536, 2538, 2540, 2554, 2555,1085 25 57, 2562, 2564, 2566, 2568, 2570, 2575, 2576, 2578, 2580,1086 25 85, 2587, 2589, 2595, 2596, 2598, 2607, 2610, 2612, 2615,1087 26 17, 2619, 2632, 2633, 2635, 2640, 2642, 2644, 2646, 2648,1088 26 53, 2654, 2656, 2658, 2663, 2665, 2673, 2674, 2675, 2680,1089 26 81, 2685, 2687, 2689, 2691, 2693, 2695, 2702, 2704, 2706,1090 2 708, 2710, 2712, 2714, 2716, 2718, 2720, 2725, 2727, 2729,1091 27 34, 2760, 2761, 2763, 2767, 2768, 2772, 2774, 2776, 2778,1092 27 80, 2782, 2789, 2791, 2793, 2795, 2797, 2799, 2804, 2809,1093 28 11, 2813, 2831, 2833, 2838, 28391033 695, 696, 701, 706, 709, 711, 713, 718, 720, 728, 1034 729, 731, 735, 736, 741, 742, 747, 748, 752, 757, 1035 758, 762, 764, 770, 771, 775, 777, 779, 781, 787, 1036 788, 792, 793, 797, 799, 801, 806, 808, 813, 815, 1037 819, 822, 826, 829, 833, 835, 839, 841, 848, 850, 1038 852, 861, 863, 865, 867, 869, 874, 876, 878, 880, 1039 885, 898, 899, 904, 906, 911, 915, 917, 919, 921, 1040 923, 929, 930, 936, 937, 941, 942, 947, 949, 955, 1041 956, 958, 963, 965, 972, 974, 978, 979, 984, 986, 1042 990, 991, 995, 997, 1001, 1002, 1006, 1007, 1011, 1012, 1043 1027, 1028, 1029, 1030, 1031, 1035, 1040, 1047, 1057, 1062, 1044 1067, 1075, 1080, 1085, 1090, 1095, 1103, 1125, 1130, 1137, 1045 1139, 1146, 1151, 1156, 1167, 1172, 1177, 1182, 1187, 1196, 1046 1201, 1209, 1210, 1211, 1212, 1218, 1223, 1231, 1232, 1233, 1047 1234, 1238, 1239, 1240, 1241, 1246, 1247, 1256, 1257, 1262, 1048 1263, 1268, 1270, 1272, 1274, 1276, 1279, 1278, 1290, 1291, 1049 1293, 1303, 1304, 1309, 1313, 1315, 1317, 1319, 1321, 1323, 1050 1325, 1327, 1332, 1334, 1336, 1338, 1340, 1342, 1344, 1346, 1051 1348, 1350, 1352, 1354, 1356, 1362, 1363, 1365, 1367, 1369, 1052 1374, 1375, 1381, 1382, 1384, 1386, 1391, 1393, 1395, 1397, 1053 1402, 1403, 1405, 1407, 1412, 1413, 1415, 1420, 1421, 1423, 1054 1425, 1430, 1432, 1434, 1439, 1440, 1444, 1446, 1452, 1451, 1055 1455, 1457, 1462, 1464, 1469, 1471, 1476, 1477, 1479, 1480, 1056 1489, 1490, 1492, 1494, 1499, 1501, 1507, 1508, 1510, 1513, 1057 1516, 1521, 1522, 1527, 1532, 1536, 1538, 1544, 1543, 1550, 1058 1552, 1558, 1559, 1567, 1568, 1572, 1573, 1574, 1576, 1578, 1059 1585, 1586, 1588, 1590, 1595, 1596, 1602, 1603, 1607, 1608, 1060 1613, 1614, 1615, 1617, 1625, 1626, 1628, 1631, 1633, 1637, 1061 1638, 1639, 1641, 1643, 1647, 1652, 1660, 1661, 1670, 1672, 1062 1677, 1678, 1679, 1683, 1684, 1685, 1689, 1690, 1691, 1695, 1063 1696, 1697, 1702, 1703, 1704, 1705, 1711, 1712, 1714, 1719, 1064 1720, 1725, 1726, 1727, 1728, 1729, 1744, 1745, 1750, 1751, 1065 1759, 1761, 1763, 1766, 1768, 1770, 1793, 1794, 1796, 1798, 1066 1803, 1804, 1806, 1811, 1816, 1817, 1823, 1822, 1826, 1830, 1067 1832, 1834, 1840, 1841, 1846, 1851, 1853, 1858, 1860, 1861, 1068 1863, 1868, 1870, 1872, 1877, 1879, 1884, 1889, 1897, 1903, 1069 1902, 1916, 1917, 1922, 1923, 1927, 1932, 1937, 1945, 1950, 1070 1961, 1962, 1973, 1974, 1980, 1981, 1985, 1986, 1987, 1990, 1071 1989, 2000, 2009, 2015, 2021, 2030, 2036, 2042, 2048, 2054, 1072 2062, 2068, 2076, 2082, 2091, 2092, 2093, 2097, 2101, 2103, 1073 2108, 2109, 2113, 2114, 2119, 2125, 2126, 2129, 2131, 2132, 1074 2136, 2137, 2138, 2139, 2173, 2175, 2176, 2178, 2183, 2188, 1075 2193, 2195, 2197, 2202, 2204, 2206, 2208, 2213, 2215, 2224, 1076 2226, 2227, 2232, 2234, 2236, 2241, 2243, 2245, 2250, 2252, 1077 2254, 2263, 2264, 2265, 2269, 2271, 2273, 2278, 2280, 2282, 1078 2287, 2289, 2291, 2306, 2308, 2309, 2311, 2316, 2317, 2322, 1079 2324, 2326, 2331, 2333, 2335, 2337, 2342, 2344, 2346, 2356, 1080 2358, 2359, 2361, 2366, 2368, 2370, 2375, 2377, 2379, 2381, 1081 2386, 2388, 2390, 2421, 2423, 2424, 2426, 2431, 2436, 2444, 1082 2446, 2448, 2453, 2455, 2460, 2462, 2476, 2477, 2479, 2484, 1083 2486, 2488, 2490, 2492, 2497, 2498, 2500, 2502, 2507, 2509, 1084 2511, 2517, 2519, 2521, 2525, 2527, 2529, 2531, 2545, 2546, 1085 2548, 2553, 2555, 2557, 2559, 2561, 2566, 2567, 2569, 2571, 1086 2576, 2578, 2580, 2586, 2587, 2589, 2598, 2601, 2603, 2606, 1087 2608, 2610, 2623, 2624, 2626, 2631, 2633, 2635, 2637, 2639, 1088 2644, 2645, 2647, 2649, 2654, 2656, 2664, 2665, 2666, 2671, 1089 2672, 2676, 2678, 2680, 2682, 2684, 2686, 2693, 2695, 2697, 1090 2699, 2701, 2703, 2705, 2707, 2709, 2711, 2716, 2718, 2720, 1091 2725, 2751, 2752, 2754, 2758, 2759, 2763, 2765, 2767, 2769, 1092 2771, 2773, 2780, 2782, 2784, 2786, 2788, 2790, 2795, 2800, 1093 2802, 2804, 2822, 2824, 2829, 2830 1094 1094 }; 1095 1095 #endif … … 6006 6006 /* Line 1806 of yacc.c */ 6007 6007 #line 714 "parser.yy" 6008 { 6009 StatementNode *sw = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); 6010 // The semantics of the declaration list is changed to include associated initialization, which is performed 6011 // *before* the transfer to the appropriate case clause by hoisting the declarations into a compound 6012 // statement around the switch. Statements after the initial declaration list can never be executed, and 6013 // therefore, are removed from the grammar even though C allows it. Change also applies to choose statement. 6014 (yyval.sn) = (yyvsp[(7) - (9)].decl) != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( (yyvsp[(7) - (9)].decl) ))->set_link( sw )) ) : sw; 6015 } 6008 { (yyval.sn) = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); /* xxx */ } 6016 6009 break; 6017 6010 … … 6019 6012 6020 6013 /* Line 1806 of yacc.c */ 6021 #line 7 23"parser.yy"6022 { (yyval.sn) = new StatementNode( StatementNode:: Switch, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); }6014 #line 719 "parser.yy" 6015 { (yyval.sn) = new StatementNode( StatementNode::Choose, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 6023 6016 break; 6024 6017 … … 6026 6019 6027 6020 /* Line 1806 of yacc.c */ 6028 #line 725 "parser.yy" 6029 { 6030 StatementNode *sw = new StatementNode( StatementNode::Switch, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); 6031 (yyval.sn) = (yyvsp[(7) - (9)].decl) != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( (yyvsp[(7) - (9)].decl) ))->set_link( sw )) ) : sw; 6032 } 6021 #line 721 "parser.yy" 6022 { (yyval.sn) = new StatementNode( StatementNode::Choose, (yyvsp[(3) - (9)].en), (yyvsp[(8) - (9)].sn) ); } 6033 6023 break; 6034 6024 … … 6036 6026 6037 6027 /* Line 1806 of yacc.c */ 6038 #line 7 35"parser.yy"6028 #line 728 "parser.yy" 6039 6029 { (yyval.en) = (yyvsp[(1) - (1)].en); } 6040 6030 break; … … 6043 6033 6044 6034 /* Line 1806 of yacc.c */ 6035 #line 730 "parser.yy" 6036 { (yyval.en) = new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ); } 6037 break; 6038 6039 case 163: 6040 6041 /* Line 1806 of yacc.c */ 6045 6042 #line 737 "parser.yy" 6046 { (yyval.en) = new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ); }6047 break;6048 6049 case 163:6050 6051 /* Line 1806 of yacc.c */6052 #line 744 "parser.yy"6053 6043 { (yyval.en) = new CompositeExprNode( new OperatorNode( OperatorNode::TupleC ), (ExpressionNode *)(tupleContents( (yyvsp[(1) - (3)].en) ))->set_link( (yyvsp[(3) - (3)].en) ) ); } 6054 6044 break; … … 6057 6047 6058 6048 /* Line 1806 of yacc.c */ 6049 #line 741 "parser.yy" 6050 { (yyval.sn) = new StatementNode( StatementNode::Case, (yyvsp[(2) - (3)].en), 0 ); } 6051 break; 6052 6053 case 165: 6054 6055 /* Line 1806 of yacc.c */ 6056 #line 742 "parser.yy" 6057 { (yyval.sn) = new StatementNode( StatementNode::Default ); } 6058 break; 6059 6060 case 167: 6061 6062 /* Line 1806 of yacc.c */ 6059 6063 #line 748 "parser.yy" 6060 { (yyval.sn) = new StatementNode( StatementNode::Case, (yyvsp[(2) - (3)].en), 0 ); }6061 break;6062 6063 case 165:6064 6065 /* Line 1806 of yacc.c */6066 #line 749 "parser.yy"6067 { (yyval.sn) = new StatementNode( StatementNode::Default ); }6068 break;6069 6070 case 167:6071 6072 /* Line 1806 of yacc.c */6073 #line 755 "parser.yy"6074 6064 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (2)].sn)->set_link( (yyvsp[(2) - (2)].sn) )); } 6075 6065 break; … … 6078 6068 6079 6069 /* Line 1806 of yacc.c */ 6080 #line 75 9"parser.yy"6081 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(2) - (2)].sn)) ); }6070 #line 752 "parser.yy" 6071 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); } 6082 6072 break; 6083 6073 … … 6085 6075 6086 6076 /* Line 1806 of yacc.c */ 6087 #line 7 64"parser.yy"6077 #line 757 "parser.yy" 6088 6078 { (yyval.sn) = 0; } 6089 6079 break; … … 6092 6082 6093 6083 /* Line 1806 of yacc.c */ 6084 #line 763 "parser.yy" 6085 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); } 6086 break; 6087 6088 case 172: 6089 6090 /* Line 1806 of yacc.c */ 6091 #line 765 "parser.yy" 6092 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); } 6093 break; 6094 6095 case 173: 6096 6097 /* Line 1806 of yacc.c */ 6094 6098 #line 770 "parser.yy" 6095 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(2) - (2)].sn) ) ); }6096 break;6097 6098 case 172:6099 6100 /* Line 1806 of yacc.c */6101 #line 772 "parser.yy"6102 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( new CompoundStmtNode( (yyvsp[(3) - (3)].sn) ) ) ) ); }6103 break;6104 6105 case 173:6106 6107 /* Line 1806 of yacc.c */6108 #line 777 "parser.yy"6109 6099 { (yyval.sn) = 0; } 6110 6100 break; … … 6113 6103 6114 6104 /* Line 1806 of yacc.c */ 6115 #line 7 83"parser.yy"6105 #line 776 "parser.yy" 6116 6106 { (yyval.sn) = (yyvsp[(1) - (2)].sn)->append_last_case( (yyvsp[(2) - (2)].sn) ); } 6117 6107 break; … … 6120 6110 6121 6111 /* Line 1806 of yacc.c */ 6122 #line 7 85"parser.yy"6123 { (yyval.sn) = (yyvsp[(1) - (3)].sn)->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*(yyvsp[(2) - (3)].sn), *(yyvsp[(3) - (3)].sn) ) ) )); }6112 #line 778 "parser.yy" 6113 { (yyval.sn) = (yyvsp[(1) - (3)].sn)->append_last_case((StatementNode *)mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].sn) ))); } 6124 6114 break; 6125 6115 … … 6127 6117 6128 6118 /* Line 1806 of yacc.c */ 6119 #line 780 "parser.yy" 6120 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); } 6121 break; 6122 6123 case 178: 6124 6125 /* Line 1806 of yacc.c */ 6126 #line 782 "parser.yy" 6127 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (4)].sn)->set_link( (yyvsp[(2) - (4)].sn)->append_last_case((StatementNode *)mkList((*(yyvsp[(3) - (4)].sn),*(yyvsp[(4) - (4)].sn) ))))); } 6128 break; 6129 6130 case 179: 6131 6132 /* Line 1806 of yacc.c */ 6129 6133 #line 787 "parser.yy" 6130 { (yyval.sn) = (StatementNode *)( (yyvsp[(1) - (3)].sn)->set_link( (yyvsp[(2) - (3)].sn)->append_last_case( (yyvsp[(3) - (3)].sn) ))); } 6131 break; 6132 6133 case 178: 6134 6135 /* Line 1806 of yacc.c */ 6136 #line 789 "parser.yy" 6137 { (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) ) ) ) ) ) ); } 6138 break; 6139 6140 case 179: 6141 6142 /* Line 1806 of yacc.c */ 6143 #line 794 "parser.yy" 6134 { (yyval.sn) = 0; } 6135 break; 6136 6137 case 181: 6138 6139 /* Line 1806 of yacc.c */ 6140 #line 792 "parser.yy" 6141 { (yyval.sn) = new StatementNode( StatementNode::Fallthru ); } 6142 break; 6143 6144 case 182: 6145 6146 /* Line 1806 of yacc.c */ 6147 #line 793 "parser.yy" 6148 { (yyval.sn) = new StatementNode( StatementNode::Fallthru ); } 6149 break; 6150 6151 case 183: 6152 6153 /* Line 1806 of yacc.c */ 6154 #line 798 "parser.yy" 6155 { (yyval.sn) = new StatementNode( StatementNode::While, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 6156 break; 6157 6158 case 184: 6159 6160 /* Line 1806 of yacc.c */ 6161 #line 800 "parser.yy" 6162 { (yyval.sn) = new StatementNode( StatementNode::Do, (yyvsp[(5) - (7)].en), (yyvsp[(2) - (7)].sn) ); } 6163 break; 6164 6165 case 185: 6166 6167 /* Line 1806 of yacc.c */ 6168 #line 802 "parser.yy" 6169 { (yyval.sn) = new StatementNode( StatementNode::For, (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].sn) ); } 6170 break; 6171 6172 case 186: 6173 6174 /* Line 1806 of yacc.c */ 6175 #line 807 "parser.yy" 6176 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].en) ); } 6177 break; 6178 6179 case 187: 6180 6181 /* Line 1806 of yacc.c */ 6182 #line 809 "parser.yy" 6183 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (4)].decl), (yyvsp[(2) - (4)].en), (yyvsp[(4) - (4)].en) ); } 6184 break; 6185 6186 case 188: 6187 6188 /* Line 1806 of yacc.c */ 6189 #line 814 "parser.yy" 6190 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(2) - (3)].tok) ); } 6191 break; 6192 6193 case 189: 6194 6195 /* Line 1806 of yacc.c */ 6196 #line 818 "parser.yy" 6197 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(3) - (4)].en) ); } 6198 break; 6199 6200 case 190: 6201 6202 /* Line 1806 of yacc.c */ 6203 #line 821 "parser.yy" 6204 { (yyval.sn) = new StatementNode( StatementNode::Continue ); } 6205 break; 6206 6207 case 191: 6208 6209 /* Line 1806 of yacc.c */ 6210 #line 825 "parser.yy" 6211 { (yyval.sn) = new StatementNode( StatementNode::Continue, (yyvsp[(2) - (3)].tok) ); } 6212 break; 6213 6214 case 192: 6215 6216 /* Line 1806 of yacc.c */ 6217 #line 828 "parser.yy" 6144 6218 { (yyval.sn) = new StatementNode( StatementNode::Break ); } 6145 6219 break; 6146 6220 6147 case 181: 6148 6149 /* Line 1806 of yacc.c */ 6150 #line 800 "parser.yy" 6151 { (yyval.sn) = 0; } 6152 break; 6153 6154 case 182: 6155 6156 /* Line 1806 of yacc.c */ 6157 #line 802 "parser.yy" 6158 { (yyval.sn) = 0; } 6159 break; 6160 6161 case 183: 6162 6163 /* Line 1806 of yacc.c */ 6164 #line 807 "parser.yy" 6165 { (yyval.sn) = new StatementNode( StatementNode::While, (yyvsp[(3) - (5)].en), (yyvsp[(5) - (5)].sn) ); } 6166 break; 6167 6168 case 184: 6169 6170 /* Line 1806 of yacc.c */ 6171 #line 809 "parser.yy" 6172 { (yyval.sn) = new StatementNode( StatementNode::Do, (yyvsp[(5) - (7)].en), (yyvsp[(2) - (7)].sn) ); } 6173 break; 6174 6175 case 185: 6176 6177 /* Line 1806 of yacc.c */ 6178 #line 811 "parser.yy" 6179 { (yyval.sn) = new StatementNode( StatementNode::For, (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].sn) ); } 6180 break; 6181 6182 case 186: 6183 6184 /* Line 1806 of yacc.c */ 6185 #line 816 "parser.yy" 6186 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (6)].en), (yyvsp[(4) - (6)].en), (yyvsp[(6) - (6)].en) ); } 6187 break; 6188 6189 case 187: 6190 6191 /* Line 1806 of yacc.c */ 6192 #line 818 "parser.yy" 6193 { (yyval.en) = new ForCtlExprNode( (yyvsp[(1) - (4)].decl), (yyvsp[(2) - (4)].en), (yyvsp[(4) - (4)].en) ); } 6194 break; 6195 6196 case 188: 6197 6198 /* Line 1806 of yacc.c */ 6199 #line 823 "parser.yy" 6200 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(2) - (3)].tok) ); } 6201 break; 6202 6203 case 189: 6204 6205 /* Line 1806 of yacc.c */ 6206 #line 827 "parser.yy" 6207 { (yyval.sn) = new StatementNode( StatementNode::Goto, (yyvsp[(3) - (4)].en) ); } 6208 break; 6209 6210 case 190: 6211 6212 /* Line 1806 of yacc.c */ 6213 #line 830 "parser.yy" 6214 { (yyval.sn) = new StatementNode( StatementNode::Continue ); } 6215 break; 6216 6217 case 191: 6221 case 193: 6222 6223 /* Line 1806 of yacc.c */ 6224 #line 832 "parser.yy" 6225 { (yyval.sn) = new StatementNode( StatementNode::Break, (yyvsp[(2) - (3)].tok) ); } 6226 break; 6227 6228 case 194: 6218 6229 6219 6230 /* Line 1806 of yacc.c */ 6220 6231 #line 834 "parser.yy" 6221 { (yyval.sn) = new StatementNode( StatementNode::Continue, (yyvsp[(2) - (3)].tok) ); }6222 break;6223 6224 case 192:6225 6226 /* Line 1806 of yacc.c */6227 #line 837 "parser.yy"6228 { (yyval.sn) = new StatementNode( StatementNode::Break ); }6229 break;6230 6231 case 193:6232 6233 /* Line 1806 of yacc.c */6234 #line 841 "parser.yy"6235 { (yyval.sn) = new StatementNode( StatementNode::Break, (yyvsp[(2) - (3)].tok) ); }6236 break;6237 6238 case 194:6239 6240 /* Line 1806 of yacc.c */6241 #line 843 "parser.yy"6242 6232 { (yyval.sn) = new StatementNode( StatementNode::Return, (yyvsp[(2) - (3)].en), 0 ); } 6243 6233 break; … … 6246 6236 6247 6237 /* Line 1806 of yacc.c */ 6248 #line 8 45"parser.yy"6238 #line 836 "parser.yy" 6249 6239 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (3)].en), 0 ); } 6250 6240 break; … … 6253 6243 6254 6244 /* Line 1806 of yacc.c */ 6245 #line 840 "parser.yy" 6246 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (3)].en), 0 ); } 6247 break; 6248 6249 case 197: 6250 6251 /* Line 1806 of yacc.c */ 6252 #line 842 "parser.yy" 6253 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (5)].en), 0 ); } 6254 break; 6255 6256 case 198: 6257 6258 /* Line 1806 of yacc.c */ 6255 6259 #line 849 "parser.yy" 6256 { (yyval.sn) = new StatementNode( StatementNode::T hrow, (yyvsp[(2) - (3)].en), 0); }6257 break; 6258 6259 case 19 7:6260 { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); } 6261 break; 6262 6263 case 199: 6260 6264 6261 6265 /* Line 1806 of yacc.c */ 6262 6266 #line 851 "parser.yy" 6263 { (yyval.sn) = new StatementNode( StatementNode::Throw, (yyvsp[(2) - (5)].en), 0 ); }6264 break;6265 6266 case 198:6267 6268 /* Line 1806 of yacc.c */6269 #line 858 "parser.yy"6270 6267 { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); } 6271 6268 break; 6272 6269 6273 case 199:6274 6275 /* Line 1806 of yacc.c */6276 #line 860 "parser.yy"6277 { (yyval.sn) = new StatementNode( StatementNode::Try, 0,(StatementNode *)(mkList((*(yyvsp[(2) - (3)].sn),*(yyvsp[(3) - (3)].pn) )))); }6278 break;6279 6280 6270 case 200: 6281 6271 6282 6272 /* Line 1806 of yacc.c */ 6283 #line 8 62"parser.yy"6273 #line 853 "parser.yy" 6284 6274 { 6285 6275 (yyvsp[(3) - (4)].pn)->set_link( (yyvsp[(4) - (4)].pn) ); … … 6291 6281 6292 6282 /* Line 1806 of yacc.c */ 6293 #line 8 73"parser.yy"6283 #line 864 "parser.yy" 6294 6284 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); } 6295 6285 break; … … 6298 6288 6299 6289 /* Line 1806 of yacc.c */ 6290 #line 866 "parser.yy" 6291 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); } 6292 break; 6293 6294 case 204: 6295 6296 /* Line 1806 of yacc.c */ 6297 #line 868 "parser.yy" 6298 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true ); } 6299 break; 6300 6301 case 205: 6302 6303 /* Line 1806 of yacc.c */ 6304 #line 870 "parser.yy" 6305 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); } 6306 break; 6307 6308 case 206: 6309 6310 /* Line 1806 of yacc.c */ 6300 6311 #line 875 "parser.yy" 6301 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true) ); }6302 break; 6303 6304 case 20 4:6312 { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); } 6313 break; 6314 6315 case 207: 6305 6316 6306 6317 /* Line 1806 of yacc.c */ 6307 6318 #line 877 "parser.yy" 6308 { (yyval.pn) = StatementNode::newCatchStmt( 0, (yyvsp[(5) - (5)].sn), true); }6309 break; 6310 6311 case 20 5:6319 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); } 6320 break; 6321 6322 case 208: 6312 6323 6313 6324 /* Line 1806 of yacc.c */ 6314 6325 #line 879 "parser.yy" 6315 { (yyval.pn) = (yyvsp[(1) - (6)].pn)->set_link( StatementNode::newCatchStmt( 0, (yyvsp[(6) - (6)].sn), true ) ); }6316 break;6317 6318 case 206:6319 6320 /* Line 1806 of yacc.c */6321 #line 884 "parser.yy"6322 6326 { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); } 6323 6327 break; 6324 6328 6325 case 207: 6329 case 209: 6330 6331 /* Line 1806 of yacc.c */ 6332 #line 881 "parser.yy" 6333 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); } 6334 break; 6335 6336 case 210: 6326 6337 6327 6338 /* Line 1806 of yacc.c */ 6328 6339 #line 886 "parser.yy" 6329 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); }6330 break;6331 6332 case 208:6333 6334 /* Line 1806 of yacc.c */6335 #line 888 "parser.yy"6336 { (yyval.pn) = StatementNode::newCatchStmt( (yyvsp[(5) - (9)].decl), (yyvsp[(8) - (9)].sn) ); }6337 break;6338 6339 case 209:6340 6341 /* Line 1806 of yacc.c */6342 #line 890 "parser.yy"6343 { (yyval.pn) = (yyvsp[(1) - (10)].pn)->set_link( StatementNode::newCatchStmt( (yyvsp[(6) - (10)].decl), (yyvsp[(9) - (10)].sn) ) ); }6344 break;6345 6346 case 210:6347 6348 /* Line 1806 of yacc.c */6349 #line 895 "parser.yy"6350 6340 { 6351 6341 (yyval.pn) = new StatementNode( StatementNode::Finally, 0, (yyvsp[(2) - (2)].sn) ); … … 6357 6347 6358 6348 /* Line 1806 of yacc.c */ 6359 #line 90 9"parser.yy"6349 #line 900 "parser.yy" 6360 6350 { 6361 6351 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6367 6357 6368 6358 /* Line 1806 of yacc.c */ 6369 #line 9 14"parser.yy"6359 #line 905 "parser.yy" 6370 6360 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 6371 6361 break; … … 6374 6364 6375 6365 /* Line 1806 of yacc.c */ 6376 #line 9 16"parser.yy"6366 #line 907 "parser.yy" 6377 6367 { 6378 6368 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6384 6374 6385 6375 /* Line 1806 of yacc.c */ 6386 #line 9 25"parser.yy"6376 #line 916 "parser.yy" 6387 6377 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (6)].flag), (yyvsp[(4) - (6)].constant), 0 ); } 6388 6378 break; … … 6391 6381 6392 6382 /* Line 1806 of yacc.c */ 6393 #line 9 27"parser.yy"6383 #line 918 "parser.yy" 6394 6384 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (8)].flag), (yyvsp[(4) - (8)].constant), (yyvsp[(6) - (8)].en) ); } 6395 6385 break; … … 6398 6388 6399 6389 /* Line 1806 of yacc.c */ 6390 #line 920 "parser.yy" 6391 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (10)].flag), (yyvsp[(4) - (10)].constant), (yyvsp[(6) - (10)].en), (yyvsp[(8) - (10)].en) ); } 6392 break; 6393 6394 case 219: 6395 6396 /* Line 1806 of yacc.c */ 6397 #line 922 "parser.yy" 6398 { (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)].constant) ); } 6399 break; 6400 6401 case 220: 6402 6403 /* Line 1806 of yacc.c */ 6404 #line 924 "parser.yy" 6405 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (14)].flag), (yyvsp[(5) - (14)].constant), 0, (yyvsp[(8) - (14)].en), (yyvsp[(10) - (14)].constant), (yyvsp[(12) - (14)].label) ); } 6406 break; 6407 6408 case 221: 6409 6410 /* Line 1806 of yacc.c */ 6400 6411 #line 929 "parser.yy" 6401 { (yyval. sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (10)].flag), (yyvsp[(4) - (10)].constant), (yyvsp[(6) - (10)].en), (yyvsp[(8) - (10)].en) ); }6402 break; 6403 6404 case 2 19:6412 { (yyval.flag) = false; } 6413 break; 6414 6415 case 222: 6405 6416 6406 6417 /* Line 1806 of yacc.c */ 6407 6418 #line 931 "parser.yy" 6408 { (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)].constant) ); }6409 break;6410 6411 case 220:6412 6413 /* Line 1806 of yacc.c */6414 #line 933 "parser.yy"6415 { (yyval.sn) = new AsmStmtNode( StatementNode::Asm, (yyvsp[(2) - (14)].flag), (yyvsp[(5) - (14)].constant), 0, (yyvsp[(8) - (14)].en), (yyvsp[(10) - (14)].constant), (yyvsp[(12) - (14)].label) ); }6416 break;6417 6418 case 221:6419 6420 /* Line 1806 of yacc.c */6421 #line 938 "parser.yy"6422 { (yyval.flag) = false; }6423 break;6424 6425 case 222:6426 6427 /* Line 1806 of yacc.c */6428 #line 940 "parser.yy"6429 6419 { (yyval.flag) = true; } 6430 6420 break; … … 6433 6423 6434 6424 /* Line 1806 of yacc.c */ 6435 #line 9 45"parser.yy"6425 #line 936 "parser.yy" 6436 6426 { (yyval.en) = 0; } 6437 6427 break; … … 6440 6430 6441 6431 /* Line 1806 of yacc.c */ 6442 #line 9 52"parser.yy"6432 #line 943 "parser.yy" 6443 6433 { (yyval.en) = (ExpressionNode *)(yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) ); } 6444 6434 break; … … 6447 6437 6448 6438 /* Line 1806 of yacc.c */ 6439 #line 948 "parser.yy" 6440 { (yyval.en) = new AsmExprNode( 0, (yyvsp[(1) - (4)].constant), (yyvsp[(3) - (4)].en) ); } 6441 break; 6442 6443 case 228: 6444 6445 /* Line 1806 of yacc.c */ 6446 #line 950 "parser.yy" 6447 { (yyval.en) = new AsmExprNode( (yyvsp[(2) - (7)].en), (yyvsp[(4) - (7)].constant), (yyvsp[(6) - (7)].en) ); } 6448 break; 6449 6450 case 229: 6451 6452 /* Line 1806 of yacc.c */ 6453 #line 955 "parser.yy" 6454 { (yyval.constant) = 0; } 6455 break; 6456 6457 case 230: 6458 6459 /* Line 1806 of yacc.c */ 6449 6460 #line 957 "parser.yy" 6450 { (yyval. en) = new AsmExprNode( 0, (yyvsp[(1) - (4)].constant), (yyvsp[(3) - (4)].en)); }6451 break; 6452 6453 case 2 28:6461 { (yyval.constant) = (yyvsp[(1) - (1)].constant); } 6462 break; 6463 6464 case 231: 6454 6465 6455 6466 /* Line 1806 of yacc.c */ 6456 6467 #line 959 "parser.yy" 6457 { (yyval. en) = new AsmExprNode( (yyvsp[(2) - (7)].en), (yyvsp[(4) - (7)].constant), (yyvsp[(6) - (7)].en) ); }6458 break; 6459 6460 case 2 29:6468 { (yyval.constant) = (ConstantNode *)(yyvsp[(1) - (3)].constant)->set_link( (yyvsp[(3) - (3)].constant) ); } 6469 break; 6470 6471 case 232: 6461 6472 6462 6473 /* Line 1806 of yacc.c */ 6463 6474 #line 964 "parser.yy" 6464 { (yyval. constant) = 0; }6465 break; 6466 6467 case 23 0:6475 { (yyval.label) = new LabelNode(); (yyval.label)->append_label( (yyvsp[(1) - (1)].tok) ); } 6476 break; 6477 6478 case 233: 6468 6479 6469 6480 /* Line 1806 of yacc.c */ 6470 6481 #line 966 "parser.yy" 6471 { (yyval.constant) = (yyvsp[(1) - (1)].constant); } 6472 break; 6473 6474 case 231: 6475 6476 /* Line 1806 of yacc.c */ 6477 #line 968 "parser.yy" 6478 { (yyval.constant) = (ConstantNode *)(yyvsp[(1) - (3)].constant)->set_link( (yyvsp[(3) - (3)].constant) ); } 6479 break; 6480 6481 case 232: 6482 { (yyval.label) = (yyvsp[(1) - (3)].label); (yyvsp[(1) - (3)].label)->append_label( (yyvsp[(3) - (3)].tok) ); } 6483 break; 6484 6485 case 234: 6482 6486 6483 6487 /* Line 1806 of yacc.c */ 6484 6488 #line 973 "parser.yy" 6485 { (yyval.label) = new LabelNode(); (yyval.label)->append_label( (yyvsp[(1) - (1)].tok) ); }6486 break;6487 6488 case 233:6489 6490 /* Line 1806 of yacc.c */6491 #line 975 "parser.yy"6492 { (yyval.label) = (yyvsp[(1) - (3)].label); (yyvsp[(1) - (3)].label)->append_label( (yyvsp[(3) - (3)].tok) ); }6493 break;6494 6495 case 234:6496 6497 /* Line 1806 of yacc.c */6498 #line 982 "parser.yy"6499 6489 { (yyval.decl) = 0; } 6500 6490 break; … … 6503 6493 6504 6494 /* Line 1806 of yacc.c */ 6505 #line 98 9"parser.yy"6495 #line 980 "parser.yy" 6506 6496 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 6507 6497 break; … … 6510 6500 6511 6501 /* Line 1806 of yacc.c */ 6512 #line 9 94"parser.yy"6502 #line 985 "parser.yy" 6513 6503 { (yyval.decl) = 0; } 6514 6504 break; … … 6517 6507 6518 6508 /* Line 1806 of yacc.c */ 6519 #line 1001"parser.yy"6509 #line 992 "parser.yy" 6520 6510 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 6521 6511 break; … … 6524 6514 6525 6515 /* Line 1806 of yacc.c */ 6526 #line 10 15"parser.yy"6516 #line 1006 "parser.yy" 6527 6517 {} 6528 6518 break; … … 6531 6521 6532 6522 /* Line 1806 of yacc.c */ 6533 #line 10 16"parser.yy"6523 #line 1007 "parser.yy" 6534 6524 {} 6535 6525 break; … … 6538 6528 6539 6529 /* Line 1806 of yacc.c */ 6540 #line 10 45"parser.yy"6530 #line 1036 "parser.yy" 6541 6531 { 6542 6532 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6548 6538 6549 6539 /* Line 1806 of yacc.c */ 6550 #line 10 52"parser.yy"6540 #line 1043 "parser.yy" 6551 6541 { 6552 6542 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6558 6548 6559 6549 /* Line 1806 of yacc.c */ 6560 #line 10 57"parser.yy"6550 #line 1048 "parser.yy" 6561 6551 { 6562 6552 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (6)].tok), TypedefTable::ID ); … … 6568 6558 6569 6559 /* Line 1806 of yacc.c */ 6570 #line 10 67"parser.yy"6560 #line 1058 "parser.yy" 6571 6561 { 6572 6562 typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) ); … … 6578 6568 6579 6569 /* Line 1806 of yacc.c */ 6580 #line 10 72"parser.yy"6570 #line 1063 "parser.yy" 6581 6571 { 6582 6572 typedefTable.setNextIdentifier( *(yyvsp[(2) - (3)].tok) ); … … 6588 6578 6589 6579 /* Line 1806 of yacc.c */ 6590 #line 10 77"parser.yy"6580 #line 1068 "parser.yy" 6591 6581 { 6592 6582 typedefTable.setNextIdentifier( *(yyvsp[(3) - (4)].tok) ); … … 6598 6588 6599 6589 /* Line 1806 of yacc.c */ 6600 #line 10 85"parser.yy"6590 #line 1076 "parser.yy" 6601 6591 { 6602 6592 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6608 6598 6609 6599 /* Line 1806 of yacc.c */ 6610 #line 10 90"parser.yy"6600 #line 1081 "parser.yy" 6611 6601 { 6612 6602 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6618 6608 6619 6609 /* Line 1806 of yacc.c */ 6620 #line 10 95"parser.yy"6610 #line 1086 "parser.yy" 6621 6611 { 6622 6612 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6628 6618 6629 6619 /* Line 1806 of yacc.c */ 6630 #line 1 100"parser.yy"6620 #line 1091 "parser.yy" 6631 6621 { 6632 6622 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6638 6628 6639 6629 /* Line 1806 of yacc.c */ 6640 #line 1 105"parser.yy"6630 #line 1096 "parser.yy" 6641 6631 { 6642 6632 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::ID ); … … 6648 6638 6649 6639 /* Line 1806 of yacc.c */ 6650 #line 11 13"parser.yy"6640 #line 1104 "parser.yy" 6651 6641 { 6652 6642 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(3) - (8)].tok), DeclarationNode::newTuple( 0 ), (yyvsp[(6) - (8)].decl), 0, true ); … … 6657 6647 6658 6648 /* Line 1806 of yacc.c */ 6659 #line 11 36"parser.yy"6649 #line 1127 "parser.yy" 6660 6650 { 6661 6651 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true ); … … 6666 6656 6667 6657 /* Line 1806 of yacc.c */ 6668 #line 11 40"parser.yy"6658 #line 1131 "parser.yy" 6669 6659 { 6670 6660 (yyval.decl) = DeclarationNode::newFunction( (yyvsp[(2) - (7)].tok), (yyvsp[(1) - (7)].decl), (yyvsp[(5) - (7)].decl), 0, true ); … … 6675 6665 6676 6666 /* Line 1806 of yacc.c */ 6667 #line 1138 "parser.yy" 6668 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); } 6669 break; 6670 6671 case 270: 6672 6673 /* Line 1806 of yacc.c */ 6674 #line 1142 "parser.yy" 6675 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (9)].decl)->appendList( (yyvsp[(7) - (9)].decl) ) ); } 6676 break; 6677 6678 case 271: 6679 6680 /* Line 1806 of yacc.c */ 6677 6681 #line 1147 "parser.yy" 6678 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }6679 break;6680 6681 case 270:6682 6683 /* Line 1806 of yacc.c */6684 #line 1151 "parser.yy"6685 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (9)].decl)->appendList( (yyvsp[(7) - (9)].decl) ) ); }6686 break;6687 6688 case 271:6689 6690 /* Line 1806 of yacc.c */6691 #line 1156 "parser.yy"6692 6682 { 6693 6683 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6699 6689 6700 6690 /* Line 1806 of yacc.c */ 6701 #line 11 61"parser.yy"6691 #line 1152 "parser.yy" 6702 6692 { 6703 6693 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6709 6699 6710 6700 /* Line 1806 of yacc.c */ 6711 #line 11 66"parser.yy"6701 #line 1157 "parser.yy" 6712 6702 { 6713 6703 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (5)].tok), TypedefTable::TD ); … … 6719 6709 6720 6710 /* Line 1806 of yacc.c */ 6721 #line 11 77"parser.yy"6711 #line 1168 "parser.yy" 6722 6712 { 6723 6713 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6729 6719 6730 6720 /* Line 1806 of yacc.c */ 6731 #line 11 82"parser.yy"6721 #line 1173 "parser.yy" 6732 6722 { 6733 6723 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6739 6729 6740 6730 /* Line 1806 of yacc.c */ 6741 #line 11 87"parser.yy"6731 #line 1178 "parser.yy" 6742 6732 { 6743 6733 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6749 6739 6750 6740 /* Line 1806 of yacc.c */ 6751 #line 11 92"parser.yy"6741 #line 1183 "parser.yy" 6752 6742 { 6753 6743 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6759 6749 6760 6750 /* Line 1806 of yacc.c */ 6761 #line 11 97"parser.yy"6751 #line 1188 "parser.yy" 6762 6752 { 6763 6753 typedefTable.addToEnclosingScope( TypedefTable::TD ); … … 6769 6759 6770 6760 /* Line 1806 of yacc.c */ 6771 #line 1 206"parser.yy"6761 #line 1197 "parser.yy" 6772 6762 { 6773 6763 typedefTable.addToEnclosingScope( *(yyvsp[(2) - (4)].tok), TypedefTable::TD ); … … 6779 6769 6780 6770 /* Line 1806 of yacc.c */ 6781 #line 12 11"parser.yy"6771 #line 1202 "parser.yy" 6782 6772 { 6783 6773 typedefTable.addToEnclosingScope( *(yyvsp[(5) - (7)].tok), TypedefTable::TD ); … … 6789 6779 6790 6780 /* Line 1806 of yacc.c */ 6791 #line 12 28"parser.yy"6781 #line 1219 "parser.yy" 6792 6782 { 6793 6783 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6799 6789 6800 6790 /* Line 1806 of yacc.c */ 6801 #line 12 33"parser.yy"6791 #line 1224 "parser.yy" 6802 6792 { 6803 6793 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 6809 6799 6810 6800 /* Line 1806 of yacc.c */ 6811 #line 12 55"parser.yy"6801 #line 1246 "parser.yy" 6812 6802 { (yyval.decl) = 0; } 6813 6803 break; … … 6816 6806 6817 6807 /* Line 1806 of yacc.c */ 6818 #line 12 67"parser.yy"6808 #line 1258 "parser.yy" 6819 6809 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6820 6810 break; … … 6823 6813 6824 6814 /* Line 1806 of yacc.c */ 6825 #line 12 78"parser.yy"6815 #line 1269 "parser.yy" 6826 6816 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Const ); } 6827 6817 break; … … 6830 6820 6831 6821 /* Line 1806 of yacc.c */ 6832 #line 12 80"parser.yy"6822 #line 1271 "parser.yy" 6833 6823 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Restrict ); } 6834 6824 break; … … 6837 6827 6838 6828 /* Line 1806 of yacc.c */ 6839 #line 12 82"parser.yy"6829 #line 1273 "parser.yy" 6840 6830 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Volatile ); } 6841 6831 break; … … 6844 6834 6845 6835 /* Line 1806 of yacc.c */ 6846 #line 12 84"parser.yy"6836 #line 1275 "parser.yy" 6847 6837 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Lvalue ); } 6848 6838 break; … … 6851 6841 6852 6842 /* Line 1806 of yacc.c */ 6853 #line 12 86"parser.yy"6843 #line 1277 "parser.yy" 6854 6844 { (yyval.decl) = DeclarationNode::newQualifier( DeclarationNode::Atomic ); } 6855 6845 break; … … 6858 6848 6859 6849 /* Line 1806 of yacc.c */ 6860 #line 12 88"parser.yy"6850 #line 1279 "parser.yy" 6861 6851 { 6862 6852 typedefTable.enterScope(); … … 6867 6857 6868 6858 /* Line 1806 of yacc.c */ 6869 #line 12 92"parser.yy"6859 #line 1283 "parser.yy" 6870 6860 { 6871 6861 typedefTable.leaveScope(); … … 6877 6867 6878 6868 /* Line 1806 of yacc.c */ 6879 #line 1 301"parser.yy"6869 #line 1292 "parser.yy" 6880 6870 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6881 6871 break; … … 6884 6874 6885 6875 /* Line 1806 of yacc.c */ 6886 #line 1 303"parser.yy"6876 #line 1294 "parser.yy" 6887 6877 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 6888 6878 break; … … 6891 6881 6892 6882 /* Line 1806 of yacc.c */ 6883 #line 1305 "parser.yy" 6884 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6885 break; 6886 6887 case 314: 6888 6889 /* Line 1806 of yacc.c */ 6893 6890 #line 1314 "parser.yy" 6891 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Extern ); } 6892 break; 6893 6894 case 315: 6895 6896 /* Line 1806 of yacc.c */ 6897 #line 1316 "parser.yy" 6898 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Static ); } 6899 break; 6900 6901 case 316: 6902 6903 /* Line 1806 of yacc.c */ 6904 #line 1318 "parser.yy" 6905 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Auto ); } 6906 break; 6907 6908 case 317: 6909 6910 /* Line 1806 of yacc.c */ 6911 #line 1320 "parser.yy" 6912 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Register ); } 6913 break; 6914 6915 case 318: 6916 6917 /* Line 1806 of yacc.c */ 6918 #line 1322 "parser.yy" 6919 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Inline ); } 6920 break; 6921 6922 case 319: 6923 6924 /* Line 1806 of yacc.c */ 6925 #line 1324 "parser.yy" 6926 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); } 6927 break; 6928 6929 case 320: 6930 6931 /* Line 1806 of yacc.c */ 6932 #line 1326 "parser.yy" 6933 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); } 6934 break; 6935 6936 case 321: 6937 6938 /* Line 1806 of yacc.c */ 6939 #line 1328 "parser.yy" 6940 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); } 6941 break; 6942 6943 case 322: 6944 6945 /* Line 1806 of yacc.c */ 6946 #line 1333 "parser.yy" 6947 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); } 6948 break; 6949 6950 case 323: 6951 6952 /* Line 1806 of yacc.c */ 6953 #line 1335 "parser.yy" 6954 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Double ); } 6955 break; 6956 6957 case 324: 6958 6959 /* Line 1806 of yacc.c */ 6960 #line 1337 "parser.yy" 6961 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Float ); } 6962 break; 6963 6964 case 325: 6965 6966 /* Line 1806 of yacc.c */ 6967 #line 1339 "parser.yy" 6968 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Int ); } 6969 break; 6970 6971 case 326: 6972 6973 /* Line 1806 of yacc.c */ 6974 #line 1341 "parser.yy" 6975 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Long ); } 6976 break; 6977 6978 case 327: 6979 6980 /* Line 1806 of yacc.c */ 6981 #line 1343 "parser.yy" 6982 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Short ); } 6983 break; 6984 6985 case 328: 6986 6987 /* Line 1806 of yacc.c */ 6988 #line 1345 "parser.yy" 6989 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Signed ); } 6990 break; 6991 6992 case 329: 6993 6994 /* Line 1806 of yacc.c */ 6995 #line 1347 "parser.yy" 6996 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Unsigned ); } 6997 break; 6998 6999 case 330: 7000 7001 /* Line 1806 of yacc.c */ 7002 #line 1349 "parser.yy" 7003 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Void ); } 7004 break; 7005 7006 case 331: 7007 7008 /* Line 1806 of yacc.c */ 7009 #line 1351 "parser.yy" 7010 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Bool ); } 7011 break; 7012 7013 case 332: 7014 7015 /* Line 1806 of yacc.c */ 7016 #line 1353 "parser.yy" 7017 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Complex ); } 7018 break; 7019 7020 case 333: 7021 7022 /* Line 1806 of yacc.c */ 7023 #line 1355 "parser.yy" 7024 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Imaginary ); } 7025 break; 7026 7027 case 334: 7028 7029 /* Line 1806 of yacc.c */ 7030 #line 1357 "parser.yy" 7031 { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); } 7032 break; 7033 7034 case 336: 7035 7036 /* Line 1806 of yacc.c */ 7037 #line 1364 "parser.yy" 7038 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7039 break; 7040 7041 case 337: 7042 7043 /* Line 1806 of yacc.c */ 7044 #line 1366 "parser.yy" 6894 7045 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 6895 7046 break; 6896 7047 6897 case 314: 6898 6899 /* Line 1806 of yacc.c */ 6900 #line 1323 "parser.yy" 6901 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Extern ); } 6902 break; 6903 6904 case 315: 6905 6906 /* Line 1806 of yacc.c */ 6907 #line 1325 "parser.yy" 6908 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Static ); } 6909 break; 6910 6911 case 316: 6912 6913 /* Line 1806 of yacc.c */ 6914 #line 1327 "parser.yy" 6915 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Auto ); } 6916 break; 6917 6918 case 317: 6919 6920 /* Line 1806 of yacc.c */ 6921 #line 1329 "parser.yy" 6922 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Register ); } 6923 break; 6924 6925 case 318: 6926 6927 /* Line 1806 of yacc.c */ 6928 #line 1331 "parser.yy" 6929 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Inline ); } 6930 break; 6931 6932 case 319: 6933 6934 /* Line 1806 of yacc.c */ 6935 #line 1333 "parser.yy" 6936 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Fortran ); } 6937 break; 6938 6939 case 320: 6940 6941 /* Line 1806 of yacc.c */ 6942 #line 1335 "parser.yy" 6943 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Noreturn ); } 6944 break; 6945 6946 case 321: 6947 6948 /* Line 1806 of yacc.c */ 6949 #line 1337 "parser.yy" 6950 { (yyval.decl) = DeclarationNode::newStorageClass( DeclarationNode::Threadlocal ); } 6951 break; 6952 6953 case 322: 6954 6955 /* Line 1806 of yacc.c */ 6956 #line 1342 "parser.yy" 6957 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Char ); } 6958 break; 6959 6960 case 323: 6961 6962 /* Line 1806 of yacc.c */ 6963 #line 1344 "parser.yy" 6964 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Double ); } 6965 break; 6966 6967 case 324: 6968 6969 /* Line 1806 of yacc.c */ 6970 #line 1346 "parser.yy" 6971 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Float ); } 6972 break; 6973 6974 case 325: 6975 6976 /* Line 1806 of yacc.c */ 6977 #line 1348 "parser.yy" 6978 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Int ); } 6979 break; 6980 6981 case 326: 6982 6983 /* Line 1806 of yacc.c */ 6984 #line 1350 "parser.yy" 6985 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Long ); } 6986 break; 6987 6988 case 327: 6989 6990 /* Line 1806 of yacc.c */ 6991 #line 1352 "parser.yy" 6992 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Short ); } 6993 break; 6994 6995 case 328: 6996 6997 /* Line 1806 of yacc.c */ 6998 #line 1354 "parser.yy" 6999 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Signed ); } 7000 break; 7001 7002 case 329: 7003 7004 /* Line 1806 of yacc.c */ 7005 #line 1356 "parser.yy" 7006 { (yyval.decl) = DeclarationNode::newModifier( DeclarationNode::Unsigned ); } 7007 break; 7008 7009 case 330: 7010 7011 /* Line 1806 of yacc.c */ 7012 #line 1358 "parser.yy" 7013 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Void ); } 7014 break; 7015 7016 case 331: 7017 7018 /* Line 1806 of yacc.c */ 7019 #line 1360 "parser.yy" 7020 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Bool ); } 7021 break; 7022 7023 case 332: 7024 7025 /* Line 1806 of yacc.c */ 7026 #line 1362 "parser.yy" 7027 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Complex ); } 7028 break; 7029 7030 case 333: 7031 7032 /* Line 1806 of yacc.c */ 7033 #line 1364 "parser.yy" 7034 { (yyval.decl) = DeclarationNode::newBasicType( DeclarationNode::Imaginary ); } 7035 break; 7036 7037 case 334: 7038 7039 /* Line 1806 of yacc.c */ 7040 #line 1366 "parser.yy" 7041 { (yyval.decl) = DeclarationNode::newBuiltinType( DeclarationNode::Valist ); } 7042 break; 7043 7044 case 336: 7045 7046 /* Line 1806 of yacc.c */ 7047 #line 1373 "parser.yy" 7048 case 338: 7049 7050 /* Line 1806 of yacc.c */ 7051 #line 1368 "parser.yy" 7052 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7053 break; 7054 7055 case 339: 7056 7057 /* Line 1806 of yacc.c */ 7058 #line 1370 "parser.yy" 7059 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addType( (yyvsp[(1) - (3)].decl) ); } 7060 break; 7061 7062 case 341: 7063 7064 /* Line 1806 of yacc.c */ 7065 #line 1376 "parser.yy" 7066 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7067 break; 7068 7069 case 343: 7070 7071 /* Line 1806 of yacc.c */ 7072 #line 1383 "parser.yy" 7048 7073 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7049 7074 break; 7050 7075 7051 case 3 37:7052 7053 /* Line 1806 of yacc.c */ 7054 #line 13 75 "parser.yy"7076 case 344: 7077 7078 /* Line 1806 of yacc.c */ 7079 #line 1385 "parser.yy" 7055 7080 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7056 7081 break; 7057 7082 7058 case 338: 7059 7060 /* Line 1806 of yacc.c */ 7061 #line 1377 "parser.yy" 7083 case 345: 7084 7085 /* Line 1806 of yacc.c */ 7086 #line 1387 "parser.yy" 7087 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); } 7088 break; 7089 7090 case 346: 7091 7092 /* Line 1806 of yacc.c */ 7093 #line 1392 "parser.yy" 7094 { (yyval.decl) = (yyvsp[(3) - (4)].decl); } 7095 break; 7096 7097 case 347: 7098 7099 /* Line 1806 of yacc.c */ 7100 #line 1394 "parser.yy" 7101 { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); } 7102 break; 7103 7104 case 348: 7105 7106 /* Line 1806 of yacc.c */ 7107 #line 1396 "parser.yy" 7108 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); } 7109 break; 7110 7111 case 349: 7112 7113 /* Line 1806 of yacc.c */ 7114 #line 1398 "parser.yy" 7115 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); } 7116 break; 7117 7118 case 351: 7119 7120 /* Line 1806 of yacc.c */ 7121 #line 1404 "parser.yy" 7122 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7123 break; 7124 7125 case 352: 7126 7127 /* Line 1806 of yacc.c */ 7128 #line 1406 "parser.yy" 7129 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7130 break; 7131 7132 case 353: 7133 7134 /* Line 1806 of yacc.c */ 7135 #line 1408 "parser.yy" 7062 7136 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7063 7137 break; 7064 7138 7065 case 339: 7066 7067 /* Line 1806 of yacc.c */ 7068 #line 1379 "parser.yy" 7069 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addType( (yyvsp[(1) - (3)].decl) ); } 7070 break; 7071 7072 case 341: 7073 7074 /* Line 1806 of yacc.c */ 7075 #line 1385 "parser.yy" 7076 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7077 break; 7078 7079 case 343: 7080 7081 /* Line 1806 of yacc.c */ 7082 #line 1392 "parser.yy" 7139 case 355: 7140 7141 /* Line 1806 of yacc.c */ 7142 #line 1414 "parser.yy" 7083 7143 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7084 7144 break; 7085 7145 7086 case 3 44:7087 7088 /* Line 1806 of yacc.c */ 7089 #line 1 394"parser.yy"7146 case 356: 7147 7148 /* Line 1806 of yacc.c */ 7149 #line 1416 "parser.yy" 7090 7150 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7091 7151 break; 7092 7152 7093 case 345: 7094 7095 /* Line 1806 of yacc.c */ 7096 #line 1396 "parser.yy" 7097 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addType( (yyvsp[(2) - (2)].decl) ); } 7098 break; 7099 7100 case 346: 7101 7102 /* Line 1806 of yacc.c */ 7103 #line 1401 "parser.yy" 7104 { (yyval.decl) = (yyvsp[(3) - (4)].decl); } 7105 break; 7106 7107 case 347: 7108 7109 /* Line 1806 of yacc.c */ 7110 #line 1403 "parser.yy" 7111 { (yyval.decl) = DeclarationNode::newTypeof( (yyvsp[(3) - (4)].en) ); } 7112 break; 7113 7114 case 348: 7115 7116 /* Line 1806 of yacc.c */ 7117 #line 1405 "parser.yy" 7118 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].decl) ); } 7119 break; 7120 7121 case 349: 7122 7123 /* Line 1806 of yacc.c */ 7124 #line 1407 "parser.yy" 7125 { (yyval.decl) = DeclarationNode::newAttr( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); } 7126 break; 7127 7128 case 351: 7129 7130 /* Line 1806 of yacc.c */ 7131 #line 1413 "parser.yy" 7153 case 358: 7154 7155 /* Line 1806 of yacc.c */ 7156 #line 1422 "parser.yy" 7132 7157 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7133 7158 break; 7134 7159 7135 case 35 2:7136 7137 /* Line 1806 of yacc.c */ 7138 #line 14 15"parser.yy"7160 case 359: 7161 7162 /* Line 1806 of yacc.c */ 7163 #line 1424 "parser.yy" 7139 7164 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7140 7165 break; 7141 7166 7142 case 3 53:7143 7144 /* Line 1806 of yacc.c */ 7145 #line 14 17"parser.yy"7167 case 360: 7168 7169 /* Line 1806 of yacc.c */ 7170 #line 1426 "parser.yy" 7146 7171 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7147 7172 break; 7148 7173 7149 case 355: 7150 7151 /* Line 1806 of yacc.c */ 7152 #line 1423 "parser.yy" 7153 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7154 break; 7155 7156 case 356: 7157 7158 /* Line 1806 of yacc.c */ 7159 #line 1425 "parser.yy" 7174 case 361: 7175 7176 /* Line 1806 of yacc.c */ 7177 #line 1431 "parser.yy" 7178 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); } 7179 break; 7180 7181 case 362: 7182 7183 /* Line 1806 of yacc.c */ 7184 #line 1433 "parser.yy" 7185 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7186 break; 7187 7188 case 363: 7189 7190 /* Line 1806 of yacc.c */ 7191 #line 1435 "parser.yy" 7160 7192 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7161 7193 break; 7162 7194 7163 case 358:7164 7165 /* Line 1806 of yacc.c */7166 #line 1431 "parser.yy"7167 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }7168 break;7169 7170 case 359:7171 7172 /* Line 1806 of yacc.c */7173 #line 1433 "parser.yy"7174 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }7175 break;7176 7177 case 360:7178 7179 /* Line 1806 of yacc.c */7180 #line 1435 "parser.yy"7181 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); }7182 break;7183 7184 case 361:7185 7186 /* Line 1806 of yacc.c */7187 #line 1440 "parser.yy"7188 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(1) - (1)].tok) ); }7189 break;7190 7191 case 362:7192 7193 /* Line 1806 of yacc.c */7194 #line 1442 "parser.yy"7195 { (yyval.decl) = DeclarationNode::newFromTypedef( (yyvsp[(2) - (2)].tok) )->addQualifiers( (yyvsp[(1) - (2)].decl) ); }7196 break;7197 7198 case 363:7199 7200 /* Line 1806 of yacc.c */7201 #line 1444 "parser.yy"7202 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }7203 break;7204 7205 7195 case 366: 7206 7196 7207 7197 /* Line 1806 of yacc.c */ 7208 #line 14 54"parser.yy"7198 #line 1445 "parser.yy" 7209 7199 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (4)].aggKey), 0, 0, (yyvsp[(3) - (4)].decl) ); } 7210 7200 break; … … 7213 7203 7214 7204 /* Line 1806 of yacc.c */ 7215 #line 14 56"parser.yy"7205 #line 1447 "parser.yy" 7216 7206 { 7217 7207 typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); … … 7223 7213 7224 7214 /* Line 1806 of yacc.c */ 7225 #line 14 61"parser.yy"7215 #line 1452 "parser.yy" 7226 7216 { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); } 7227 7217 break; … … 7230 7220 7231 7221 /* Line 1806 of yacc.c */ 7222 #line 1454 "parser.yy" 7223 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (6)].aggKey), (yyvsp[(2) - (6)].tok), 0, (yyvsp[(5) - (6)].decl)); } 7224 break; 7225 7226 case 370: 7227 7228 /* Line 1806 of yacc.c */ 7229 #line 1456 "parser.yy" 7230 { (yyval.decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), 0, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl) ); } 7231 break; 7232 7233 case 371: 7234 7235 /* Line 1806 of yacc.c */ 7236 #line 1458 "parser.yy" 7237 { (yyval.decl) = (yyvsp[(2) - (2)].decl); } 7238 break; 7239 7240 case 372: 7241 7242 /* Line 1806 of yacc.c */ 7232 7243 #line 1463 "parser.yy" 7233 { (yyval. decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (6)].aggKey), (yyvsp[(2) - (6)].tok), 0, (yyvsp[(5) - (6)].decl) ); }7234 break; 7235 7236 case 37 0:7244 { (yyval.aggKey) = DeclarationNode::Struct; } 7245 break; 7246 7247 case 373: 7237 7248 7238 7249 /* Line 1806 of yacc.c */ 7239 7250 #line 1465 "parser.yy" 7240 { (yyval. decl) = DeclarationNode::newAggregate( (yyvsp[(1) - (7)].aggKey), 0, (yyvsp[(3) - (7)].en), (yyvsp[(6) - (7)].decl) ); }7241 break; 7242 7243 case 37 1:7244 7245 /* Line 1806 of yacc.c */ 7246 #line 14 67"parser.yy"7247 { (yyval.decl) = (yyvsp[( 2) - (2)].decl); }7248 break; 7249 7250 case 37 2:7251 { (yyval.aggKey) = DeclarationNode::Union; } 7252 break; 7253 7254 case 374: 7255 7256 /* Line 1806 of yacc.c */ 7257 #line 1470 "parser.yy" 7258 { (yyval.decl) = (yyvsp[(1) - (1)].decl); } 7259 break; 7260 7261 case 375: 7251 7262 7252 7263 /* Line 1806 of yacc.c */ 7253 7264 #line 1472 "parser.yy" 7254 { (yyval.aggKey) = DeclarationNode::Struct; } 7255 break; 7256 7257 case 373: 7258 7259 /* Line 1806 of yacc.c */ 7260 #line 1474 "parser.yy" 7261 { (yyval.aggKey) = DeclarationNode::Union; } 7262 break; 7263 7264 case 374: 7265 7266 /* Line 1806 of yacc.c */ 7267 #line 1479 "parser.yy" 7268 { (yyval.decl) = (yyvsp[(1) - (1)].decl); } 7269 break; 7270 7271 case 375: 7265 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ); } 7266 break; 7267 7268 case 377: 7269 7270 /* Line 1806 of yacc.c */ 7271 #line 1478 "parser.yy" 7272 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->set_extension( true ); } 7273 break; 7274 7275 case 379: 7272 7276 7273 7277 /* Line 1806 of yacc.c */ 7274 7278 #line 1481 "parser.yy" 7275 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ); }7276 break;7277 7278 case 377:7279 7280 /* Line 1806 of yacc.c */7281 #line 1487 "parser.yy"7282 { (yyval.decl) = (yyvsp[(2) - (3)].decl)->set_extension( true ); }7283 break;7284 7285 case 379:7286 7287 /* Line 1806 of yacc.c */7288 #line 1490 "parser.yy"7289 7279 { // mark all fields in list 7290 7280 for ( DeclarationNode *iter = (yyvsp[(2) - (3)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) … … 7297 7287 7298 7288 /* Line 1806 of yacc.c */ 7289 #line 1491 "parser.yy" 7290 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addName( (yyvsp[(2) - (2)].tok) ); } 7291 break; 7292 7293 case 382: 7294 7295 /* Line 1806 of yacc.c */ 7296 #line 1493 "parser.yy" 7297 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); } 7298 break; 7299 7300 case 383: 7301 7302 /* Line 1806 of yacc.c */ 7303 #line 1495 "parser.yy" 7304 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) ); } 7305 break; 7306 7307 case 384: 7308 7309 /* Line 1806 of yacc.c */ 7299 7310 #line 1500 "parser.yy" 7300 { (yyval.decl) = (yyvsp[( 1) - (2)].decl)->addName( (yyvsp[(2) - (2)].tok) ); }7301 break; 7302 7303 case 38 2:7311 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7312 break; 7313 7314 case 385: 7304 7315 7305 7316 /* Line 1806 of yacc.c */ 7306 7317 #line 1502 "parser.yy" 7307 { (yyval.decl) = (yyvsp[(1) - ( 3)].decl)->appendList( (yyvsp[(1) - (3)].decl)->cloneType( (yyvsp[(3) - (3)].tok) ) ); }7308 break; 7309 7310 case 38 3:7311 7312 /* Line 1806 of yacc.c */ 7313 #line 150 4"parser.yy"7314 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(1) - (2)].decl)->cloneType( 0 ) );}7315 break; 7316 7317 case 38 4:7318 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(1) - (4)].decl)->cloneBaseType( (yyvsp[(4) - (4)].decl) ) ); } 7319 break; 7320 7321 case 386: 7322 7323 /* Line 1806 of yacc.c */ 7324 #line 1507 "parser.yy" 7325 { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ } 7326 break; 7327 7328 case 387: 7318 7329 7319 7330 /* Line 1806 of yacc.c */ 7320 7331 #line 1509 "parser.yy" 7321 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); }7322 break;7323 7324 case 385:7325 7326 /* Line 1806 of yacc.c */7327 #line 1511 "parser.yy"7328 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(1) - (4)].decl)->cloneBaseType( (yyvsp[(4) - (4)].decl) ) ); }7329 break;7330 7331 case 386:7332 7333 /* Line 1806 of yacc.c */7334 #line 1516 "parser.yy"7335 { (yyval.decl) = DeclarationNode::newName( 0 ); /* XXX */ }7336 break;7337 7338 case 387:7339 7340 /* Line 1806 of yacc.c */7341 #line 1518 "parser.yy"7342 7332 { (yyval.decl) = DeclarationNode::newBitfield( (yyvsp[(1) - (1)].en) ); } 7343 7333 break; … … 7346 7336 7347 7337 /* Line 1806 of yacc.c */ 7338 #line 1512 "parser.yy" 7339 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); } 7340 break; 7341 7342 case 389: 7343 7344 /* Line 1806 of yacc.c */ 7345 #line 1515 "parser.yy" 7346 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); } 7347 break; 7348 7349 case 391: 7350 7351 /* Line 1806 of yacc.c */ 7348 7352 #line 1521 "parser.yy" 7349 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }7350 break;7351 7352 case 389:7353 7354 /* Line 1806 of yacc.c */7355 #line 1524 "parser.yy"7356 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addBitfield( (yyvsp[(2) - (2)].en) ); }7357 break;7358 7359 case 391:7360 7361 /* Line 1806 of yacc.c */7362 #line 1530 "parser.yy"7363 7353 { (yyval.en) = 0; } 7364 7354 break; … … 7367 7357 7368 7358 /* Line 1806 of yacc.c */ 7369 #line 15 32"parser.yy"7359 #line 1523 "parser.yy" 7370 7360 { (yyval.en) = (yyvsp[(1) - (1)].en); } 7371 7361 break; … … 7374 7364 7375 7365 /* Line 1806 of yacc.c */ 7366 #line 1528 "parser.yy" 7367 { (yyval.en) = (yyvsp[(2) - (2)].en); } 7368 break; 7369 7370 case 395: 7371 7372 /* Line 1806 of yacc.c */ 7376 7373 #line 1537 "parser.yy" 7377 { (yyval.en) = (yyvsp[(2) - (2)].en); }7378 break;7379 7380 case 395:7381 7382 /* Line 1806 of yacc.c */7383 #line 1546 "parser.yy"7384 7374 { (yyval.decl) = DeclarationNode::newEnum( 0, (yyvsp[(3) - (5)].decl) ); } 7385 7375 break; … … 7388 7378 7389 7379 /* Line 1806 of yacc.c */ 7390 #line 15 48"parser.yy"7380 #line 1539 "parser.yy" 7391 7381 { 7392 7382 typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); … … 7398 7388 7399 7389 /* Line 1806 of yacc.c */ 7390 #line 1544 "parser.yy" 7391 { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); } 7392 break; 7393 7394 case 398: 7395 7396 /* Line 1806 of yacc.c */ 7397 #line 1546 "parser.yy" 7398 { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(2) - (7)].tok), (yyvsp[(5) - (7)].decl) ); } 7399 break; 7400 7401 case 399: 7402 7403 /* Line 1806 of yacc.c */ 7404 #line 1551 "parser.yy" 7405 { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); } 7406 break; 7407 7408 case 400: 7409 7410 /* Line 1806 of yacc.c */ 7400 7411 #line 1553 "parser.yy" 7401 { typedefTable.makeTypedef( *(yyvsp[(2) - (2)].tok) ); }7402 break; 7403 7404 case 398:7405 7406 /* Line 1806 of yacc.c */ 7407 #line 155 5"parser.yy"7408 { (yyval. decl) = DeclarationNode::newEnum( (yyvsp[(2) - (7)].tok), (yyvsp[(5) - (7)].decl) ); }7409 break; 7410 7411 case 399:7412 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); } 7413 break; 7414 7415 case 401: 7416 7417 /* Line 1806 of yacc.c */ 7418 #line 1558 "parser.yy" 7419 { (yyval.en) = 0; } 7420 break; 7421 7422 case 402: 7412 7423 7413 7424 /* Line 1806 of yacc.c */ 7414 7425 #line 1560 "parser.yy" 7415 { (yyval.decl) = DeclarationNode::newEnumConstant( (yyvsp[(1) - (2)].tok), (yyvsp[(2) - (2)].en) ); } 7416 break; 7417 7418 case 400: 7419 7420 /* Line 1806 of yacc.c */ 7421 #line 1562 "parser.yy" 7422 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( DeclarationNode::newEnumConstant( (yyvsp[(3) - (4)].tok), (yyvsp[(4) - (4)].en) ) ); } 7423 break; 7424 7425 case 401: 7426 { (yyval.en) = (yyvsp[(2) - (2)].en); } 7427 break; 7428 7429 case 403: 7426 7430 7427 7431 /* Line 1806 of yacc.c */ 7428 7432 #line 1567 "parser.yy" 7429 { (yyval.en) = 0; }7430 break;7431 7432 case 402:7433 7434 /* Line 1806 of yacc.c */7435 #line 1569 "parser.yy"7436 { (yyval.en) = (yyvsp[(2) - (2)].en); }7437 break;7438 7439 case 403:7440 7441 /* Line 1806 of yacc.c */7442 #line 1576 "parser.yy"7443 7433 { (yyval.decl) = 0; } 7444 7434 break; … … 7447 7437 7448 7438 /* Line 1806 of yacc.c */ 7449 #line 15 84"parser.yy"7439 #line 1575 "parser.yy" 7450 7440 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7451 7441 break; … … 7454 7444 7455 7445 /* Line 1806 of yacc.c */ 7456 #line 15 86"parser.yy"7446 #line 1577 "parser.yy" 7457 7447 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7458 7448 break; … … 7461 7451 7462 7452 /* Line 1806 of yacc.c */ 7463 #line 15 88"parser.yy"7453 #line 1579 "parser.yy" 7464 7454 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7465 7455 break; … … 7468 7458 7469 7459 /* Line 1806 of yacc.c */ 7470 #line 15 96"parser.yy"7460 #line 1587 "parser.yy" 7471 7461 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7472 7462 break; … … 7475 7465 7476 7466 /* Line 1806 of yacc.c */ 7477 #line 15 98"parser.yy"7467 #line 1589 "parser.yy" 7478 7468 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7479 7469 break; … … 7482 7472 7483 7473 /* Line 1806 of yacc.c */ 7484 #line 1 600"parser.yy"7474 #line 1591 "parser.yy" 7485 7475 { (yyval.decl) = (yyvsp[(1) - (9)].decl)->appendList( (yyvsp[(5) - (9)].decl) )->appendList( (yyvsp[(9) - (9)].decl) ); } 7486 7476 break; … … 7489 7479 7490 7480 /* Line 1806 of yacc.c */ 7491 #line 1 606"parser.yy"7481 #line 1597 "parser.yy" 7492 7482 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7493 7483 break; … … 7496 7486 7497 7487 /* Line 1806 of yacc.c */ 7498 #line 16 11"parser.yy"7488 #line 1602 "parser.yy" 7499 7489 { (yyval.decl) = 0; } 7500 7490 break; … … 7503 7493 7504 7494 /* Line 1806 of yacc.c */ 7495 #line 1609 "parser.yy" 7496 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); } 7497 break; 7498 7499 case 422: 7500 7501 /* Line 1806 of yacc.c */ 7502 #line 1616 "parser.yy" 7503 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7504 break; 7505 7506 case 423: 7507 7508 /* Line 1806 of yacc.c */ 7505 7509 #line 1618 "parser.yy" 7506 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->addVarArgs(); }7507 break;7508 7509 case 422:7510 7511 /* Line 1806 of yacc.c */7512 #line 1625 "parser.yy"7513 7510 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); } 7514 7511 break; 7515 7512 7516 case 42 3:7513 case 425: 7517 7514 7518 7515 /* Line 1806 of yacc.c */ 7519 7516 #line 1627 "parser.yy" 7520 { (yyval.decl) = (yyvsp[(1) - (5)].decl)->appendList( (yyvsp[(5) - (5)].decl) ); }7521 break;7522 7523 case 425:7524 7525 /* Line 1806 of yacc.c */7526 #line 1636 "parser.yy"7527 7517 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); } 7528 7518 break; … … 7531 7521 7532 7522 /* Line 1806 of yacc.c */ 7533 #line 163 9"parser.yy"7523 #line 1630 "parser.yy" 7534 7524 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addName( (yyvsp[(2) - (3)].tok) ); } 7535 7525 break; … … 7538 7528 7539 7529 /* Line 1806 of yacc.c */ 7540 #line 16 41"parser.yy"7530 #line 1632 "parser.yy" 7541 7531 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addName( (yyvsp[(3) - (4)].tok) )->addQualifiers( (yyvsp[(1) - (4)].decl) ); } 7542 7532 break; … … 7545 7535 7546 7536 /* Line 1806 of yacc.c */ 7547 #line 16 51"parser.yy"7537 #line 1642 "parser.yy" 7548 7538 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7549 7539 break; … … 7552 7542 7553 7543 /* Line 1806 of yacc.c */ 7554 #line 16 57"parser.yy"7544 #line 1648 "parser.yy" 7555 7545 { 7556 7546 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7562 7552 7563 7553 /* Line 1806 of yacc.c */ 7564 #line 16 62"parser.yy"7554 #line 1653 "parser.yy" 7565 7555 { 7566 7556 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7572 7562 7573 7563 /* Line 1806 of yacc.c */ 7564 #line 1662 "parser.yy" 7565 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7566 break; 7567 7568 case 438: 7569 7570 /* Line 1806 of yacc.c */ 7574 7571 #line 1671 "parser.yy" 7572 { (yyval.decl) = DeclarationNode::newName( (yyvsp[(1) - (1)].tok) ); } 7573 break; 7574 7575 case 439: 7576 7577 /* Line 1806 of yacc.c */ 7578 #line 1673 "parser.yy" 7579 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( DeclarationNode::newName( (yyvsp[(3) - (3)].tok) ) ); } 7580 break; 7581 7582 case 451: 7583 7584 /* Line 1806 of yacc.c */ 7585 #line 1698 "parser.yy" 7575 7586 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7576 7587 break; 7577 7588 7578 case 438: 7579 7580 /* Line 1806 of yacc.c */ 7581 #line 1680 "parser.yy" 7582 { (yyval.decl) = DeclarationNode::newName( (yyvsp[(1) - (1)].tok) ); } 7583 break; 7584 7585 case 439: 7586 7587 /* Line 1806 of yacc.c */ 7588 #line 1682 "parser.yy" 7589 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( DeclarationNode::newName( (yyvsp[(3) - (3)].tok) ) ); } 7590 break; 7591 7592 case 451: 7593 7594 /* Line 1806 of yacc.c */ 7595 #line 1707 "parser.yy" 7589 case 455: 7590 7591 /* Line 1806 of yacc.c */ 7592 #line 1706 "parser.yy" 7596 7593 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7597 7594 break; 7598 7595 7599 case 455: 7596 case 456: 7597 7598 /* Line 1806 of yacc.c */ 7599 #line 1711 "parser.yy" 7600 { (yyval.in) = 0; } 7601 break; 7602 7603 case 457: 7604 7605 /* Line 1806 of yacc.c */ 7606 #line 1713 "parser.yy" 7607 { (yyval.in) = (yyvsp[(2) - (2)].in); } 7608 break; 7609 7610 case 458: 7600 7611 7601 7612 /* Line 1806 of yacc.c */ 7602 7613 #line 1715 "parser.yy" 7603 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addType( (yyvsp[(1) - (2)].decl) ); } 7604 break; 7605 7606 case 456: 7614 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); } 7615 break; 7616 7617 case 459: 7618 7619 /* Line 1806 of yacc.c */ 7620 #line 1719 "parser.yy" 7621 { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); } 7622 break; 7623 7624 case 460: 7607 7625 7608 7626 /* Line 1806 of yacc.c */ 7609 7627 #line 1720 "parser.yy" 7628 { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); } 7629 break; 7630 7631 case 461: 7632 7633 /* Line 1806 of yacc.c */ 7634 #line 1725 "parser.yy" 7610 7635 { (yyval.in) = 0; } 7611 7636 break; 7612 7637 7613 case 457: 7614 7615 /* Line 1806 of yacc.c */ 7616 #line 1722 "parser.yy" 7617 { (yyval.in) = (yyvsp[(2) - (2)].in); } 7618 break; 7619 7620 case 458: 7621 7622 /* Line 1806 of yacc.c */ 7623 #line 1724 "parser.yy" 7624 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_maybeConstructed( false ); } 7625 break; 7626 7627 case 459: 7638 case 463: 7639 7640 /* Line 1806 of yacc.c */ 7641 #line 1727 "parser.yy" 7642 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); } 7643 break; 7644 7645 case 464: 7628 7646 7629 7647 /* Line 1806 of yacc.c */ 7630 7648 #line 1728 "parser.yy" 7631 { (yyval.in) = new InitializerNode( (yyvsp[(1) - (1)].en) ); }7632 break;7633 7634 case 460:7635 7636 /* Line 1806 of yacc.c */7637 #line 1729 "parser.yy"7638 { (yyval.in) = new InitializerNode( (yyvsp[(2) - (4)].in), true ); }7639 break;7640 7641 case 461:7642 7643 /* Line 1806 of yacc.c */7644 #line 1734 "parser.yy"7645 { (yyval.in) = 0; }7646 break;7647 7648 case 463:7649 7650 /* Line 1806 of yacc.c */7651 #line 1736 "parser.yy"7652 { (yyval.in) = (yyvsp[(2) - (2)].in)->set_designators( (yyvsp[(1) - (2)].en) ); }7653 break;7654 7655 case 464:7656 7657 /* Line 1806 of yacc.c */7658 #line 1737 "parser.yy"7659 7649 { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (3)].in)->set_link( (yyvsp[(3) - (3)].in) ) ); } 7660 7650 break; … … 7663 7653 7664 7654 /* Line 1806 of yacc.c */ 7665 #line 173 9"parser.yy"7655 #line 1730 "parser.yy" 7666 7656 { (yyval.in) = (InitializerNode *)( (yyvsp[(1) - (4)].in)->set_link( (yyvsp[(4) - (4)].in)->set_designators( (yyvsp[(3) - (4)].en) ) ) ); } 7667 7657 break; … … 7670 7660 7671 7661 /* Line 1806 of yacc.c */ 7672 #line 17 55"parser.yy"7662 #line 1746 "parser.yy" 7673 7663 { (yyval.en) = new VarRefNode( (yyvsp[(1) - (2)].tok) ); } 7674 7664 break; … … 7677 7667 7678 7668 /* Line 1806 of yacc.c */ 7679 #line 17 61"parser.yy"7669 #line 1752 "parser.yy" 7680 7670 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (2)].en)->set_link( (yyvsp[(2) - (2)].en) )); } 7681 7671 break; … … 7684 7674 7685 7675 /* Line 1806 of yacc.c */ 7676 #line 1760 "parser.yy" 7677 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(1) - (1)].tok) ) ); } 7678 break; 7679 7680 case 471: 7681 7682 /* Line 1806 of yacc.c */ 7683 #line 1762 "parser.yy" 7684 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(2) - (2)].tok) ) ); } 7685 break; 7686 7687 case 472: 7688 7689 /* Line 1806 of yacc.c */ 7690 #line 1765 "parser.yy" 7691 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); } 7692 break; 7693 7694 case 473: 7695 7696 /* Line 1806 of yacc.c */ 7697 #line 1767 "parser.yy" 7698 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); } 7699 break; 7700 7701 case 474: 7702 7703 /* Line 1806 of yacc.c */ 7686 7704 #line 1769 "parser.yy" 7687 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(1) - (1)].tok) )); }7688 break; 7689 7690 case 47 1:7705 { (yyval.en) = new DesignatorNode( new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].en) ), true ); } 7706 break; 7707 7708 case 475: 7691 7709 7692 7710 /* Line 1806 of yacc.c */ 7693 7711 #line 1771 "parser.yy" 7694 { (yyval.en) = new DesignatorNode( new VarRefNode( (yyvsp[(2) - (2)].tok) ) ); }7695 break;7696 7697 case 472:7698 7699 /* Line 1806 of yacc.c */7700 #line 1774 "parser.yy"7701 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); }7702 break;7703 7704 case 473:7705 7706 /* Line 1806 of yacc.c */7707 #line 1776 "parser.yy"7708 { (yyval.en) = new DesignatorNode( (yyvsp[(3) - (5)].en), true ); }7709 break;7710 7711 case 474:7712 7713 /* Line 1806 of yacc.c */7714 #line 1778 "parser.yy"7715 { (yyval.en) = new DesignatorNode( new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(3) - (7)].en), (yyvsp[(5) - (7)].en) ), true ); }7716 break;7717 7718 case 475:7719 7720 /* Line 1806 of yacc.c */7721 #line 1780 "parser.yy"7722 7712 { (yyval.en) = new DesignatorNode( (yyvsp[(4) - (6)].en) ); } 7723 7713 break; … … 7726 7716 7727 7717 /* Line 1806 of yacc.c */ 7728 #line 1 804"parser.yy"7718 #line 1795 "parser.yy" 7729 7719 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7730 7720 break; … … 7733 7723 7734 7724 /* Line 1806 of yacc.c */ 7735 #line 1 806"parser.yy"7725 #line 1797 "parser.yy" 7736 7726 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7737 7727 break; … … 7740 7730 7741 7731 /* Line 1806 of yacc.c */ 7742 #line 1 808"parser.yy"7732 #line 1799 "parser.yy" 7743 7733 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->addQualifiers( (yyvsp[(2) - (3)].decl) )->addQualifiers( (yyvsp[(3) - (3)].decl) ); } 7744 7734 break; … … 7747 7737 7748 7738 /* Line 1806 of yacc.c */ 7749 #line 18 14"parser.yy"7739 #line 1805 "parser.yy" 7750 7740 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7751 7741 break; … … 7754 7744 7755 7745 /* Line 1806 of yacc.c */ 7756 #line 18 16"parser.yy"7746 #line 1807 "parser.yy" 7757 7747 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 7758 7748 break; … … 7761 7751 7762 7752 /* Line 1806 of yacc.c */ 7763 #line 18 21"parser.yy"7753 #line 1812 "parser.yy" 7764 7754 { (yyval.decl) = DeclarationNode::newFromTypeGen( (yyvsp[(1) - (4)].tok), (yyvsp[(3) - (4)].en) ); } 7765 7755 break; … … 7768 7758 7769 7759 /* Line 1806 of yacc.c */ 7770 #line 18 27"parser.yy"7760 #line 1818 "parser.yy" 7771 7761 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->appendList( (yyvsp[(3) - (4)].decl) ); } 7772 7762 break; … … 7775 7765 7776 7766 /* Line 1806 of yacc.c */ 7777 #line 18 32"parser.yy"7767 #line 1823 "parser.yy" 7778 7768 { typedefTable.addToEnclosingScope( *(yyvsp[(2) - (2)].tok), TypedefTable::TD ); } 7779 7769 break; … … 7782 7772 7783 7773 /* Line 1806 of yacc.c */ 7784 #line 18 34"parser.yy"7774 #line 1825 "parser.yy" 7785 7775 { (yyval.decl) = DeclarationNode::newTypeParam( (yyvsp[(1) - (4)].tclass), (yyvsp[(2) - (4)].tok) )->addAssertions( (yyvsp[(4) - (4)].decl) ); } 7786 7776 break; … … 7789 7779 7790 7780 /* Line 1806 of yacc.c */ 7781 #line 1831 "parser.yy" 7782 { (yyval.tclass) = DeclarationNode::Type; } 7783 break; 7784 7785 case 490: 7786 7787 /* Line 1806 of yacc.c */ 7788 #line 1833 "parser.yy" 7789 { (yyval.tclass) = DeclarationNode::Ftype; } 7790 break; 7791 7792 case 491: 7793 7794 /* Line 1806 of yacc.c */ 7795 #line 1835 "parser.yy" 7796 { (yyval.tclass) = DeclarationNode::Dtype; } 7797 break; 7798 7799 case 492: 7800 7801 /* Line 1806 of yacc.c */ 7791 7802 #line 1840 "parser.yy" 7792 { (yyval. tclass) = DeclarationNode::Type; }7793 break; 7794 7795 case 49 0:7803 { (yyval.decl) = 0; } 7804 break; 7805 7806 case 493: 7796 7807 7797 7808 /* Line 1806 of yacc.c */ 7798 7809 #line 1842 "parser.yy" 7799 { (yyval.tclass) = DeclarationNode::Ftype; } 7800 break; 7801 7802 case 491: 7803 7804 /* Line 1806 of yacc.c */ 7805 #line 1844 "parser.yy" 7806 { (yyval.tclass) = DeclarationNode::Dtype; } 7807 break; 7808 7809 case 492: 7810 7811 /* Line 1806 of yacc.c */ 7812 #line 1849 "parser.yy" 7813 { (yyval.decl) = 0; } 7814 break; 7815 7816 case 493: 7817 7818 /* Line 1806 of yacc.c */ 7819 #line 1851 "parser.yy" 7820 { (yyval.decl) = (yyvsp[(1) - (2)].decl) != 0 ? (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ) : (yyvsp[(2) - (2)].decl); } 7810 { (yyval.decl) = (yyvsp[(1) - (2)].decl) == 0 ? (yyvsp[(2) - (2)].decl) : (yyvsp[(1) - (2)].decl)->appendList( (yyvsp[(2) - (2)].decl) ); } 7821 7811 break; 7822 7812 … … 7824 7814 7825 7815 /* Line 1806 of yacc.c */ 7826 #line 18 56"parser.yy"7816 #line 1847 "parser.yy" 7827 7817 { 7828 7818 typedefTable.openTrait( *(yyvsp[(2) - (5)].tok) ); … … 7834 7824 7835 7825 /* Line 1806 of yacc.c */ 7836 #line 18 61"parser.yy"7826 #line 1852 "parser.yy" 7837 7827 { (yyval.decl) = (yyvsp[(4) - (5)].decl); } 7838 7828 break; … … 7841 7831 7842 7832 /* Line 1806 of yacc.c */ 7843 #line 18 63"parser.yy"7833 #line 1854 "parser.yy" 7844 7834 { (yyval.decl) = 0; } 7845 7835 break; … … 7848 7838 7849 7839 /* Line 1806 of yacc.c */ 7850 #line 18 68"parser.yy"7840 #line 1859 "parser.yy" 7851 7841 { (yyval.en) = new TypeValueNode( (yyvsp[(1) - (1)].decl) ); } 7852 7842 break; … … 7855 7845 7856 7846 /* Line 1806 of yacc.c */ 7847 #line 1862 "parser.yy" 7848 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( new TypeValueNode( (yyvsp[(3) - (3)].decl) ))); } 7849 break; 7850 7851 case 500: 7852 7853 /* Line 1806 of yacc.c */ 7854 #line 1864 "parser.yy" 7855 { (yyval.en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) )); } 7856 break; 7857 7858 case 501: 7859 7860 /* Line 1806 of yacc.c */ 7861 #line 1869 "parser.yy" 7862 { (yyval.decl) = (yyvsp[(2) - (2)].decl); } 7863 break; 7864 7865 case 502: 7866 7867 /* Line 1806 of yacc.c */ 7857 7868 #line 1871 "parser.yy" 7858 { (yyval. en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( new TypeValueNode( (yyvsp[(3) - (3)].decl) ))); }7859 break; 7860 7861 case 50 0:7869 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); } 7870 break; 7871 7872 case 503: 7862 7873 7863 7874 /* Line 1806 of yacc.c */ 7864 7875 #line 1873 "parser.yy" 7865 { (yyval. en) = (ExpressionNode *)( (yyvsp[(1) - (3)].en)->set_link( (yyvsp[(3) - (3)].en) )); }7866 break; 7867 7868 case 50 1:7876 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); } 7877 break; 7878 7879 case 504: 7869 7880 7870 7881 /* Line 1806 of yacc.c */ 7871 7882 #line 1878 "parser.yy" 7872 { (yyval.decl) = (yyvsp[( 2) - (2)].decl); }7873 break; 7874 7875 case 50 2:7883 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); } 7884 break; 7885 7886 case 505: 7876 7887 7877 7888 /* Line 1806 of yacc.c */ 7878 7889 #line 1880 "parser.yy" 7879 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addQualifiers( (yyvsp[(1) - (3)].decl) ); }7880 break;7881 7882 case 503:7883 7884 /* Line 1806 of yacc.c */7885 #line 1882 "parser.yy"7886 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl)->copyStorageClasses( (yyvsp[(1) - (3)].decl) ) ); }7887 break;7888 7889 case 504:7890 7891 /* Line 1806 of yacc.c */7892 #line 1887 "parser.yy"7893 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addAssertions( (yyvsp[(2) - (2)].decl) ); }7894 break;7895 7896 case 505:7897 7898 /* Line 1806 of yacc.c */7899 #line 1889 "parser.yy"7900 7890 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addAssertions( (yyvsp[(2) - (4)].decl) )->addType( (yyvsp[(4) - (4)].decl) ); } 7901 7891 break; … … 7904 7894 7905 7895 /* Line 1806 of yacc.c */ 7906 #line 18 94"parser.yy"7896 #line 1885 "parser.yy" 7907 7897 { 7908 7898 typedefTable.addToEnclosingScope( *(yyvsp[(1) - (1)].tok), TypedefTable::TD ); … … 7914 7904 7915 7905 /* Line 1806 of yacc.c */ 7916 #line 189 9"parser.yy"7906 #line 1890 "parser.yy" 7917 7907 { 7918 7908 typedefTable.addToEnclosingScope( *(yyvsp[(1) - (6)].tok), TypedefTable::TG ); … … 7924 7914 7925 7915 /* Line 1806 of yacc.c */ 7926 #line 1 907"parser.yy"7916 #line 1898 "parser.yy" 7927 7917 { 7928 7918 typedefTable.addToEnclosingScope( *(yyvsp[(2) - (9)].tok), TypedefTable::ID ); … … 7934 7924 7935 7925 /* Line 1806 of yacc.c */ 7936 #line 19 12"parser.yy"7926 #line 1903 "parser.yy" 7937 7927 { 7938 7928 typedefTable.enterTrait( *(yyvsp[(2) - (8)].tok) ); … … 7944 7934 7945 7935 /* Line 1806 of yacc.c */ 7946 #line 19 17"parser.yy"7936 #line 1908 "parser.yy" 7947 7937 { 7948 7938 typedefTable.leaveTrait(); … … 7955 7945 7956 7946 /* Line 1806 of yacc.c */ 7957 #line 19 27"parser.yy"7947 #line 1918 "parser.yy" 7958 7948 { (yyval.decl) = (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ); } 7959 7949 break; … … 7962 7952 7963 7953 /* Line 1806 of yacc.c */ 7964 #line 19 37"parser.yy"7954 #line 1928 "parser.yy" 7965 7955 { 7966 7956 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7972 7962 7973 7963 /* Line 1806 of yacc.c */ 7974 #line 19 42"parser.yy"7964 #line 1933 "parser.yy" 7975 7965 { 7976 7966 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 7982 7972 7983 7973 /* Line 1806 of yacc.c */ 7984 #line 19 47"parser.yy"7974 #line 1938 "parser.yy" 7985 7975 { 7986 7976 typedefTable.addToEnclosingScope2( *(yyvsp[(5) - (5)].tok), TypedefTable::ID ); … … 7992 7982 7993 7983 /* Line 1806 of yacc.c */ 7994 #line 19 55"parser.yy"7984 #line 1946 "parser.yy" 7995 7985 { 7996 7986 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 8002 7992 8003 7993 /* Line 1806 of yacc.c */ 8004 #line 19 60"parser.yy"7994 #line 1951 "parser.yy" 8005 7995 { 8006 7996 typedefTable.addToEnclosingScope2( TypedefTable::ID ); … … 8012 8002 8013 8003 /* Line 1806 of yacc.c */ 8014 #line 19 70"parser.yy"8004 #line 1961 "parser.yy" 8015 8005 {} 8016 8006 break; … … 8019 8009 8020 8010 /* Line 1806 of yacc.c */ 8021 #line 19 72"parser.yy"8011 #line 1963 "parser.yy" 8022 8012 { 8023 8013 if ( theTree ) { … … 8032 8022 8033 8023 /* Line 1806 of yacc.c */ 8034 #line 19 84"parser.yy"8024 #line 1975 "parser.yy" 8035 8025 { (yyval.decl) = ( (yyvsp[(1) - (3)].decl) != NULL ) ? (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ) : (yyvsp[(3) - (3)].decl); } 8036 8026 break; … … 8039 8029 8040 8030 /* Line 1806 of yacc.c */ 8041 #line 198 9"parser.yy"8031 #line 1980 "parser.yy" 8042 8032 { (yyval.decl) = 0; } 8043 8033 break; … … 8046 8036 8047 8037 /* Line 1806 of yacc.c */ 8048 #line 19 97"parser.yy"8038 #line 1988 "parser.yy" 8049 8039 {} 8050 8040 break; … … 8053 8043 8054 8044 /* Line 1806 of yacc.c */ 8055 #line 199 9"parser.yy"8045 #line 1990 "parser.yy" 8056 8046 { 8057 8047 linkageStack.push( linkage ); … … 8063 8053 8064 8054 /* Line 1806 of yacc.c */ 8065 #line 2004"parser.yy"8055 #line 1995 "parser.yy" 8066 8056 { 8067 8057 linkage = linkageStack.top(); … … 8074 8064 8075 8065 /* Line 1806 of yacc.c */ 8076 #line 20 10"parser.yy"8066 #line 2001 "parser.yy" 8077 8067 { // mark all fields in list 8078 8068 for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_link() ) … … 8085 8075 8086 8076 /* Line 1806 of yacc.c */ 8087 #line 20 25"parser.yy"8077 #line 2016 "parser.yy" 8088 8078 { 8089 8079 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8096 8086 8097 8087 /* Line 1806 of yacc.c */ 8098 #line 20 31"parser.yy"8088 #line 2022 "parser.yy" 8099 8089 { 8100 8090 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8107 8097 8108 8098 /* Line 1806 of yacc.c */ 8109 #line 20 40"parser.yy"8099 #line 2031 "parser.yy" 8110 8100 { 8111 8101 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8118 8108 8119 8109 /* Line 1806 of yacc.c */ 8120 #line 20 46"parser.yy"8110 #line 2037 "parser.yy" 8121 8111 { 8122 8112 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8129 8119 8130 8120 /* Line 1806 of yacc.c */ 8131 #line 20 52"parser.yy"8121 #line 2043 "parser.yy" 8132 8122 { 8133 8123 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8140 8130 8141 8131 /* Line 1806 of yacc.c */ 8142 #line 20 58"parser.yy"8132 #line 2049 "parser.yy" 8143 8133 { 8144 8134 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8151 8141 8152 8142 /* Line 1806 of yacc.c */ 8153 #line 20 64"parser.yy"8143 #line 2055 "parser.yy" 8154 8144 { 8155 8145 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8162 8152 8163 8153 /* Line 1806 of yacc.c */ 8164 #line 20 72"parser.yy"8154 #line 2063 "parser.yy" 8165 8155 { 8166 8156 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8173 8163 8174 8164 /* Line 1806 of yacc.c */ 8175 #line 20 78"parser.yy"8165 #line 2069 "parser.yy" 8176 8166 { 8177 8167 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8184 8174 8185 8175 /* Line 1806 of yacc.c */ 8186 #line 20 86"parser.yy"8176 #line 2077 "parser.yy" 8187 8177 { 8188 8178 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8195 8185 8196 8186 /* Line 1806 of yacc.c */ 8197 #line 20 92"parser.yy"8187 #line 2083 "parser.yy" 8198 8188 { 8199 8189 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 8206 8196 8207 8197 /* Line 1806 of yacc.c */ 8208 #line 2 107"parser.yy"8198 #line 2098 "parser.yy" 8209 8199 { (yyval.en) = new CompositeExprNode( new OperatorNode( OperatorNode::Range ), (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ); } 8210 8200 break; … … 8213 8203 8214 8204 /* Line 1806 of yacc.c */ 8215 #line 21 17"parser.yy"8205 #line 2108 "parser.yy" 8216 8206 { (yyval.decl) = 0; } 8217 8207 break; … … 8220 8210 8221 8211 /* Line 1806 of yacc.c */ 8222 #line 21 24"parser.yy"8212 #line 2115 "parser.yy" 8223 8213 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 8224 8214 break; … … 8227 8217 8228 8218 /* Line 1806 of yacc.c */ 8229 #line 21 30"parser.yy"8219 #line 2121 "parser.yy" 8230 8220 { (yyval.decl) = 0; } 8231 8221 break; … … 8234 8224 8235 8225 /* Line 1806 of yacc.c */ 8236 #line 21 45"parser.yy"8226 #line 2136 "parser.yy" 8237 8227 {} 8238 8228 break; … … 8241 8231 8242 8232 /* Line 1806 of yacc.c */ 8243 #line 21 46"parser.yy"8233 #line 2137 "parser.yy" 8244 8234 {} 8245 8235 break; … … 8248 8238 8249 8239 /* Line 1806 of yacc.c */ 8250 #line 21 47"parser.yy"8240 #line 2138 "parser.yy" 8251 8241 {} 8252 8242 break; … … 8255 8245 8256 8246 /* Line 1806 of yacc.c */ 8257 #line 21 48"parser.yy"8247 #line 2139 "parser.yy" 8258 8248 {} 8259 8249 break; … … 8262 8252 8263 8253 /* Line 1806 of yacc.c */ 8264 #line 21 83"parser.yy"8254 #line 2174 "parser.yy" 8265 8255 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8266 8256 break; … … 8269 8259 8270 8260 /* Line 1806 of yacc.c */ 8271 #line 21 86"parser.yy"8261 #line 2177 "parser.yy" 8272 8262 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8273 8263 break; … … 8276 8266 8277 8267 /* Line 1806 of yacc.c */ 8278 #line 21 88"parser.yy"8268 #line 2179 "parser.yy" 8279 8269 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8280 8270 break; … … 8283 8273 8284 8274 /* Line 1806 of yacc.c */ 8285 #line 21 93"parser.yy"8275 #line 2184 "parser.yy" 8286 8276 { 8287 8277 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8293 8283 8294 8284 /* Line 1806 of yacc.c */ 8285 #line 2189 "parser.yy" 8286 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8287 break; 8288 8289 case 570: 8290 8291 /* Line 1806 of yacc.c */ 8292 #line 2194 "parser.yy" 8293 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8294 break; 8295 8296 case 571: 8297 8298 /* Line 1806 of yacc.c */ 8299 #line 2196 "parser.yy" 8300 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8301 break; 8302 8303 case 572: 8304 8305 /* Line 1806 of yacc.c */ 8295 8306 #line 2198 "parser.yy" 8296 8307 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8297 8308 break; 8298 8309 8299 case 57 0:8310 case 573: 8300 8311 8301 8312 /* Line 1806 of yacc.c */ 8302 8313 #line 2203 "parser.yy" 8314 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8315 break; 8316 8317 case 574: 8318 8319 /* Line 1806 of yacc.c */ 8320 #line 2205 "parser.yy" 8321 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8322 break; 8323 8324 case 575: 8325 8326 /* Line 1806 of yacc.c */ 8327 #line 2207 "parser.yy" 8328 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8329 break; 8330 8331 case 576: 8332 8333 /* Line 1806 of yacc.c */ 8334 #line 2209 "parser.yy" 8335 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8336 break; 8337 8338 case 577: 8339 8340 /* Line 1806 of yacc.c */ 8341 #line 2214 "parser.yy" 8342 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8343 break; 8344 8345 case 578: 8346 8347 /* Line 1806 of yacc.c */ 8348 #line 2216 "parser.yy" 8349 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8350 break; 8351 8352 case 579: 8353 8354 /* Line 1806 of yacc.c */ 8355 #line 2225 "parser.yy" 8356 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8357 break; 8358 8359 case 581: 8360 8361 /* Line 1806 of yacc.c */ 8362 #line 2228 "parser.yy" 8363 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8364 break; 8365 8366 case 582: 8367 8368 /* Line 1806 of yacc.c */ 8369 #line 2233 "parser.yy" 8370 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8371 break; 8372 8373 case 583: 8374 8375 /* Line 1806 of yacc.c */ 8376 #line 2235 "parser.yy" 8377 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8378 break; 8379 8380 case 584: 8381 8382 /* Line 1806 of yacc.c */ 8383 #line 2237 "parser.yy" 8384 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8385 break; 8386 8387 case 585: 8388 8389 /* Line 1806 of yacc.c */ 8390 #line 2242 "parser.yy" 8303 8391 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8304 8392 break; 8305 8393 8306 case 5 71:8307 8308 /* Line 1806 of yacc.c */ 8309 #line 22 05"parser.yy"8394 case 586: 8395 8396 /* Line 1806 of yacc.c */ 8397 #line 2244 "parser.yy" 8310 8398 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8311 8399 break; 8312 8400 8313 case 572: 8314 8315 /* Line 1806 of yacc.c */ 8316 #line 2207 "parser.yy" 8317 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8318 break; 8319 8320 case 573: 8321 8322 /* Line 1806 of yacc.c */ 8323 #line 2212 "parser.yy" 8324 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8325 break; 8326 8327 case 574: 8328 8329 /* Line 1806 of yacc.c */ 8330 #line 2214 "parser.yy" 8331 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8332 break; 8333 8334 case 575: 8335 8336 /* Line 1806 of yacc.c */ 8337 #line 2216 "parser.yy" 8338 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8339 break; 8340 8341 case 576: 8342 8343 /* Line 1806 of yacc.c */ 8344 #line 2218 "parser.yy" 8345 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8346 break; 8347 8348 case 577: 8349 8350 /* Line 1806 of yacc.c */ 8351 #line 2223 "parser.yy" 8352 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8353 break; 8354 8355 case 578: 8356 8357 /* Line 1806 of yacc.c */ 8358 #line 2225 "parser.yy" 8359 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8360 break; 8361 8362 case 579: 8363 8364 /* Line 1806 of yacc.c */ 8365 #line 2234 "parser.yy" 8366 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8367 break; 8368 8369 case 581: 8370 8371 /* Line 1806 of yacc.c */ 8372 #line 2237 "parser.yy" 8373 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8374 break; 8375 8376 case 582: 8377 8378 /* Line 1806 of yacc.c */ 8379 #line 2242 "parser.yy" 8380 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8381 break; 8382 8383 case 583: 8384 8385 /* Line 1806 of yacc.c */ 8386 #line 2244 "parser.yy" 8387 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8388 break; 8389 8390 case 584: 8401 case 587: 8391 8402 8392 8403 /* Line 1806 of yacc.c */ … … 8395 8406 break; 8396 8407 8397 case 58 5:8408 case 588: 8398 8409 8399 8410 /* Line 1806 of yacc.c */ 8400 8411 #line 2251 "parser.yy" 8401 { (yyval.decl) = (yyvsp[(2) - ( 2)].decl)->addPointer( DeclarationNode::newPointer( 0) ); }8402 break; 8403 8404 case 58 6:8412 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8413 break; 8414 8415 case 589: 8405 8416 8406 8417 /* Line 1806 of yacc.c */ 8407 8418 #line 2253 "parser.yy" 8408 { (yyval.decl) = (yyvsp[( 3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl)) ); }8409 break; 8410 8411 case 5 87:8419 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8420 break; 8421 8422 case 590: 8412 8423 8413 8424 /* Line 1806 of yacc.c */ … … 8416 8427 break; 8417 8428 8418 case 5 88:8419 8420 /* Line 1806 of yacc.c */ 8421 #line 22 60 "parser.yy"8422 { (yyval.decl) = (yyvsp[( 2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8423 break; 8424 8425 case 5 89:8426 8427 /* Line 1806 of yacc.c */ 8428 #line 22 62 "parser.yy"8429 { (yyval.decl) = (yyvsp[(2) - ( 4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8430 break; 8431 8432 case 59 0:8433 8434 /* Line 1806 of yacc.c */ 8435 #line 22 64 "parser.yy"8429 case 594: 8430 8431 /* Line 1806 of yacc.c */ 8432 #line 2270 "parser.yy" 8433 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); } 8434 break; 8435 8436 case 595: 8437 8438 /* Line 1806 of yacc.c */ 8439 #line 2272 "parser.yy" 8440 { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); } 8441 break; 8442 8443 case 596: 8444 8445 /* Line 1806 of yacc.c */ 8446 #line 2274 "parser.yy" 8436 8447 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8437 8448 break; 8438 8449 8439 case 59 4:8450 case 597: 8440 8451 8441 8452 /* Line 1806 of yacc.c */ 8442 8453 #line 2279 "parser.yy" 8443 { (yyval.decl) = (yyvsp[( 1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); }8444 break; 8445 8446 case 59 5:8454 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8455 break; 8456 8457 case 598: 8447 8458 8448 8459 /* Line 1806 of yacc.c */ 8449 8460 #line 2281 "parser.yy" 8450 { (yyval.decl) = (yyvsp[( 2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); }8451 break; 8452 8453 case 59 6:8461 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8462 break; 8463 8464 case 599: 8454 8465 8455 8466 /* Line 1806 of yacc.c */ … … 8458 8469 break; 8459 8470 8460 case 597:8471 case 600: 8461 8472 8462 8473 /* Line 1806 of yacc.c */ 8463 8474 #line 2288 "parser.yy" 8464 { (yyval.decl) = (yyvsp[(2) - ( 2)].decl)->addPointer( DeclarationNode::newPointer( 0) ); }8465 break; 8466 8467 case 598:8475 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8476 break; 8477 8478 case 601: 8468 8479 8469 8480 /* Line 1806 of yacc.c */ 8470 8481 #line 2290 "parser.yy" 8471 { (yyval.decl) = (yyvsp[( 3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl)) ); }8472 break; 8473 8474 case 599:8482 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8483 break; 8484 8485 case 602: 8475 8486 8476 8487 /* Line 1806 of yacc.c */ … … 8479 8490 break; 8480 8491 8481 case 600: 8482 8483 /* Line 1806 of yacc.c */ 8484 #line 2297 "parser.yy" 8485 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8486 break; 8487 8488 case 601: 8489 8490 /* Line 1806 of yacc.c */ 8491 #line 2299 "parser.yy" 8492 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8493 break; 8494 8495 case 602: 8496 8497 /* Line 1806 of yacc.c */ 8498 #line 2301 "parser.yy" 8492 case 603: 8493 8494 /* Line 1806 of yacc.c */ 8495 #line 2307 "parser.yy" 8496 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8497 break; 8498 8499 case 605: 8500 8501 /* Line 1806 of yacc.c */ 8502 #line 2310 "parser.yy" 8503 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8504 break; 8505 8506 case 606: 8507 8508 /* Line 1806 of yacc.c */ 8509 #line 2312 "parser.yy" 8510 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8511 break; 8512 8513 case 608: 8514 8515 /* Line 1806 of yacc.c */ 8516 #line 2318 "parser.yy" 8499 8517 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8500 8518 break; 8501 8519 8502 case 603: 8503 8504 /* Line 1806 of yacc.c */ 8505 #line 2316 "parser.yy" 8506 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8507 break; 8508 8509 case 605: 8510 8511 /* Line 1806 of yacc.c */ 8512 #line 2319 "parser.yy" 8513 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8514 break; 8515 8516 case 606: 8517 8518 /* Line 1806 of yacc.c */ 8519 #line 2321 "parser.yy" 8520 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8521 break; 8522 8523 case 608: 8520 case 609: 8521 8522 /* Line 1806 of yacc.c */ 8523 #line 2323 "parser.yy" 8524 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8525 break; 8526 8527 case 610: 8528 8529 /* Line 1806 of yacc.c */ 8530 #line 2325 "parser.yy" 8531 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8532 break; 8533 8534 case 611: 8524 8535 8525 8536 /* Line 1806 of yacc.c */ … … 8528 8539 break; 8529 8540 8530 case 6 09:8541 case 612: 8531 8542 8532 8543 /* Line 1806 of yacc.c */ 8533 8544 #line 2332 "parser.yy" 8534 { (yyval.decl) = (yyvsp[( 2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0) ); }8535 break; 8536 8537 case 61 0:8545 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8546 break; 8547 8548 case 613: 8538 8549 8539 8550 /* Line 1806 of yacc.c */ 8540 8551 #line 2334 "parser.yy" 8541 { (yyval.decl) = (yyvsp[( 3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl)) ); }8542 break; 8543 8544 case 61 1:8552 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8553 break; 8554 8555 case 614: 8545 8556 8546 8557 /* Line 1806 of yacc.c */ 8547 8558 #line 2336 "parser.yy" 8559 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8560 break; 8561 8562 case 615: 8563 8564 /* Line 1806 of yacc.c */ 8565 #line 2338 "parser.yy" 8548 8566 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8549 8567 break; 8550 8568 8551 case 612: 8552 8553 /* Line 1806 of yacc.c */ 8554 #line 2341 "parser.yy" 8555 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8556 break; 8557 8558 case 613: 8569 case 616: 8559 8570 8560 8571 /* Line 1806 of yacc.c */ 8561 8572 #line 2343 "parser.yy" 8562 { (yyval.decl) = (yyvsp[( 2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8563 break; 8564 8565 case 61 4:8573 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8574 break; 8575 8576 case 617: 8566 8577 8567 8578 /* Line 1806 of yacc.c */ 8568 8579 #line 2345 "parser.yy" 8569 { (yyval.decl) = (yyvsp[(2) - ( 4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8570 break; 8571 8572 case 61 5:8580 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8581 break; 8582 8583 case 618: 8573 8584 8574 8585 /* Line 1806 of yacc.c */ … … 8577 8588 break; 8578 8589 8579 case 616: 8580 8581 /* Line 1806 of yacc.c */ 8582 #line 2352 "parser.yy" 8590 case 619: 8591 8592 /* Line 1806 of yacc.c */ 8593 #line 2357 "parser.yy" 8594 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8595 break; 8596 8597 case 621: 8598 8599 /* Line 1806 of yacc.c */ 8600 #line 2360 "parser.yy" 8601 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8602 break; 8603 8604 case 622: 8605 8606 /* Line 1806 of yacc.c */ 8607 #line 2362 "parser.yy" 8608 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8609 break; 8610 8611 case 623: 8612 8613 /* Line 1806 of yacc.c */ 8614 #line 2367 "parser.yy" 8615 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8616 break; 8617 8618 case 624: 8619 8620 /* Line 1806 of yacc.c */ 8621 #line 2369 "parser.yy" 8622 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8623 break; 8624 8625 case 625: 8626 8627 /* Line 1806 of yacc.c */ 8628 #line 2371 "parser.yy" 8629 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8630 break; 8631 8632 case 626: 8633 8634 /* Line 1806 of yacc.c */ 8635 #line 2376 "parser.yy" 8636 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8637 break; 8638 8639 case 627: 8640 8641 /* Line 1806 of yacc.c */ 8642 #line 2378 "parser.yy" 8643 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8644 break; 8645 8646 case 628: 8647 8648 /* Line 1806 of yacc.c */ 8649 #line 2380 "parser.yy" 8650 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8651 break; 8652 8653 case 629: 8654 8655 /* Line 1806 of yacc.c */ 8656 #line 2382 "parser.yy" 8657 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8658 break; 8659 8660 case 630: 8661 8662 /* Line 1806 of yacc.c */ 8663 #line 2387 "parser.yy" 8583 8664 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8584 8665 break; 8585 8666 8586 case 6 17:8587 8588 /* Line 1806 of yacc.c */ 8589 #line 23 54"parser.yy"8667 case 631: 8668 8669 /* Line 1806 of yacc.c */ 8670 #line 2389 "parser.yy" 8590 8671 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8591 8672 break; 8592 8673 8593 case 618: 8594 8595 /* Line 1806 of yacc.c */ 8596 #line 2356 "parser.yy" 8597 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8598 break; 8599 8600 case 619: 8601 8602 /* Line 1806 of yacc.c */ 8603 #line 2366 "parser.yy" 8604 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8605 break; 8606 8607 case 621: 8608 8609 /* Line 1806 of yacc.c */ 8610 #line 2369 "parser.yy" 8611 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8612 break; 8613 8614 case 622: 8615 8616 /* Line 1806 of yacc.c */ 8617 #line 2371 "parser.yy" 8618 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8619 break; 8620 8621 case 623: 8622 8623 /* Line 1806 of yacc.c */ 8624 #line 2376 "parser.yy" 8625 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8626 break; 8627 8628 case 624: 8629 8630 /* Line 1806 of yacc.c */ 8631 #line 2378 "parser.yy" 8632 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8633 break; 8634 8635 case 625: 8636 8637 /* Line 1806 of yacc.c */ 8638 #line 2380 "parser.yy" 8639 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8640 break; 8641 8642 case 626: 8643 8644 /* Line 1806 of yacc.c */ 8645 #line 2385 "parser.yy" 8646 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8647 break; 8648 8649 case 627: 8650 8651 /* Line 1806 of yacc.c */ 8652 #line 2387 "parser.yy" 8653 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8654 break; 8655 8656 case 628: 8657 8658 /* Line 1806 of yacc.c */ 8659 #line 2389 "parser.yy" 8660 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8661 break; 8662 8663 case 629: 8674 case 632: 8664 8675 8665 8676 /* Line 1806 of yacc.c */ … … 8668 8679 break; 8669 8680 8670 case 630:8671 8672 /* Line 1806 of yacc.c */8673 #line 2396 "parser.yy"8674 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }8675 break;8676 8677 case 631:8678 8679 /* Line 1806 of yacc.c */8680 #line 2398 "parser.yy"8681 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }8682 break;8683 8684 case 632:8685 8686 /* Line 1806 of yacc.c */8687 #line 2400 "parser.yy"8688 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8689 break;8690 8691 8681 case 633: 8692 8682 8693 8683 /* Line 1806 of yacc.c */ 8694 #line 24 31"parser.yy"8684 #line 2422 "parser.yy" 8695 8685 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8696 8686 break; … … 8699 8689 8700 8690 /* Line 1806 of yacc.c */ 8701 #line 24 34"parser.yy"8691 #line 2425 "parser.yy" 8702 8692 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8703 8693 break; … … 8706 8696 8707 8697 /* Line 1806 of yacc.c */ 8708 #line 24 36"parser.yy"8698 #line 2427 "parser.yy" 8709 8699 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8710 8700 break; … … 8713 8703 8714 8704 /* Line 1806 of yacc.c */ 8715 #line 24 41"parser.yy"8705 #line 2432 "parser.yy" 8716 8706 { 8717 8707 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8723 8713 8724 8714 /* Line 1806 of yacc.c */ 8725 #line 24 46"parser.yy"8715 #line 2437 "parser.yy" 8726 8716 { 8727 8717 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8733 8723 8734 8724 /* Line 1806 of yacc.c */ 8725 #line 2445 "parser.yy" 8726 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8727 break; 8728 8729 case 640: 8730 8731 /* Line 1806 of yacc.c */ 8732 #line 2447 "parser.yy" 8733 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8734 break; 8735 8736 case 641: 8737 8738 /* Line 1806 of yacc.c */ 8739 #line 2449 "parser.yy" 8740 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8741 break; 8742 8743 case 642: 8744 8745 /* Line 1806 of yacc.c */ 8735 8746 #line 2454 "parser.yy" 8747 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8748 break; 8749 8750 case 643: 8751 8752 /* Line 1806 of yacc.c */ 8753 #line 2456 "parser.yy" 8754 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8755 break; 8756 8757 case 644: 8758 8759 /* Line 1806 of yacc.c */ 8760 #line 2461 "parser.yy" 8761 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8762 break; 8763 8764 case 645: 8765 8766 /* Line 1806 of yacc.c */ 8767 #line 2463 "parser.yy" 8768 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8769 break; 8770 8771 case 647: 8772 8773 /* Line 1806 of yacc.c */ 8774 #line 2478 "parser.yy" 8775 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8776 break; 8777 8778 case 648: 8779 8780 /* Line 1806 of yacc.c */ 8781 #line 2480 "parser.yy" 8782 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8783 break; 8784 8785 case 649: 8786 8787 /* Line 1806 of yacc.c */ 8788 #line 2485 "parser.yy" 8789 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8790 break; 8791 8792 case 650: 8793 8794 /* Line 1806 of yacc.c */ 8795 #line 2487 "parser.yy" 8796 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8797 break; 8798 8799 case 651: 8800 8801 /* Line 1806 of yacc.c */ 8802 #line 2489 "parser.yy" 8736 8803 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8737 8804 break; 8738 8805 8739 case 6 40:8740 8741 /* Line 1806 of yacc.c */ 8742 #line 24 56"parser.yy"8806 case 652: 8807 8808 /* Line 1806 of yacc.c */ 8809 #line 2491 "parser.yy" 8743 8810 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8744 8811 break; 8745 8812 8746 case 6 41:8747 8748 /* Line 1806 of yacc.c */ 8749 #line 24 58"parser.yy"8813 case 653: 8814 8815 /* Line 1806 of yacc.c */ 8816 #line 2493 "parser.yy" 8750 8817 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8751 8818 break; 8752 8819 8753 case 642: 8754 8755 /* Line 1806 of yacc.c */ 8756 #line 2463 "parser.yy" 8757 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8758 break; 8759 8760 case 643: 8761 8762 /* Line 1806 of yacc.c */ 8763 #line 2465 "parser.yy" 8820 case 655: 8821 8822 /* Line 1806 of yacc.c */ 8823 #line 2499 "parser.yy" 8764 8824 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8765 8825 break; 8766 8826 8767 case 644: 8768 8769 /* Line 1806 of yacc.c */ 8770 #line 2470 "parser.yy" 8771 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8772 break; 8773 8774 case 645: 8775 8776 /* Line 1806 of yacc.c */ 8777 #line 2472 "parser.yy" 8827 case 656: 8828 8829 /* Line 1806 of yacc.c */ 8830 #line 2501 "parser.yy" 8831 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8832 break; 8833 8834 case 657: 8835 8836 /* Line 1806 of yacc.c */ 8837 #line 2503 "parser.yy" 8838 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8839 break; 8840 8841 case 658: 8842 8843 /* Line 1806 of yacc.c */ 8844 #line 2508 "parser.yy" 8845 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8846 break; 8847 8848 case 659: 8849 8850 /* Line 1806 of yacc.c */ 8851 #line 2510 "parser.yy" 8778 8852 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8779 8853 break; 8780 8854 8781 case 647: 8782 8783 /* Line 1806 of yacc.c */ 8784 #line 2487 "parser.yy" 8785 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8786 break; 8787 8788 case 648: 8789 8790 /* Line 1806 of yacc.c */ 8791 #line 2489 "parser.yy" 8792 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8793 break; 8794 8795 case 649: 8796 8797 /* Line 1806 of yacc.c */ 8798 #line 2494 "parser.yy" 8799 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8800 break; 8801 8802 case 650: 8803 8804 /* Line 1806 of yacc.c */ 8805 #line 2496 "parser.yy" 8806 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8807 break; 8808 8809 case 651: 8810 8811 /* Line 1806 of yacc.c */ 8812 #line 2498 "parser.yy" 8813 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8814 break; 8815 8816 case 652: 8817 8818 /* Line 1806 of yacc.c */ 8819 #line 2500 "parser.yy" 8820 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8821 break; 8822 8823 case 653: 8824 8825 /* Line 1806 of yacc.c */ 8826 #line 2502 "parser.yy" 8827 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8828 break; 8829 8830 case 655: 8831 8832 /* Line 1806 of yacc.c */ 8833 #line 2508 "parser.yy" 8834 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8835 break; 8836 8837 case 656: 8838 8839 /* Line 1806 of yacc.c */ 8840 #line 2510 "parser.yy" 8841 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8842 break; 8843 8844 case 657: 8855 case 660: 8845 8856 8846 8857 /* Line 1806 of yacc.c */ … … 8849 8860 break; 8850 8861 8851 case 658: 8852 8853 /* Line 1806 of yacc.c */ 8854 #line 2517 "parser.yy" 8862 case 661: 8863 8864 /* Line 1806 of yacc.c */ 8865 #line 2518 "parser.yy" 8866 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8867 break; 8868 8869 case 662: 8870 8871 /* Line 1806 of yacc.c */ 8872 #line 2520 "parser.yy" 8873 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); } 8874 break; 8875 8876 case 664: 8877 8878 /* Line 1806 of yacc.c */ 8879 #line 2526 "parser.yy" 8880 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); } 8881 break; 8882 8883 case 665: 8884 8885 /* Line 1806 of yacc.c */ 8886 #line 2528 "parser.yy" 8887 { (yyval.decl) = DeclarationNode::newVarArray( 0 ); } 8888 break; 8889 8890 case 666: 8891 8892 /* Line 1806 of yacc.c */ 8893 #line 2530 "parser.yy" 8894 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); } 8895 break; 8896 8897 case 667: 8898 8899 /* Line 1806 of yacc.c */ 8900 #line 2532 "parser.yy" 8901 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); } 8902 break; 8903 8904 case 669: 8905 8906 /* Line 1806 of yacc.c */ 8907 #line 2547 "parser.yy" 8908 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8909 break; 8910 8911 case 670: 8912 8913 /* Line 1806 of yacc.c */ 8914 #line 2549 "parser.yy" 8915 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8916 break; 8917 8918 case 671: 8919 8920 /* Line 1806 of yacc.c */ 8921 #line 2554 "parser.yy" 8922 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8923 break; 8924 8925 case 672: 8926 8927 /* Line 1806 of yacc.c */ 8928 #line 2556 "parser.yy" 8929 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8930 break; 8931 8932 case 673: 8933 8934 /* Line 1806 of yacc.c */ 8935 #line 2558 "parser.yy" 8936 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8937 break; 8938 8939 case 674: 8940 8941 /* Line 1806 of yacc.c */ 8942 #line 2560 "parser.yy" 8943 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8944 break; 8945 8946 case 675: 8947 8948 /* Line 1806 of yacc.c */ 8949 #line 2562 "parser.yy" 8950 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8951 break; 8952 8953 case 677: 8954 8955 /* Line 1806 of yacc.c */ 8956 #line 2568 "parser.yy" 8957 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8958 break; 8959 8960 case 678: 8961 8962 /* Line 1806 of yacc.c */ 8963 #line 2570 "parser.yy" 8964 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8965 break; 8966 8967 case 679: 8968 8969 /* Line 1806 of yacc.c */ 8970 #line 2572 "parser.yy" 8971 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8972 break; 8973 8974 case 680: 8975 8976 /* Line 1806 of yacc.c */ 8977 #line 2577 "parser.yy" 8855 8978 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8856 8979 break; 8857 8980 8858 case 6 59:8859 8860 /* Line 1806 of yacc.c */ 8861 #line 25 19 "parser.yy"8981 case 681: 8982 8983 /* Line 1806 of yacc.c */ 8984 #line 2579 "parser.yy" 8862 8985 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8863 8986 break; 8864 8987 8865 case 660: 8866 8867 /* Line 1806 of yacc.c */ 8868 #line 2521 "parser.yy" 8869 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8870 break; 8871 8872 case 661: 8873 8874 /* Line 1806 of yacc.c */ 8875 #line 2527 "parser.yy" 8876 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8877 break; 8878 8879 case 662: 8880 8881 /* Line 1806 of yacc.c */ 8882 #line 2529 "parser.yy" 8883 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); } 8884 break; 8885 8886 case 664: 8887 8888 /* Line 1806 of yacc.c */ 8889 #line 2535 "parser.yy" 8890 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); } 8891 break; 8892 8893 case 665: 8894 8895 /* Line 1806 of yacc.c */ 8896 #line 2537 "parser.yy" 8897 { (yyval.decl) = DeclarationNode::newVarArray( 0 ); } 8898 break; 8899 8900 case 666: 8901 8902 /* Line 1806 of yacc.c */ 8903 #line 2539 "parser.yy" 8904 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); } 8905 break; 8906 8907 case 667: 8908 8909 /* Line 1806 of yacc.c */ 8910 #line 2541 "parser.yy" 8911 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); } 8912 break; 8913 8914 case 669: 8915 8916 /* Line 1806 of yacc.c */ 8917 #line 2556 "parser.yy" 8918 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8919 break; 8920 8921 case 670: 8922 8923 /* Line 1806 of yacc.c */ 8924 #line 2558 "parser.yy" 8925 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8926 break; 8927 8928 case 671: 8929 8930 /* Line 1806 of yacc.c */ 8931 #line 2563 "parser.yy" 8932 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8933 break; 8934 8935 case 672: 8936 8937 /* Line 1806 of yacc.c */ 8938 #line 2565 "parser.yy" 8939 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8940 break; 8941 8942 case 673: 8943 8944 /* Line 1806 of yacc.c */ 8945 #line 2567 "parser.yy" 8946 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8947 break; 8948 8949 case 674: 8950 8951 /* Line 1806 of yacc.c */ 8952 #line 2569 "parser.yy" 8953 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8954 break; 8955 8956 case 675: 8957 8958 /* Line 1806 of yacc.c */ 8959 #line 2571 "parser.yy" 8960 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8961 break; 8962 8963 case 677: 8964 8965 /* Line 1806 of yacc.c */ 8966 #line 2577 "parser.yy" 8967 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8968 break; 8969 8970 case 678: 8971 8972 /* Line 1806 of yacc.c */ 8973 #line 2579 "parser.yy" 8974 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8975 break; 8976 8977 case 679: 8988 case 682: 8978 8989 8979 8990 /* Line 1806 of yacc.c */ … … 8982 8993 break; 8983 8994 8984 case 680: 8985 8986 /* Line 1806 of yacc.c */ 8987 #line 2586 "parser.yy" 8988 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8989 break; 8990 8991 case 681: 8995 case 684: 8992 8996 8993 8997 /* Line 1806 of yacc.c */ 8994 8998 #line 2588 "parser.yy" 8999 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 9000 break; 9001 9002 case 686: 9003 9004 /* Line 1806 of yacc.c */ 9005 #line 2599 "parser.yy" 9006 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 9007 break; 9008 9009 case 687: 9010 9011 /* Line 1806 of yacc.c */ 9012 #line 2602 "parser.yy" 9013 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9014 break; 9015 9016 case 688: 9017 9018 /* Line 1806 of yacc.c */ 9019 #line 2604 "parser.yy" 9020 { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); } 9021 break; 9022 9023 case 689: 9024 9025 /* Line 1806 of yacc.c */ 9026 #line 2607 "parser.yy" 9027 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9028 break; 9029 9030 case 690: 9031 9032 /* Line 1806 of yacc.c */ 9033 #line 2609 "parser.yy" 9034 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); } 9035 break; 9036 9037 case 691: 9038 9039 /* Line 1806 of yacc.c */ 9040 #line 2611 "parser.yy" 9041 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); } 9042 break; 9043 9044 case 693: 9045 9046 /* Line 1806 of yacc.c */ 9047 #line 2625 "parser.yy" 9048 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 9049 break; 9050 9051 case 694: 9052 9053 /* Line 1806 of yacc.c */ 9054 #line 2627 "parser.yy" 9055 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 9056 break; 9057 9058 case 695: 9059 9060 /* Line 1806 of yacc.c */ 9061 #line 2632 "parser.yy" 9062 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 9063 break; 9064 9065 case 696: 9066 9067 /* Line 1806 of yacc.c */ 9068 #line 2634 "parser.yy" 9069 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 9070 break; 9071 9072 case 697: 9073 9074 /* Line 1806 of yacc.c */ 9075 #line 2636 "parser.yy" 9076 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 9077 break; 9078 9079 case 698: 9080 9081 /* Line 1806 of yacc.c */ 9082 #line 2638 "parser.yy" 9083 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 9084 break; 9085 9086 case 699: 9087 9088 /* Line 1806 of yacc.c */ 9089 #line 2640 "parser.yy" 9090 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9091 break; 9092 9093 case 701: 9094 9095 /* Line 1806 of yacc.c */ 9096 #line 2646 "parser.yy" 9097 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 9098 break; 9099 9100 case 702: 9101 9102 /* Line 1806 of yacc.c */ 9103 #line 2648 "parser.yy" 9104 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 9105 break; 9106 9107 case 703: 9108 9109 /* Line 1806 of yacc.c */ 9110 #line 2650 "parser.yy" 9111 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9112 break; 9113 9114 case 704: 9115 9116 /* Line 1806 of yacc.c */ 9117 #line 2655 "parser.yy" 8995 9118 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8996 9119 break; 8997 9120 8998 case 682:8999 9000 /* Line 1806 of yacc.c */ 9001 #line 2 590"parser.yy"9121 case 705: 9122 9123 /* Line 1806 of yacc.c */ 9124 #line 2657 "parser.yy" 9002 9125 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9003 9126 break; 9004 9127 9005 case 684: 9006 9007 /* Line 1806 of yacc.c */ 9008 #line 2597 "parser.yy" 9009 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 9010 break; 9011 9012 case 686: 9013 9014 /* Line 1806 of yacc.c */ 9015 #line 2608 "parser.yy" 9016 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 9017 break; 9018 9019 case 687: 9020 9021 /* Line 1806 of yacc.c */ 9022 #line 2611 "parser.yy" 9128 case 708: 9129 9130 /* Line 1806 of yacc.c */ 9131 #line 2667 "parser.yy" 9132 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9133 break; 9134 9135 case 711: 9136 9137 /* Line 1806 of yacc.c */ 9138 #line 2677 "parser.yy" 9139 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9140 break; 9141 9142 case 712: 9143 9144 /* Line 1806 of yacc.c */ 9145 #line 2679 "parser.yy" 9146 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9147 break; 9148 9149 case 713: 9150 9151 /* Line 1806 of yacc.c */ 9152 #line 2681 "parser.yy" 9153 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9154 break; 9155 9156 case 714: 9157 9158 /* Line 1806 of yacc.c */ 9159 #line 2683 "parser.yy" 9160 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9161 break; 9162 9163 case 715: 9164 9165 /* Line 1806 of yacc.c */ 9166 #line 2685 "parser.yy" 9167 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9168 break; 9169 9170 case 716: 9171 9172 /* Line 1806 of yacc.c */ 9173 #line 2687 "parser.yy" 9174 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9175 break; 9176 9177 case 717: 9178 9179 /* Line 1806 of yacc.c */ 9180 #line 2694 "parser.yy" 9181 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9182 break; 9183 9184 case 718: 9185 9186 /* Line 1806 of yacc.c */ 9187 #line 2696 "parser.yy" 9188 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9189 break; 9190 9191 case 719: 9192 9193 /* Line 1806 of yacc.c */ 9194 #line 2698 "parser.yy" 9195 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9196 break; 9197 9198 case 720: 9199 9200 /* Line 1806 of yacc.c */ 9201 #line 2700 "parser.yy" 9202 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9203 break; 9204 9205 case 721: 9206 9207 /* Line 1806 of yacc.c */ 9208 #line 2702 "parser.yy" 9209 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9210 break; 9211 9212 case 722: 9213 9214 /* Line 1806 of yacc.c */ 9215 #line 2704 "parser.yy" 9216 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9217 break; 9218 9219 case 723: 9220 9221 /* Line 1806 of yacc.c */ 9222 #line 2706 "parser.yy" 9223 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9224 break; 9225 9226 case 724: 9227 9228 /* Line 1806 of yacc.c */ 9229 #line 2708 "parser.yy" 9230 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9231 break; 9232 9233 case 725: 9234 9235 /* Line 1806 of yacc.c */ 9236 #line 2710 "parser.yy" 9237 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9238 break; 9239 9240 case 726: 9241 9242 /* Line 1806 of yacc.c */ 9243 #line 2712 "parser.yy" 9244 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9245 break; 9246 9247 case 727: 9248 9249 /* Line 1806 of yacc.c */ 9250 #line 2717 "parser.yy" 9023 9251 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9024 9252 break; 9025 9253 9026 case 688: 9027 9028 /* Line 1806 of yacc.c */ 9029 #line 2613 "parser.yy" 9030 { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); } 9031 break; 9032 9033 case 689: 9034 9035 /* Line 1806 of yacc.c */ 9036 #line 2616 "parser.yy" 9254 case 728: 9255 9256 /* Line 1806 of yacc.c */ 9257 #line 2719 "parser.yy" 9037 9258 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9038 9259 break; 9039 9260 9040 case 690: 9041 9042 /* Line 1806 of yacc.c */ 9043 #line 2618 "parser.yy" 9044 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); } 9045 break; 9046 9047 case 691: 9048 9049 /* Line 1806 of yacc.c */ 9050 #line 2620 "parser.yy" 9051 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); } 9052 break; 9053 9054 case 693: 9055 9056 /* Line 1806 of yacc.c */ 9057 #line 2634 "parser.yy" 9058 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 9059 break; 9060 9061 case 694: 9062 9063 /* Line 1806 of yacc.c */ 9064 #line 2636 "parser.yy" 9065 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 9066 break; 9067 9068 case 695: 9069 9070 /* Line 1806 of yacc.c */ 9071 #line 2641 "parser.yy" 9072 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 9073 break; 9074 9075 case 696: 9076 9077 /* Line 1806 of yacc.c */ 9078 #line 2643 "parser.yy" 9079 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 9080 break; 9081 9082 case 697: 9083 9084 /* Line 1806 of yacc.c */ 9085 #line 2645 "parser.yy" 9086 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 9087 break; 9088 9089 case 698: 9090 9091 /* Line 1806 of yacc.c */ 9092 #line 2647 "parser.yy" 9093 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 9094 break; 9095 9096 case 699: 9097 9098 /* Line 1806 of yacc.c */ 9099 #line 2649 "parser.yy" 9100 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9101 break; 9102 9103 case 701: 9104 9105 /* Line 1806 of yacc.c */ 9106 #line 2655 "parser.yy" 9107 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 9108 break; 9109 9110 case 702: 9111 9112 /* Line 1806 of yacc.c */ 9113 #line 2657 "parser.yy" 9114 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 9115 break; 9116 9117 case 703: 9118 9119 /* Line 1806 of yacc.c */ 9120 #line 2659 "parser.yy" 9121 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9122 break; 9123 9124 case 704: 9125 9126 /* Line 1806 of yacc.c */ 9127 #line 2664 "parser.yy" 9128 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 9129 break; 9130 9131 case 705: 9132 9133 /* Line 1806 of yacc.c */ 9134 #line 2666 "parser.yy" 9135 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 9136 break; 9137 9138 case 708: 9139 9140 /* Line 1806 of yacc.c */ 9141 #line 2676 "parser.yy" 9261 case 729: 9262 9263 /* Line 1806 of yacc.c */ 9264 #line 2724 "parser.yy" 9265 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); } 9266 break; 9267 9268 case 730: 9269 9270 /* Line 1806 of yacc.c */ 9271 #line 2726 "parser.yy" 9272 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); } 9273 break; 9274 9275 case 732: 9276 9277 /* Line 1806 of yacc.c */ 9278 #line 2753 "parser.yy" 9142 9279 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9143 9280 break; 9144 9281 9145 case 7 11:9146 9147 /* Line 1806 of yacc.c */ 9148 #line 2 686"parser.yy"9282 case 736: 9283 9284 /* Line 1806 of yacc.c */ 9285 #line 2764 "parser.yy" 9149 9286 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9150 9287 break; 9151 9288 9152 case 7 12:9153 9154 /* Line 1806 of yacc.c */ 9155 #line 2 688"parser.yy"9289 case 737: 9290 9291 /* Line 1806 of yacc.c */ 9292 #line 2766 "parser.yy" 9156 9293 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9157 9294 break; 9158 9295 9159 case 7 13:9160 9161 /* Line 1806 of yacc.c */ 9162 #line 2 690"parser.yy"9296 case 738: 9297 9298 /* Line 1806 of yacc.c */ 9299 #line 2768 "parser.yy" 9163 9300 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9164 9301 break; 9165 9302 9166 case 7 14:9167 9168 /* Line 1806 of yacc.c */ 9169 #line 2 692"parser.yy"9303 case 739: 9304 9305 /* Line 1806 of yacc.c */ 9306 #line 2770 "parser.yy" 9170 9307 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9171 9308 break; 9172 9309 9173 case 7 15:9174 9175 /* Line 1806 of yacc.c */ 9176 #line 2 694"parser.yy"9310 case 740: 9311 9312 /* Line 1806 of yacc.c */ 9313 #line 2772 "parser.yy" 9177 9314 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9178 9315 break; 9179 9316 9180 case 7 16:9181 9182 /* Line 1806 of yacc.c */ 9183 #line 2 696"parser.yy"9317 case 741: 9318 9319 /* Line 1806 of yacc.c */ 9320 #line 2774 "parser.yy" 9184 9321 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9185 9322 break; 9186 9323 9187 case 7 17:9188 9189 /* Line 1806 of yacc.c */ 9190 #line 27 03"parser.yy"9324 case 742: 9325 9326 /* Line 1806 of yacc.c */ 9327 #line 2781 "parser.yy" 9191 9328 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9192 9329 break; 9193 9330 9194 case 718: 9195 9196 /* Line 1806 of yacc.c */ 9197 #line 2705 "parser.yy" 9331 case 743: 9332 9333 /* Line 1806 of yacc.c */ 9334 #line 2783 "parser.yy" 9335 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9336 break; 9337 9338 case 744: 9339 9340 /* Line 1806 of yacc.c */ 9341 #line 2785 "parser.yy" 9198 9342 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9199 9343 break; 9200 9344 9201 case 719: 9202 9203 /* Line 1806 of yacc.c */ 9204 #line 2707 "parser.yy" 9345 case 745: 9346 9347 /* Line 1806 of yacc.c */ 9348 #line 2787 "parser.yy" 9349 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9350 break; 9351 9352 case 746: 9353 9354 /* Line 1806 of yacc.c */ 9355 #line 2789 "parser.yy" 9205 9356 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9206 9357 break; 9207 9358 9208 case 720: 9209 9210 /* Line 1806 of yacc.c */ 9211 #line 2709 "parser.yy" 9212 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9213 break; 9214 9215 case 721: 9216 9217 /* Line 1806 of yacc.c */ 9218 #line 2711 "parser.yy" 9359 case 747: 9360 9361 /* Line 1806 of yacc.c */ 9362 #line 2791 "parser.yy" 9219 9363 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9220 9364 break; 9221 9365 9222 case 722: 9223 9224 /* Line 1806 of yacc.c */ 9225 #line 2713 "parser.yy" 9226 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9227 break; 9228 9229 case 723: 9230 9231 /* Line 1806 of yacc.c */ 9232 #line 2715 "parser.yy" 9233 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9234 break; 9235 9236 case 724: 9237 9238 /* Line 1806 of yacc.c */ 9239 #line 2717 "parser.yy" 9240 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9241 break; 9242 9243 case 725: 9244 9245 /* Line 1806 of yacc.c */ 9246 #line 2719 "parser.yy" 9247 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9248 break; 9249 9250 case 726: 9251 9252 /* Line 1806 of yacc.c */ 9253 #line 2721 "parser.yy" 9254 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9255 break; 9256 9257 case 727: 9258 9259 /* Line 1806 of yacc.c */ 9260 #line 2726 "parser.yy" 9261 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9262 break; 9263 9264 case 728: 9265 9266 /* Line 1806 of yacc.c */ 9267 #line 2728 "parser.yy" 9268 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9269 break; 9270 9271 case 729: 9272 9273 /* Line 1806 of yacc.c */ 9274 #line 2733 "parser.yy" 9275 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); } 9276 break; 9277 9278 case 730: 9279 9280 /* Line 1806 of yacc.c */ 9281 #line 2735 "parser.yy" 9282 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); } 9283 break; 9284 9285 case 732: 9286 9287 /* Line 1806 of yacc.c */ 9288 #line 2762 "parser.yy" 9289 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9290 break; 9291 9292 case 736: 9293 9294 /* Line 1806 of yacc.c */ 9295 #line 2773 "parser.yy" 9296 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9297 break; 9298 9299 case 737: 9300 9301 /* Line 1806 of yacc.c */ 9302 #line 2775 "parser.yy" 9303 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9304 break; 9305 9306 case 738: 9307 9308 /* Line 1806 of yacc.c */ 9309 #line 2777 "parser.yy" 9310 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9311 break; 9312 9313 case 739: 9314 9315 /* Line 1806 of yacc.c */ 9316 #line 2779 "parser.yy" 9317 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9318 break; 9319 9320 case 740: 9321 9322 /* Line 1806 of yacc.c */ 9323 #line 2781 "parser.yy" 9324 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9325 break; 9326 9327 case 741: 9328 9329 /* Line 1806 of yacc.c */ 9330 #line 2783 "parser.yy" 9331 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9332 break; 9333 9334 case 742: 9335 9336 /* Line 1806 of yacc.c */ 9337 #line 2790 "parser.yy" 9338 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9339 break; 9340 9341 case 743: 9342 9343 /* Line 1806 of yacc.c */ 9344 #line 2792 "parser.yy" 9345 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9346 break; 9347 9348 case 744: 9349 9350 /* Line 1806 of yacc.c */ 9351 #line 2794 "parser.yy" 9352 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9353 break; 9354 9355 case 745: 9366 case 748: 9356 9367 9357 9368 /* Line 1806 of yacc.c */ 9358 9369 #line 2796 "parser.yy" 9359 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false) ); }9360 break; 9361 9362 case 74 6:9363 9364 /* Line 1806 of yacc.c */ 9365 #line 2 798"parser.yy"9366 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false )); }9367 break; 9368 9369 case 7 47:9370 9371 /* Line 1806 of yacc.c */ 9372 #line 280 0"parser.yy"9373 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl)); }9374 break; 9375 9376 case 7 48:9370 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); } 9371 break; 9372 9373 case 749: 9374 9375 /* Line 1806 of yacc.c */ 9376 #line 2801 "parser.yy" 9377 { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); } 9378 break; 9379 9380 case 750: 9381 9382 /* Line 1806 of yacc.c */ 9383 #line 2803 "parser.yy" 9384 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9385 break; 9386 9387 case 751: 9377 9388 9378 9389 /* Line 1806 of yacc.c */ 9379 9390 #line 2805 "parser.yy" 9380 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); }9381 break;9382 9383 case 749:9384 9385 /* Line 1806 of yacc.c */9386 #line 2810 "parser.yy"9387 { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); }9388 break;9389 9390 case 750:9391 9392 /* Line 1806 of yacc.c */9393 #line 2812 "parser.yy"9394 9391 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9395 9392 break; 9396 9393 9397 case 751:9398 9399 /* Line 1806 of yacc.c */9400 #line 2814 "parser.yy"9401 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); }9402 break;9403 9404 9394 case 754: 9405 9395 9406 9396 /* Line 1806 of yacc.c */ 9407 #line 28 38"parser.yy"9397 #line 2829 "parser.yy" 9408 9398 { (yyval.en) = 0; } 9409 9399 break; … … 9412 9402 9413 9403 /* Line 1806 of yacc.c */ 9414 #line 28 40"parser.yy"9404 #line 2831 "parser.yy" 9415 9405 { (yyval.en) = (yyvsp[(2) - (2)].en); } 9416 9406 break; … … 9419 9409 9420 9410 /* Line 1806 of yacc.c */ 9421 #line 94 22 "Parser/parser.cc"9411 #line 9412 "Parser/parser.cc" 9422 9412 default: break; 9423 9413 } … … 9650 9640 9651 9641 /* Line 2067 of yacc.c */ 9652 #line 28 43"parser.yy"9642 #line 2834 "parser.yy" 9653 9643 9654 9644 // ----end of grammar---- -
src/Parser/parser.yy
rd1b9d78 r8884112 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 12 17:26:32201613 // Update Count : 165 912 // Last Modified On : Thu Jun 30 21:15:54 2016 13 // Update Count : 1657 14 14 // 15 15 … … 712 712 { $$ = new StatementNode( StatementNode::Switch, $3, $5 ); } 713 713 | SWITCH '(' comma_expression ')' '{' push declaration_list_opt switch_clause_list_opt '}' // CFA 714 { 715 StatementNode *sw = new StatementNode( StatementNode::Switch, $3, $8 ); 716 // The semantics of the declaration list is changed to include associated initialization, which is performed 717 // *before* the transfer to the appropriate case clause by hoisting the declarations into a compound 718 // statement around the switch. Statements after the initial declaration list can never be executed, and 719 // therefore, are removed from the grammar even though C allows it. Change also applies to choose statement. 720 $$ = $7 != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( $7 ))->set_link( sw )) ) : sw; 721 } 714 { $$ = new StatementNode( StatementNode::Switch, $3, $8 ); /* xxx */ } 715 // The semantics of the declaration list is changed to include any associated initialization, which is performed 716 // *before* the transfer to the appropriate case clause. Statements after the initial declaration list can 717 // never be executed, and therefore, are removed from the grammar even though C allows it. 722 718 | CHOOSE '(' comma_expression ')' case_clause // CFA 723 { $$ = new StatementNode( StatementNode:: Switch, $3, $5 ); }719 { $$ = new StatementNode( StatementNode::Choose, $3, $5 ); } 724 720 | CHOOSE '(' comma_expression ')' '{' push declaration_list_opt choose_clause_list_opt '}' // CFA 725 { 726 StatementNode *sw = new StatementNode( StatementNode::Switch, $3, $8 ); 727 $$ = $7 != 0 ? new CompoundStmtNode( (StatementNode *)((new StatementNode( $7 ))->set_link( sw )) ) : sw; 728 } 721 { $$ = new StatementNode( StatementNode::Choose, $3, $8 ); } 729 722 ; 730 723 … … 757 750 758 751 case_clause: // CFA 759 case_label_list statement { $$ = $1->append_last_case( new CompoundStmtNode( $2 )); }752 case_label_list statement { $$ = $1->append_last_case( $2 ); } 760 753 ; 761 754 … … 768 761 switch_clause_list: // CFA 769 762 case_label_list statement_list 770 { $$ = $1->append_last_case( new CompoundStmtNode( $2 )); }763 { $$ = $1->append_last_case( $2 ); } 771 764 | switch_clause_list case_label_list statement_list 772 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case( new CompoundStmtNode( $3 ) ) )); }765 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case( $3 ))); } 773 766 ; 774 767 … … 783 776 { $$ = $1->append_last_case( $2 ); } 784 777 | case_label_list statement_list fall_through_opt 785 { $$ = $1->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*$2, *$3 ) ) )); }778 { $$ = $1->append_last_case((StatementNode *)mkList((*$2,*$3 ))); } 786 779 | choose_clause_list case_label_list fall_through 787 780 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case( $3 ))); } 788 781 | choose_clause_list case_label_list statement_list fall_through_opt 789 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case( new CompoundStmtNode( (StatementNode *)mkList( (*$3, *$4 ) ) ) ) )); }782 { $$ = (StatementNode *)( $1->set_link( $2->append_last_case((StatementNode *)mkList((*$3,*$4 ))))); } 790 783 ; 791 784 792 785 fall_through_opt: // CFA 793 786 // empty 794 { $$ = new StatementNode( StatementNode::Break ); } // insert implicit break787 { $$ = 0; } 795 788 | fall_through 796 789 ; 797 790 798 791 fall_through: // CFA 799 FALLTHRU 800 { $$ = 0; } 801 | FALLTHRU ';' 802 { $$ = 0; } 792 FALLTHRU { $$ = new StatementNode( StatementNode::Fallthru ); } 793 | FALLTHRU ';' { $$ = new StatementNode( StatementNode::Fallthru ); } 803 794 ; 804 795 … … 823 814 { $$ = new StatementNode( StatementNode::Goto, $2 ); } 824 815 | GOTO '*' comma_expression ';' // GCC, computed goto 825 // The syntax for the GCC computed goto violates normal expression precedence, e.g., goto *i+3; => goto *(i+3 );816 // The syntax for the GCC computed goto violates normal expression precedence, e.g., goto *i+3; => goto *(i+3 ); 826 817 // whereas normal operator precedence yields goto (*i)+3; 827 818 { $$ = new StatementNode( StatementNode::Goto, $3 ); } … … 829 820 // A semantic check is required to ensure this statement appears only in the body of an iteration statement. 830 821 { $$ = new StatementNode( StatementNode::Continue ); } 831 | CONTINUE IDENTIFIER ';' // CFA, multi-level continue822 | CONTINUE IDENTIFIER ';' // CFA, multi-level continue 832 823 // A semantic check is required to ensure this statement appears only in the body of an iteration statement, and 833 824 // the target of the transfer appears only at the start of an iteration statement. … … 836 827 // A semantic check is required to ensure this statement appears only in the body of an iteration statement. 837 828 { $$ = new StatementNode( StatementNode::Break ); } 838 | BREAK IDENTIFIER ';' // CFA, multi-level exit829 | BREAK IDENTIFIER ';' // CFA, multi-level exit 839 830 // A semantic check is required to ensure this statement appears only in the body of an iteration statement, and 840 831 // the target of the transfer appears only at the start of an iteration statement. … … 960 951 ; 961 952 962 asm_clobbers_list_opt: // GCC953 asm_clobbers_list_opt: // GCC 963 954 // empty 964 955 { $$ = 0; } // use default argument … … 1461 1452 { typedefTable.makeTypedef( *$2 ); } 1462 1453 '{' field_declaration_list '}' 1463 { $$ = DeclarationNode::newAggregate( $1, $2, 0, $5 ); }1454 { $$ = DeclarationNode::newAggregate( $1, $2, 0, $5); } 1464 1455 | aggregate_key '(' type_name_list ')' '{' field_declaration_list '}' // CFA 1465 1456 { $$ = DeclarationNode::newAggregate( $1, 0, $3, $6 ); } … … 1849 1840 { $$ = 0; } 1850 1841 | assertion_list_opt assertion 1851 { $$ = $1 != 0 ? $1->appendList( $2 ) : $2; }1842 { $$ = $1 == 0 ? $2 : $1->appendList( $2 ); } 1852 1843 ; 1853 1844 -
src/ResolvExpr/Resolver.cc
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 12:17:01 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:45:42201613 // Update Count : 20 411 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri May 13 11:36:40 2016 13 // Update Count : 203 14 14 // 15 15 … … 49 49 virtual void visit( ForStmt *forStmt ); 50 50 virtual void visit( SwitchStmt *switchStmt ); 51 virtual void visit( ChooseStmt *switchStmt ); 51 52 virtual void visit( CaseStmt *caseStmt ); 52 53 virtual void visit( BranchStmt *branchStmt ); … … 301 302 302 303 void Resolver::visit( SwitchStmt *switchStmt ) { 304 handleSwitchStmt( switchStmt, *this ); 305 } 306 307 void Resolver::visit( ChooseStmt *switchStmt ) { 303 308 handleSwitchStmt( switchStmt, *this ); 304 309 } -
src/SymTab/AddVisit.h
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 16:14:32 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue Jul 12 17:46:33201613 // Update Count : 611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 14 15:52:42 2016 13 // Update Count : 5 14 14 // 15 15 … … 38 38 39 39 template< typename Visitor > 40 inline void addVisit(ChooseStmt *switchStmt, Visitor &visitor) { 41 addVisitStatementList( switchStmt->get_branches(), visitor ); 42 maybeAccept( switchStmt->get_condition(), visitor ); 43 } 44 45 // template< typename Visitor > 46 // inline void addVisit(CaseStmt *caseStmt, Visitor &visitor) { 47 // addVisitStatementList( caseStmt->get_statements(), visitor ); 48 // maybeAccept( caseStmt->get_condition(), visitor ); 49 // } 50 51 template< typename Visitor > 40 52 void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor, bool addBefore ) { 41 53 std::list< Declaration * >::iterator i = translationUnit.begin(); -
src/SymTab/Autogen.cc
rd1b9d78 r8884112 9 9 // Author : Rob Schluntz 10 10 // Created On : Thu Mar 03 15:45:56 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue Jul 12 17:47:17201613 // Update Count : 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu May 26 14:14:09 2016 13 // Update Count : 1 14 14 // 15 15 … … 42 42 virtual void visit( CompoundStmt *compoundStmt ); 43 43 virtual void visit( SwitchStmt *switchStmt ); 44 virtual void visit( ChooseStmt *chooseStmt ); 45 // virtual void visit( CaseStmt *caseStmt ); 44 46 45 47 AutogenerateRoutines() : functionNesting( 0 ) {} … … 557 559 visitStatement( switchStmt ); 558 560 } 561 562 void AutogenerateRoutines::visit( ChooseStmt *switchStmt ) { 563 visitStatement( switchStmt ); 564 } 565 566 // void AutogenerateRoutines::visit( CaseStmt *caseStmt ) { 567 // visitStatement( caseStmt ); 568 // } 559 569 } // SymTab -
src/SymTab/Indexer.cc
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:37:33 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:47:47201613 // Update Count : 1 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri Apr 22 15:25:43 2016 13 // Update Count : 11 14 14 // 15 15 … … 520 520 const MangleTable &mangleTable = decls->second; 521 521 for ( MangleTable::const_iterator decl = mangleTable.begin(); decl != mangleTable.end(); ++decl ) { 522 // check for C decls with the same name, skipping those with a compatible type (by mangleName) 522 // check for C decls with the same name, skipping 523 // those with a compatible type (by mangleName) 523 524 if ( decl->second->get_linkage() == LinkageSpec::C && decl->first != mangleName ) return true; 524 525 } -
src/SymTab/Validate.cc
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Sun May 17 21:50:04 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:49:21201613 // Update Count : 29 811 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed May 11 13:17:52 2016 13 // Update Count : 297 14 14 // 15 15 … … 74 74 virtual void visit( CompoundStmt *compoundStmt ); 75 75 virtual void visit( SwitchStmt *switchStmt ); 76 virtual void visit( ChooseStmt *chooseStmt ); 77 // virtual void visit( CaseStmt *caseStmt ); 76 78 private: 77 79 HoistStruct(); … … 266 268 addVisit( switchStmt, *this ); 267 269 } 270 271 void HoistStruct::visit( ChooseStmt *switchStmt ) { 272 addVisit( switchStmt, *this ); 273 } 274 275 // void HoistStruct::visit( CaseStmt *caseStmt ) { 276 // addVisit( caseStmt, *this ); 277 // } 268 278 269 279 void Pass1::visit( EnumDecl *enumDecl ) { … … 541 551 if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( tyDecl->get_base() ) ) { 542 552 return new StructDecl( aggDecl->get_name() ); 543 // return aggDecl->get_baseStruct();544 553 } else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( tyDecl->get_base() ) ) { 545 554 return new UnionDecl( aggDecl->get_name() ); … … 636 645 } // if 637 646 } 638 639 647 Declaration *EliminateTypedef::mutate( StructDecl * structDecl ) { 640 648 addImplicitTypedef( structDecl ); … … 683 691 684 692 Visitor::visit( funcDecl ); 693 // original idea: modify signature of ctor/dtors and insert appropriate return statements 694 // to cause desired behaviour 695 // new idea: add comma exprs to every ctor call to produce first parameter. 696 // this requires some memoization of the first parameter, because it can be a 697 // complicated expression with side effects (see: malloc). idea: add temporary variable 698 // that is assigned address of constructed object in ctor argument position and 699 // return the temporary. It should also be done after all implicit ctors are 700 // added, so not in this pass! 685 701 } 686 702 -
src/SynTree/AddStmtVisitor.cc
rd1b9d78 r8884112 9 9 // Author : Rob Schluntz 10 10 // Created On : Wed Jun 22 12:11:17 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:49:59 201613 // Update Count : 1 211 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jun 22 12:16:29 2016 13 // Update Count : 11 14 14 // 15 15 … … 75 75 } 76 76 77 void AddStmtVisitor::visit(ChooseStmt *switchStmt) { 78 visitStatementList( switchStmt->get_branches() ); 79 maybeAccept( switchStmt->get_condition(), *this ); 80 } 81 77 82 void AddStmtVisitor::visit(CaseStmt *caseStmt) { 78 83 visitStatementList( caseStmt->get_statements() ); -
src/SynTree/AddStmtVisitor.h
rd1b9d78 r8884112 9 9 // Author : Rob Schluntz 10 10 // Created On : Wed Jun 22 12:05:48 2016 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:50:32201613 // Update Count : 811 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jun 22 12:12:05 2016 13 // Update Count : 7 14 14 // 15 15 … … 32 32 virtual void visit(ForStmt *forStmt); 33 33 virtual void visit(SwitchStmt *switchStmt); 34 virtual void visit(ChooseStmt *chooseStmt); 34 35 virtual void visit(CaseStmt *caseStmt); 35 36 virtual void visit(CatchStmt *catchStmt); -
src/SynTree/Mutator.cc
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:51:19 201613 // Update Count : 1 711 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Apr 27 17:07:29 2016 13 // Update Count : 16 14 14 // 15 15 … … 130 130 } 131 131 132 Statement *Mutator::mutate( ChooseStmt *switchStmt ) { 133 switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) ); 134 mutateAll( switchStmt->get_branches(), *this ); 135 return switchStmt; 136 } 137 138 Statement *Mutator::mutate( FallthruStmt *fallthruStmt ) { 139 return fallthruStmt; 140 } 141 132 142 Statement *Mutator::mutate( CaseStmt *caseStmt ) { 133 143 caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) ); -
src/SynTree/Mutator.h
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue Jul 12 17:51:43201613 // Update Count : 1 111 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 14 15:32:00 2016 13 // Update Count : 10 14 14 // 15 15 #include <cassert> … … 42 42 virtual Statement* mutate( ForStmt *forStmt ); 43 43 virtual Statement* mutate( SwitchStmt *switchStmt ); 44 virtual Statement* mutate( ChooseStmt *chooseStmt ); 45 virtual Statement* mutate( FallthruStmt *fallthruStmt ); 44 46 virtual Statement* mutate( CaseStmt *caseStmt ); 45 47 virtual Statement* mutate( BranchStmt *branchStmt ); -
src/SynTree/Statement.cc
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue Jul 12 17:52:32201613 // Update Count : 5 511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu May 12 13:33:18 2016 13 // Update Count : 54 14 14 // 15 15 … … 206 206 for ( i = stmts.begin(); i != stmts.end(); i++) 207 207 (*i )->print( os, indent + 4 ); 208 } 209 210 //ChooseStmt::ChooseStmt( std::list<Label> labels, Expression *condition, Statement *body ) {} 211 ChooseStmt::ChooseStmt( std::list<Label> _labels, Expression * _condition, std::list<Statement *> &_branches ): 212 Statement( _labels ), condition( _condition ), branches( _branches ) { 213 } 214 215 ChooseStmt::ChooseStmt( const ChooseStmt & other ): 216 Statement( other ), condition( maybeClone( other.condition ) ) { 217 cloneAll( other.branches, branches ); 218 } 219 220 ChooseStmt::~ChooseStmt() { 221 delete condition; 222 } 223 224 void ChooseStmt::add_case( CaseStmt *c ) {} 225 226 void ChooseStmt::print( std::ostream &os, int indent ) const { 227 os << "Choose on condition: "; 228 condition->print( os ); 229 os << endl; 230 231 // branches 232 std::list<Statement *>::const_iterator i; 233 for ( i = branches.begin(); i != branches.end(); i++) 234 (*i )->print( os, indent + 4 ); 235 236 //for_each( branches.begin(), branches.end(), mem_fun( bind1st(&Statement::print ), os )); 237 } 238 239 void FallthruStmt::print( std::ostream &os, int indent ) const { 240 os << string( indent, ' ' ) << "Fall-through statement" << endl; 208 241 } 209 242 -
src/SynTree/Statement.h
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:53:29 201613 // Update Count : 4 711 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Dec 09 14:09:24 2015 13 // Update Count : 46 14 14 // 15 15 … … 149 149 }; 150 150 151 class ChooseStmt : public Statement { 152 public: 153 ChooseStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &branches ); 154 ChooseStmt( const ChooseStmt &other ); 155 virtual ~ChooseStmt(); 156 157 Expression *get_condition() { return condition; } 158 void set_condition( Expression *newValue ) { condition = newValue; } 159 160 std::list<Statement *>& get_branches() { return branches; } 161 void add_case( CaseStmt * ); 162 163 virtual void accept( Visitor &v ) { v.visit( this ); } 164 virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); } 165 166 virtual ChooseStmt *clone() const { return new ChooseStmt( *this ); } 167 virtual void print( std::ostream &os, int indent = 0 ) const; 168 private: 169 Expression *condition; 170 std::list<Statement *> branches; // should be list of CaseStmt 171 }; 172 173 class FallthruStmt : public Statement { 174 public: 175 FallthruStmt( std::list<Label> labels ) : Statement( labels ) { } 176 177 virtual void accept( Visitor &v ) { v.visit( this ); } 178 virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); } 179 180 virtual FallthruStmt *clone() const { return new FallthruStmt( *this ); } 181 virtual void print( std::ostream &os, int indent = 0 ) const; 182 }; 183 151 184 class CaseStmt : public Statement { 152 185 public: -
src/SynTree/SynTree.h
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue Jul 12 17:54:02201613 // Update Count : 611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 14 15:31:36 2016 13 // Update Count : 5 14 14 // 15 15 … … 45 45 class ForStmt; 46 46 class SwitchStmt; 47 class ChooseStmt; 48 class FallthruStmt; 47 49 class CaseStmt; 48 50 class BranchStmt; -
src/SynTree/Visitor.cc
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jul 12 17:54:39201613 // Update Count : 1 911 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Apr 27 17:07:40 2016 13 // Update Count : 18 14 14 // 15 15 … … 112 112 } 113 113 114 void Visitor::visit( ChooseStmt *switchStmt ) { 115 maybeAccept( switchStmt->get_condition(), *this ); 116 acceptAll( switchStmt->get_branches(), *this ); 117 } 118 119 void Visitor::visit( FallthruStmt *fallthruStmt ) {} 120 114 121 void Visitor::visit( CaseStmt *caseStmt ) { 115 122 maybeAccept( caseStmt->get_condition(), *this ); -
src/SynTree/Visitor.h
rd1b9d78 r8884112 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : T ue Jul 12 17:55:09201613 // Update Count : 811 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 14 15:30:58 2016 13 // Update Count : 7 14 14 // 15 15 … … 42 42 virtual void visit( ForStmt *forStmt ); 43 43 virtual void visit( SwitchStmt *switchStmt ); 44 virtual void visit( ChooseStmt *switchStmt ); 45 virtual void visit( FallthruStmt *switchStmt ); 44 46 virtual void visit( CaseStmt *caseStmt ); 45 47 virtual void visit( BranchStmt *branchStmt ); -
src/examples/includes.c
rd1b9d78 r8884112 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 17:59:25201613 // Update Count : 37 112 // Last Modified On : Wed Apr 13 22:30:02 2016 13 // Update Count : 370 14 14 // 15 15 … … 22 22 #endif // __CFA__ 23 23 24 #if 025 24 #if 1 26 25 #define _GNU_SOURCE 27 #include <aio.h>28 #include <a.out.h>29 #include <aliases.h>30 #include <alloca.h>31 #include <ansidecl.h>32 #include <ar.h>33 #include <argp.h>26 //#include <aio.h> 27 //#include <a.out.h> 28 //#include <aliases.h> 29 //#include <alloca.h> 30 //#include <ansidecl.h> 31 //#include <ar.h> 32 //#include <argp.h> 34 33 #include <argz.h> 35 #include <assert.h>34 //#include <assert.h> 36 35 #include <bfd.h> 36 #if 0 37 37 #include <bfdlink.h> 38 38 #include <byteswap.h> … … 44 44 #include <ctype.h> 45 45 #include <curses.h> 46 //#include <demangle.h>46 #include <demangle.h> 47 47 #include <dialog.h> 48 48 #include <dirent.h> 49 49 #include <dis-asm.h> 50 #endif51 #if 052 50 #include <dlfcn.h> 53 51 #include <dlg_colors.h> … … 130 128 #else 131 129 132 #define _GNU_SOURCE133 //#include <bfd.h>130 //#define _GNU_SOURCE 131 #include <bfd.h> 134 132 //#include <error.h> 135 136 #include <demangle.h>137 133 138 134 #endif // 0 -
src/libcfa/iostream
rd1b9d78 r8884112 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 18:01:09201613 // Update Count : 9 312 // Last Modified On : Sun Apr 10 23:00:12 2016 13 // Update Count : 92 14 14 // 15 15 … … 42 42 }; 43 43 44 // implement writable for intrinsic types44 // implement writable for some intrinsic types 45 45 46 46 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, char ); … … 67 67 68 68 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, ostype * (*)( ostype * ) ); 69 // manipulators70 69 forall( dtype ostype | ostream( ostype ) ) ostype * endl( ostype * ); 71 70 forall( dtype ostype | ostream( ostype ) ) ostype * sepOn( ostype * ); -
src/libcfa/iostream.c
rd1b9d78 r8884112 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 12 18:01:39201613 // Update Count : 30 612 // Last Modified On : Thu May 26 10:08:31 2016 13 // Update Count : 305 14 14 // 15 15 … … 185 185 186 186 forall( dtype ostype | ostream( ostype ) ) 187 ostype * ?|?( ostype * os, ostype * (* manip)( ostype * ) ) {187 ostype * ?|?( ostype *os, ostype * (* manip)( ostype * ) ) { 188 188 return manip( os ); 189 189 } // ?|? -
src/tests/.expect/gccExtensions.txt
rd1b9d78 r8884112 27 27 } 28 28 inline void ___constructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){ 29 ((void)((* ((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ?{} */);30 ((void)((* ((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);31 ((void)((* ((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);29 ((void)((*___dst__P2sS_2).__a__i_2) /* ?{} */); 30 ((void)((*___dst__P2sS_2).__b__i_2) /* ?{} */); 31 ((void)((*___dst__P2sS_2).__c__i_2) /* ?{} */); 32 32 } 33 33 inline void ___constructor__F_P2sS2sS_autogen___2(struct S *___dst__P2sS_2, struct S ___src__2sS_2){ 34 ((void)((* ((int *)(&(*___dst__P2sS_2).__a__i_2)))=___src__2sS_2.__a__i_2) /* ?{} */);35 ((void)((* ((int *)(&(*___dst__P2sS_2).__b__i_2)))=___src__2sS_2.__b__i_2) /* ?{} */);36 ((void)((* ((int *)(&(*___dst__P2sS_2).__c__i_2)))=___src__2sS_2.__c__i_2) /* ?{} */);34 ((void)((*___dst__P2sS_2).__a__i_2=___src__2sS_2.__a__i_2) /* ?{} */); 35 ((void)((*___dst__P2sS_2).__b__i_2=___src__2sS_2.__b__i_2) /* ?{} */); 36 ((void)((*___dst__P2sS_2).__c__i_2=___src__2sS_2.__c__i_2) /* ?{} */); 37 37 } 38 38 inline void ___destructor__F_P2sS_autogen___2(struct S *___dst__P2sS_2){ 39 ((void)((* ((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ^?{} */);40 ((void)((* ((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ^?{} */);41 ((void)((* ((int *)(&(*___dst__P2sS_2).__a__i_2)))) /* ^?{} */);39 ((void)((*___dst__P2sS_2).__c__i_2) /* ^?{} */); 40 ((void)((*___dst__P2sS_2).__b__i_2) /* ^?{} */); 41 ((void)((*___dst__P2sS_2).__a__i_2) /* ^?{} */); 42 42 } 43 43 inline void ___constructor__F_P2sSi_autogen___2(struct S *___dst__P2sS_2, int __a__i_2){ 44 ((void)((* ((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);45 ((void)((* ((int *)(&(*___dst__P2sS_2).__b__i_2)))) /* ?{} */);46 ((void)((* ((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);44 ((void)((*___dst__P2sS_2).__a__i_2=__a__i_2) /* ?{} */); 45 ((void)((*___dst__P2sS_2).__b__i_2) /* ?{} */); 46 ((void)((*___dst__P2sS_2).__c__i_2) /* ?{} */); 47 47 } 48 48 inline void ___constructor__F_P2sSii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2){ 49 ((void)((* ((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);50 ((void)((* ((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);51 ((void)((* ((int *)(&(*___dst__P2sS_2).__c__i_2)))) /* ?{} */);49 ((void)((*___dst__P2sS_2).__a__i_2=__a__i_2) /* ?{} */); 50 ((void)((*___dst__P2sS_2).__b__i_2=__b__i_2) /* ?{} */); 51 ((void)((*___dst__P2sS_2).__c__i_2) /* ?{} */); 52 52 } 53 53 inline void ___constructor__F_P2sSiii_autogen___2(struct S *___dst__P2sS_2, int __a__i_2, int __b__i_2, int __c__i_2){ 54 ((void)((* ((int *)(&(*___dst__P2sS_2).__a__i_2)))=__a__i_2) /* ?{} */);55 ((void)((* ((int *)(&(*___dst__P2sS_2).__b__i_2)))=__b__i_2) /* ?{} */);56 ((void)((* ((int *)(&(*___dst__P2sS_2).__c__i_2)))=__c__i_2) /* ?{} */);54 ((void)((*___dst__P2sS_2).__a__i_2=__a__i_2) /* ?{} */); 55 ((void)((*___dst__P2sS_2).__b__i_2=__b__i_2) /* ?{} */); 56 ((void)((*___dst__P2sS_2).__c__i_2=__c__i_2) /* ?{} */); 57 57 } 58 58 int __i__i_2; … … 92 92 } 93 93 inline void ___constructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){ 94 ((void)((* ((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ?{} */);94 ((void)((*___dst__P3ss2_2).__i__i_2) /* ?{} */); 95 95 } 96 96 inline void ___constructor__F_P3ss23ss2_autogen___2(struct s2 *___dst__P3ss2_2, struct s2 ___src__3ss2_2){ 97 ((void)((* ((int *)(&(*___dst__P3ss2_2).__i__i_2)))=___src__3ss2_2.__i__i_2) /* ?{} */);97 ((void)((*___dst__P3ss2_2).__i__i_2=___src__3ss2_2.__i__i_2) /* ?{} */); 98 98 } 99 99 inline void ___destructor__F_P3ss2_autogen___2(struct s2 *___dst__P3ss2_2){ 100 ((void)((* ((int *)(&(*___dst__P3ss2_2).__i__i_2)))) /* ^?{} */);100 ((void)((*___dst__P3ss2_2).__i__i_2) /* ^?{} */); 101 101 } 102 102 inline void ___constructor__F_P3ss2i_autogen___2(struct s2 *___dst__P3ss2_2, int __i__i_2){ 103 ((void)((* ((int *)(&(*___dst__P3ss2_2).__i__i_2)))=__i__i_2) /* ?{} */);103 ((void)((*___dst__P3ss2_2).__i__i_2=__i__i_2) /* ?{} */); 104 104 } 105 105 struct s3 { … … 111 111 } 112 112 inline void ___constructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){ 113 ((void)((* ((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ?{} */);113 ((void)((*___dst__P3ss3_2).__i__i_2) /* ?{} */); 114 114 } 115 115 inline void ___constructor__F_P3ss33ss3_autogen___2(struct s3 *___dst__P3ss3_2, struct s3 ___src__3ss3_2){ 116 ((void)((* ((int *)(&(*___dst__P3ss3_2).__i__i_2)))=___src__3ss3_2.__i__i_2) /* ?{} */);116 ((void)((*___dst__P3ss3_2).__i__i_2=___src__3ss3_2.__i__i_2) /* ?{} */); 117 117 } 118 118 inline void ___destructor__F_P3ss3_autogen___2(struct s3 *___dst__P3ss3_2){ 119 ((void)((* ((int *)(&(*___dst__P3ss3_2).__i__i_2)))) /* ^?{} */);119 ((void)((*___dst__P3ss3_2).__i__i_2) /* ^?{} */); 120 120 } 121 121 inline void ___constructor__F_P3ss3i_autogen___2(struct s3 *___dst__P3ss3_2, int __i__i_2){ 122 ((void)((* ((int *)(&(*___dst__P3ss3_2).__i__i_2)))=__i__i_2) /* ?{} */);122 ((void)((*___dst__P3ss3_2).__i__i_2=__i__i_2) /* ?{} */); 123 123 } 124 124 struct s3 __x1__3ss3_2; … … 136 136 } 137 137 inline void ___constructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){ 138 ((void)((* ((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ?{} */);138 ((void)((*___dst__P3ss4_2).__i__i_2) /* ?{} */); 139 139 } 140 140 inline void ___constructor__F_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){ 141 ((void)((* ((int *)(&(*___dst__P3ss4_2).__i__i_2)))=___src__3ss4_2.__i__i_2) /* ?{} */);141 ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2) /* ?{} */); 142 142 } 143 143 inline void ___destructor__F_P3ss4_autogen___2(struct s4 *___dst__P3ss4_2){ 144 ((void)((* ((int *)(&(*___dst__P3ss4_2).__i__i_2)))) /* ^?{} */);144 ((void)((*___dst__P3ss4_2).__i__i_2) /* ^?{} */); 145 145 } 146 146 inline void ___constructor__F_P3ss4i_autogen___2(struct s4 *___dst__P3ss4_2, int __i__i_2){ 147 ((void)((* ((int *)(&(*___dst__P3ss4_2).__i__i_2)))=__i__i_2) /* ?{} */);147 ((void)((*___dst__P3ss4_2).__i__i_2=__i__i_2) /* ?{} */); 148 148 } 149 149 struct s4 __x2__3ss4_2; -
src/tests/switch.c
rd1b9d78 r8884112 1 // 2 // Cforall Version 1.0.0 Copyright (C) 2016 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 // switch.c -- 8 // 9 // Author : Peter A. Buhr 10 // Created On : Tue Jul 12 06:50:22 2016 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 12 18:02:23 2016 13 // Update Count : 22 14 // 1 int main(int argc, char const *argv[]) { 2 int i; 3 switch ( i ) case 3 : i = 1; 4 switch ( i ) default : i = 1; 5 switch ( 3 ) 6 default: 7 case 2: 8 case 3: 9 3; 15 10 16 int f( int i ) { return i; } 11 switch ( i ) { 12 } 17 13 18 int main() { 19 int i = 0; 20 switch ( i ) case 3 : i = 1; 21 switch ( i ) default : f( 3 ); 14 switch ( i ) { 15 int i; 16 case 8~10: 17 default: 18 i = 3; 19 case 3: 20 case 'A' ... 'Z': 21 case 5 ... 6: 22 case 2, 4: 23 i = 3; 24 break; 25 } 22 26 23 switch ( 3 ) 24 default: 25 case 2: 26 case 3: 27 f( 3 ); 28 29 switch ( i ) {} 30 switch ( i ) { 31 case 3: 32 f( 3 ); 33 } // switch 34 35 // switch (3 ) { 36 // int j; 37 // case 3: 38 // break; 39 // case 4: 40 // j = 0; 41 // } 42 43 switch ( i ) { 44 int j = 0; 45 int k = 0; 46 struct S { int i; }; 47 S s; 48 case 8~10: 49 default: 50 i = 3; 51 case 3: 52 case 'A' ... 'Z': 53 case 5 ... 6: 54 case 2, 4: 55 j = 3; 56 f( 3 ); 57 break; 58 } // switch 59 60 choose ( i ) case 3 : f( 3 ); 61 choose ( i ) default : i = 1; 62 63 choose ( 3 ) 64 case 2: 65 default: 66 case 3: 67 f( 3 ); 68 69 choose ( i ) {} 70 choose ( i ) { 71 case 3: 72 f( 3 ); 73 } // choose 74 75 choose ( i ) { 76 int j = 0; 77 int k = 0; 78 struct S { int i; }; 79 S s; 80 case 3: 81 case 'A' ... 'Z': 82 case 5 ... 6: 83 case 2, 4, 7: 84 i = 3; 85 f( 3 ); 86 default: 87 j = 3; 88 case 8~10: 89 f( 3 ); 90 fallthru 91 case 'd': 92 j = 5; 93 } // choose 27 choose ( i ) case 3 : i = 1; 28 choose ( i ) default : i = 1; 29 choose ( i ) { 30 int i; 31 case 3: 32 case 'A' ... 'Z': 33 case 5 ... 6: 34 case 2, 4, 7: 35 i = 3; 36 fallthru; 37 default: 38 i = 3; 39 case 8~10: 40 fallthru 41 } 94 42 } 95 96 // Local Variables: //97 // tab-width: 4 //98 // compile-command: "cfa switch.c" //99 // End: //
Note:
See TracChangeset
for help on using the changeset viewer.