Changeset b9f6791 for src


Ignore:
Timestamp:
Jul 9, 2024, 10:50:58 AM (10 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
f3811df
Parents:
2f4c910
Message:

allow empty global declaration ';', adjust semi-colon rules after static_assert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r2f4c910 rb9f6791  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 27 14:45:57 2024
    13 // Update Count     : 6705
     12// Last Modified On : Tue Jul  9 10:29:01 2024
     13// Update Count     : 6713
    1414//
    1515
     
    19981998        c_declaration ';'
    19991999        | cfa_declaration ';'                                                           // CFA
    2000         | static_assert                                                                         // C11
     2000        | static_assert ';'                                                                     // C11
    20012001        ;
    20022002
    20032003static_assert:
    2004         STATICASSERT '(' constant_expression ',' string_literal ')' ';' // C11
     2004        STATICASSERT '(' constant_expression ',' string_literal ')' // C11
    20052005                { $$ = DeclarationNode::newStaticAssert( $3, maybeMoveBuild( $5 ) ); }
    2006         | STATICASSERT '(' constant_expression ')' ';'          // CFA
     2006        | STATICASSERT '(' constant_expression ')'                      // CFA
    20072007                { $$ = DeclarationNode::newStaticAssert( $3, build_constantStr( yylloc, *new string( "\"\"" ) ) ); }
    20082008
     
    27092709                { $$ = $2; }                                                                    // mark all fields in list
    27102710        | cfa_typedef_declaration ';'                                           // CFA
    2711         | static_assert                                                                         // C11
     2711        | static_assert ';'                                                                     // C11
    27122712        ;
    27132713
     
    33643364                        $$ = $6;
    33653365                }
     3366        | ';'                                                                                           // empty declaration
     3367                { $$ = nullptr; }
    33663368        ;
    33673369
Note: See TracChangeset for help on using the changeset viewer.