Changeset 135b431 for src/Parser/parser.yy
- Timestamp:
- Aug 25, 2017, 11:09:02 AM (7 years ago)
- 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, resolv-new, with_gc
- Children:
- 6b224a52
- Parents:
- 3eab0ef6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r3eab0ef6 r135b431 97 97 DeclarationNode::TypeClass tclass; 98 98 StatementNode * sn; 99 WaitForStmt * wfs; 99 100 ConstantExpr * constant; 100 101 IfCtl * ifctl; … … 187 188 %type<flag> asm_volatile_opt 188 189 %type<en> handler_predicate_opt 190 %type<en> when_clause_opt timeout 189 191 190 192 // statements … … 192 194 %type<sn> iteration_statement jump_statement 193 195 %type<sn> with_statement exception_statement asm_statement 194 %type<sn> w hen_clause_opt waitfor_statement waitfor_clause waitfor timeout196 %type<sn> waitfor_statement 195 197 %type<sn> fall_through_opt fall_through 196 198 %type<sn> statement statement_list … … 202 204 %type<sn> handler_clause finally_clause 203 205 %type<catch_kind> handler_key 206 %type<wfs> waitfor_clause 207 %type<en> waitfor 204 208 205 209 // declarations … … 979 983 when_clause_opt: 980 984 // empty 981 { $$ = nullptr; } // FIX ME985 { $$ = nullptr; } 982 986 | WHEN '(' comma_expression ')' 983 { $$ = nullptr; } // FIX ME987 { $$ = $3; } 984 988 ; 985 989 986 990 waitfor: 987 991 WAITFOR '(' identifier ')' 988 { $$ = nullptr; } // FIX ME 992 { 993 $$ = new ExpressionNode( new NameExpr( *$3 ) ); 994 delete $3; 995 } 989 996 | WAITFOR '(' identifier ',' argument_expression_list ')' 990 { $$ = nullptr; } // FIX ME 997 { 998 $$ = new ExpressionNode( new NameExpr( *$3 ) ); 999 $$->set_last( $5 ); 1000 delete $3; 1001 } 991 1002 ; 992 1003 993 1004 timeout: 994 1005 TIMEOUT '(' comma_expression ')' 995 { $$ = nullptr; } // FIX ME1006 { $$ = $3; } 996 1007 ; 997 1008 998 1009 waitfor_clause: 999 1010 when_clause_opt waitfor statement %prec THEN 1000 { $$ = nullptr; } // FIX ME1011 { $$ = build_waitfor( $2, $3, $1 ); } 1001 1012 | when_clause_opt waitfor statement WOR waitfor_clause 1002 { $$ = nullptr; } // FIX ME1013 { $$ = build_waitfor( $2, $3, $1, $5 ); } 1003 1014 | when_clause_opt timeout statement %prec THEN 1004 { $$ = nullptr; } // FIX ME1015 { $$ = build_waitfor_timeout( $2, $3, $1 ); } 1005 1016 | when_clause_opt ELSE statement 1006 { $$ = nullptr; } // FIX ME1017 { $$ = build_waitfor_timeout( nullptr, $3, $1 ); } 1007 1018 | when_clause_opt timeout statement WOR when_clause_opt ELSE statement 1008 { $$ = nullptr; } // FIX ME1019 { $$ = build_waitfor_timeout( $2, $3, $1, $7, $5 ); } 1009 1020 ; 1010 1021 1011 1022 waitfor_statement: 1012 1023 when_clause_opt waitfor statement %prec THEN 1013 { $$ = n ullptr; } // FIX ME1024 { $$ = new StatementNode( build_waitfor( $2, $3, $1 ) ); } 1014 1025 | when_clause_opt waitfor statement WOR waitfor_clause 1015 { $$ = n ullptr; } // FIX ME1026 { $$ = new StatementNode( build_waitfor( $2, $3, $1, $5 ) ); } 1016 1027 ; 1017 1028
Note: See TracChangeset
for help on using the changeset viewer.