Changeset 98337569


Ignore:
Timestamp:
Mar 30, 2021, 5:11:30 PM (4 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master
Children:
ca33b15
Parents:
a41e87b
Message:

add syntax for array-type for-control, update enum type error message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    ra41e87b r98337569  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Mar 28 18:53:34 2021
    13 // Update Count     : 4940
     12// Last Modified On : Tue Mar 30 16:56:54 2021
     13// Update Count     : 4952
    1414//
    1515
     
    12361236        | comma_expression ';' comma_expression inclexcl comma_expression '~' comma_expression // CFA
    12371237                { $$ = forCtrl( $3, $1, $3->clone(), $4, $5, $7 ); }
     1238
     1239        | comma_expression ';' TYPEDEFname                                      // CFA
     1240                { SemanticError( yylloc, "Array interator is currently unimplemented." ); $$ = nullptr; }
    12381241
    12391242                // There is a S/R conflicit if ~ and -~ are factored out.
     
    22272230        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '{' enumerator_list comma_opt '}'
    22282231                {
    2229                         if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 ) { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for constants." ); }
     2232                        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." ); }
    22302233                        SemanticError( yylloc, "Typed enumeration is currently unimplemented." ); $$ = nullptr;
    22312234                }
    22322235        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt identifier attribute_list_opt
    22332236                {
    2234                         if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 ) { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for constants." ); }
     2237                        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." ); }
    22352238                        typedefTable.makeTypedef( *$6 );
    22362239                }
     
    22412244        | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt '{' enumerator_list comma_opt '}'
    22422245                {
    2243                         if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 ) { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for constants." ); }
     2246                        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." ); }
    22442247                        typedefTable.makeTypedef( *$6->name );
    22452248                        SemanticError( yylloc, "Typed enumeration is currently unimplemented." ); $$ = nullptr;
Note: See TracChangeset for help on using the changeset viewer.