Changeset cbaee0d
- Timestamp:
- Aug 16, 2016, 9:49:29 PM (8 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:
- 5ead9f9
- Parents:
- 08ac489
- Location:
- src
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.cc
r08ac489 rcbaee0d 10 10 // Created On : Sat May 16 13:26:29 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 16 11:41:39201613 // Update Count : 1 1412 // Last Modified On : Tue Aug 16 21:31:47 2016 13 // Update Count : 125 14 14 // 15 15 … … 28 28 29 29 ParseNode *ParseNode::get_last() { 30 ParseNode *current = this; 31 32 while ( current->get_next() != 0 ) 33 current = current->get_next(); 30 ParseNode *current; 31 for ( current = this; current->get_next() != 0; current = current->get_next() ); 34 32 return current; 35 33 } 36 34 37 ParseNode *ParseNode::set_last( ParseNode *ne xt_) {38 if ( ne xt_ != 0 ) get_last()->next = next_;35 ParseNode *ParseNode::set_last( ParseNode *newlast ) { 36 if ( newlast != 0 ) get_last()->set_next( newlast ); 39 37 return this; 40 38 } -
src/Parser/ParseNode.h
r08ac489 rcbaee0d 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 16 11:46:11201613 // Update Count : 53 312 // Last Modified On : Tue Aug 16 21:32:18 2016 13 // Update Count : 538 14 14 // 15 15 … … 49 49 ParseNode *set_next( ParseNode *newlink ) { next = newlink; return this; } 50 50 ParseNode *get_last(); 51 ParseNode *set_last( ParseNode * );51 ParseNode *set_last( ParseNode *newlast ); 52 52 53 53 const std::string &get_name() const { return name; } -
src/Parser/parser.cc
r08ac489 rcbaee0d 83 83 #include "LinkageSpec.h" 84 84 85 extern DeclarationNode * parseTree;85 extern DeclarationNode * parseTree; 86 86 extern LinkageSpec::Type linkage; 87 87 extern TypedefTable typedefTable; … … 1070 1070 1862, 1867, 1869, 1870, 1872, 1877, 1879, 1881, 1886, 1888, 1071 1071 1893, 1898, 1906, 1912, 1911, 1925, 1926, 1931, 1932, 1936, 1072 1941, 1946, 1954, 1959, 1970, 1971, 19 82, 1983, 1989, 1990,1073 19 94, 1995, 1996, 1999, 1998, 2009, 2018, 2024, 2030, 2039,1074 20 45, 2051, 2057, 2063, 2071, 2077, 2085, 2091, 2100, 2101,1075 2 102, 2106, 2110, 2112, 2117, 2118, 2122, 2123, 2128, 2134,1076 21 35, 2138, 2140, 2141, 2145, 2146, 2147, 2148, 2182, 2184,1077 21 85, 2187, 2192, 2197, 2202, 2204, 2206, 2211, 2213, 2215,1078 221 7, 2222, 2224, 2233, 2235, 2236, 2241, 2243, 2245, 2250,1079 22 52, 2254, 2259, 2261, 2263, 2272, 2273, 2274, 2278, 2280,1080 22 82, 2287, 2289, 2291, 2296, 2298, 2300, 2315, 2317, 2318,1081 23 20, 2325, 2326, 2331, 2333, 2335, 2340, 2342, 2344, 2346,1082 23 51, 2353, 2355, 2365, 2367, 2368, 2370, 2375, 2377, 2379,1083 23 84, 2386, 2388, 2390, 2395, 2397, 2399, 2430, 2432, 2433,1084 24 35, 2440, 2445, 2453, 2455, 2457, 2462, 2464, 2469, 2471,1085 24 85, 2486, 2488, 2493, 2495, 2497, 2499, 2501, 2506, 2507,1086 250 9, 2511, 2516, 2518, 2520, 2526, 2528, 2530, 2534, 2536,1087 253 8, 2540, 2554, 2555, 2557, 2562, 2564, 2566, 2568, 2570,1088 25 75, 2576, 2578, 2580, 2585, 2587, 2589, 2595, 2596, 2598,1089 260 7, 2610, 2612, 2615, 2617, 2619, 2632, 2633, 2635, 2640,1090 26 42, 2644, 2646, 2648, 2653, 2654, 2656, 2658, 2663, 2665,1091 26 73, 2674, 2675, 2680, 2681, 2685, 2687, 2689, 2691, 2693,1092 26 95, 2702, 2704, 2706, 2708, 2710, 2712, 2714, 2716, 2718,1093 27 20, 2725, 2727, 2729, 2734, 2760, 2761, 2763, 2767, 2768,1094 27 72, 2774, 2776, 2778, 2780, 2782, 2789, 2791, 2793, 2795,1095 279 7, 2799, 2804, 2809, 2811, 2813, 2831, 2833, 2838, 28391072 1941, 1946, 1954, 1959, 1970, 1971, 1976, 1977, 1983, 1984, 1073 1988, 1989, 1990, 1993, 1992, 2003, 2012, 2018, 2024, 2033, 1074 2039, 2045, 2051, 2057, 2065, 2071, 2079, 2085, 2094, 2095, 1075 2096, 2100, 2104, 2106, 2111, 2112, 2116, 2117, 2122, 2128, 1076 2129, 2132, 2134, 2135, 2139, 2140, 2141, 2142, 2176, 2178, 1077 2179, 2181, 2186, 2191, 2196, 2198, 2200, 2205, 2207, 2209, 1078 2211, 2216, 2218, 2227, 2229, 2230, 2235, 2237, 2239, 2244, 1079 2246, 2248, 2253, 2255, 2257, 2266, 2267, 2268, 2272, 2274, 1080 2276, 2281, 2283, 2285, 2290, 2292, 2294, 2309, 2311, 2312, 1081 2314, 2319, 2320, 2325, 2327, 2329, 2334, 2336, 2338, 2340, 1082 2345, 2347, 2349, 2359, 2361, 2362, 2364, 2369, 2371, 2373, 1083 2378, 2380, 2382, 2384, 2389, 2391, 2393, 2424, 2426, 2427, 1084 2429, 2434, 2439, 2447, 2449, 2451, 2456, 2458, 2463, 2465, 1085 2479, 2480, 2482, 2487, 2489, 2491, 2493, 2495, 2500, 2501, 1086 2503, 2505, 2510, 2512, 2514, 2520, 2522, 2524, 2528, 2530, 1087 2532, 2534, 2548, 2549, 2551, 2556, 2558, 2560, 2562, 2564, 1088 2569, 2570, 2572, 2574, 2579, 2581, 2583, 2589, 2590, 2592, 1089 2601, 2604, 2606, 2609, 2611, 2613, 2626, 2627, 2629, 2634, 1090 2636, 2638, 2640, 2642, 2647, 2648, 2650, 2652, 2657, 2659, 1091 2667, 2668, 2669, 2674, 2675, 2679, 2681, 2683, 2685, 2687, 1092 2689, 2696, 2698, 2700, 2702, 2704, 2706, 2708, 2710, 2712, 1093 2714, 2719, 2721, 2723, 2728, 2754, 2755, 2757, 2761, 2762, 1094 2766, 2768, 2770, 2772, 2774, 2776, 2783, 2785, 2787, 2789, 1095 2791, 2793, 2798, 2803, 2805, 2807, 2825, 2827, 2832, 2833 1096 1096 }; 1097 1097 #endif … … 7772 7772 /* Line 1806 of yacc.c */ 7773 7773 #line 1972 "parser.yy" 7774 { 7775 if ( parseTree ) { 7776 parseTree->appendList( (yyvsp[(1) - (1)].decl) ); 7777 } else { 7778 parseTree = (yyvsp[(1) - (1)].decl); 7779 } 7780 } 7774 { parseTree = parseTree ? parseTree->appendList( (yyvsp[(1) - (1)].decl) ) : (yyvsp[(1) - (1)].decl); } 7781 7775 break; 7782 7776 … … 7784 7778 7785 7779 /* Line 1806 of yacc.c */ 7786 #line 19 84"parser.yy"7780 #line 1978 "parser.yy" 7787 7781 { (yyval.decl) = ( (yyvsp[(1) - (3)].decl) != NULL ) ? (yyvsp[(1) - (3)].decl)->appendList( (yyvsp[(3) - (3)].decl) ) : (yyvsp[(3) - (3)].decl); } 7788 7782 break; … … 7791 7785 7792 7786 /* Line 1806 of yacc.c */ 7793 #line 198 9"parser.yy"7787 #line 1983 "parser.yy" 7794 7788 { (yyval.decl) = 0; } 7795 7789 break; … … 7798 7792 7799 7793 /* Line 1806 of yacc.c */ 7800 #line 199 7"parser.yy"7794 #line 1991 "parser.yy" 7801 7795 {} 7802 7796 break; … … 7805 7799 7806 7800 /* Line 1806 of yacc.c */ 7807 #line 199 9"parser.yy"7801 #line 1993 "parser.yy" 7808 7802 { 7809 7803 linkageStack.push( linkage ); … … 7815 7809 7816 7810 /* Line 1806 of yacc.c */ 7817 #line 2004"parser.yy"7811 #line 1998 "parser.yy" 7818 7812 { 7819 7813 linkage = linkageStack.top(); … … 7826 7820 7827 7821 /* Line 1806 of yacc.c */ 7828 #line 20 10"parser.yy"7822 #line 2004 "parser.yy" 7829 7823 { // mark all fields in list 7830 7824 for ( DeclarationNode *iter = (yyvsp[(2) - (2)].decl); iter != NULL; iter = (DeclarationNode *)iter->get_next() ) … … 7837 7831 7838 7832 /* Line 1806 of yacc.c */ 7839 #line 20 25"parser.yy"7833 #line 2019 "parser.yy" 7840 7834 { 7841 7835 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7848 7842 7849 7843 /* Line 1806 of yacc.c */ 7850 #line 20 31"parser.yy"7844 #line 2025 "parser.yy" 7851 7845 { 7852 7846 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7859 7853 7860 7854 /* Line 1806 of yacc.c */ 7861 #line 20 40"parser.yy"7855 #line 2034 "parser.yy" 7862 7856 { 7863 7857 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7870 7864 7871 7865 /* Line 1806 of yacc.c */ 7872 #line 204 6"parser.yy"7866 #line 2040 "parser.yy" 7873 7867 { 7874 7868 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7879 7873 7880 7874 case 531: 7875 7876 /* Line 1806 of yacc.c */ 7877 #line 2046 "parser.yy" 7878 { 7879 typedefTable.addToEnclosingScope( TypedefTable::ID ); 7880 typedefTable.leaveScope(); 7881 (yyval.decl) = (yyvsp[(2) - (3)].decl)->addFunctionBody( (yyvsp[(3) - (3)].sn) )->addQualifiers( (yyvsp[(1) - (3)].decl) ); 7882 } 7883 break; 7884 7885 case 532: 7881 7886 7882 7887 /* Line 1806 of yacc.c */ … … 7889 7894 break; 7890 7895 7891 case 53 2:7896 case 533: 7892 7897 7893 7898 /* Line 1806 of yacc.c */ 7894 7899 #line 2058 "parser.yy" 7895 {7896 typedefTable.addToEnclosingScope( TypedefTable::ID );7897 typedefTable.leaveScope();7898 (yyval.decl) = (yyvsp[(2) - (3)].decl)->addFunctionBody( (yyvsp[(3) - (3)].sn) )->addQualifiers( (yyvsp[(1) - (3)].decl) );7899 }7900 break;7901 7902 case 533:7903 7904 /* Line 1806 of yacc.c */7905 #line 2064 "parser.yy"7906 7900 { 7907 7901 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7914 7908 7915 7909 /* Line 1806 of yacc.c */ 7916 #line 20 72"parser.yy"7910 #line 2066 "parser.yy" 7917 7911 { 7918 7912 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7925 7919 7926 7920 /* Line 1806 of yacc.c */ 7927 #line 207 8"parser.yy"7921 #line 2072 "parser.yy" 7928 7922 { 7929 7923 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7936 7930 7937 7931 /* Line 1806 of yacc.c */ 7938 #line 208 6"parser.yy"7932 #line 2080 "parser.yy" 7939 7933 { 7940 7934 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7947 7941 7948 7942 /* Line 1806 of yacc.c */ 7949 #line 20 92"parser.yy"7943 #line 2086 "parser.yy" 7950 7944 { 7951 7945 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 7958 7952 7959 7953 /* Line 1806 of yacc.c */ 7960 #line 210 7"parser.yy"7954 #line 2101 "parser.yy" 7961 7955 { (yyval.en) = new ExpressionNode( build_range( (yyvsp[(1) - (3)].en), (yyvsp[(3) - (3)].en) ) ); } 7962 7956 break; … … 7965 7959 7966 7960 /* Line 1806 of yacc.c */ 7967 #line 211 7"parser.yy"7961 #line 2111 "parser.yy" 7968 7962 { (yyval.decl) = 0; } 7969 7963 break; … … 7972 7966 7973 7967 /* Line 1806 of yacc.c */ 7968 #line 2118 "parser.yy" 7969 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 7970 break; 7971 7972 case 548: 7973 7974 /* Line 1806 of yacc.c */ 7974 7975 #line 2124 "parser.yy" 7975 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); }7976 break;7977 7978 case 548:7979 7980 /* Line 1806 of yacc.c */7981 #line 2130 "parser.yy"7982 7976 { (yyval.decl) = 0; } 7983 7977 break; … … 7986 7980 7987 7981 /* Line 1806 of yacc.c */ 7988 #line 21 45"parser.yy"7982 #line 2139 "parser.yy" 7989 7983 {} 7990 7984 break; … … 7993 7987 7994 7988 /* Line 1806 of yacc.c */ 7995 #line 214 6"parser.yy"7989 #line 2140 "parser.yy" 7996 7990 {} 7997 7991 break; … … 8000 7994 8001 7995 /* Line 1806 of yacc.c */ 8002 #line 214 7"parser.yy"7996 #line 2141 "parser.yy" 8003 7997 {} 8004 7998 break; … … 8007 8001 8008 8002 /* Line 1806 of yacc.c */ 8009 #line 214 8"parser.yy"8003 #line 2142 "parser.yy" 8010 8004 {} 8011 8005 break; … … 8014 8008 8015 8009 /* Line 1806 of yacc.c */ 8016 #line 21 83"parser.yy"8010 #line 2177 "parser.yy" 8017 8011 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8018 8012 break; … … 8021 8015 8022 8016 /* Line 1806 of yacc.c */ 8023 #line 218 6"parser.yy"8017 #line 2180 "parser.yy" 8024 8018 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8025 8019 break; … … 8028 8022 8029 8023 /* Line 1806 of yacc.c */ 8030 #line 218 8"parser.yy"8024 #line 2182 "parser.yy" 8031 8025 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8032 8026 break; … … 8035 8029 8036 8030 /* Line 1806 of yacc.c */ 8037 #line 21 93"parser.yy"8031 #line 2187 "parser.yy" 8038 8032 { 8039 8033 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8045 8039 8046 8040 /* Line 1806 of yacc.c */ 8047 #line 219 8"parser.yy"8041 #line 2192 "parser.yy" 8048 8042 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8049 8043 break; … … 8052 8046 8053 8047 /* Line 1806 of yacc.c */ 8054 #line 2 203"parser.yy"8048 #line 2197 "parser.yy" 8055 8049 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8056 8050 break; … … 8059 8053 8060 8054 /* Line 1806 of yacc.c */ 8061 #line 2 205"parser.yy"8055 #line 2199 "parser.yy" 8062 8056 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8063 8057 break; … … 8066 8060 8067 8061 /* Line 1806 of yacc.c */ 8068 #line 220 7"parser.yy"8062 #line 2201 "parser.yy" 8069 8063 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8070 8064 break; … … 8073 8067 8074 8068 /* Line 1806 of yacc.c */ 8069 #line 2206 "parser.yy" 8070 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8071 break; 8072 8073 case 568: 8074 8075 /* Line 1806 of yacc.c */ 8076 #line 2208 "parser.yy" 8077 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8078 break; 8079 8080 case 569: 8081 8082 /* Line 1806 of yacc.c */ 8083 #line 2210 "parser.yy" 8084 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8085 break; 8086 8087 case 570: 8088 8089 /* Line 1806 of yacc.c */ 8075 8090 #line 2212 "parser.yy" 8091 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8092 break; 8093 8094 case 571: 8095 8096 /* Line 1806 of yacc.c */ 8097 #line 2217 "parser.yy" 8098 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8099 break; 8100 8101 case 572: 8102 8103 /* Line 1806 of yacc.c */ 8104 #line 2219 "parser.yy" 8105 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8106 break; 8107 8108 case 573: 8109 8110 /* Line 1806 of yacc.c */ 8111 #line 2228 "parser.yy" 8112 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8113 break; 8114 8115 case 575: 8116 8117 /* Line 1806 of yacc.c */ 8118 #line 2231 "parser.yy" 8119 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8120 break; 8121 8122 case 576: 8123 8124 /* Line 1806 of yacc.c */ 8125 #line 2236 "parser.yy" 8126 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8127 break; 8128 8129 case 577: 8130 8131 /* Line 1806 of yacc.c */ 8132 #line 2238 "parser.yy" 8133 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8134 break; 8135 8136 case 578: 8137 8138 /* Line 1806 of yacc.c */ 8139 #line 2240 "parser.yy" 8140 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8141 break; 8142 8143 case 579: 8144 8145 /* Line 1806 of yacc.c */ 8146 #line 2245 "parser.yy" 8147 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8148 break; 8149 8150 case 580: 8151 8152 /* Line 1806 of yacc.c */ 8153 #line 2247 "parser.yy" 8154 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8155 break; 8156 8157 case 581: 8158 8159 /* Line 1806 of yacc.c */ 8160 #line 2249 "parser.yy" 8161 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8162 break; 8163 8164 case 582: 8165 8166 /* Line 1806 of yacc.c */ 8167 #line 2254 "parser.yy" 8168 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8169 break; 8170 8171 case 583: 8172 8173 /* Line 1806 of yacc.c */ 8174 #line 2256 "parser.yy" 8175 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8176 break; 8177 8178 case 584: 8179 8180 /* Line 1806 of yacc.c */ 8181 #line 2258 "parser.yy" 8182 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8183 break; 8184 8185 case 588: 8186 8187 /* Line 1806 of yacc.c */ 8188 #line 2273 "parser.yy" 8189 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); } 8190 break; 8191 8192 case 589: 8193 8194 /* Line 1806 of yacc.c */ 8195 #line 2275 "parser.yy" 8196 { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); } 8197 break; 8198 8199 case 590: 8200 8201 /* Line 1806 of yacc.c */ 8202 #line 2277 "parser.yy" 8203 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8204 break; 8205 8206 case 591: 8207 8208 /* Line 1806 of yacc.c */ 8209 #line 2282 "parser.yy" 8210 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8211 break; 8212 8213 case 592: 8214 8215 /* Line 1806 of yacc.c */ 8216 #line 2284 "parser.yy" 8217 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8218 break; 8219 8220 case 593: 8221 8222 /* Line 1806 of yacc.c */ 8223 #line 2286 "parser.yy" 8224 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8225 break; 8226 8227 case 594: 8228 8229 /* Line 1806 of yacc.c */ 8230 #line 2291 "parser.yy" 8231 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8232 break; 8233 8234 case 595: 8235 8236 /* Line 1806 of yacc.c */ 8237 #line 2293 "parser.yy" 8238 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8239 break; 8240 8241 case 596: 8242 8243 /* Line 1806 of yacc.c */ 8244 #line 2295 "parser.yy" 8245 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8246 break; 8247 8248 case 597: 8249 8250 /* Line 1806 of yacc.c */ 8251 #line 2310 "parser.yy" 8252 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8253 break; 8254 8255 case 599: 8256 8257 /* Line 1806 of yacc.c */ 8258 #line 2313 "parser.yy" 8259 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8260 break; 8261 8262 case 600: 8263 8264 /* Line 1806 of yacc.c */ 8265 #line 2315 "parser.yy" 8266 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8267 break; 8268 8269 case 602: 8270 8271 /* Line 1806 of yacc.c */ 8272 #line 2321 "parser.yy" 8273 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8274 break; 8275 8276 case 603: 8277 8278 /* Line 1806 of yacc.c */ 8279 #line 2326 "parser.yy" 8280 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8281 break; 8282 8283 case 604: 8284 8285 /* Line 1806 of yacc.c */ 8286 #line 2328 "parser.yy" 8287 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8288 break; 8289 8290 case 605: 8291 8292 /* Line 1806 of yacc.c */ 8293 #line 2330 "parser.yy" 8294 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8295 break; 8296 8297 case 606: 8298 8299 /* Line 1806 of yacc.c */ 8300 #line 2335 "parser.yy" 8076 8301 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8077 8302 break; 8078 8303 8079 case 568:8080 8081 /* Line 1806 of yacc.c */ 8082 #line 2 214"parser.yy"8304 case 607: 8305 8306 /* Line 1806 of yacc.c */ 8307 #line 2337 "parser.yy" 8083 8308 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8084 8309 break; 8085 8310 8086 case 569:8087 8088 /* Line 1806 of yacc.c */ 8089 #line 2 216"parser.yy"8311 case 608: 8312 8313 /* Line 1806 of yacc.c */ 8314 #line 2339 "parser.yy" 8090 8315 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8091 8316 break; 8092 8317 8093 case 570:8094 8095 /* Line 1806 of yacc.c */ 8096 #line 2 218"parser.yy"8318 case 609: 8319 8320 /* Line 1806 of yacc.c */ 8321 #line 2341 "parser.yy" 8097 8322 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8098 8323 break; 8099 8324 8100 case 571: 8101 8102 /* Line 1806 of yacc.c */ 8103 #line 2223 "parser.yy" 8325 case 610: 8326 8327 /* Line 1806 of yacc.c */ 8328 #line 2346 "parser.yy" 8329 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8330 break; 8331 8332 case 611: 8333 8334 /* Line 1806 of yacc.c */ 8335 #line 2348 "parser.yy" 8104 8336 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8105 8337 break; 8106 8338 8107 case 572:8108 8109 /* Line 1806 of yacc.c */ 8110 #line 2 225"parser.yy"8339 case 612: 8340 8341 /* Line 1806 of yacc.c */ 8342 #line 2350 "parser.yy" 8111 8343 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8112 8344 break; 8113 8345 8114 case 573:8115 8116 /* Line 1806 of yacc.c */ 8117 #line 2 234"parser.yy"8346 case 613: 8347 8348 /* Line 1806 of yacc.c */ 8349 #line 2360 "parser.yy" 8118 8350 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8119 8351 break; 8120 8352 8121 case 575:8122 8123 /* Line 1806 of yacc.c */ 8124 #line 2 237"parser.yy"8353 case 615: 8354 8355 /* Line 1806 of yacc.c */ 8356 #line 2363 "parser.yy" 8125 8357 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8126 8358 break; 8127 8359 8128 case 576: 8129 8130 /* Line 1806 of yacc.c */ 8131 #line 2242 "parser.yy" 8360 case 616: 8361 8362 /* Line 1806 of yacc.c */ 8363 #line 2365 "parser.yy" 8364 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8365 break; 8366 8367 case 617: 8368 8369 /* Line 1806 of yacc.c */ 8370 #line 2370 "parser.yy" 8371 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8372 break; 8373 8374 case 618: 8375 8376 /* Line 1806 of yacc.c */ 8377 #line 2372 "parser.yy" 8378 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8379 break; 8380 8381 case 619: 8382 8383 /* Line 1806 of yacc.c */ 8384 #line 2374 "parser.yy" 8385 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8386 break; 8387 8388 case 620: 8389 8390 /* Line 1806 of yacc.c */ 8391 #line 2379 "parser.yy" 8392 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8393 break; 8394 8395 case 621: 8396 8397 /* Line 1806 of yacc.c */ 8398 #line 2381 "parser.yy" 8399 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8400 break; 8401 8402 case 622: 8403 8404 /* Line 1806 of yacc.c */ 8405 #line 2383 "parser.yy" 8406 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8407 break; 8408 8409 case 623: 8410 8411 /* Line 1806 of yacc.c */ 8412 #line 2385 "parser.yy" 8413 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8414 break; 8415 8416 case 624: 8417 8418 /* Line 1806 of yacc.c */ 8419 #line 2390 "parser.yy" 8132 8420 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8133 8421 break; 8134 8422 8135 case 577:8136 8137 /* Line 1806 of yacc.c */ 8138 #line 2 244"parser.yy"8423 case 625: 8424 8425 /* Line 1806 of yacc.c */ 8426 #line 2392 "parser.yy" 8139 8427 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8140 8428 break; 8141 8429 8142 case 578:8143 8144 /* Line 1806 of yacc.c */ 8145 #line 2 246"parser.yy"8430 case 626: 8431 8432 /* Line 1806 of yacc.c */ 8433 #line 2394 "parser.yy" 8146 8434 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8147 8435 break; 8148 8436 8149 case 579: 8150 8151 /* Line 1806 of yacc.c */ 8152 #line 2251 "parser.yy" 8153 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8154 break; 8155 8156 case 580: 8157 8158 /* Line 1806 of yacc.c */ 8159 #line 2253 "parser.yy" 8160 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8161 break; 8162 8163 case 581: 8164 8165 /* Line 1806 of yacc.c */ 8166 #line 2255 "parser.yy" 8167 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8168 break; 8169 8170 case 582: 8171 8172 /* Line 1806 of yacc.c */ 8173 #line 2260 "parser.yy" 8174 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8175 break; 8176 8177 case 583: 8178 8179 /* Line 1806 of yacc.c */ 8180 #line 2262 "parser.yy" 8181 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8182 break; 8183 8184 case 584: 8185 8186 /* Line 1806 of yacc.c */ 8187 #line 2264 "parser.yy" 8188 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8189 break; 8190 8191 case 588: 8192 8193 /* Line 1806 of yacc.c */ 8194 #line 2279 "parser.yy" 8195 { (yyval.decl) = (yyvsp[(1) - (4)].decl)->addIdList( (yyvsp[(3) - (4)].decl) ); } 8196 break; 8197 8198 case 589: 8199 8200 /* Line 1806 of yacc.c */ 8201 #line 2281 "parser.yy" 8202 { (yyval.decl) = (yyvsp[(2) - (6)].decl)->addIdList( (yyvsp[(5) - (6)].decl) ); } 8203 break; 8204 8205 case 590: 8206 8207 /* Line 1806 of yacc.c */ 8208 #line 2283 "parser.yy" 8209 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8210 break; 8211 8212 case 591: 8213 8214 /* Line 1806 of yacc.c */ 8215 #line 2288 "parser.yy" 8216 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8217 break; 8218 8219 case 592: 8220 8221 /* Line 1806 of yacc.c */ 8222 #line 2290 "parser.yy" 8223 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8224 break; 8225 8226 case 593: 8227 8228 /* Line 1806 of yacc.c */ 8229 #line 2292 "parser.yy" 8230 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8231 break; 8232 8233 case 594: 8234 8235 /* Line 1806 of yacc.c */ 8236 #line 2297 "parser.yy" 8237 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8238 break; 8239 8240 case 595: 8241 8242 /* Line 1806 of yacc.c */ 8243 #line 2299 "parser.yy" 8244 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8245 break; 8246 8247 case 596: 8248 8249 /* Line 1806 of yacc.c */ 8250 #line 2301 "parser.yy" 8251 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8252 break; 8253 8254 case 597: 8255 8256 /* Line 1806 of yacc.c */ 8257 #line 2316 "parser.yy" 8437 case 627: 8438 8439 /* Line 1806 of yacc.c */ 8440 #line 2425 "parser.yy" 8258 8441 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8259 8442 break; 8260 8443 8261 case 599:8262 8263 /* Line 1806 of yacc.c */ 8264 #line 2 319"parser.yy"8444 case 629: 8445 8446 /* Line 1806 of yacc.c */ 8447 #line 2428 "parser.yy" 8265 8448 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8266 8449 break; 8267 8450 8268 case 6 00:8269 8270 /* Line 1806 of yacc.c */ 8271 #line 2 321"parser.yy"8451 case 630: 8452 8453 /* Line 1806 of yacc.c */ 8454 #line 2430 "parser.yy" 8272 8455 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8273 8456 break; 8274 8457 8275 case 602:8276 8277 /* Line 1806 of yacc.c */8278 #line 2327 "parser.yy"8279 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8280 break;8281 8282 case 603:8283 8284 /* Line 1806 of yacc.c */8285 #line 2332 "parser.yy"8286 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }8287 break;8288 8289 case 604:8290 8291 /* Line 1806 of yacc.c */8292 #line 2334 "parser.yy"8293 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }8294 break;8295 8296 case 605:8297 8298 /* Line 1806 of yacc.c */8299 #line 2336 "parser.yy"8300 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8301 break;8302 8303 case 606:8304 8305 /* Line 1806 of yacc.c */8306 #line 2341 "parser.yy"8307 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }8308 break;8309 8310 case 607:8311 8312 /* Line 1806 of yacc.c */8313 #line 2343 "parser.yy"8314 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8315 break;8316 8317 case 608:8318 8319 /* Line 1806 of yacc.c */8320 #line 2345 "parser.yy"8321 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8322 break;8323 8324 case 609:8325 8326 /* Line 1806 of yacc.c */8327 #line 2347 "parser.yy"8328 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8329 break;8330 8331 case 610:8332 8333 /* Line 1806 of yacc.c */8334 #line 2352 "parser.yy"8335 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }8336 break;8337 8338 case 611:8339 8340 /* Line 1806 of yacc.c */8341 #line 2354 "parser.yy"8342 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }8343 break;8344 8345 case 612:8346 8347 /* Line 1806 of yacc.c */8348 #line 2356 "parser.yy"8349 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8350 break;8351 8352 case 613:8353 8354 /* Line 1806 of yacc.c */8355 #line 2366 "parser.yy"8356 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8357 break;8358 8359 case 615:8360 8361 /* Line 1806 of yacc.c */8362 #line 2369 "parser.yy"8363 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8364 break;8365 8366 case 616:8367 8368 /* Line 1806 of yacc.c */8369 #line 2371 "parser.yy"8370 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8371 break;8372 8373 case 617:8374 8375 /* Line 1806 of yacc.c */8376 #line 2376 "parser.yy"8377 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }8378 break;8379 8380 case 618:8381 8382 /* Line 1806 of yacc.c */8383 #line 2378 "parser.yy"8384 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }8385 break;8386 8387 case 619:8388 8389 /* Line 1806 of yacc.c */8390 #line 2380 "parser.yy"8391 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8392 break;8393 8394 case 620:8395 8396 /* Line 1806 of yacc.c */8397 #line 2385 "parser.yy"8398 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }8399 break;8400 8401 case 621:8402 8403 /* Line 1806 of yacc.c */8404 #line 2387 "parser.yy"8405 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8406 break;8407 8408 case 622:8409 8410 /* Line 1806 of yacc.c */8411 #line 2389 "parser.yy"8412 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8413 break;8414 8415 case 623:8416 8417 /* Line 1806 of yacc.c */8418 #line 2391 "parser.yy"8419 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8420 break;8421 8422 case 624:8423 8424 /* Line 1806 of yacc.c */8425 #line 2396 "parser.yy"8426 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); }8427 break;8428 8429 case 625:8430 8431 /* Line 1806 of yacc.c */8432 #line 2398 "parser.yy"8433 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }8434 break;8435 8436 case 626:8437 8438 /* Line 1806 of yacc.c */8439 #line 2400 "parser.yy"8440 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8441 break;8442 8443 case 627:8444 8445 /* Line 1806 of yacc.c */8446 #line 2431 "parser.yy"8447 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8448 break;8449 8450 case 629:8451 8452 /* Line 1806 of yacc.c */8453 #line 2434 "parser.yy"8454 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8455 break;8456 8457 case 630:8458 8459 /* Line 1806 of yacc.c */8460 #line 2436 "parser.yy"8461 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8462 break;8463 8464 8458 case 631: 8465 8459 8466 8460 /* Line 1806 of yacc.c */ 8467 #line 24 41"parser.yy"8461 #line 2435 "parser.yy" 8468 8462 { 8469 8463 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8475 8469 8476 8470 /* Line 1806 of yacc.c */ 8477 #line 244 6"parser.yy"8471 #line 2440 "parser.yy" 8478 8472 { 8479 8473 typedefTable.setNextIdentifier( *(yyvsp[(1) - (1)].tok) ); … … 8485 8479 8486 8480 /* Line 1806 of yacc.c */ 8487 #line 24 54"parser.yy"8481 #line 2448 "parser.yy" 8488 8482 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8489 8483 break; … … 8492 8486 8493 8487 /* Line 1806 of yacc.c */ 8494 #line 245 6"parser.yy"8488 #line 2450 "parser.yy" 8495 8489 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8496 8490 break; … … 8499 8493 8500 8494 /* Line 1806 of yacc.c */ 8501 #line 245 8"parser.yy"8495 #line 2452 "parser.yy" 8502 8496 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8503 8497 break; … … 8506 8500 8507 8501 /* Line 1806 of yacc.c */ 8508 #line 24 63"parser.yy"8502 #line 2457 "parser.yy" 8509 8503 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8510 8504 break; … … 8513 8507 8514 8508 /* Line 1806 of yacc.c */ 8515 #line 24 65"parser.yy"8509 #line 2459 "parser.yy" 8516 8510 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8517 8511 break; … … 8520 8514 8521 8515 /* Line 1806 of yacc.c */ 8522 #line 24 70"parser.yy"8516 #line 2464 "parser.yy" 8523 8517 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addParamList( (yyvsp[(4) - (6)].decl) ); } 8524 8518 break; … … 8527 8521 8528 8522 /* Line 1806 of yacc.c */ 8529 #line 24 72"parser.yy"8523 #line 2466 "parser.yy" 8530 8524 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8531 8525 break; … … 8534 8528 8535 8529 /* Line 1806 of yacc.c */ 8536 #line 248 7"parser.yy"8530 #line 2481 "parser.yy" 8537 8531 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8538 8532 break; … … 8541 8535 8542 8536 /* Line 1806 of yacc.c */ 8543 #line 248 9"parser.yy"8537 #line 2483 "parser.yy" 8544 8538 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8545 8539 break; … … 8548 8542 8549 8543 /* Line 1806 of yacc.c */ 8544 #line 2488 "parser.yy" 8545 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8546 break; 8547 8548 case 644: 8549 8550 /* Line 1806 of yacc.c */ 8551 #line 2490 "parser.yy" 8552 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8553 break; 8554 8555 case 645: 8556 8557 /* Line 1806 of yacc.c */ 8558 #line 2492 "parser.yy" 8559 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8560 break; 8561 8562 case 646: 8563 8564 /* Line 1806 of yacc.c */ 8550 8565 #line 2494 "parser.yy" 8566 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8567 break; 8568 8569 case 647: 8570 8571 /* Line 1806 of yacc.c */ 8572 #line 2496 "parser.yy" 8573 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8574 break; 8575 8576 case 649: 8577 8578 /* Line 1806 of yacc.c */ 8579 #line 2502 "parser.yy" 8580 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8581 break; 8582 8583 case 650: 8584 8585 /* Line 1806 of yacc.c */ 8586 #line 2504 "parser.yy" 8587 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8588 break; 8589 8590 case 651: 8591 8592 /* Line 1806 of yacc.c */ 8593 #line 2506 "parser.yy" 8594 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8595 break; 8596 8597 case 652: 8598 8599 /* Line 1806 of yacc.c */ 8600 #line 2511 "parser.yy" 8601 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8602 break; 8603 8604 case 653: 8605 8606 /* Line 1806 of yacc.c */ 8607 #line 2513 "parser.yy" 8608 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8609 break; 8610 8611 case 654: 8612 8613 /* Line 1806 of yacc.c */ 8614 #line 2515 "parser.yy" 8615 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8616 break; 8617 8618 case 655: 8619 8620 /* Line 1806 of yacc.c */ 8621 #line 2521 "parser.yy" 8622 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8623 break; 8624 8625 case 656: 8626 8627 /* Line 1806 of yacc.c */ 8628 #line 2523 "parser.yy" 8629 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); } 8630 break; 8631 8632 case 658: 8633 8634 /* Line 1806 of yacc.c */ 8635 #line 2529 "parser.yy" 8636 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); } 8637 break; 8638 8639 case 659: 8640 8641 /* Line 1806 of yacc.c */ 8642 #line 2531 "parser.yy" 8643 { (yyval.decl) = DeclarationNode::newVarArray( 0 ); } 8644 break; 8645 8646 case 660: 8647 8648 /* Line 1806 of yacc.c */ 8649 #line 2533 "parser.yy" 8650 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false ) ); } 8651 break; 8652 8653 case 661: 8654 8655 /* Line 1806 of yacc.c */ 8656 #line 2535 "parser.yy" 8657 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 ) ); } 8658 break; 8659 8660 case 663: 8661 8662 /* Line 1806 of yacc.c */ 8663 #line 2550 "parser.yy" 8664 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8665 break; 8666 8667 case 664: 8668 8669 /* Line 1806 of yacc.c */ 8670 #line 2552 "parser.yy" 8671 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8672 break; 8673 8674 case 665: 8675 8676 /* Line 1806 of yacc.c */ 8677 #line 2557 "parser.yy" 8551 8678 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8552 8679 break; 8553 8680 8554 case 6 44:8555 8556 /* Line 1806 of yacc.c */ 8557 #line 2 496"parser.yy"8681 case 666: 8682 8683 /* Line 1806 of yacc.c */ 8684 #line 2559 "parser.yy" 8558 8685 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8559 8686 break; 8560 8687 8561 case 6 45:8562 8563 /* Line 1806 of yacc.c */ 8564 #line 2 498"parser.yy"8688 case 667: 8689 8690 /* Line 1806 of yacc.c */ 8691 #line 2561 "parser.yy" 8565 8692 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8566 8693 break; 8567 8694 8568 case 6 46:8569 8570 /* Line 1806 of yacc.c */ 8571 #line 25 00"parser.yy"8695 case 668: 8696 8697 /* Line 1806 of yacc.c */ 8698 #line 2563 "parser.yy" 8572 8699 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8573 8700 break; 8574 8701 8575 case 6 47:8576 8577 /* Line 1806 of yacc.c */ 8578 #line 25 02"parser.yy"8702 case 669: 8703 8704 /* Line 1806 of yacc.c */ 8705 #line 2565 "parser.yy" 8579 8706 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8580 8707 break; 8581 8708 8582 case 6 49:8583 8584 /* Line 1806 of yacc.c */ 8585 #line 25 08"parser.yy"8709 case 671: 8710 8711 /* Line 1806 of yacc.c */ 8712 #line 2571 "parser.yy" 8586 8713 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8587 8714 break; 8588 8715 8589 case 6 50:8590 8591 /* Line 1806 of yacc.c */ 8592 #line 25 10"parser.yy"8716 case 672: 8717 8718 /* Line 1806 of yacc.c */ 8719 #line 2573 "parser.yy" 8593 8720 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8594 8721 break; 8595 8722 8596 case 6 51:8597 8598 /* Line 1806 of yacc.c */ 8599 #line 25 12"parser.yy"8723 case 673: 8724 8725 /* Line 1806 of yacc.c */ 8726 #line 2575 "parser.yy" 8600 8727 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8601 8728 break; 8602 8729 8603 case 6 52:8604 8605 /* Line 1806 of yacc.c */ 8606 #line 25 17"parser.yy"8730 case 674: 8731 8732 /* Line 1806 of yacc.c */ 8733 #line 2580 "parser.yy" 8607 8734 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8608 8735 break; 8609 8736 8610 case 6 53:8611 8612 /* Line 1806 of yacc.c */ 8613 #line 25 19"parser.yy"8737 case 675: 8738 8739 /* Line 1806 of yacc.c */ 8740 #line 2582 "parser.yy" 8614 8741 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8615 8742 break; 8616 8743 8617 case 6 54:8618 8619 /* Line 1806 of yacc.c */ 8620 #line 25 21"parser.yy"8744 case 676: 8745 8746 /* Line 1806 of yacc.c */ 8747 #line 2584 "parser.yy" 8621 8748 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8622 8749 break; 8623 8750 8624 case 655: 8625 8626 /* Line 1806 of yacc.c */ 8627 #line 2527 "parser.yy" 8751 case 678: 8752 8753 /* Line 1806 of yacc.c */ 8754 #line 2591 "parser.yy" 8755 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); } 8756 break; 8757 8758 case 680: 8759 8760 /* Line 1806 of yacc.c */ 8761 #line 2602 "parser.yy" 8628 8762 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); } 8629 8763 break; 8630 8764 8631 case 6 56:8632 8633 /* Line 1806 of yacc.c */ 8634 #line 2 529"parser.yy"8635 { (yyval.decl) = DeclarationNode::new Array( 0, 0, false )->addArray( (yyvsp[(3) - (3)].decl) ); }8636 break; 8637 8638 case 6 58:8639 8640 /* Line 1806 of yacc.c */ 8641 #line 2 535"parser.yy"8642 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(3) - (5)].en), 0, false ); }8643 break; 8644 8645 case 6 59:8646 8647 /* Line 1806 of yacc.c */ 8648 #line 2 537"parser.yy"8649 { (yyval.decl) = DeclarationNode::new VarArray( 0); }8650 break; 8651 8652 case 6 60:8653 8654 /* Line 1806 of yacc.c */ 8655 #line 2 539"parser.yy"8656 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newArray( (yyvsp[(4) - (6)].en), 0, false )); }8657 break; 8658 8659 case 6 61:8660 8661 /* Line 1806 of yacc.c */ 8662 #line 2 541"parser.yy"8663 { (yyval.decl) = (yyvsp[(1) - (6)].decl)->addArray( DeclarationNode::newVarArray( 0 )); }8664 break; 8665 8666 case 6 63:8667 8668 /* Line 1806 of yacc.c */ 8669 #line 2 556"parser.yy"8765 case 681: 8766 8767 /* Line 1806 of yacc.c */ 8768 #line 2605 "parser.yy" 8769 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 8770 break; 8771 8772 case 682: 8773 8774 /* Line 1806 of yacc.c */ 8775 #line 2607 "parser.yy" 8776 { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); } 8777 break; 8778 8779 case 683: 8780 8781 /* Line 1806 of yacc.c */ 8782 #line 2610 "parser.yy" 8783 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 8784 break; 8785 8786 case 684: 8787 8788 /* Line 1806 of yacc.c */ 8789 #line 2612 "parser.yy" 8790 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); } 8791 break; 8792 8793 case 685: 8794 8795 /* Line 1806 of yacc.c */ 8796 #line 2614 "parser.yy" 8797 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); } 8798 break; 8799 8800 case 687: 8801 8802 /* Line 1806 of yacc.c */ 8803 #line 2628 "parser.yy" 8670 8804 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8671 8805 break; 8672 8806 8673 case 6 64:8674 8675 /* Line 1806 of yacc.c */ 8676 #line 2 558"parser.yy"8807 case 688: 8808 8809 /* Line 1806 of yacc.c */ 8810 #line 2630 "parser.yy" 8677 8811 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); } 8678 8812 break; 8679 8813 8680 case 6 65:8681 8682 /* Line 1806 of yacc.c */ 8683 #line 2 563"parser.yy"8814 case 689: 8815 8816 /* Line 1806 of yacc.c */ 8817 #line 2635 "parser.yy" 8684 8818 { (yyval.decl) = DeclarationNode::newPointer( 0 ); } 8685 8819 break; 8686 8820 8687 case 6 66:8688 8689 /* Line 1806 of yacc.c */ 8690 #line 2 565"parser.yy"8821 case 690: 8822 8823 /* Line 1806 of yacc.c */ 8824 #line 2637 "parser.yy" 8691 8825 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); } 8692 8826 break; 8693 8827 8694 case 6 67:8695 8696 /* Line 1806 of yacc.c */ 8697 #line 2 567"parser.yy"8828 case 691: 8829 8830 /* Line 1806 of yacc.c */ 8831 #line 2639 "parser.yy" 8698 8832 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); } 8699 8833 break; 8700 8834 8701 case 6 68:8702 8703 /* Line 1806 of yacc.c */ 8704 #line 2 569"parser.yy"8835 case 692: 8836 8837 /* Line 1806 of yacc.c */ 8838 #line 2641 "parser.yy" 8705 8839 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); } 8706 8840 break; 8707 8841 8708 case 6 69:8709 8710 /* Line 1806 of yacc.c */ 8711 #line 2 571"parser.yy"8842 case 693: 8843 8844 /* Line 1806 of yacc.c */ 8845 #line 2643 "parser.yy" 8712 8846 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8713 8847 break; 8714 8848 8715 case 6 71:8716 8717 /* Line 1806 of yacc.c */ 8718 #line 2 577"parser.yy"8849 case 695: 8850 8851 /* Line 1806 of yacc.c */ 8852 #line 2649 "parser.yy" 8719 8853 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8720 8854 break; 8721 8855 8722 case 6 72:8723 8724 /* Line 1806 of yacc.c */ 8725 #line 2 579"parser.yy"8856 case 696: 8857 8858 /* Line 1806 of yacc.c */ 8859 #line 2651 "parser.yy" 8726 8860 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); } 8727 8861 break; 8728 8862 8729 case 6 73:8730 8731 /* Line 1806 of yacc.c */ 8732 #line 2 581"parser.yy"8863 case 697: 8864 8865 /* Line 1806 of yacc.c */ 8866 #line 2653 "parser.yy" 8733 8867 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8734 8868 break; 8735 8869 8736 case 674: 8737 8738 /* Line 1806 of yacc.c */ 8739 #line 2586 "parser.yy" 8740 { (yyval.decl) = DeclarationNode::newFunction( 0, 0, (yyvsp[(3) - (5)].decl), 0 ); } 8741 break; 8742 8743 case 675: 8744 8745 /* Line 1806 of yacc.c */ 8746 #line 2588 "parser.yy" 8870 case 698: 8871 8872 /* Line 1806 of yacc.c */ 8873 #line 2658 "parser.yy" 8747 8874 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); } 8748 8875 break; 8749 8876 8750 case 6 76:8751 8752 /* Line 1806 of yacc.c */ 8753 #line 2 590 "parser.yy"8877 case 699: 8878 8879 /* Line 1806 of yacc.c */ 8880 #line 2660 "parser.yy" 8754 8881 { (yyval.decl) = (yyvsp[(2) - (3)].decl); } 8755 8882 break; 8756 8883 8757 case 678:8758 8759 /* Line 1806 of yacc.c */8760 #line 2597 "parser.yy"8761 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addArray( (yyvsp[(2) - (2)].decl) ); }8762 break;8763 8764 case 680:8765 8766 /* Line 1806 of yacc.c */8767 #line 2608 "parser.yy"8768 { (yyval.decl) = DeclarationNode::newArray( 0, 0, false ); }8769 break;8770 8771 case 681:8772 8773 /* Line 1806 of yacc.c */8774 #line 2611 "parser.yy"8775 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); }8776 break;8777 8778 case 682:8779 8780 /* Line 1806 of yacc.c */8781 #line 2613 "parser.yy"8782 { (yyval.decl) = DeclarationNode::newArray( 0, (yyvsp[(3) - (5)].decl), false ); }8783 break;8784 8785 case 683:8786 8787 /* Line 1806 of yacc.c */8788 #line 2616 "parser.yy"8789 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); }8790 break;8791 8792 case 684:8793 8794 /* Line 1806 of yacc.c */8795 #line 2618 "parser.yy"8796 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl), true ); }8797 break;8798 8799 case 685:8800 8801 /* Line 1806 of yacc.c */8802 #line 2620 "parser.yy"8803 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(3) - (7)].decl), true ); }8804 break;8805 8806 case 687:8807 8808 /* Line 1806 of yacc.c */8809 #line 2634 "parser.yy"8810 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8811 break;8812 8813 case 688:8814 8815 /* Line 1806 of yacc.c */8816 #line 2636 "parser.yy"8817 { (yyval.decl) = (yyvsp[(1) - (2)].decl)->addQualifiers( (yyvsp[(2) - (2)].decl) ); }8818 break;8819 8820 case 689:8821 8822 /* Line 1806 of yacc.c */8823 #line 2641 "parser.yy"8824 { (yyval.decl) = DeclarationNode::newPointer( 0 ); }8825 break;8826 8827 case 690:8828 8829 /* Line 1806 of yacc.c */8830 #line 2643 "parser.yy"8831 { (yyval.decl) = DeclarationNode::newPointer( (yyvsp[(2) - (2)].decl) ); }8832 break;8833 8834 case 691:8835 8836 /* Line 1806 of yacc.c */8837 #line 2645 "parser.yy"8838 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addPointer( DeclarationNode::newPointer( 0 ) ); }8839 break;8840 8841 case 692:8842 8843 /* Line 1806 of yacc.c */8844 #line 2647 "parser.yy"8845 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addPointer( DeclarationNode::newPointer( (yyvsp[(2) - (3)].decl) ) ); }8846 break;8847 8848 case 693:8849 8850 /* Line 1806 of yacc.c */8851 #line 2649 "parser.yy"8852 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8853 break;8854 8855 case 695:8856 8857 /* Line 1806 of yacc.c */8858 #line 2655 "parser.yy"8859 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8860 break;8861 8862 case 696:8863 8864 /* Line 1806 of yacc.c */8865 #line 2657 "parser.yy"8866 { (yyval.decl) = (yyvsp[(2) - (4)].decl)->addArray( (yyvsp[(4) - (4)].decl) ); }8867 break;8868 8869 case 697:8870 8871 /* Line 1806 of yacc.c */8872 #line 2659 "parser.yy"8873 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8874 break;8875 8876 case 698:8877 8878 /* Line 1806 of yacc.c */8879 #line 2664 "parser.yy"8880 { (yyval.decl) = (yyvsp[(2) - (8)].decl)->addParamList( (yyvsp[(6) - (8)].decl) ); }8881 break;8882 8883 case 699:8884 8885 /* Line 1806 of yacc.c */8886 #line 2666 "parser.yy"8887 { (yyval.decl) = (yyvsp[(2) - (3)].decl); }8888 break;8889 8890 8884 case 702: 8891 8885 8892 8886 /* Line 1806 of yacc.c */ 8893 #line 267 6"parser.yy"8887 #line 2670 "parser.yy" 8894 8888 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 8895 8889 break; … … 8898 8892 8899 8893 /* Line 1806 of yacc.c */ 8894 #line 2680 "parser.yy" 8895 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 8896 break; 8897 8898 case 706: 8899 8900 /* Line 1806 of yacc.c */ 8901 #line 2682 "parser.yy" 8902 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 8903 break; 8904 8905 case 707: 8906 8907 /* Line 1806 of yacc.c */ 8908 #line 2684 "parser.yy" 8909 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 8910 break; 8911 8912 case 708: 8913 8914 /* Line 1806 of yacc.c */ 8900 8915 #line 2686 "parser.yy" 8916 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 8917 break; 8918 8919 case 709: 8920 8921 /* Line 1806 of yacc.c */ 8922 #line 2688 "parser.yy" 8901 8923 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 8902 8924 break; 8903 8925 8904 case 7 06:8905 8906 /* Line 1806 of yacc.c */ 8907 #line 26 88"parser.yy"8926 case 710: 8927 8928 /* Line 1806 of yacc.c */ 8929 #line 2690 "parser.yy" 8908 8930 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 8909 8931 break; 8910 8932 8911 case 707:8912 8913 /* Line 1806 of yacc.c */8914 #line 2690 "parser.yy"8915 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }8916 break;8917 8918 case 708:8919 8920 /* Line 1806 of yacc.c */8921 #line 2692 "parser.yy"8922 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }8923 break;8924 8925 case 709:8926 8927 /* Line 1806 of yacc.c */8928 #line 2694 "parser.yy"8929 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); }8930 break;8931 8932 case 710:8933 8934 /* Line 1806 of yacc.c */8935 #line 2696 "parser.yy"8936 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); }8937 break;8938 8939 8933 case 711: 8940 8934 8941 8935 /* Line 1806 of yacc.c */ 8936 #line 2697 "parser.yy" 8937 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 8938 break; 8939 8940 case 712: 8941 8942 /* Line 1806 of yacc.c */ 8943 #line 2699 "parser.yy" 8944 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 8945 break; 8946 8947 case 713: 8948 8949 /* Line 1806 of yacc.c */ 8950 #line 2701 "parser.yy" 8951 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 8952 break; 8953 8954 case 714: 8955 8956 /* Line 1806 of yacc.c */ 8942 8957 #line 2703 "parser.yy" 8943 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false) ); }8944 break; 8945 8946 case 71 2:8958 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 8959 break; 8960 8961 case 715: 8947 8962 8948 8963 /* Line 1806 of yacc.c */ … … 8951 8966 break; 8952 8967 8953 case 71 3:8968 case 716: 8954 8969 8955 8970 /* Line 1806 of yacc.c */ 8956 8971 #line 2707 "parser.yy" 8972 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 8973 break; 8974 8975 case 717: 8976 8977 /* Line 1806 of yacc.c */ 8978 #line 2709 "parser.yy" 8979 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 8980 break; 8981 8982 case 718: 8983 8984 /* Line 1806 of yacc.c */ 8985 #line 2711 "parser.yy" 8957 8986 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 8958 8987 break; 8959 8988 8960 case 71 4:8961 8962 /* Line 1806 of yacc.c */ 8963 #line 27 09"parser.yy"8989 case 719: 8990 8991 /* Line 1806 of yacc.c */ 8992 #line 2713 "parser.yy" 8964 8993 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 8965 8994 break; 8966 8995 8967 case 715: 8968 8969 /* Line 1806 of yacc.c */ 8970 #line 2711 "parser.yy" 8971 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 8972 break; 8973 8974 case 716: 8975 8976 /* Line 1806 of yacc.c */ 8977 #line 2713 "parser.yy" 8978 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 8979 break; 8980 8981 case 717: 8996 case 720: 8982 8997 8983 8998 /* Line 1806 of yacc.c */ … … 8986 9001 break; 8987 9002 8988 case 718: 8989 8990 /* Line 1806 of yacc.c */ 8991 #line 2717 "parser.yy" 9003 case 721: 9004 9005 /* Line 1806 of yacc.c */ 9006 #line 2720 "parser.yy" 9007 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9008 break; 9009 9010 case 722: 9011 9012 /* Line 1806 of yacc.c */ 9013 #line 2722 "parser.yy" 9014 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9015 break; 9016 9017 case 723: 9018 9019 /* Line 1806 of yacc.c */ 9020 #line 2727 "parser.yy" 9021 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); } 9022 break; 9023 9024 case 724: 9025 9026 /* Line 1806 of yacc.c */ 9027 #line 2729 "parser.yy" 9028 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); } 9029 break; 9030 9031 case 726: 9032 9033 /* Line 1806 of yacc.c */ 9034 #line 2756 "parser.yy" 9035 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9036 break; 9037 9038 case 730: 9039 9040 /* Line 1806 of yacc.c */ 9041 #line 2767 "parser.yy" 9042 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9043 break; 9044 9045 case 731: 9046 9047 /* Line 1806 of yacc.c */ 9048 #line 2769 "parser.yy" 9049 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9050 break; 9051 9052 case 732: 9053 9054 /* Line 1806 of yacc.c */ 9055 #line 2771 "parser.yy" 9056 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9057 break; 9058 9059 case 733: 9060 9061 /* Line 1806 of yacc.c */ 9062 #line 2773 "parser.yy" 9063 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9064 break; 9065 9066 case 734: 9067 9068 /* Line 1806 of yacc.c */ 9069 #line 2775 "parser.yy" 9070 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9071 break; 9072 9073 case 735: 9074 9075 /* Line 1806 of yacc.c */ 9076 #line 2777 "parser.yy" 9077 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9078 break; 9079 9080 case 736: 9081 9082 /* Line 1806 of yacc.c */ 9083 #line 2784 "parser.yy" 9084 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 9085 break; 9086 9087 case 737: 9088 9089 /* Line 1806 of yacc.c */ 9090 #line 2786 "parser.yy" 8992 9091 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); } 8993 9092 break; 8994 9093 8995 case 719: 8996 8997 /* Line 1806 of yacc.c */ 8998 #line 2719 "parser.yy" 8999 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( (yyvsp[(2) - (3)].decl) )->addNewArray( (yyvsp[(1) - (3)].decl) ); } 9000 break; 9001 9002 case 720: 9003 9004 /* Line 1806 of yacc.c */ 9005 #line 2721 "parser.yy" 9094 case 738: 9095 9096 /* Line 1806 of yacc.c */ 9097 #line 2788 "parser.yy" 9006 9098 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); } 9007 9099 break; 9008 9100 9009 case 721: 9010 9011 /* Line 1806 of yacc.c */ 9012 #line 2726 "parser.yy" 9013 { (yyval.decl) = DeclarationNode::newVarArray( (yyvsp[(3) - (6)].decl) ); } 9014 break; 9015 9016 case 722: 9017 9018 /* Line 1806 of yacc.c */ 9019 #line 2728 "parser.yy" 9020 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), false ); } 9021 break; 9022 9023 case 723: 9024 9025 /* Line 1806 of yacc.c */ 9026 #line 2733 "parser.yy" 9027 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(4) - (6)].en), (yyvsp[(3) - (6)].decl), true ); } 9028 break; 9029 9030 case 724: 9031 9032 /* Line 1806 of yacc.c */ 9033 #line 2735 "parser.yy" 9034 { (yyval.decl) = DeclarationNode::newArray( (yyvsp[(5) - (7)].en), (yyvsp[(4) - (7)].decl)->addQualifiers( (yyvsp[(3) - (7)].decl) ), true ); } 9035 break; 9036 9037 case 726: 9038 9039 /* Line 1806 of yacc.c */ 9040 #line 2762 "parser.yy" 9041 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addQualifiers( (yyvsp[(1) - (2)].decl) ); } 9042 break; 9043 9044 case 730: 9045 9046 /* Line 1806 of yacc.c */ 9047 #line 2773 "parser.yy" 9048 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9049 break; 9050 9051 case 731: 9052 9053 /* Line 1806 of yacc.c */ 9054 #line 2775 "parser.yy" 9055 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9056 break; 9057 9058 case 732: 9059 9060 /* Line 1806 of yacc.c */ 9061 #line 2777 "parser.yy" 9062 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9063 break; 9064 9065 case 733: 9066 9067 /* Line 1806 of yacc.c */ 9068 #line 2779 "parser.yy" 9069 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9070 break; 9071 9072 case 734: 9073 9074 /* Line 1806 of yacc.c */ 9075 #line 2781 "parser.yy" 9076 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewPointer( DeclarationNode::newPointer( 0 ) ); } 9077 break; 9078 9079 case 735: 9080 9081 /* Line 1806 of yacc.c */ 9082 #line 2783 "parser.yy" 9083 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewPointer( DeclarationNode::newPointer( (yyvsp[(1) - (3)].decl) ) ); } 9084 break; 9085 9086 case 736: 9101 case 739: 9087 9102 9088 9103 /* Line 1806 of yacc.c */ … … 9091 9106 break; 9092 9107 9093 case 7 37:9108 case 740: 9094 9109 9095 9110 /* Line 1806 of yacc.c */ … … 9098 9113 break; 9099 9114 9100 case 7 38:9115 case 741: 9101 9116 9102 9117 /* Line 1806 of yacc.c */ … … 9105 9120 break; 9106 9121 9107 case 739:9108 9109 /* Line 1806 of yacc.c */9110 #line 2796 "parser.yy"9111 { (yyval.decl) = (yyvsp[(3) - (3)].decl)->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }9112 break;9113 9114 case 740:9115 9116 /* Line 1806 of yacc.c */9117 #line 2798 "parser.yy"9118 { (yyval.decl) = (yyvsp[(4) - (4)].decl)->addNewArray( (yyvsp[(3) - (4)].decl) )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }9119 break;9120 9121 case 741:9122 9123 /* Line 1806 of yacc.c */9124 #line 2800 "parser.yy"9125 { (yyval.decl) = (yyvsp[(2) - (2)].decl)->addNewArray( (yyvsp[(1) - (2)].decl) ); }9126 break;9127 9128 9122 case 742: 9129 9123 9130 9124 /* Line 1806 of yacc.c */ 9131 #line 2 805"parser.yy"9125 #line 2799 "parser.yy" 9132 9126 { (yyval.decl) = DeclarationNode::newTuple( (yyvsp[(3) - (5)].decl) ); } 9133 9127 break; … … 9136 9130 9137 9131 /* Line 1806 of yacc.c */ 9138 #line 28 10"parser.yy"9132 #line 2804 "parser.yy" 9139 9133 { (yyval.decl) = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), (yyvsp[(4) - (5)].decl), 0 ); } 9140 9134 break; … … 9143 9137 9144 9138 /* Line 1806 of yacc.c */ 9145 #line 28 12"parser.yy"9139 #line 2806 "parser.yy" 9146 9140 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9147 9141 break; … … 9150 9144 9151 9145 /* Line 1806 of yacc.c */ 9152 #line 28 14"parser.yy"9146 #line 2808 "parser.yy" 9153 9147 { (yyval.decl) = DeclarationNode::newFunction( 0, (yyvsp[(1) - (6)].decl), (yyvsp[(4) - (6)].decl), 0 ); } 9154 9148 break; … … 9157 9151 9158 9152 /* Line 1806 of yacc.c */ 9159 #line 283 8"parser.yy"9153 #line 2832 "parser.yy" 9160 9154 { (yyval.en) = 0; } 9161 9155 break; … … 9164 9158 9165 9159 /* Line 1806 of yacc.c */ 9166 #line 28 40"parser.yy"9160 #line 2834 "parser.yy" 9167 9161 { (yyval.en) = (yyvsp[(2) - (2)].en); } 9168 9162 break; … … 9171 9165 9172 9166 /* Line 1806 of yacc.c */ 9173 #line 91 74"Parser/parser.cc"9167 #line 9168 "Parser/parser.cc" 9174 9168 default: break; 9175 9169 } … … 9402 9396 9403 9397 /* Line 2067 of yacc.c */ 9404 #line 28 43"parser.yy"9398 #line 2837 "parser.yy" 9405 9399 9406 9400 // ----end of grammar---- -
src/Parser/parser.yy
r08ac489 rcbaee0d 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 16 17:10:35201613 // Update Count : 1 89812 // Last Modified On : Tue Aug 16 21:31:46 2016 13 // Update Count : 1906 14 14 // 15 15 … … 55 55 #include "LinkageSpec.h" 56 56 57 extern DeclarationNode * parseTree;57 extern DeclarationNode * parseTree; 58 58 extern LinkageSpec::Type linkage; 59 59 extern TypedefTable typedefTable; … … 1970 1970 {} // empty input file 1971 1971 | external_definition_list 1972 { 1973 if ( parseTree ) { 1974 parseTree->appendList( $1 ); 1975 } else { 1976 parseTree = $1; 1977 } 1978 } 1972 { parseTree = parseTree ? parseTree->appendList( $1 ) : $1; } 1979 1973 ; 1980 1974 -
src/main.cc
r08ac489 rcbaee0d 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Aug 16 17:47:52201613 // Update Count : 2 5212 // Last Modified On : Tue Aug 16 21:33:49 2016 13 // Update Count : 260 14 14 // 15 15 … … 55 55 LinkageSpec::Type linkage = LinkageSpec::Cforall; 56 56 TypedefTable typedefTable; 57 DeclarationNode * parseTree = nullptr; // program parse tree57 DeclarationNode * parseTree = nullptr; // program parse tree 58 58 59 59 bool … … 78 78 static void parse( FILE * input, LinkageSpec::Type t, bool shouldExit = false ); 79 79 static void dump( std::list< Declaration * > & translationUnit, std::ostream & out = std::cout ); 80 static void parse_cmdline( int argc, char *argv[], const char *& filename );81 82 83 int main( int argc, char * argv[] ) {84 FILE * input;85 std::ostream *output = & std::cout;80 static void parse_cmdline( int argc, char *argv[], const char *& filename ); 81 82 83 int main( int argc, char * argv[] ) { 84 FILE * input; 85 std::ostream *output = & std::cout; 86 86 std::list< Declaration * > translationUnit; 87 87 const char *filename = NULL; … … 155 155 buildList( parseTree, translationUnit ); 156 156 delete parseTree; 157 parseTree = nullptr; 157 158 158 159 if ( astp ) { … … 268 269 } // main 269 270 270 void parse_cmdline( int argc, char * argv[], const char *&filename ) {271 void parse_cmdline( int argc, char * argv[], const char *& filename ) { 271 272 enum { Ast, Bbox, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, Validate, }; 272 273 … … 376 377 static void parse( FILE * input, LinkageSpec::Type link, bool shouldExit ) { 377 378 extern int yyparse( void ); 378 extern FILE * yyin;379 extern FILE * yyin; 379 380 extern int yylineno; 380 381
Note: See TracChangeset
for help on using the changeset viewer.