Changes in src/Parser/parser.yy [d7874052:65ef0cd]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rd7874052 r65ef0cd 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jun 30 12:32:36202313 // Update Count : 63 6412 // Last Modified On : Tue Jun 20 22:10:31 2023 13 // Update Count : 6348 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 rule2683 { SemanticError( yylloc, "syntax error, hiding '!' the enumerator names of an anonymous enumeration means the names are inaccessible." ); $$ = nullptr; }2684 2682 | ENUM attribute_list_opt identifier 2685 2683 { typedefTable.makeTypedef( *$3 ); } 2686 2684 hide_opt '{' enumerator_list comma_opt '}' 2687 2685 { $$ = DeclarationNode::newEnum( $3, $7, true, false, nullptr, $5 )->addQualifiers( $2 ); } 2688 | ENUM attribute_list_opt typedef_name hide_opt '{' enumerator_list comma_opt '}' // unqualified type name 2686 | ENUM attribute_list_opt typedef_name // unqualified type name 2687 hide_opt '{' enumerator_list comma_opt '}' 2689 2688 { $$ = DeclarationNode::newEnum( $3->name, $6, true, false, nullptr, $4 )->addQualifiers( $2 ); } 2690 2689 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '{' enumerator_list comma_opt '}' … … 2695 2694 $$ = DeclarationNode::newEnum( nullptr, $7, true, true, $3 )->addQualifiers( $5 ); 2696 2695 } 2697 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '!' '{' enumerator_list comma_opt '}' // unqualified type name2698 { SemanticError( yylloc, "syntax error, hiding '!' the enumerator names of an anonymous enumeration means the names are inaccessible." ); $$ = nullptr; }2699 2696 | ENUM '(' ')' attribute_list_opt '{' enumerator_list comma_opt '}' 2700 2697 { 2701 2698 $$ = DeclarationNode::newEnum( nullptr, $6, true, true )->addQualifiers( $4 ); 2702 2699 } 2703 | ENUM '(' ')' attribute_list_opt '!' '{' enumerator_list comma_opt '}' // invalid syntax rule2704 { SemanticError( yylloc, "syntax error, hiding '!' the enumerator names of an anonymous enumeration means the names are inaccessible." ); $$ = nullptr; }2705 2700 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt identifier attribute_list_opt 2706 2701 { … … 2714 2709 $$ = DeclarationNode::newEnum( $6, $11, true, true, $3, $9 )->addQualifiers( $5 )->addQualifiers( $7 ); 2715 2710 } 2716 | ENUM '(' ')' attribute_list_opt identifier attribute_list_opt hide_opt '{' enumerator_list comma_opt '}' 2711 | ENUM '(' ')' attribute_list_opt identifier attribute_list_opt 2712 hide_opt '{' enumerator_list comma_opt '}' 2717 2713 { 2718 2714 $$ = DeclarationNode::newEnum( $5, $9, true, true, nullptr, $7 )->addQualifiers( $4 )->addQualifiers( $6 ); 2719 2715 } 2720 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt hide_opt '{' enumerator_list comma_opt '}' 2716 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt 2717 hide_opt '{' enumerator_list comma_opt '}' 2721 2718 { 2722 2719 $$ = DeclarationNode::newEnum( $6->name, $10, true, true, $3, $8 )->addQualifiers( $5 )->addQualifiers( $7 ); 2723 2720 } 2724 | ENUM '(' ')' attribute_list_opt typedef_name attribute_list_opt hide_opt '{' enumerator_list comma_opt '}' 2721 | ENUM '(' ')' attribute_list_opt typedef_name attribute_list_opt 2722 hide_opt '{' enumerator_list comma_opt '}' 2725 2723 { 2726 2724 $$ = DeclarationNode::newEnum( $5->name, $9, true, true, nullptr, $7 )->addQualifiers( $4 )->addQualifiers( $6 );
Note:
See TracChangeset
for help on using the changeset viewer.