Changeset e15b0a0a for src/Parser
- Timestamp:
- May 26, 2015, 10:41:24 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, string, with_gc
- Children:
- 4d51835
- Parents:
- a77e7b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/cfa.y
ra77e7b5 re15b0a0a 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat May 16 11:55:39201513 // Update Count : 9 7512 // Last Modified On : Tue May 26 22:38:42 2015 13 // Update Count : 995 14 14 // 15 15 … … 1009 1009 $$ = $1; 1010 1010 } 1011 | declaration_qualifier_list new_function_specifier 1012 // declaration_qualifier_list also includes type_qualifier_list, so a semantic check is 1013 // necessary to preclude them as a type_qualifier cannot appear in this context. 1011 | type_qualifier_list new_function_specifier 1014 1012 { 1015 1013 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1016 1014 $$ = $2->addQualifiers( $1 ); 1015 } 1016 | declaration_qualifier_list new_function_specifier 1017 { 1018 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1019 $$ = $2->addQualifiers( $1 ); 1020 } 1021 | declaration_qualifier_list type_qualifier_list new_function_specifier 1022 { 1023 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1024 $$ = $3->addQualifiers( $1 )->addQualifiers( $2 ); 1017 1025 } 1018 1026 | new_function_declaration pop ',' push identifier_or_typedef_name … … 1904 1912 1905 1913 function_definition: 1906 new_function_ specifiercompound_statement // CFA1914 new_function_declaration compound_statement // CFA 1907 1915 { 1908 1916 typedefTable.addToEnclosingScope( TypedefTable::ID ); … … 1910 1918 $$ = $1->addFunctionBody( $2 ); 1911 1919 } 1912 | declaration_qualifier_list new_function_specifier compound_statement // CFA 1913 // declaration_qualifier_list also includes type_qualifier_list, so a semantic check is 1914 // necessary to preclude them as a type_qualifier cannot appear in this context. 1915 { 1916 typedefTable.addToEnclosingScope( TypedefTable::ID ); 1917 typedefTable.leaveScope(); 1918 $$ = $2->addFunctionBody( $3 )->addQualifiers( $1 ); 1919 } 1920 1920 // | declaration_qualifier_list new_function_specifier compound_statement // CFA 1921 // // declaration_qualifier_list also includes type_qualifier_list, so a semantic check is 1922 // // necessary to preclude them as a type_qualifier cannot appear in this context. 1923 // { 1924 // typedefTable.addToEnclosingScope( TypedefTable::ID ); 1925 // typedefTable.leaveScope(); 1926 // $$ = $2->addFunctionBody( $3 )->addQualifiers( $1 ); 1927 // } 1921 1928 | declaration_specifier function_declarator compound_statement 1922 1929 {
Note: See TracChangeset
for help on using the changeset viewer.