- Timestamp:
- Mar 18, 2019, 10:41:12 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 0c81320
- Parents:
- 083203b
- Location:
- src/Parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/lex.ll
r083203b r1528a2c 10 10 * Created On : Sat Sep 22 08:58:10 2001 11 11 * Last Modified By : Peter A. Buhr 12 * Last Modified On : Sun Mar 10 09:13:09201913 * Update Count : 70 612 * Last Modified On : Wed Mar 13 14:54:30 2019 13 * Update Count : 707 14 14 */ 15 15 … … 226 226 char { KEYWORD_RETURN(CHAR); } 227 227 choose { KEYWORD_RETURN(CHOOSE); } // CFA 228 coerce { KEYWORD_RETURN(COERCE); } // CFA 228 229 _Complex { KEYWORD_RETURN(COMPLEX); } // C99 229 230 __complex { KEYWORD_RETURN(COMPLEX); } // GCC -
src/Parser/parser.yy
r083203b r1528a2c 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 21 08:45:07201913 // Update Count : 42 3212 // Last Modified On : Fri Mar 15 14:25:43 2019 13 // Update Count : 4248 14 14 // 15 15 … … 265 265 %token RESTRICT // C99 266 266 %token ATOMIC // C11 267 %token FORALL MUTEX VIRTUAL 267 %token FORALL MUTEX VIRTUAL COERCE // CFA 268 268 %token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED 269 269 %token BOOL COMPLEX IMAGINARY // C99 … … 795 795 | '(' type_no_function ')' cast_expression 796 796 { $$ = new ExpressionNode( build_cast( $2, $4 ) ); } 797 // keyword cast cannot be grouped because of reduction in aggregate_key 797 798 | '(' COROUTINE '&' ')' cast_expression // CFA 798 799 { $$ = new ExpressionNode( build_keyword_cast( KeywordCastExpr::Coroutine, $5 ) ); } … … 806 807 | '(' VIRTUAL type_no_function ')' cast_expression // CFA 807 808 { $$ = new ExpressionNode( new VirtualCastExpr( maybeMoveBuild< Expression >( $5 ), maybeMoveBuildType( $3 ) ) ); } 809 | '(' RETURN type_no_function ')' cast_expression // CFA 810 { SemanticError( yylloc, "Return cast is currently unimplemented." ); $$ = nullptr; } 811 | '(' COERCE type_no_function ')' cast_expression // CFA 812 { SemanticError( yylloc, "Coerce cast is currently unimplemented." ); $$ = nullptr; } 813 | '(' qualifier_cast_list ')' cast_expression // CFA 814 { SemanticError( yylloc, "Qualifier cast is currently unimplemented." ); $$ = nullptr; } 808 815 // | '(' type_no_function ')' tuple 809 816 // { $$ = new ExpressionNode( build_cast( $2, $4 ) ); } 817 ; 818 819 qualifier_cast_list: 820 cast_modifier type_qualifier_name 821 | cast_modifier MUTEX 822 | qualifier_cast_list cast_modifier type_qualifier_name 823 | qualifier_cast_list cast_modifier MUTEX 824 ; 825 826 cast_modifier: 827 '-' 828 | '+' 810 829 ; 811 830
Note: See TracChangeset
for help on using the changeset viewer.