Changeset cbce272 for src/Parser/parser.yy
- Timestamp:
- Aug 9, 2017, 2:08:14 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 65cdc1e
- Parents:
- e195093
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
re195093 rcbce272 9 9 // Author : Peter A. Buhr 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon Jul 31 14:54:32201713 // Update Count : 247 411 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Aug 4 13:33:00 2017 13 // Update Count : 2475 14 14 // 15 15 … … 182 182 %type<en> asm_clobbers_list_opt 183 183 %type<flag> asm_volatile_opt 184 %type<en> handler_predicate_opt 184 185 185 186 // statements … … 968 969 969 970 handler_clause: 970 // TEMPORARY, TEST EXCEPTIONS 971 handler_key '(' push push INTEGERconstant pop ')' compound_statement pop 972 { $$ = new StatementNode( build_catch( $1, nullptr, new ExpressionNode( build_constantInteger( *$5 ) ), $8 ) ); } 973 | handler_clause handler_key '(' push push INTEGERconstant pop ')' compound_statement pop 974 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, nullptr, new ExpressionNode( build_constantInteger( *$6 ) ), $9 ) ) ); } 975 976 | handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop 977 { $$ = new StatementNode( build_catch( $1, $5, nullptr, $9 ) ); } 971 handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop 972 { $$ = new StatementNode( build_catch( $1, $5, $7, $9 ) ); } 978 973 | handler_clause handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop 979 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, $6, nullptr, $10 ) ) ); }974 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, $6, $8, $10 ) ) ); } 980 975 ; 981 976 982 977 handler_predicate_opt: 983 978 //empty 979 { $$ = nullptr; } 984 980 | ';' conditional_expression 981 { $$ = $2; } 985 982 ; 986 983 … … 1674 1671 | aggregate_key attribute_list_opt typegen_name // CFA 1675 1672 { $$ = $3->addQualifiers( $2 ); } 1676 1677 // Temp, testing TreeStruct1678 | STRUCT TRY attribute_list_opt no_attr_identifier_or_type_name1679 {1680 typedefTable.makeTypedef( *$4 ); // create typedef1681 if ( forall ) typedefTable.changeKind( *$4, TypedefTable::TG ); // $1682 forall = false; // reset1683 }1684 '{' field_declaration_list '}'1685 {1686 $$ = DeclarationNode::newTreeStruct( DeclarationNode::Struct,1687 $4, nullptr, nullptr, $7, true )->addQualifiers( $3 );1688 }1689 | STRUCT TRY attribute_list_opt no_attr_identifier_or_type_name TYPEDEFname1690 {1691 typedefTable.makeTypedef( *$4 ); // create typedef1692 if ( forall ) typedefTable.changeKind( *$4, TypedefTable::TG ); // $1693 forall = false; // reset1694 }1695 '{' field_declaration_list '}'1696 {1697 $$ = DeclarationNode::newTreeStruct( DeclarationNode::Struct,1698 $4, $5, nullptr, $8, true )->addQualifiers( $3 );1699 }1700 1673 ; 1701 1674
Note: See TracChangeset
for help on using the changeset viewer.