Changeset 893256d for src/Parser/parser.yy
- Timestamp:
- Jul 20, 2015, 2:29:52 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
- 18997b9
- Parents:
- 2794fff (diff), 994ec2c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r2794fff r893256d 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 3 13:53:45201513 // Update Count : 12 2012 // Last Modified On : Thu Jul 16 16:25:12 2015 13 // Update Count : 1267 14 14 // 15 15 … … 54 54 #include "lex.h" 55 55 #include "ParseNode.h" 56 #include "TypeData.h" 56 57 #include "LinkageSpec.h" 57 58 … … 227 228 %type<decl> variable_abstract_array variable_abstract_declarator variable_abstract_function 228 229 %type<decl> variable_abstract_ptr variable_array variable_declarator variable_function variable_ptr 230 231 %type<decl> attribute_list_opt attribute_list attribute 229 232 230 233 // initializers … … 620 623 labeled_statement: 621 624 no_attr_identifier ':' attribute_list_opt statement 622 { $$ = $4->add_label( $1 );} 625 { 626 $$ = $4->add_label( $1 ); 627 } 623 628 ; 624 629 … … 1182 1187 type_qualifier_name 1183 1188 | attribute 1184 1189 //{ $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); } 1185 1190 ; 1186 1191 … … 1997 2002 attribute_list_opt: // GCC 1998 2003 // empty 2004 { $$ = 0; } 1999 2005 | attribute_list 2000 2006 ; … … 2003 2009 attribute 2004 2010 | attribute_list attribute 2011 { $$ = $2->addQualifiers( $1 ); } 2005 2012 ; 2006 2013 2007 2014 attribute: // GCC 2008 2015 ATTRIBUTE '(' '(' attribute_parameter_list ')' ')' 2016 // { $$ = DeclarationNode::newQualifier( DeclarationNode::Attribute ); } 2017 { $$ = 0; } 2009 2018 ; 2010 2019 … … 2059 2068 variable_declarator: 2060 2069 paren_identifier attribute_list_opt 2070 { $$ = $1->addQualifiers( $2 ); } 2061 2071 | variable_ptr 2062 2072 | variable_array attribute_list_opt 2073 { $$ = $1->addQualifiers( $2 ); } 2063 2074 | variable_function attribute_list_opt 2075 { $$ = $1->addQualifiers( $2 ); } 2064 2076 ; 2065 2077 … … 2108 2120 function_declarator: 2109 2121 function_no_ptr attribute_list_opt 2122 { $$ = $1->addQualifiers( $2 ); } 2110 2123 | function_ptr 2111 2124 | function_array attribute_list_opt 2125 { $$ = $1->addQualifiers( $2 ); } 2112 2126 ; 2113 2127 … … 2188 2202 type_redeclarator: 2189 2203 paren_type attribute_list_opt 2204 { $$ = $1->addQualifiers( $2 ); } 2190 2205 | type_ptr 2191 2206 | type_array attribute_list_opt 2207 { $$ = $1->addQualifiers( $2 ); } 2192 2208 | type_function attribute_list_opt 2209 { $$ = $1->addQualifiers( $2 ); } 2193 2210 ; 2194 2211 … … 2235 2252 identifier_parameter_declarator: 2236 2253 paren_identifier attribute_list_opt 2254 { $$ = $1->addQualifiers( $2 ); } 2237 2255 | identifier_parameter_ptr 2238 2256 | identifier_parameter_array attribute_list_opt 2257 { $$ = $1->addQualifiers( $2 ); } 2239 2258 | identifier_parameter_function attribute_list_opt 2259 { $$ = $1->addQualifiers( $2 ); } 2240 2260 ; 2241 2261 … … 2297 2317 type_parameter_redeclarator: 2298 2318 typedef attribute_list_opt 2319 { $$ = $1->addQualifiers( $2 ); } 2299 2320 | type_parameter_ptr 2300 2321 | type_parameter_array attribute_list_opt 2322 { $$ = $1->addQualifiers( $2 ); } 2301 2323 | type_parameter_function attribute_list_opt 2324 { $$ = $1->addQualifiers( $2 ); } 2302 2325 ; 2303 2326 … … 2350 2373 abstract_ptr 2351 2374 | abstract_array attribute_list_opt 2375 { $$ = $1->addQualifiers( $2 ); } 2352 2376 | abstract_function attribute_list_opt 2377 { $$ = $1->addQualifiers( $2 ); } 2353 2378 ; 2354 2379 … … 2417 2442 abstract_parameter_ptr 2418 2443 | abstract_parameter_array attribute_list_opt 2444 { $$ = $1->addQualifiers( $2 ); } 2419 2445 | abstract_parameter_function attribute_list_opt 2446 { $$ = $1->addQualifiers( $2 ); } 2420 2447 ; 2421 2448 … … 2493 2520 variable_abstract_ptr 2494 2521 | variable_abstract_array attribute_list_opt 2522 { $$ = $1->addQualifiers( $2 ); } 2495 2523 | variable_abstract_function attribute_list_opt 2524 { $$ = $1->addQualifiers( $2 ); } 2496 2525 ; 2497 2526
Note: See TracChangeset
for help on using the changeset viewer.