Changeset c786e1d


Ignore:
Timestamp:
May 29, 2019, 9:09:25 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
6054b18
Parents:
eba615c
Message:

change bit size to assignment_expression, add semi-colon after return initializer, sketch out suspend/resume

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    reba615c rc786e1d  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 15 21:25:27 2019
    13 // Update Count     : 4296
     12// Last Modified On : Tue May 28 17:06:37 2019
     13// Update Count     : 4354
    1414//
    1515
     
    278278%token OTYPE FTYPE DTYPE TTYPE TRAIT                                    // CFA
    279279%token SIZEOF OFFSETOF
     280// %token SUSPEND RESUME                                                                        // CFA
    280281%token ATTRIBUTE EXTENSION                                                              // GCC
    281282%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
     
    482483%precedence '}'
    483484%precedence '('
     485
     486// %precedence RESUME
     487// %precedence '{'
     488// %precedence ')'
    484489
    485490%locations                                                                                              // support location tracking for error messages
     
    599604                        $$ = new ExpressionNode( $5 );
    600605                }
     606        // | RESUME '(' comma_expression ')'
     607        //      { SemanticError( yylloc, "Resume expression is currently unimplemented." ); $$ = nullptr; }
     608        // | RESUME '(' comma_expression ')' compound_statement
     609        //      { SemanticError( yylloc, "Resume expression is currently unimplemented." ); $$ = nullptr; }
    601610        ;
    602611
     
    12631272        | RETURN comma_expression_opt ';'
    12641273                { $$ = new StatementNode( build_return( $2 ) ); }
    1265         | RETURN '{' initializer_list_opt comma_opt '}'
     1274        | RETURN '{' initializer_list_opt comma_opt '}' ';'
    12661275                { SemanticError( yylloc, "Initializer return is currently unimplemented." ); $$ = nullptr; }
     1276        // | SUSPEND ';'
     1277        //      { SemanticError( yylloc, "Suspend expression is currently unimplemented." ); $$ = nullptr; }
     1278        // | SUSPEND compound_statement ';'
     1279        //      { SemanticError( yylloc, "Suspend expression is currently unimplemented." ); $$ = nullptr; }
    12671280        | THROW assignment_expression_opt ';'                           // handles rethrow
    12681281                { $$ = new StatementNode( build_throw( $2 ) ); }
     
    21582171
    21592172bit_subrange_size:
    2160         ':' constant_expression
     2173        ':' assignment_expression
    21612174                { $$ = $2; }
    21622175        ;
Note: See TracChangeset for help on using the changeset viewer.