Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r9306559f r9867cdb  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Feb 26 14:27:39 2020
    13 // Update Count     : 4472
     12// Last Modified On : Fri Mar  6 17:26:45 2020
     13// Update Count     : 4474
    1414//
    1515
     
    278278%token OTYPE FTYPE DTYPE TTYPE TRAIT                                    // CFA
    279279%token SIZEOF OFFSETOF
    280 // %token RESUME                                                                        // CFA
    281 %token SUSPEND                                                                  // CFA
     280// %token SUSPEND RESUME                                                                        // CFA
    282281%token ATTRIBUTE EXTENSION                                                              // GCC
    283282%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
     
    919918        conditional_expression
    920919        | unary_expression assignment_operator assignment_expression
    921                 { $$ = new ExpressionNode( build_binary_val( $2, $1, $3 ) ); }
     920                {
     921                        if ( $2 == OperKinds::AtAssn ) {
     922                                SemanticError( yylloc, "C @= assignment is currently unimplemented." ); $$ = nullptr;
     923                        } else {
     924                                $$ = new ExpressionNode( build_binary_val( $2, $1, $3 ) );
     925                        } // if
     926                }
    922927        | unary_expression '=' '{' initializer_list_opt comma_opt '}'
    923928                { SemanticError( yylloc, "Initializer assignment is currently unimplemented." ); $$ = nullptr; }
     
    12601265        | RETURN '{' initializer_list_opt comma_opt '}' ';'
    12611266                { SemanticError( yylloc, "Initializer return is currently unimplemented." ); $$ = nullptr; }
    1262         | SUSPEND ';'
    1263                 { $$ = new StatementNode( build_suspend( nullptr ) ); }
    1264         | SUSPEND compound_statement
    1265                 { $$ = new StatementNode( build_suspend( $2 ) ); }
    1266         | SUSPEND COROUTINE ';'
    1267                 { $$ = new StatementNode( build_suspend( nullptr, SuspendStmt::Coroutine ) ); }
    1268         | SUSPEND COROUTINE compound_statement
    1269                 { $$ = new StatementNode( build_suspend( $3, SuspendStmt::Coroutine ) ); }
    1270         | SUSPEND GENERATOR ';'
    1271                 { $$ = new StatementNode( build_suspend( nullptr, SuspendStmt::Generator ) ); }
    1272         | SUSPEND GENERATOR compound_statement
    1273                 { $$ = new StatementNode( build_suspend( $3, SuspendStmt::Generator ) ); }
     1267        // | SUSPEND ';'
     1268        //      { SemanticError( yylloc, "Suspend expression is currently unimplemented." ); $$ = nullptr; }
     1269        // | SUSPEND compound_statement ';'
     1270        //      { SemanticError( yylloc, "Suspend expression is currently unimplemented." ); $$ = nullptr; }
    12741271        | THROW assignment_expression_opt ';'                           // handles rethrow
    12751272                { $$ = new StatementNode( build_throw( $2 ) ); }
     
    20862083aggregate_control:                                                                              // CFA
    20872084        GENERATOR
    2088                 { yyy = true; $$ = AggregateDecl::Generator; }
     2085                { SemanticError( yylloc, "generator is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }
    20892086        | MONITOR GENERATOR
    20902087                { SemanticError( yylloc, "monitor generator is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }
Note: See TracChangeset for help on using the changeset viewer.