Ignore:
Timestamp:
Dec 12, 2018, 3:56:32 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
014bb94
Parents:
515a037
Message:

Missed file in merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r515a037 r1b8f13f0  
    196196                new ExpressionNode( build_binary_val( compop == OperKinds::LThan || compop == OperKinds::LEThan ? // choose += or -= for upto/downto
    197197                                                                                          OperKinds::PlusAssn : OperKinds::MinusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) );
    198 <<<<<<< HEAD
    199 =======
    200198} // forCtrl
    201199
     
    206204                SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); return nullptr;
    207205        } // if
    208 >>>>>>> master
    209206} // forCtrl
    210207
     
    11481145
    11491146for_control_expression:
    1150 <<<<<<< HEAD
    1151         comma_expression_opt                                                            // CFA
    1152                 {
    1153                         if ( ! $1 ) {                                                           // => for ( ;; )
    1154                                 $$ = new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr );
    1155                         } else {
    1156                                 $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
    1157                                                           OperKinds::LThan, $1->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
    1158                         } // if
    1159                 }
    1160 =======
    11611147        comma_expression                                                                        // CFA
    11621148                { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
    11631149                                                OperKinds::LThan, $1->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
    1164 >>>>>>> master
    11651150        | constant_expression inclexcl constant_expression      // CFA
    11661151                { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
    11671152        | constant_expression inclexcl constant_expression '~' constant_expression // CFA
    11681153                { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, $5 ); }
    1169 <<<<<<< HEAD
    1170         | comma_expression_opt ';' comma_expression                     // CFA
    1171                 {
    1172                         if ( ! $1 ) {
    1173                                 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
    1174                         } else if ( ! $3 ) {
    1175                                 SemanticError( yylloc, "Missing loop range." ); $$ = nullptr;
    1176                         } else {
    1177                                 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
    1178                                         $$ = forCtrl( $3, new string( identifier->name ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
    1179                                                                   OperKinds::LThan, $3->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
    1180                                 } else {
    1181                                         SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
    1182                                 } // if
    1183                         } // if
    1184                 }
    1185         | comma_expression_opt ';' constant_expression inclexcl constant_expression // CFA
    1186                 {
    1187                         if ( ! $1 ) {
    1188                                 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
    1189                         } else {
    1190                                 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
    1191                                         $$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) );
    1192                                 } else {
    1193                                         SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
    1194                                 } // if
    1195                         } // if
    1196                 }
    1197         | comma_expression_opt ';' constant_expression inclexcl constant_expression '~' constant_expression // CFA
    1198                 {
    1199                         if ( ! $1 ) {
    1200                                 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
    1201                         } else {
    1202                                 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
    1203                                         $$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, $7 );
    1204                                 } else {
    1205                                         SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
    1206                                 } // if
    1207                         } // if
    1208                 }
    1209         | comma_expression_opt ';' comma_expression_opt ';' comma_expression_opt
    1210 =======
    12111154        | comma_expression ';' comma_expression                         // CFA
    12121155                { $$ = forCtrl( $3, $1, new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
     
    12171160                { $$ = forCtrl( $3, $1, $3->clone(), $4, $5, $7 ); }
    12181161        | comma_expression ';' comma_expression_opt ';' comma_expression_opt
    1219 >>>>>>> master
    12201162                { $$ = new ForCtrl( $1, $3, $5 ); }
    12211163        | ';' comma_expression_opt ';' comma_expression_opt
     
    18861828        | TYPEOF '(' comma_expression ')'                                       // GCC: typeof( a+b ) y;
    18871829                { $$ = DeclarationNode::newTypeof( $3 ); }
    1888 <<<<<<< HEAD
    1889         | BASETYPEOF '(' type ')'                                                       // CFA: basetypeof(x) y;
    1890                 { $$ = $3; }
    1891         | BASETYPEOF '(' comma_expression ')'                           // CFA: basetypeof(a+b) y;
    1892                 { $$ = DeclarationNode::newTypeof( $3 ); }
    1893         | ATTR_TYPEGENname '(' type ')'                                         // CFA: e.g., @type(x) y;
    1894 =======
    18951830        | BASETYPEOF '(' type ')'                                                       // CFA: basetypeof( x ) y;
    18961831                { $$ = DeclarationNode::newTypeof( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ), true ); }
     
    18981833                { $$ = DeclarationNode::newTypeof( $3, true ); }
    18991834        | ATTR_TYPEGENname '(' type ')'                                         // CFA: e.g., @type( x ) y;
    1900 >>>>>>> master
    19011835                { $$ = DeclarationNode::newAttr( $1, $3 ); }
    19021836        | ATTR_TYPEGENname '(' comma_expression ')'                     // CFA: e.g., @type( a+b ) y;
Note: See TracChangeset for help on using the changeset viewer.