Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    re307e12 r312029a  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Dec  7 10:43:44 2019
    13 // Update Count     : 4394
     12// Last Modified On : Tue Dec 10 23:07:17 2019
     13// Update Count     : 4400
    1414//
    1515
     
    5151using namespace std;
    5252
     53#include "SynTree/Declaration.h"
    5354#include "ParseNode.h"
    5455#include "TypedefTable.h"
     
    211212} // forCtrl
    212213
    213 KeywordCastExpr::Target Aggregate2Target( DeclarationNode::Aggregate aggr ) {
    214         KeywordCastExpr::Target target;
    215         switch ( aggr ) {
    216           case DeclarationNode::Coroutine: target = KeywordCastExpr::Coroutine; break;
    217           case DeclarationNode::Monitor: target = KeywordCastExpr::Monitor; break;
    218           case DeclarationNode::Thread: target = KeywordCastExpr::Thread; break;
    219           default: abort();
    220         } // switch
    221         return target;
    222 } // Aggregate2Target
    223 
    224 
    225214bool forall = false, yyy = false;                                               // aggregate have one or more forall qualifiers ?
    226215
     
    248237        ExpressionNode * en;
    249238        DeclarationNode * decl;
    250         DeclarationNode::Aggregate aggKey;
     239        AggregateDecl::Aggregate aggKey;
    251240        DeclarationNode::TypeClass tclass;
    252241        StatementNode * sn;
     
    662651                { $$ = new ExpressionNode( build_fieldSel( $1, build_tuple( $4 ) ) ); }
    663652        | postfix_expression '.' aggregate_control
    664                 { $$ = new ExpressionNode( build_keyword_cast( Aggregate2Target( $3 ), $1 ) ); }
     653                { $$ = new ExpressionNode( build_keyword_cast( $3, $1 ) ); }
    665654        | postfix_expression ARROW identifier
    666655                { $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); }
     
    807796                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
    808797        | '(' aggregate_control '&' ')' cast_expression         // CFA
    809                 { $$ = new ExpressionNode( build_keyword_cast( Aggregate2Target( $2 ), $5 ) ); }
     798                { $$ = new ExpressionNode( build_keyword_cast( $2, $5 ) ); }
    810799                // VIRTUAL cannot be opt because of look ahead issues
    811800        | '(' VIRTUAL ')' cast_expression                                       // CFA
     
    20712060aggregate_data:
    20722061        STRUCT
    2073                 { yyy = true; $$ = DeclarationNode::Struct; }
     2062                { yyy = true; $$ = AggregateDecl::Struct; }
    20742063        | UNION
    2075                 { yyy = true; $$ = DeclarationNode::Union; }
     2064                { yyy = true; $$ = AggregateDecl::Union; }
    20762065        | EXCEPTION                                                                                     // CFA
    2077                 { yyy = true; $$ = DeclarationNode::Exception; }
     2066                { yyy = true; $$ = AggregateDecl::Exception; }
    20782067        ;
    20792068
    20802069aggregate_control:                                                                              // CFA
    20812070        GENERATOR
    2082                 { yyy = true; $$ = DeclarationNode::Coroutine; }
     2071                { yyy = true; $$ = AggregateDecl::Coroutine; }
    20832072        | COROUTINE
    2084                 { yyy = true; $$ = DeclarationNode::Coroutine; }
     2073                { yyy = true; $$ = AggregateDecl::Coroutine; }
    20852074        | MONITOR
    2086                 { yyy = true; $$ = DeclarationNode::Monitor; }
     2075                { yyy = true; $$ = AggregateDecl::Monitor; }
    20872076        | THREAD
    2088                 { yyy = true; $$ = DeclarationNode::Thread; }
     2077                { yyy = true; $$ = AggregateDecl::Thread; }
    20892078        ;
    20902079
Note: See TracChangeset for help on using the changeset viewer.