Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r5695645 r9e7236f4  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May  4 14:25:20 2022
    13 // Update Count     : 5277
     12// Last Modified On : Mon Mar 14 16:35:29 2022
     13// Update Count     : 5276
    1414//
    1515
     
    111111
    112112void distInl( DeclarationNode * declaration ) {
    113         // distribute INLINE across all declarations
     113        // distribute EXTENSION across all declarations
    114114        for ( DeclarationNode *iter = declaration; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) {
    115115                iter->set_inLine( true );
     
    12211221
    12221222iteration_statement:
    1223         WHILE '(' ')' statement                                                         %prec THEN // CFA => while ( 1 )
     1223        WHILE '(' ')' statement                                                         // CFA => while ( 1 )
    12241224                { $$ = new StatementNode( build_while( new CondCtl( nullptr, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ), maybe_build_compound( $4 ) ) ); }
    1225         | WHILE '(' ')' statement ELSE statement                        // CFA
    1226                 { SemanticWarning( yylloc, Warning::SuperfluousElse ); }
    12271225        | WHILE '(' conditional_declaration ')' statement       %prec THEN
    12281226                { $$ = new StatementNode( build_while( $3, maybe_build_compound( $5 ) ) ); }
     
    12311229        | DO statement WHILE '(' ')' ';'                                        // CFA => do while( 1 )
    12321230                { $$ = new StatementNode( build_do_while( new ExpressionNode( build_constantInteger( *new string( "1" ) ) ), maybe_build_compound( $2 ) ) ); }
    1233         | DO statement WHILE '(' ')' ELSE statement                     // CFA
    1234                 { SemanticWarning( yylloc, Warning::SuperfluousElse ); }
    12351231        | DO statement WHILE '(' comma_expression ')' ';'       %prec THEN
    12361232                { $$ = new StatementNode( build_do_while( $5, maybe_build_compound( $2 ) ) ); }
     
    23222318                        { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for enumeration constants, which are const." ); }
    23232319
    2324                         $$ = DeclarationNode::newEnum( nullptr, $7, true, $3 )->addQualifiers( $5 );
     2320                        $$ = DeclarationNode::newEnum( nullptr, $7, true, $3 ) ->addQualifiers( $5 );
    23252321                }
    23262322        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt identifier attribute_list_opt
     
    23312327          '{' enumerator_list comma_opt '}'
    23322328                {
    2333                         $$ = DeclarationNode::newEnum( $6, $10, true, $3 )->addQualifiers( $5 )->addQualifiers( $7 );
     2329                        $$ = DeclarationNode::newEnum( $6, $10, true, $3 ) -> addQualifiers( $5 ) -> addQualifiers( $7 );
    23342330                }
    23352331        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt '{' enumerator_list comma_opt '}'
     
    23372333                        if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 ) { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for enumeration constants, which are const." ); }
    23382334                        typedefTable.makeTypedef( *$6->name );
    2339                         $$ = DeclarationNode::newEnum( $6->name, $9, true, $3 )->addQualifiers( $5 )->addQualifiers( $7 );
     2335                        $$ = DeclarationNode::newEnum( $6->name, $9, true, $3 ) -> addQualifiers( $5 ) -> addQualifiers( $7 );
    23402336                }
    23412337        | enum_type_nobody
Note: See TracChangeset for help on using the changeset viewer.