Changeset b6b3c42 for src/Parser
- Timestamp:
- Oct 16, 2017, 11:08:30 AM (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:
- 633c711
- Parents:
- 0aaac0e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r0aaac0e rb6b3c42 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Oct 2 18:18:55201713 // Update Count : 28 3512 // Last Modified On : Mon Oct 16 11:07:29 2017 13 // Update Count : 2892 14 14 // 15 15 … … 250 250 %type<sn> exception_statement handler_clause finally_clause 251 251 %type<catch_kind> handler_key 252 %type<sn> mutex_statement 252 253 %type<en> when_clause when_clause_opt waitfor timeout 253 254 %type<sn> waitfor_statement … … 807 808 | jump_statement 808 809 | with_statement 810 | mutex_statement 809 811 | waitfor_statement 810 812 | exception_statement … … 1031 1033 ; 1032 1034 1035 // If MUTEX becomes a general qualifier, there are shift/reduce conflicts, so change syntax to "with mutex". 1036 mutex_statement: 1037 MUTEX '(' argument_expression_list ')' statement 1038 { $$ = nullptr; } // FIX ME 1039 ; 1040 1033 1041 when_clause: 1034 1042 WHEN '(' comma_expression ')' … … 1549 1557 | VOLATILE 1550 1558 { $$ = DeclarationNode::newTypeQualifier( Type::Volatile ); } 1551 | MUTEX1552 { $$ = DeclarationNode::newTypeQualifier( Type::Mutex ); }1553 1559 | ATOMIC 1554 1560 { $$ = DeclarationNode::newTypeQualifier( Type::Atomic ); } … … 2703 2709 paren_identifier attribute_list_opt 2704 2710 { $$ = $1->addQualifiers( $2 ); } 2711 | '&' MUTEX paren_identifier attribute_list_opt 2712 { $$ = $3->addPointer( DeclarationNode::newPointer( DeclarationNode::newTypeQualifier( Type::Mutex ), OperKinds::AddressOf ) )->addQualifiers( $4 ); } 2705 2713 | identifier_parameter_ptr 2706 2714 | identifier_parameter_array attribute_list_opt … … 2743 2751 // 2744 2752 // typedef int foo; 2753 // forall( otype T ) foo( T ); 2745 2754 // int f( int foo ); // redefine typedef name in new scope 2746 2755 // … … 2750 2759 typedef attribute_list_opt 2751 2760 { $$ = $1->addQualifiers( $2 ); } 2761 | '&' MUTEX typedef attribute_list_opt 2762 { $$ = $3->addPointer( DeclarationNode::newPointer( DeclarationNode::newTypeQualifier( Type::Mutex ), OperKinds::AddressOf ) )->addQualifiers( $4 ); } 2752 2763 | type_parameter_ptr 2753 2764 | type_parameter_array attribute_list_opt … … 2896 2907 abstract_parameter_declarator: 2897 2908 abstract_parameter_ptr 2909 | '&' MUTEX attribute_list_opt 2910 { $$ = DeclarationNode::newPointer( DeclarationNode::newTypeQualifier( Type::Mutex ), OperKinds::AddressOf )->addQualifiers( $3 ); } 2898 2911 | abstract_parameter_array attribute_list_opt 2899 2912 { $$ = $1->addQualifiers( $2 ); }
Note: See TracChangeset
for help on using the changeset viewer.