Changeset fae90d5


Ignore:
Timestamp:
Mar 30, 2018, 6:16:42 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
b10affd
Parents:
43725bd
Message:

add casts for concurrency types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/parser.yy

    r43725bd rfae90d5  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 22 16:56:21 2018
    13 // Update Count     : 3125
     12// Last Modified On : Wed Mar 28 17:52:24 2018
     13// Update Count     : 3130
    1414//
    1515
     
    497497                { $$ = new ExpressionNode( build_func( new ExpressionNode( build_postfix_name( $5 ) ), $2 ) ); }
    498498        | type_name '.' no_attr_identifier                                      // CFA, nested type
    499                 { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; } // FIX ME
     499                { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; }
    500500        | type_name '.' '[' push field_list pop ']'                     // CFA, nested type / tuple field selector
    501                 { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; } // FIX ME
     501                { SemanticError( yylloc, "Qualified names are currently unimplemented." ); $$ = nullptr; }
    502502        | GENERIC '(' assignment_expression ',' generic_assoc_list ')' // C11
    503                 { SemanticError( yylloc, "_Generic is currently unimplemented." ); $$ = nullptr; } // FIX ME
     503                { SemanticError( yylloc, "_Generic is currently unimplemented." ); $$ = nullptr; }
    504504        ;
    505505
     
    687687        | '(' type_no_function ')' cast_expression
    688688                { $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
     689        | '(' COROUTINE '&' ')' cast_expression                         // CFA
     690                { SemanticError( yylloc, "coroutine cast is currently unimplemented." ); $$ = nullptr; }
     691        | '(' THREAD '&' ')' cast_expression                            // CFA
     692                { SemanticError( yylloc, "monitor cast is currently unimplemented." ); $$ = nullptr; }
     693        | '(' MONITOR '&' ')' cast_expression                           // CFA
     694                { SemanticError( yylloc, "thread cast is currently unimplemented." ); $$ = nullptr; }
    689695                // VIRTUAL cannot be opt because of look ahead issues
    690         | '(' VIRTUAL ')' cast_expression
     696        | '(' VIRTUAL ')' cast_expression                                       // CFA
    691697                { $$ = new ExpressionNode( new VirtualCastExpr( maybeMoveBuild< Expression >( $4 ), maybeMoveBuildType( nullptr ) ) ); }
    692         | '(' VIRTUAL type_no_function ')' cast_expression
     698        | '(' VIRTUAL type_no_function ')' cast_expression      // CFA
    693699                { $$ = new ExpressionNode( new VirtualCastExpr( maybeMoveBuild< Expression >( $5 ), maybeMoveBuildType( $3 ) ) ); }
    694700//      | '(' type_no_function ')' tuple
     
    782788        | logical_OR_expression '?' comma_expression ':' conditional_expression
    783789                { $$ = new ExpressionNode( build_cond( $1, $3, $5 ) ); }
    784                 // FIX ME: this hack computes $1 twice
     790                // FIX ME: computes $1 twice
    785791        | logical_OR_expression '?' /* empty */ ':' conditional_expression // GCC, omitted first operand
    786792                { $$ = new ExpressionNode( build_cond( $1, $1, $4 ) ); }
     
    797803                { $$ = new ExpressionNode( build_binary_val( $2, $1, $3 ) ); }
    798804        | unary_expression '=' '{' initializer_list comma_opt '}'
    799                 { SemanticError( yylloc, "Initializer assignment is currently unimplemented." ); $$ = nullptr; } // FIX ME
     805                { SemanticError( yylloc, "Initializer assignment is currently unimplemented." ); $$ = nullptr; }
    800806        ;
    801807
     
    867873        | exception_statement
    868874        | enable_disable_statement
    869                 { SemanticError( yylloc, "enable/disable statement is currently unimplemented." ); $$ = nullptr; } // FIX ME
     875                { SemanticError( yylloc, "enable/disable statement is currently unimplemented." ); $$ = nullptr; }
    870876        | asm_statement
    871877        ;
     
    10621068                { $$ = new StatementNode( build_return( $2 ) ); }
    10631069        | RETURN '{' initializer_list comma_opt '}'
    1064                 { SemanticError( yylloc, "Initializer return is currently unimplemented." ); $$ = nullptr; } // FIX ME
     1070                { SemanticError( yylloc, "Initializer return is currently unimplemented." ); $$ = nullptr; }
    10651071        | THROW assignment_expression_opt ';'                           // handles rethrow
    10661072                { $$ = new StatementNode( build_throw( $2 ) ); }
     
    10861092mutex_statement:
    10871093        MUTEX '(' argument_expression_list ')' statement
    1088                 { SemanticError( yylloc, "Mutex statement is currently unimplemented." ); $$ = nullptr; } // FIX ME
     1094                { SemanticError( yylloc, "Mutex statement is currently unimplemented." ); $$ = nullptr; }
    10891095        ;
    10901096
     
    13081314static_assert:
    13091315        STATICASSERT '(' constant_expression ',' string_literal ')' ';' // C11
    1310                 { SemanticError( yylloc, "Static assert is currently unimplemented." ); $$ = nullptr; } // FIX ME
     1316                { SemanticError( yylloc, "Static assert is currently unimplemented." ); $$ = nullptr; }
    13111317
    13121318// C declaration syntax is notoriously confusing and error prone. Cforall provides its own type, variable and function
Note: See TracChangeset for help on using the changeset viewer.