- Timestamp:
- Jun 30, 2023, 4:22:16 PM (14 months ago)
- Branches:
- master
- Children:
- 6c7fe7b
- Parents:
- bdf4cd9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rbdf4cd9 rd7874052 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jun 20 22:10:31202313 // Update Count : 63 4812 // Last Modified On : Fri Jun 30 12:32:36 2023 13 // Update Count : 6364 14 14 // 15 15 … … 2680 2680 ENUM attribute_list_opt '{' enumerator_list comma_opt '}' 2681 2681 { $$ = DeclarationNode::newEnum( nullptr, $4, true, false )->addQualifiers( $2 ); } 2682 | ENUM attribute_list_opt '!' '{' enumerator_list comma_opt '}' // invalid syntax rule 2683 { SemanticError( yylloc, "syntax error, hiding '!' the enumerator names of an anonymous enumeration means the names are inaccessible." ); $$ = nullptr; } 2682 2684 | ENUM attribute_list_opt identifier 2683 2685 { typedefTable.makeTypedef( *$3 ); } 2684 2686 hide_opt '{' enumerator_list comma_opt '}' 2685 2687 { $$ = DeclarationNode::newEnum( $3, $7, true, false, nullptr, $5 )->addQualifiers( $2 ); } 2686 | ENUM attribute_list_opt typedef_name // unqualified type name 2687 hide_opt '{' enumerator_list comma_opt '}' 2688 | ENUM attribute_list_opt typedef_name hide_opt '{' enumerator_list comma_opt '}' // unqualified type name 2688 2689 { $$ = DeclarationNode::newEnum( $3->name, $6, true, false, nullptr, $4 )->addQualifiers( $2 ); } 2689 2690 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '{' enumerator_list comma_opt '}' … … 2694 2695 $$ = DeclarationNode::newEnum( nullptr, $7, true, true, $3 )->addQualifiers( $5 ); 2695 2696 } 2697 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '!' '{' enumerator_list comma_opt '}' // unqualified type name 2698 { SemanticError( yylloc, "syntax error, hiding '!' the enumerator names of an anonymous enumeration means the names are inaccessible." ); $$ = nullptr; } 2696 2699 | ENUM '(' ')' attribute_list_opt '{' enumerator_list comma_opt '}' 2697 2700 { 2698 2701 $$ = DeclarationNode::newEnum( nullptr, $6, true, true )->addQualifiers( $4 ); 2699 2702 } 2703 | ENUM '(' ')' attribute_list_opt '!' '{' enumerator_list comma_opt '}' // invalid syntax rule 2704 { SemanticError( yylloc, "syntax error, hiding '!' the enumerator names of an anonymous enumeration means the names are inaccessible." ); $$ = nullptr; } 2700 2705 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt identifier attribute_list_opt 2701 2706 { … … 2709 2714 $$ = DeclarationNode::newEnum( $6, $11, true, true, $3, $9 )->addQualifiers( $5 )->addQualifiers( $7 ); 2710 2715 } 2711 | ENUM '(' ')' attribute_list_opt identifier attribute_list_opt 2712 hide_opt '{' enumerator_list comma_opt '}' 2716 | ENUM '(' ')' attribute_list_opt identifier attribute_list_opt hide_opt '{' enumerator_list comma_opt '}' 2713 2717 { 2714 2718 $$ = DeclarationNode::newEnum( $5, $9, true, true, nullptr, $7 )->addQualifiers( $4 )->addQualifiers( $6 ); 2715 2719 } 2716 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt 2717 hide_opt '{' enumerator_list comma_opt '}' 2720 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt hide_opt '{' enumerator_list comma_opt '}' 2718 2721 { 2719 2722 $$ = DeclarationNode::newEnum( $6->name, $10, true, true, $3, $8 )->addQualifiers( $5 )->addQualifiers( $7 ); 2720 2723 } 2721 | ENUM '(' ')' attribute_list_opt typedef_name attribute_list_opt 2722 hide_opt '{' enumerator_list comma_opt '}' 2724 | ENUM '(' ')' attribute_list_opt typedef_name attribute_list_opt hide_opt '{' enumerator_list comma_opt '}' 2723 2725 { 2724 2726 $$ = DeclarationNode::newEnum( $5->name, $9, true, true, nullptr, $7 )->addQualifiers( $4 )->addQualifiers( $6 );
Note: See TracChangeset
for help on using the changeset viewer.