Changeset 910e1d0


Ignore:
Timestamp:
Nov 20, 2022, 10:25:30 PM (17 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, master
Children:
9fce2572
Parents:
d2ad151
Message:

parse enumerated dimension

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    rd2ad151 r910e1d0  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Nov  2 21:31:21 2022
    13 // Update Count     : 5810
     12// Last Modified On : Sun Nov 20 09:41:25 2022
     13// Update Count     : 5816
    1414//
    1515
     
    25582558                { typedefTable.makeTypedef( *$3 ); }
    25592559          hide_opt '{' enumerator_list comma_opt '}'
    2560           { $$ = DeclarationNode::newEnum( $3, $7, true, false, nullptr, $5 )->addQualifiers( $2 ); }
     2560                { $$ = DeclarationNode::newEnum( $3, $7, true, false, nullptr, $5 )->addQualifiers( $2 ); }
    25612561        | ENUM attribute_list_opt typedef_name                          // unqualified type name
    25622562          hide_opt '{' enumerator_list comma_opt '}'
     
    36533653        | '[' ']' multi_array_dimension
    36543654                { $$ = DeclarationNode::newArray( 0, 0, false )->addArray( $3 ); }
     3655                // Cannot use constant_expression because of tuples => semantic check
    36553656        | '[' push assignment_expression pop ',' comma_expression ']'
    36563657                { $$ = DeclarationNode::newArray( $3, 0, false )->addArray( DeclarationNode::newArray( $6, 0, false ) ); }
    36573658                // { SemanticError( yylloc, "New array dimension is currently unimplemented." ); $$ = nullptr; }
     3659        | '[' push TYPEDEFname pop ']'
     3660                { SemanticError( yylloc, "Type array dimension is currently unimplemented." ); $$ = nullptr; }
    36583661        | multi_array_dimension
    36593662        ;
Note: See TracChangeset for help on using the changeset viewer.