Changes in src/Parser/parser.yy [9335ecc:307a732]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r9335ecc r307a732 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 : Wed Jun 28 22:11:22201713 // Update Count : 241 411 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Jun 30 15:38:00 2017 13 // Update Count : 2415 14 14 // 15 15 … … 104 104 std::string * str; 105 105 bool flag; 106 CatchStmt::Kind catch_kind; 106 107 } 107 108 … … 192 193 %type<sn> switch_clause_list_opt switch_clause_list choose_clause_list_opt choose_clause_list 193 194 %type<sn> /* handler_list */ handler_clause finally_clause 195 %type<catch_kind> handler_key 194 196 195 197 // declarations … … 958 960 handler_clause: 959 961 // TEMPORARY, TEST EXCEPTIONS 960 CATCH '(' push push INTEGERconstant pop ')' compound_statement pop 961 { $$ = new StatementNode( build_catch( CatchStmt::Terminate, nullptr, new ExpressionNode( build_constantInteger( *$5 ) ), $8 ) ); } 962 | handler_clause CATCH '(' push push INTEGERconstant pop ')' compound_statement pop 963 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( CatchStmt::Terminate, nullptr, new ExpressionNode( build_constantInteger( *$6 ) ), $9 ) ) ); } 964 965 | CATCH '(' push push exception_declaration pop ')' compound_statement pop 966 { $$ = new StatementNode( build_catch( CatchStmt::Terminate, $5, nullptr, $8 ) ); } 967 | handler_clause CATCH '(' push push exception_declaration pop ')' compound_statement pop 968 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( CatchStmt::Terminate, $6, nullptr, $9 ) ) ); } 969 | CATCHRESUME '(' push push exception_declaration pop ')' compound_statement pop 970 { $$ = new StatementNode( build_catch( CatchStmt::Resume, $5, nullptr, $8 ) ); } 971 | handler_clause CATCHRESUME '(' push push exception_declaration pop ')' compound_statement pop 972 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( CatchStmt::Resume, $6, nullptr, $9 ) ) ); } 962 handler_key '(' push push INTEGERconstant pop ')' compound_statement pop 963 { $$ = new StatementNode( build_catch( $1, nullptr, new ExpressionNode( build_constantInteger( *$5 ) ), $8 ) ); } 964 | handler_clause handler_key '(' push push INTEGERconstant pop ')' compound_statement pop 965 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, nullptr, new ExpressionNode( build_constantInteger( *$6 ) ), $9 ) ) ); } 966 967 | handler_key '(' push push exception_declaration pop ')' compound_statement pop 968 { $$ = new StatementNode( build_catch( $1, $5, nullptr, $8 ) ); } 969 | handler_clause handler_key '(' push push exception_declaration pop ')' compound_statement pop 970 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, $6, nullptr, $9 ) ) ); } 971 ; 972 973 handler_key: 974 CATCH 975 { $$ = CatchStmt::Terminate; } 976 | CATCHRESUME 977 { $$ = CatchStmt::Resume; } 973 978 ; 974 979
Note: See TracChangeset
for help on using the changeset viewer.