Changeset 24711a3 for src


Ignore:
Timestamp:
Apr 26, 2021, 6:54:31 PM (8 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
8840228
Parents:
aec68b6
Message:

parse aggregate_control *, remove spurious yyy variable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    raec68b6 r24711a3  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Apr 14 18:13:44 2021
    13 // Update Count     : 4983
     12// Last Modified On : Mon Apr 26 18:41:54 2021
     13// Update Count     : 4990
    1414//
    1515
     
    211211} // forCtrl
    212212
    213 bool forall = false, yyy = false;                                               // aggregate have one or more forall qualifiers ?
     213bool forall = false;                                                                    // aggregate have one or more forall qualifiers ?
    214214
    215215// https://www.gnu.org/software/bison/manual/bison.html#Location-Type
     
    812812                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
    813813        | '(' aggregate_control '&' ')' cast_expression         // CFA
     814                { $$ = new ExpressionNode( build_keyword_cast( $2, $5 ) ); }
     815        | '(' aggregate_control '*' ')' cast_expression         // CFA
    814816                { $$ = new ExpressionNode( build_keyword_cast( $2, $5 ) ); }
    815817        | '(' VIRTUAL ')' cast_expression                                       // CFA
     
    21282130aggregate_data:
    21292131        STRUCT vtable_opt
    2130                 { yyy = true; $$ = AggregateDecl::Struct; }
     2132                { $$ = AggregateDecl::Struct; }
    21312133        | UNION
    2132                 { yyy = true; $$ = AggregateDecl::Union; }
     2134                { $$ = AggregateDecl::Union; }
    21332135        | EXCEPTION                                                                                     // CFA
    2134                 { yyy = true; $$ = AggregateDecl::Exception; }
     2136                { $$ = AggregateDecl::Exception; }
    21352137          //            { SemanticError( yylloc, "exception aggregate is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }
    21362138        ;
     
    21382140aggregate_control:                                                                              // CFA
    21392141        MONITOR
    2140                 { yyy = true; $$ = AggregateDecl::Monitor; }
     2142                { $$ = AggregateDecl::Monitor; }
    21412143        | MUTEX STRUCT
    2142                 { yyy = true; $$ = AggregateDecl::Monitor; }
     2144                { $$ = AggregateDecl::Monitor; }
    21432145        | GENERATOR
    2144                 { yyy = true; $$ = AggregateDecl::Generator; }
     2146                { $$ = AggregateDecl::Generator; }
    21452147        | MUTEX GENERATOR
    21462148                { SemanticError( yylloc, "monitor generator is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }
    21472149        | COROUTINE
    2148                 { yyy = true; $$ = AggregateDecl::Coroutine; }
     2150                { $$ = AggregateDecl::Coroutine; }
    21492151        | MUTEX COROUTINE
    21502152                { SemanticError( yylloc, "monitor coroutine is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }
    21512153        | THREAD
    2152                 { yyy = true; $$ = AggregateDecl::Thread; }
     2154                { $$ = AggregateDecl::Thread; }
    21532155        | MUTEX THREAD
    21542156                { SemanticError( yylloc, "monitor thread is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }
Note: See TracChangeset for help on using the changeset viewer.