Changeset 8cbe732 for src/Parser


Ignore:
Timestamp:
Oct 13, 2023, 7:13:21 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
a97b9ed, bab2917
Parents:
85034ed (diff), 0bf0b978 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/Parser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    r85034ed r8cbe732  
    498498} // build_mutex
    499499
     500ast::Stmt * build_corun( const CodeLocation & location, StatementNode * stmt ) {
     501        ast::Stmt * body = maybeMoveBuild( stmt );
     502        return new ast::CorunStmt( location, body );
     503} // build_corun
     504
    500505// Local Variables: //
    501506// tab-width: 4 //
  • src/Parser/StatementNode.h

    r85034ed r8cbe732  
    105105ast::Stmt * build_with( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
    106106ast::Stmt * build_mutex( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
     107ast::Stmt * build_corun( const CodeLocation &, StatementNode * stmt );
  • src/Parser/lex.ll

    r85034ed r8cbe732  
    1010 * Created On       : Sat Sep 22 08:58:10 2001
    1111 * Last Modified By : Peter A. Buhr
    12  * Last Modified On : Fri Jun  9 10:04:00 2023
    13  * Update Count     : 770
     12 * Last Modified On : Tue Oct  3 17:10:57 2023
     13 * Update Count     : 773
    1414 */
    1515
     
    217217
    218218                                /* keywords */
     219alignas                 { KEYWORD_RETURN(ALIGNAS); }                    // CFA
    219220_Alignas                { KEYWORD_RETURN(ALIGNAS); }                    // C11
     221alignof                 { KEYWORD_RETURN(ALIGNOF); }                    // CFA
    220222_Alignof                { KEYWORD_RETURN(ALIGNOF); }                    // C11
    221223__alignof               { KEYWORD_RETURN(ALIGNOF); }                    // GCC
     
    239241choose                  { KEYWORD_RETURN(CHOOSE); }                             // CFA
    240242coerce                  { KEYWORD_RETURN(COERCE); }                             // CFA
     243corun                   { KEYWORD_RETURN(CORUN); }                              // CFA
     244cofor                   { KEYWORD_RETURN(COFOR); }                              // CFA
    241245_Complex                { KEYWORD_RETURN(COMPLEX); }                    // C99
    242246__complex               { KEYWORD_RETURN(COMPLEX); }                    // GCC
     
    319323static                  { KEYWORD_RETURN(STATIC); }
    320324_Static_assert  { KEYWORD_RETURN(STATICASSERT); }               // C11
    321 _static_assert  { KEYWORD_RETURN(STATICASSERT); }               // C23
     325static_assert   { KEYWORD_RETURN(STATICASSERT); }               // C23
    322326struct                  { KEYWORD_RETURN(STRUCT); }
    323327suspend                 { KEYWORD_RETURN(SUSPEND); }                    // CFA
     
    326330__thread                { KEYWORD_RETURN(THREADLOCALGCC); }             // GCC
    327331_Thread_local   { KEYWORD_RETURN(THREADLOCALC11); }             // C11
     332thread_local    { KEYWORD_RETURN(THREADLOCALC11); }             // C23
    328333throw                   { KEYWORD_RETURN(THROW); }                              // CFA
    329334throwResume             { KEYWORD_RETURN(THROWRESUME); }                // CFA
  • src/Parser/parser.yy

    r85034ed r8cbe732  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Sep  4 18:28:12 2023
    13 // Update Count     : 6393
     12// Last Modified On : Tue Oct  3 17:14:12 2023
     13// Update Count     : 6396
    1414//
    1515
     
    350350%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
    351351%token CHOOSE FALLTHRU FALLTHROUGH WITH WHEN WAITFOR WAITUNTIL // CFA
     352%token CORUN COFOR
    352353%token DISABLE ENABLE TRY THROW THROWRESUME AT                  // CFA
    353354%token ASM                                                                                              // C99, extension ISO/IEC 9899:1999 Section J.5.10(1)
     
    422423%type<stmt> with_statement
    423424%type<expr> with_clause_opt
     425%type<stmt> corun_statement                             cofor_statement
    424426%type<stmt> exception_statement
    425427%type<clause> handler_clause                    finally_clause
     
    11401142        | waitfor_statement
    11411143        | waituntil_statement
     1144        | corun_statement
     1145        | cofor_statement
    11421146        | exception_statement
    11431147        | enable_disable_statement
     
    17131717        wor_waituntil_clause                                                            %prec THEN
    17141718                { $$ = new StatementNode( build_waituntil_stmt( yylloc, $1 ) ); }
     1719        ;
     1720
     1721corun_statement:
     1722        CORUN statement
     1723                { $$ = new StatementNode( build_corun( yylloc, $2 ) ); }
     1724        ;
     1725
     1726cofor_statement:
     1727        COFOR '(' for_control_expression_list ')' statement
     1728                { SemanticError( yylloc, "cofor statement is currently unimplemented." ); $$ = nullptr; }
    17151729        ;
    17161730
Note: See TracChangeset for help on using the changeset viewer.