Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 5b2edbc786deeeab550f4eaf834b24ef4baa221c)
+++ src/Parser/ParseNode.h	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -414,4 +414,8 @@
 Statement * build_compound( StatementNode * first );
 Statement * build_asmstmt( bool voltile, ConstantExpr * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );
+WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when );
+WaitForStmt * build_waitfor( ExpressionNode * target, StatementNode * stmt, ExpressionNode * when, WaitForStmt * existing );
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when );
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when, StatementNode * else_stmt, ExpressionNode * else_when );
 
 //##############################################################################
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision 5b2edbc786deeeab550f4eaf834b24ef4baa221c)
+++ src/Parser/StatementNode.cc	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -93,5 +93,5 @@
 		elseb = branches.front();
 	} // if
-	
+
 	std::list< Statement * > init;
 	if ( ctl->init != 0 ) {
@@ -207,4 +207,72 @@
 }
 
+WaitForStmt * build_waitfor( ExpressionNode * targetExpr, StatementNode * stmt, ExpressionNode * when ) {
+	auto node = new WaitForStmt();
+
+	WaitForStmt::Target target;
+	target.function = maybeBuild<Expression>( targetExpr );
+	buildMoveList< Expression >( targetExpr, target.arguments );
+	delete targetExpr;
+
+	node->clauses.push_back( WaitForStmt::Clause{
+		target,
+		maybeMoveBuild<Statement >( stmt ),
+		maybeMoveBuild<Expression>( when )
+	});
+
+	return node;
+}
+
+WaitForStmt * build_waitfor( ExpressionNode * targetExpr, StatementNode * stmt, ExpressionNode * when, WaitForStmt * node ) {
+	WaitForStmt::Target target;
+
+	target.function = maybeBuild<Expression>( targetExpr );
+	buildMoveList< Expression >( targetExpr, target.arguments );
+	delete targetExpr;
+
+	node->clauses.push_back( WaitForStmt::Clause{
+		std::move( target ),
+		maybeMoveBuild<Statement >( stmt ),
+		maybeMoveBuild<Expression>( when )
+	});
+
+	return node;
+}
+
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when ) {
+	auto node = new WaitForStmt();
+
+	if( timeout ) {
+		node->timeout.time      = maybeMoveBuild<Expression>( timeout );
+		node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
+		node->timeout.condition = maybeMoveBuild<Expression>( when    );
+	}
+	else {
+		node->orelse.statement  = maybeMoveBuild<Statement >( stmt    );
+		node->orelse.condition  = maybeMoveBuild<Expression>( when    );
+	}
+
+	return node;
+}
+
+WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when,  StatementNode * else_stmt, ExpressionNode * else_when ) {
+	auto node = new WaitForStmt();
+
+	node->timeout.time      = maybeMoveBuild<Expression>( timeout );
+	node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
+	node->timeout.condition = maybeMoveBuild<Expression>( when    );
+
+	node->orelse.statement = maybeMoveBuild<Statement >( else_stmt );
+	node->orelse.condition = maybeMoveBuild<Expression>( else_when );
+
+	return node;
+}
+
+// WaitForStmt::Target build_waitfor( const std::string * name, ExpressionNode * arguments ) {
+// 	 return WaitForStmt::Clause{
+
+// 	 };
+// }
+
 Statement *build_compound( StatementNode *first ) {
 	CompoundStmt *cs = new CompoundStmt( noLabels );
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 5b2edbc786deeeab550f4eaf834b24ef4baa221c)
+++ src/Parser/parser.yy	(revision 135b43118e38aa40c2f0cbfa16829e4b41313af7)
@@ -97,4 +97,5 @@
 	DeclarationNode::TypeClass tclass;
 	StatementNode * sn;
+	WaitForStmt * wfs;
 	ConstantExpr * constant;
 	IfCtl * ifctl;
@@ -187,4 +188,5 @@
 %type<flag> asm_volatile_opt
 %type<en> handler_predicate_opt
+%type<en> when_clause_opt timeout
 
 // statements
@@ -192,5 +194,5 @@
 %type<sn> iteration_statement			jump_statement
 %type<sn> with_statement				exception_statement			asm_statement
-%type<sn> when_clause_opt				waitfor_statement			waitfor_clause				waitfor				timeout
+%type<sn> waitfor_statement
 %type<sn> fall_through_opt				fall_through
 %type<sn> statement						statement_list
@@ -202,4 +204,6 @@
 %type<sn> handler_clause				finally_clause
 %type<catch_kind> handler_key
+%type<wfs> waitfor_clause
+%type<en> waitfor
 
 // declarations
@@ -979,39 +983,46 @@
 when_clause_opt:
 	// empty
-		{ $$ = nullptr; }								// FIX ME
+		{ $$ = nullptr; }
 	| WHEN '(' comma_expression ')'
-		{ $$ = nullptr; }								// FIX ME
+		{ $$ = $3; }
 	;
 
 waitfor:
 	WAITFOR '(' identifier ')'
- 		{ $$ = nullptr; }								// FIX ME
+ 		{
+			$$ = new ExpressionNode( new NameExpr( *$3 ) );
+			delete $3;
+		}
 	| WAITFOR '(' identifier ',' argument_expression_list ')'
- 		{ $$ = nullptr; }								// FIX ME
+ 		{
+			$$ = new ExpressionNode( new NameExpr( *$3 ) );
+		  	$$->set_last( $5 );
+			delete $3;
+		}
 	;
 
 timeout:
 	TIMEOUT '(' comma_expression ')'
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = $3; }
 	;
 
 waitfor_clause:
 	when_clause_opt waitfor statement %prec THEN
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor( $2, $3, $1 ); }
 	| when_clause_opt waitfor statement WOR waitfor_clause
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor( $2, $3, $1, $5 ); }
 	| when_clause_opt timeout statement %prec THEN
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor_timeout( $2, $3, $1 ); }
 	| when_clause_opt ELSE statement
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor_timeout( nullptr, $3, $1 ); }
 	| when_clause_opt timeout statement WOR when_clause_opt ELSE statement
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = build_waitfor_timeout( $2, $3, $1, $7, $5 ); }
 	;
 
 waitfor_statement:
 	when_clause_opt waitfor statement %prec THEN
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = new StatementNode( build_waitfor( $2, $3, $1 ) ); }
 	| when_clause_opt waitfor statement WOR waitfor_clause
- 		{ $$ = nullptr; }								// FIX ME
+ 		{ $$ = new StatementNode( build_waitfor( $2, $3, $1, $5 ) ); }
 	;
 
