Index: tests/concurrent/waitfor/parse.cfa
===================================================================
--- tests/concurrent/waitfor/parse.cfa	(revision a50fdfbfae933dc68ef63eb07fe97924c504fe1b)
+++ tests/concurrent/waitfor/parse.cfa	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -1,10 +1,16 @@
-//----------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------
+// 
+// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
 //
-//		DEPRECATED TEST
-//		DIFFERS BETWEEN DEBUG AND RELEASE
-//
-//----------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// waitfor.c -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Wed Aug 30 17:53:29 2017
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon Apr 10 22:52:18 2023
+// Update Count     : 64
+// 
 
 #include <monitor.hfa>
@@ -12,91 +18,244 @@
 monitor M {};
 
-M a;
-
-void f1( M & mutex a );
-void f2( M & mutex a );
-void f2( M & mutex a, M & mutex b );
-void f3( M & mutex a );
-void f3( M & mutex a, M & mutex b );
-void f3( M & mutex a, M & mutex b, M & mutex c );
-
-void foo() {
-
-	//---------------------------------------
-	waitfor( f1 : a ) {
-		1;
-	}
-
-	//---------------------------------------
-	waitfor( f1 : a ) {
-		2;
-	}
-	waitfor( f2 : a ) {
-		3;
-	}
-
-	//---------------------------------------
-	when( 1 < 3 ) waitfor( f2 : a, a ) {
-		4;
-	}
-	or timeout( 100 ) {
-		5;
-	}
-
-	//---------------------------------------
-	when( 2 < 3 ) waitfor( f3 : a ) {
-		5;
-	}
+void notcalled( M & mutex m1, M & mutex m2 ) {
+	abort();
+}
+void or( M & mutex m ) {
+	abort();
+}
+void timeout( M & mutex m ) {
+	abort();
+}
+
+void fred( M & mutex m, M & mutex or, M & mutex timeout ) {
+	// test waitfor and when
+
+	waitfor( notcalled : m, m );
+
+	waitfor( notcalled : m, m ) {
+	}
+
+	waitfor( notcalled : m, m ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m );
+
+	when( true ) waitfor( notcalled : m, m ) {
+	}
+
+	waitfor( notcalled : m, m );
+	or waitfor( notcalled : m, m );
+
+	when( true ) waitfor( notcalled : m, m );
+	or when( true ) waitfor( notcalled : m, m );
+
+	waitfor( notcalled : m, m ) {
+	} or waitfor( notcalled : m, m ) {
+	}
+
+	waitfor( notcalled : m, m ) {
+	} or waitfor( notcalled : m, m ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when( true ) waitfor( notcalled : m, m ) {
+	}
+
+	waitfor( notcalled : m, m );
+	or waitfor( notcalled : m, m ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m );
+	or when( true ) waitfor( notcalled : m, m ) {
+	}
+
+	waitfor( notcalled : m, m ) {
+	} or waitfor( notcalled : m, m );
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when( true ) waitfor( notcalled : m, m );
+
+	// test when, waitfor and else
+
+	waitfor( notcalled : m, m );
+	or else;
+
+	when( true ) waitfor( notcalled : m, m );
+	or else;
+
+	when( true ) waitfor( notcalled : m, m );
+	or else;
+
+	waitfor( notcalled : m, m ) {
+	} or else {
+	}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or else {
+	}
+
+	waitfor( notcalled : m, m );
 	or else {
-		6;
-	}
-
-	//---------------------------------------
-	when( 3 < 3 ) waitfor( f3 : a, a ) {
-		7;
-	}
-	or when( 4 < 3 ) timeout( 101 ) {
-		8;
-	}
-	or when( 5 < 3 ) else {
-		9;
-	}
-
-	//---------------------------------------
-	when( 6 < 3 ) waitfor( f3 : a, a, a ) {
-		10;
-	}
- 	or when( 7 < 3 ) waitfor( f1 : a  ) {
-		11;
-	}
+	}
+
+	when( true ) waitfor( notcalled : m, m );
 	or else {
-		12;
-	}
-
-	//---------------------------------------
-	when( 8 < 3 ) waitfor( f3 : a, a ) {
-		13;
-	}
- 	or waitfor( f1 : a  ) {
-		14;
-	}
-	or when( 9 < 3 ) timeout( 102 ) {
-		15;
-	}
-
-	//---------------------------------------
-	when( 10 < 3 ) waitfor( f1 : a ) {
-		16;
-	}
- 	or waitfor( f2 : a, a ) {
-		17;
-	}
-	or timeout( 103 ) {
-		18;
-	}
-	or when( 11 < 3 ) else {
-		19;
-	}
-}
-
-int main() {}
+	}
+
+	when( true ) waitfor( notcalled : m, m );
+	or else {
+	}
+
+	waitfor( notcalled : m, m ) {
+	} or else;
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or else;
+
+	waitfor( notcalled : m, m );
+	or when( true ) else;
+
+	when( true ) waitfor( notcalled : m, m );
+	or when( true ) else;
+
+	when( true ) waitfor( notcalled : m, m );
+	or when( true ) else;
+
+	waitfor( notcalled : m, m ) {
+	} or when( true ) else {
+	}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when( true ) else {
+	}
+
+	waitfor( notcalled : m, m );
+	or when( true ) else {
+	}
+
+	when( true ) waitfor( notcalled : m, m );
+	or when( true ) else {
+	}
+
+	when( true ) waitfor( notcalled : m, m );
+	or when( true ) else {
+	}
+
+	waitfor( notcalled : m, m ) {
+	} or when( true ) else;
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when( true ) else;
+
+	// test when, waitfor and timeout
+
+	waitfor( notcalled : m, m );
+	or timeout( 3 );
+
+	waitfor( notcalled : m, m );
+	or timeout( 3 );
+
+	when( true ) waitfor( notcalled : m, m );
+	or timeout( 3 );
+
+	waitfor( notcalled : m, m ) {
+	} or timeout( 3 ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or timeout( 3 ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or timeout( 3 ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when ( true ) timeout( 3 ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when ( true ) timeout( 3 ) {
+	}
+
+	waitfor( notcalled : m, m );
+	or timeout( 3 ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m );
+	or timeout( 3 ) {
+	}
+
+	when( true ) waitfor( notcalled : m, m );
+	or when( true ) timeout( 3 ) {
+	}
+
+	waitfor( notcalled : m, m ) {
+	} or timeout( 3 );
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or timeout( 3 );
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when( true ) timeout( 3 );
+
+	// test when, waitfor, timeout and else
+
+	waitfor( notcalled : m, m ) {
+	} or timeout( 3 ) {
+	} or when( true ) else {}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or timeout( 3 ) {
+	} or when( true ) else {}
+
+	waitfor( notcalled : m, m ) {
+	} or timeout( 3 ) {
+	} or when( true ) else {}
+
+	waitfor( notcalled : m, m ) {
+	} or when( true ) timeout( 3 ) {
+	} or when( true ) else {}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or timeout( 3 ) {
+	} or when( true ) else {}
+
+	waitfor( notcalled : m, m ) {
+	} or when( true ) timeout( 3 ) {
+	} or when( true ) else {}
+
+	when( true ) waitfor( notcalled : m, m ) {
+	} or when( true ) timeout( 3 ) {
+	} or when( true ) else {}
+
+	// test quasi-keywords "or" and "timeout"
+
+	int or = 0, timeout = 0;
+	waitfor( timeout : timeout ) timeout += 1; or timeout( timeout );
+	waitfor( notcalled : or, or ) or += 1; or timeout( or ) 3;
+	when( or ) waitfor( or : m ) { 4; } or timeout( or ) or += 1;
+	when( timeout ) waitfor( notcalled : timeout, timeout ) or += 1; or else timeout += 1;
+	when( or + timeout ) waitfor( or : m ) 4; or when( or ) timeout( or ) 4; or when( or ) else timeout += 1;
+	when( 3 ) waitfor( or : or ) 3; or when( or ) waitfor( notcalled : or, or ) 4; or else 4;
+	when( timeout ) waitfor( or : timeout ) 3; or waitfor( notcalled : timeout, or ) 4; or when( or ) timeout( timeout ) 4;
+	when( 3 ) waitfor( or : timeout ) or += 1;
+	or waitfor( or : or ) timeout += 1;
+	or timeout( timeout ) or += 1;
+	or when( 3 ) else or += 1;
+
+	// test else selection
+
+	if ( or > timeout ) waitfor( or : or ) 3;
+	else waitfor( timeout : timeout ) 4;
+}
+
+//Dummy main
+int main( int argc, char const * argv[] ) {
+    #pragma GCC warning "Compiled"                      // force non-empty .expect file, NO TABS!!!
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa waitfor.cfa" //
+// End: //
Index: tests/concurrent/waitfor/parse2.cfa
===================================================================
--- tests/concurrent/waitfor/parse2.cfa	(revision a50fdfbfae933dc68ef63eb07fe97924c504fe1b)
+++ 	(revision )
@@ -1,249 +1,0 @@
-// 
-// Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-// 
-// waitfor.c -- 
-// 
-// Author           : Peter A. Buhr
-// Created On       : Wed Aug 30 17:53:29 2017
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jan 16 23:13:37 2020
-// Update Count     : 6
-// 
-
-#include <stdbool.h>
-
-int fred() {
-	int x, z;
-
-	// test waitfor and when
-
-	waitfor( x );
-
-	waitfor( x ) {
-	}
-
-	waitfor( x : z ) {
-	}
-
-	when( true ) waitfor( x );
-
-	when( true ) waitfor( x ) {
-	}
-
-	waitfor( x );
-	or waitfor( y );
-
-	waitfor( x : z );
-	or waitfor( y );
-
-	when( true ) waitfor( x );
-	or when( true ) waitfor( y );
-
-	when( true ) waitfor( x : z );
-	or when( true ) waitfor( y );
-
-	waitfor( x ) {
-	} or waitfor( y ) {
-	}
-
-	waitfor( x : z ) {
-	} or waitfor( y ) {
-	}
-
-	when( true ) waitfor( x ) {
-	} or when( true ) waitfor( y ) {
-	}
-
-	waitfor( x );
-	or waitfor( y ) {
-	}
-
-	when( true ) waitfor( x );
-	or when( true ) waitfor( y ) {
-	}
-
-	waitfor( x ) {
-	} or waitfor( y );
-
-	when( true ) waitfor( x ) {
-	} or when( true ) waitfor( y );
-
-	// test when, waitfor and else
-
-	waitfor( x );
-	or else;
-
-	when( true ) waitfor( x );
-	or else;
-
-	when( true ) waitfor( x : z );
-	or else;
-
-	waitfor( x ) {
-	} or else {
-	}
-
-	when( true ) waitfor( x ) {
-	} or else {
-	}
-
-	waitfor( x );
-	or else {
-	}
-
-	when( true ) waitfor( x );
-	or else {
-	}
-
-	when( true ) waitfor( x : z );
-	or else {
-	}
-
-	waitfor( x ) {
-	} or else;
-
-	when( true ) waitfor( x ) {
-	} or else;
-
-	waitfor( x );
-	or when( true ) else;
-
-	when( true ) waitfor( x );
-	or when( true ) else;
-
-	when( true ) waitfor( x : z );
-	or when( true ) else;
-
-	waitfor( x ) {
-	} or when( true ) else {
-	}
-
-	when( true ) waitfor( x ) {
-	} or when( true ) else {
-	}
-
-	waitfor( x );
-	or when( true ) else {
-	}
-
-	when( true ) waitfor( x );
-	or when( true ) else {
-	}
-
-	when( true ) waitfor( x : z );
-	or when( true ) else {
-	}
-
-	waitfor( x ) {
-	} or when( true ) else;
-
-	when( true ) waitfor( x ) {
-	} or when( true ) else;
-
-	// test when, waitfor and timeout
-
-	waitfor( x );
-	or timeout( 3 );
-
-	waitfor( x : z );
-	or timeout( 3 );
-
-	when( true ) waitfor( x );
-	or timeout( 3 );
-
-	waitfor( x ) {
-	} or timeout( 3 ) {
-	}
-
-	when( true ) waitfor( x ) {
-	} or timeout( 3 ) {
-	}
-
-	when( true ) waitfor( x : z ) {
-	} or timeout( 3 ) {
-	}
-
-	when( true ) waitfor( x ) {
-	} or when ( true ) timeout( 3 ) {
-	}
-
-	when( true ) waitfor( x : z ) {
-	} or when ( true ) timeout( 3 ) {
-	}
-
-	waitfor( x );
-	or timeout( 3 ) {
-	}
-
-	when( true ) waitfor( x );
-	or timeout( 3 ) {
-	}
-
-	when( true ) waitfor( x );
-	or when( true ) timeout( 3 ) {
-	}
-
-	waitfor( x ) {
-	} or timeout( 3 );
-
-	when( true ) waitfor( x ) {
-	} or timeout( 3 );
-
-	when( true ) waitfor( x ) {
-	} or when( true ) timeout( 3 );
-
-	// test when, waitfor, timeout and else
-
-	waitfor( x ) {
-	} or timeout( 3 ) {
-	} or when( true ) else {}
-
-	when( true ) waitfor( x ) {
-	} or timeout( 3 ) {
-	} or when( true ) else {}
-
-	waitfor( x ) {
-	} or timeout( 3 ) {
-	} or when( true ) else {}
-
-	waitfor( x ) {
-	} or when( true ) timeout( 3 ) {
-	} or when( true ) else {}
-
-	when( true ) waitfor( x ) {
-	} or timeout( 3 ) {
-	} or when( true ) else {}
-
-	waitfor( x ) {
-	} or when( true ) timeout( 3 ) {
-	} or when( true ) else {}
-
-	when( true ) waitfor( x ) {
-	} or when( true ) timeout( 3 ) {
-	} or when( true ) else {}
-
-	// test quasi-keywords "or" and "timeout"
-
-	int or, timeout;
-	waitfor( timeout : 7 ) 3;
-	waitfor( timeout : 7 ) 3; or waitfor( timeout : 7 ) 3;
-	when( or ) waitfor( or : ) { 4; } or timeout( 1 ) 3;
-	when( 3 ) waitfor( or : 2 ) 4; or else 4;
-	when( 3 ) waitfor( or : 3 ) 4; or when( or ) timeout( or ) 4; or when( or ) else timeout;
-	when( 3 ) waitfor( or : or ) 3; or when( or ) waitfor( or : timeout ) 4; or else 4;
-	when( 3 ) waitfor( or : or ) 3; or waitfor( or : 9 ) 4; or when( or ) timeout( timeout ) 4;
-	when( 3 ) waitfor( or : 3 ) 3; or waitfor( or : 7 ) or; or timeout( 1 ) or; or when( 3 ) else or;
-
-	// test else selection
-
-	if ( or > timeout ) waitfor( or ) 3;
-	else waitfor( timeout ) 4;
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa waitfor.cfa" //
-// End: //
