Index: src/Parser/lex.ll
===================================================================
--- src/Parser/lex.ll	(revision 0bfe750447b7bfa83f9c5f069c3a5501f54ed9cf)
+++ src/Parser/lex.ll	(revision 5b2edbc786deeeab550f4eaf834b24ef4baa221c)
@@ -10,6 +10,6 @@
  * Created On       : Sat Sep 22 08:58:10 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Thu Jul 27 21:46:06 2017
- * Update Count     : 550
+ * Last Modified On : Tue Aug 22 22:43:39 2017
+ * Update Count     : 558
  */
 
@@ -45,4 +45,5 @@
 #define NUMERIC_RETURN(x)	rm_underscore(); RETURN_VAL( x ) // numeric constant
 #define KEYWORD_RETURN(x)	RETURN_CHAR( x )			// keyword
+#define QKEYWORD_RETURN(x)	typedefTable.isKind( yytext ); RETURN_VAL(x); // quasi-keyword
 #define IDENTIFIER_RETURN()	RETURN_VAL( typedefTable.isKind( yytext ) )
 #define ATTRIBUTE_RETURN()	RETURN_VAL( ATTR_IDENTIFIER )
@@ -261,4 +262,5 @@
 throw			{ KEYWORD_RETURN(THROW); }				// CFA
 throwResume		{ KEYWORD_RETURN(THROWRESUME); }		// CFA
+timeout			{ QKEYWORD_RETURN(TIMEOUT); }			// CFA
 trait			{ KEYWORD_RETURN(TRAIT); }				// CFA
 try				{ KEYWORD_RETURN(TRY); }				// CFA
@@ -277,4 +279,7 @@
 __volatile		{ KEYWORD_RETURN(VOLATILE); }			// GCC
 __volatile__	{ KEYWORD_RETURN(VOLATILE); }			// GCC
+waitfor			{ KEYWORD_RETURN(WAITFOR); }
+or				{ QKEYWORD_RETURN(WOR); }				// CFA
+when			{ KEYWORD_RETURN(WHEN); }
 while			{ KEYWORD_RETURN(WHILE); }
 with			{ KEYWORD_RETURN(WITH); }				// CFA
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 0bfe750447b7bfa83f9c5f069c3a5501f54ed9cf)
+++ src/Parser/parser.yy	(revision 5b2edbc786deeeab550f4eaf834b24ef4baa221c)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Aug 20 09:21:54 2017
-// Update Count     : 2573
+// Last Modified On : Wed Aug 23 14:53:20 2017
+// Update Count     : 2702
 //
 
@@ -131,5 +131,5 @@
 %token ATTRIBUTE EXTENSION								// GCC
 %token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
-%token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH // CFA
+%token CHOOSE DISABLE ENABLE FALLTHRU TRY CATCH CATCHRESUME FINALLY THROW THROWRESUME AT WITH WHEN WAITFOR // CFA
 %token ASM												// C99, extension ISO/IEC 9899:1999 Section J.5.10(1)
 %token ALIGNAS ALIGNOF GENERIC STATICASSERT				// C11
@@ -137,4 +137,5 @@
 // names and constants: lexer differentiates between identifier and typedef names
 %token<tok> IDENTIFIER			QUOTED_IDENTIFIER		TYPEDEFname				TYPEGENname
+%token<tok> TIMEOUT				WOR
 %token<tok> ATTR_IDENTIFIER		ATTR_TYPEDEFname		ATTR_TYPEGENname
 %token<tok> INTEGERconstant		CHARACTERconstant		STRINGliteral
@@ -161,4 +162,5 @@
 %type<tok> identifier  no_attr_identifier
 %type<tok> identifier_or_type_name  no_attr_identifier_or_type_name  attr_name
+%type<tok> quasi_keyword
 %type<constant> string_literal
 %type<str> string_literal_list
@@ -190,4 +192,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> fall_through_opt				fall_through
 %type<sn> statement						statement_list
@@ -197,5 +200,5 @@
 %type<sn> case_clause					case_value_list				case_label					case_label_list
 %type<sn> switch_clause_list_opt		switch_clause_list			choose_clause_list_opt		choose_clause_list
-%type<sn> /* handler_list */			handler_clause				finally_clause
+%type<sn> handler_clause				finally_clause
 %type<catch_kind> handler_key
 
@@ -295,10 +298,15 @@
 // Handle single shift/reduce conflict for dangling else by shifting the ELSE token. For example, this string
 // is ambiguous:
-// .---------.				matches IF '(' comma_expression ')' statement
+// .---------.				matches IF '(' comma_expression ')' statement . (reduce)
 // if ( C ) S1 else S2
-// `-----------------'		matches IF '(' comma_expression ')' statement ELSE statement */
-
-%nonassoc THEN	// rule precedence for IF '(' comma_expression ')' statement
-%nonassoc ELSE	// token precedence for start of else clause in IF statement
+// `-----------------'		matches IF '(' comma_expression ')' statement . (shift) ELSE statement */
+// Similar issues exit with the waitfor statement.
+
+// Order of these lines matters. THEN is left associative over WOR/TIMEOUT/ELSE, WOR is left associative over
+// TIMEOUT/ELSE, and TIMEOUT is left associative over ELSE.
+%precedence THEN	// rule precedence for IF/WAITFOR statement
+%precedence WOR		// token precedence for start of WOR in WAITFOR statement
+%precedence TIMEOUT	// token precedence for start of TIMEOUT in WAITFOR statement
+%precedence ELSE	// token precedence for start of else clause in IF/WAITFOR statement
 
 %start translation_unit									// parse-tree root
@@ -353,11 +361,18 @@
 	;
 
+quasi_keyword:											// CFA
+	TIMEOUT
+	| WOR
+	;
+
 identifier:
 	IDENTIFIER
 	| ATTR_IDENTIFIER									// CFA
+	| quasi_keyword
 	;
 
 no_attr_identifier:
 	IDENTIFIER
+	| quasi_keyword
 	;
 
@@ -380,4 +395,6 @@
 primary_expression:
 	IDENTIFIER											// typedef name cannot be used as a variable name
+		{ $$ = new ExpressionNode( build_varref( $1 ) ); }
+	| quasi_keyword
 		{ $$ = new ExpressionNode( build_varref( $1 ) ); }
 	| tuple
@@ -736,4 +753,5 @@
 	| jump_statement
 	| with_statement
+	| waitfor_statement
 	| exception_statement
 	| asm_statement
@@ -955,6 +973,45 @@
 
 with_statement:
-	WITH '(' tuple_expression_list ')' compound_statement
-		{ $$ = (StatementNode *)0; }					// FIX ME
+	WITH '(' tuple_expression_list ')' statement
+		{ $$ = nullptr; }								// FIX ME
+	;
+
+when_clause_opt:
+	// empty
+		{ $$ = nullptr; }								// FIX ME
+	| WHEN '(' comma_expression ')'
+		{ $$ = nullptr; }								// FIX ME
+	;
+
+waitfor:
+	WAITFOR '(' identifier ')'
+ 		{ $$ = nullptr; }								// FIX ME
+	| WAITFOR '(' identifier ',' argument_expression_list ')'
+ 		{ $$ = nullptr; }								// FIX ME
+	;
+
+timeout:
+	TIMEOUT '(' comma_expression ')'
+ 		{ $$ = nullptr; }								// FIX ME
+	;
+
+waitfor_clause:
+	when_clause_opt waitfor statement %prec THEN
+ 		{ $$ = nullptr; }								// FIX ME
+	| when_clause_opt waitfor statement WOR waitfor_clause
+ 		{ $$ = nullptr; }								// FIX ME
+	| when_clause_opt timeout statement %prec THEN
+ 		{ $$ = nullptr; }								// FIX ME
+	| when_clause_opt ELSE statement
+ 		{ $$ = nullptr; }								// FIX ME
+	| when_clause_opt timeout statement WOR when_clause_opt ELSE statement
+ 		{ $$ = nullptr; }								// FIX ME
+	;
+
+waitfor_statement:
+	when_clause_opt waitfor statement %prec THEN
+ 		{ $$ = nullptr; }								// FIX ME
+	| when_clause_opt waitfor statement WOR waitfor_clause
+ 		{ $$ = nullptr; }								// FIX ME
 	;
 
@@ -967,17 +1024,4 @@
 		{ $$ = new StatementNode( build_try( $2, $3, $4 ) ); }
 	;
-
-//handler_list:
-//	handler_clause
-//		// ISO/IEC 9899:1999 Section 15.3(6 ) If present, a "..." handler shall be the last handler for its try block.
-//	| CATCH '(' ELLIPSIS ')' compound_statement
-//		{ $$ = new StatementNode( build_catch( 0, $5, true ) ); }
-//	| handler_clause CATCH '(' ELLIPSIS ')' compound_statement
-//		{ $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( 0, $6, true ) ) ); }
-//	| CATCHRESUME '(' ELLIPSIS ')' compound_statement
-//		{ $$ = new StatementNode( build_catch( 0, $5, true ) ); }
-//	| handler_clause CATCHRESUME '(' ELLIPSIS ')' compound_statement
-//		{ $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( 0, $6, true ) ) ); }
-//	;
 
 handler_clause:
@@ -2241,7 +2285,7 @@
 with_clause_opt:
 	// empty
-		{ $$ = (StatementNode *)0; }					// FIX ME
+		{ $$ = nullptr; }								// FIX ME
 	| WITH '(' tuple_expression_list ')'
-		{ $$ = (StatementNode *)0; }					// FIX ME
+		{ $$ = nullptr; }								// FIX ME
 	;
 
@@ -2363,4 +2407,5 @@
 attr_name:												// GCC
 	IDENTIFIER
+	| quasi_keyword
 	| TYPEDEFname
 	| TYPEGENname
