- Timestamp:
- Oct 30, 2022, 3:59:54 PM (22 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 0bdfcc3, 637c139
- Parents:
- 7a2057a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r7a2057a rc7f12a4 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Oct 14 14:04:43202213 // Update Count : 57 5112 // Last Modified On : Fri Oct 28 15:27:08 2022 13 // Update Count : 5764 14 14 // 15 15 … … 2553 2553 | ENUM attribute_list_opt identifier 2554 2554 { typedefTable.makeTypedef( *$3 ); } 2555 '{' enumerator_list comma_opt '}'2556 { $$ = DeclarationNode::newEnum( $3, $ 6, true, false )->addQualifiers( $2 ); }2555 hide_opt '{' enumerator_list comma_opt '}' 2556 { $$ = DeclarationNode::newEnum( $3, $7, true, false )->addQualifiers( $2 ); } 2557 2557 | ENUM attribute_list_opt typedef_name // unqualified type name 2558 '{' enumerator_list comma_opt '}'2559 { $$ = DeclarationNode::newEnum( $3->name, $ 5, true, false )->addQualifiers( $2 ); }2558 hide_opt '{' enumerator_list comma_opt '}' 2559 { $$ = DeclarationNode::newEnum( $3->name, $6, true, false )->addQualifiers( $2 ); } 2560 2560 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '{' enumerator_list comma_opt '}' 2561 2561 { … … 2574 2574 typedefTable.makeTypedef( *$6 ); 2575 2575 } 2576 '{' enumerator_list comma_opt '}'2577 { 2578 $$ = DeclarationNode::newEnum( $6, $1 0, true, true, $3 )->addQualifiers( $5 )->addQualifiers( $7 );2576 hide_opt '{' enumerator_list comma_opt '}' 2577 { 2578 $$ = DeclarationNode::newEnum( $6, $11, true, true, $3 )->addQualifiers( $5 )->addQualifiers( $7 ); 2579 2579 } 2580 2580 | ENUM '(' ')' attribute_list_opt identifier attribute_list_opt 2581 '{' enumerator_list comma_opt '}' 2582 { 2583 $$ = DeclarationNode::newEnum( $5, $8, true, true, nullptr )->addQualifiers( $4 )->addQualifiers( $6 ); 2584 } 2585 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt '{' enumerator_list comma_opt '}' 2586 { 2587 $$ = DeclarationNode::newEnum( $6->name, $9, true, true, $3 )->addQualifiers( $5 )->addQualifiers( $7 ); 2588 } 2589 | ENUM '(' ')' attribute_list_opt typedef_name attribute_list_opt '{' enumerator_list comma_opt '}' 2590 { 2591 $$ = DeclarationNode::newEnum( $5->name, $8, true, true, nullptr )->addQualifiers( $4 )->addQualifiers( $6 ); 2581 hide_opt '{' enumerator_list comma_opt '}' 2582 { 2583 $$ = DeclarationNode::newEnum( $5, $9, true, true, nullptr )->addQualifiers( $4 )->addQualifiers( $6 ); 2584 } 2585 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt 2586 hide_opt '{' enumerator_list comma_opt '}' 2587 { 2588 $$ = DeclarationNode::newEnum( $6->name, $10, true, true, $3 )->addQualifiers( $5 )->addQualifiers( $7 ); 2589 } 2590 | ENUM '(' ')' attribute_list_opt typedef_name attribute_list_opt 2591 hide_opt '{' enumerator_list comma_opt '}' 2592 { 2593 $$ = DeclarationNode::newEnum( $5->name, $9, true, true, nullptr )->addQualifiers( $4 )->addQualifiers( $6 ); 2592 2594 } 2593 2595 | enum_type_nobody 2596 ; 2597 2598 hide_opt: 2599 // empty 2600 | '!' 2594 2601 ; 2595 2602 … … 2602 2609 2603 2610 enumerator_list: 2604 identifier_or_type_name enumerator_value_opt2605 { $$ = DeclarationNode::newEnumValueGeneric( $ 1, $2); }2611 hide_visible_opt identifier_or_type_name enumerator_value_opt 2612 { $$ = DeclarationNode::newEnumValueGeneric( $2, $3 ); } 2606 2613 | INLINE type_name 2607 2614 { $$ = DeclarationNode::newEnumInLine( *$2->type->symbolic.name ); } 2608 | enumerator_list ',' identifier_or_type_name enumerator_value_opt2609 { $$ = $1->appendList( DeclarationNode::newEnumValueGeneric( $ 3, $4) ); }2615 | enumerator_list ',' hide_visible_opt identifier_or_type_name enumerator_value_opt 2616 { $$ = $1->appendList( DeclarationNode::newEnumValueGeneric( $4, $5 ) ); } 2610 2617 | enumerator_list ',' INLINE type_name enumerator_value_opt 2611 2618 { $$ = $1->appendList( DeclarationNode::newEnumValueGeneric( new string("inline"), nullptr ) ); } 2619 ; 2620 2621 hide_visible_opt: 2622 hide_opt 2623 | '^' 2612 2624 ; 2613 2625
Note: See TracChangeset
for help on using the changeset viewer.