Changeset 1b77274 for src/Parser/parser.yy
- Timestamp:
- Sep 16, 2016, 10:48:28 PM (8 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:
- 2298f728
- Parents:
- ba7aa2d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rba7aa2d r1b77274 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 12 17:29:45201613 // Update Count : 19 6912 // Last Modified On : Fri Sep 16 18:12:21 2016 13 // Update Count : 1978 14 14 // 15 15 … … 359 359 { $$ = $2; } 360 360 | '(' compound_statement ')' // GCC, lambda expression 361 { $$ = new ExpressionNode( build_valexpr( $2 ) ); }361 { $$ = new ExpressionNode( build_valexpr( $2 ) ); } 362 362 ; 363 363 … … 896 896 { $$ = new StatementNode( build_catch( $5, $8 ) ); } 897 897 | handler_clause CATCH '(' push push exception_declaration pop ')' compound_statement pop 898 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $6, $9 ) ) ); }898 { $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $6, $9 ) ) ); } 899 899 | CATCHRESUME '(' push push exception_declaration pop ')' compound_statement pop 900 900 { $$ = new StatementNode( build_catch( $5, $8 ) ); } … … 968 968 { $$ = new ExpressionNode( build_asmexpr( 0, $1, $3 ) ); } 969 969 | '[' constant_expression ']' string_literal '(' constant_expression ')' 970 { $$ = new ExpressionNode( build_asmexpr( $2, $4, $6 ) ); }970 { $$ = new ExpressionNode( build_asmexpr( $2, $4, $6 ) ); } 971 971 ; 972 972 … … 1467 1467 aggregate_name: 1468 1468 aggregate_key '{' field_declaration_list '}' 1469 { $$ = DeclarationNode::newAggregate( $1, 0, 0, $3, true ); }1469 { $$ = DeclarationNode::newAggregate( $1, new std::string( "" ), nullptr, $3, true ); } 1470 1470 | aggregate_key no_attr_identifier_or_type_name 1471 1471 { … … 1476 1476 { typedefTable.makeTypedef( *$2 ); } 1477 1477 '{' field_declaration_list '}' 1478 { $$ = DeclarationNode::newAggregate( $1, $2, 0, $5, true ); }1478 { $$ = DeclarationNode::newAggregate( $1, $2, nullptr, $5, true ); } 1479 1479 | aggregate_key '(' type_name_list ')' '{' field_declaration_list '}' // CFA 1480 { $$ = DeclarationNode::newAggregate( $1, 0, $3, $6, false ); }1480 { $$ = DeclarationNode::newAggregate( $1, new std::string( "" ), $3, $6, false ); } 1481 1481 | aggregate_key typegen_name // CFA, S/R conflict 1482 1482 { $$ = $2; } … … 1559 1559 enum_name: 1560 1560 enum_key '{' enumerator_list comma_opt '}' 1561 { $$ = DeclarationNode::newEnum( 0, $3 ); }1561 { $$ = DeclarationNode::newEnum( new std::string( "" ), $3 ); } 1562 1562 | enum_key no_attr_identifier_or_type_name 1563 1563 { … … 2520 2520 abstract_function: 2521 2521 '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3) 2522 { $$ = DeclarationNode::newFunction( 0, 0, $3, 0); }2522 { $$ = DeclarationNode::newFunction( new std::string( "" ), nullptr, $3, nullptr ); } 2523 2523 | '(' abstract_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3) 2524 2524 { $$ = $2->addParamList( $6 ); } … … 2589 2589 abstract_parameter_function: 2590 2590 '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3) 2591 { $$ = DeclarationNode::newFunction( 0, 0, $3, 0); }2591 { $$ = DeclarationNode::newFunction( new std::string( "" ), nullptr, $3, nullptr ); } 2592 2592 | '(' abstract_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3) 2593 2593 { $$ = $2->addParamList( $6 ); } … … 2813 2813 new_abstract_function: // CFA 2814 2814 '[' ']' '(' new_parameter_type_list_opt ')' 2815 { $$ = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), $4, 0); }2815 { $$ = DeclarationNode::newFunction( new std::string( "" ), DeclarationNode::newTuple( nullptr ), $4, nullptr ); } 2816 2816 | new_abstract_tuple '(' push new_parameter_type_list_opt pop ')' 2817 { $$ = DeclarationNode::newFunction( 0, $1, $4, 0); }2817 { $$ = DeclarationNode::newFunction( new std::string( "" ), $1, $4, nullptr ); } 2818 2818 | new_function_return '(' push new_parameter_type_list_opt pop ')' 2819 { $$ = DeclarationNode::newFunction( 0, $1, $4, 0); }2819 { $$ = DeclarationNode::newFunction( new std::string( "" ), $1, $4, nullptr ); } 2820 2820 ; 2821 2821
Note: See TracChangeset
for help on using the changeset viewer.