Changes in src/Parser/parser.yy [9867cdb:0a6d8204]
- File:
-
- 1 edited
-
src/Parser/parser.yy (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r9867cdb r0a6d8204 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 6 17:26:45202013 // Update Count : 44 7412 // Last Modified On : Mon Apr 27 12:25:42 2020 13 // Update Count : 4483 14 14 // 15 15 … … 278 278 %token OTYPE FTYPE DTYPE TTYPE TRAIT // CFA 279 279 %token SIZEOF OFFSETOF 280 // %token SUSPEND RESUME // CFA 280 // %token RESUME // CFA 281 %token SUSPEND // CFA 281 282 %token ATTRIBUTE EXTENSION // GCC 282 283 %token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN … … 965 966 966 967 tuple_expression_list: 967 assignment_expression_opt 968 | tuple_expression_list ',' assignment_expression_opt 968 assignment_expression 969 | '@' // CFA 970 { SemanticError( yylloc, "Eliding tuple element with '@' is currently unimplemented." ); $$ = nullptr; } 971 | tuple_expression_list ',' assignment_expression 969 972 { $$ = (ExpressionNode *)($1->set_last( $3 )); } 973 | tuple_expression_list ',' '@' 974 { SemanticError( yylloc, "Eliding tuple element with '@' is currently unimplemented." ); $$ = nullptr; } 970 975 ; 971 976 … … 1265 1270 | RETURN '{' initializer_list_opt comma_opt '}' ';' 1266 1271 { SemanticError( yylloc, "Initializer return is currently unimplemented." ); $$ = nullptr; } 1267 // | SUSPEND ';' 1268 // { SemanticError( yylloc, "Suspend expression is currently unimplemented." ); $$ = nullptr; } 1269 // | SUSPEND compound_statement ';' 1270 // { SemanticError( yylloc, "Suspend expression is currently unimplemented." ); $$ = nullptr; } 1272 | SUSPEND ';' 1273 { $$ = new StatementNode( build_suspend( nullptr ) ); } 1274 | SUSPEND compound_statement 1275 { $$ = new StatementNode( build_suspend( $2 ) ); } 1276 | SUSPEND COROUTINE ';' 1277 { $$ = new StatementNode( build_suspend( nullptr, SuspendStmt::Coroutine ) ); } 1278 | SUSPEND COROUTINE compound_statement 1279 { $$ = new StatementNode( build_suspend( $3, SuspendStmt::Coroutine ) ); } 1280 | SUSPEND GENERATOR ';' 1281 { $$ = new StatementNode( build_suspend( nullptr, SuspendStmt::Generator ) ); } 1282 | SUSPEND GENERATOR compound_statement 1283 { $$ = new StatementNode( build_suspend( $3, SuspendStmt::Generator ) ); } 1271 1284 | THROW assignment_expression_opt ';' // handles rethrow 1272 1285 { $$ = new StatementNode( build_throw( $2 ) ); } … … 2083 2096 aggregate_control: // CFA 2084 2097 GENERATOR 2085 { SemanticError( yylloc, "generator is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }2098 { yyy = true; $$ = AggregateDecl::Generator; } 2086 2099 | MONITOR GENERATOR 2087 2100 { SemanticError( yylloc, "monitor generator is currently unimplemented." ); $$ = AggregateDecl::NoAggregate; }
Note:
See TracChangeset
for help on using the changeset viewer.