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