Changes in / [f1d2c44:5144898]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
rf1d2c44 r5144898 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 11 16:56:42202413 // Update Count : 66 3812 // Last Modified On : Tue Jun 11 21:32:15 2024 13 // Update Count : 6641 14 14 // 15 15 … … 387 387 // names and constants: lexer differentiates between identifier and typedef names 388 388 %token<tok> IDENTIFIER TYPEDIMname TYPEDEFname TYPEGENname 389 %token<tok> TIMEOUT WAND WOR 389 %token<tok> TIMEOUT WAND WOR CATCH RECOVER CATCHRESUME FIXUP FINALLY // CFA 390 390 %token<tok> INTEGERconstant CHARACTERconstant STRINGliteral 391 391 %token<tok> DIRECTIVE … … 493 493 %type<decl> exception_declaration 494 494 495 %type<decl> field_declaration_list_opt field_declaration field_declaring_list_opt field_declar ing_list field_declarator field_abstract_list_opt field_abstract495 %type<decl> field_declaration_list_opt field_declaration field_declaring_list_opt field_declarator field_abstract_list_opt field_abstract 496 496 %type<expr> field field_name_list field_name fraction_constants_opt 497 497 … … 678 678 | '@' // CFA 679 679 { Token tok = { new string( DeclarationNode::anonymous.newName() ), yylval.tok.loc }; $$ = tok; } 680 ; 681 682 identifier_or_type_name: 683 identifier 684 | TYPEDEFname 685 | TYPEGENname 680 686 ; 681 687 … … 811 817 // z.E; // lexer returns E is TYPEDEFname 812 818 // } 813 | postfix_expression '.' identifier 814 { $$ = new ExpressionNode( build_fieldSel( yylloc, $1, build_varref( yylloc, $3 ) ) ); } 815 | postfix_expression '.' TYPEDEFname // CFA, SKULLDUGGERY 816 { $$ = new ExpressionNode( build_fieldSel( yylloc, $1, build_varref( yylloc, $3 ) ) ); } 817 | postfix_expression '.' TYPEGENname // CFA, SKULLDUGGERY 819 | postfix_expression '.' identifier_or_type_name 818 820 { $$ = new ExpressionNode( build_fieldSel( yylloc, $1, build_varref( yylloc, $3 ) ) ); } 819 821 … … 1613 1615 enum_key: 1614 1616 TYPEDEFname 1615 | ENUM TYPEDEFname1617 | ENUM identifier_or_type_name 1616 1618 ; 1617 1619 … … 2692 2694 // empty 2693 2695 { $$ = nullptr; } 2694 | field_declaring_list 2695 ; 2696 2697 field_declaring_list: 2698 field_declarator 2699 | field_declaring_list ',' attribute_list_opt field_declarator 2696 | field_declarator 2697 | field_declaring_list_opt ',' attribute_list_opt field_declarator 2700 2698 { $$ = $1->set_last( $4->addQualifiers( $3 ) ); } 2701 2699 ; … … 2961 2959 ; 2962 2960 2963 identifier_or_type_name:2964 identifier2965 | TYPEDEFname2966 | TYPEGENname2967 ;2968 2969 2961 type_no_function: // sizeof, alignof, cast (constructor) 2970 2962 cfa_abstract_declarator_tuple // CFA … … 3230 3222 // empty, input file 3231 3223 | external_definition_list 3232 { parseTree = parseTree ? parseTree->set_last( $1 ) : $1; 3224 { parseTree = parseTree ? parseTree->set_last( $1 ) : $1; } 3233 3225 ; 3234 3226 … … 3488 3480 3489 3481 attr_name: // GCC 3490 IDENTIFIER 3491 | quasi_keyword 3492 | TYPEDEFname 3493 | TYPEGENname 3482 identifier_or_type_name 3494 3483 | FALLTHROUGH 3495 3484 { $$ = Token{ new string( "fallthrough" ), { nullptr, -1 } }; }
Note: See TracChangeset
for help on using the changeset viewer.