Index: tests/.expect/copyfile.txt
===================================================================
--- tests/.expect/copyfile.txt	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/.expect/copyfile.txt	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jun 19 13:44:05 2020
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jun  5 21:20:07 2023
-// Update Count     : 5
+// Last Modified On : Sat Aug 17 14:18:47 2024
+// Update Count     : 11
 // 
 
@@ -22,10 +22,10 @@
 
 	try {
-		choose ( argc ) {
-		  case 2, 3:
+		choose ( argc ) {								// terminate if command-line errors
+		  case 3, 2:
 			open( in, argv[1] );						// open input file first as output creates file
 			if ( argc == 3 ) open( out, argv[2] );		// do not create output unless input opens
 		  case 1: ;										// use default files
-		  default:
+		  default:										// wrong number of options
 			exit | "Usage" | argv[0] | "[ input-file (default stdin) [ output-file (default stdout) ] ]";
 		} // choose
@@ -41,13 +41,10 @@
 
 	char ch;
-	for () {											// read all characters
-		in | ch;
-	  if ( eof( in ) ) break;							// eof ?
-		out | ch;
-	} //for
+	try {
+		for () {										// read all characters
+			in | ch;
+			out | ch;
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa copyfile.cfa" //
-// End: //
Index: tests/.in/copyfile.txt
===================================================================
--- tests/.in/copyfile.txt	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/.in/copyfile.txt	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jun 19 13:44:05 2020
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jun  5 21:20:07 2023
-// Update Count     : 5
+// Last Modified On : Sat Aug 17 14:18:47 2024
+// Update Count     : 11
 // 
 
@@ -22,10 +22,10 @@
 
 	try {
-		choose ( argc ) {
-		  case 2, 3:
+		choose ( argc ) {								// terminate if command-line errors
+		  case 3, 2:
 			open( in, argv[1] );						// open input file first as output creates file
 			if ( argc == 3 ) open( out, argv[2] );		// do not create output unless input opens
 		  case 1: ;										// use default files
-		  default:
+		  default:										// wrong number of options
 			exit | "Usage" | argv[0] | "[ input-file (default stdin) [ output-file (default stdout) ] ]";
 		} // choose
@@ -41,13 +41,10 @@
 
 	char ch;
-	for () {											// read all characters
-		in | ch;
-	  if ( eof( in ) ) break;							// eof ?
-		out | ch;
-	} //for
+	try {
+		for () {										// read all characters
+			in | ch;
+			out | ch;
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa copyfile.cfa" //
-// End: //
Index: tests/concurrency/examples/quickSort.cfa
===================================================================
--- tests/concurrency/examples/quickSort.cfa	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/concurrency/examples/quickSort.cfa	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -11,6 +11,6 @@
 // Created On       : Wed Dec  6 12:15:52 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan  1 12:07:59 2024
-// Update Count     : 188
+// Last Modified On : Sat Aug 17 13:59:15 2024
+// Update Count     : 199
 //
 
@@ -145,29 +145,33 @@
 
 	if ( size == -1 ) {									// generate output ?
-		for () {
-			unsortedfile | size;						// read number of elements in the list
-		  if ( eof( unsortedfile ) ) break;
-
-			int * values = aalloc( size );				// values to be sorted, too large to put on stack
-			for ( counter; size ) {						// read unsorted numbers
-				unsortedfile | values[counter];
-				if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
-				sortedfile | values[counter];
-				if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' ';
+		int * values = 0p;
+		try {
+			for () {
+				unsortedfile | size;					// read number of elements in the list
+				values = aalloc( size );				// values to be sorted, too large to put on stack
+				for ( counter; size ) {					// read unsorted numbers
+					unsortedfile | values[counter];
+					if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
+					sortedfile | values[counter];
+					if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' ';
+				} // for
+				sortedfile | nl;
+
+				if ( size > 0 ) {						// values to sort ?
+					Quicksort QS = { values, size - 1, 0 }; // sort values
+				} // wait until sort tasks terminate
+				for ( counter; size ) {					// print sorted list
+					if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
+					sortedfile | values[counter];
+					if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' ';
+				} // for
+				sortedfile | nl | nl;
+
+				delete( values );
+				values = 0p;
 			} // for
-			sortedfile | nl;
-
-			if ( size > 0 ) {							// values to sort ?
-				Quicksort QS = { values, size - 1, 0 }; // sort values
-			} // wait until sort tasks terminate
-			for ( counter; size ) {						// print sorted list
-				if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
-				sortedfile | values[counter];
-				if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' ';
-			} // for
-			sortedfile | nl | nl;
-
+		} catch( end_of_file * ) {
 			delete( values );
-		} // for
+		} // try
 	} else {											// timing
 		PRNG prng;										
Index: tests/copyfile.cfa
===================================================================
--- tests/copyfile.cfa	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/copyfile.cfa	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -10,6 +10,6 @@
 // Created On       : Fri Jun 19 13:44:05 2020
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jun  5 21:20:19 2023
-// Update Count     : 7
+// Last Modified On : Sat Aug 17 14:18:47 2024
+// Update Count     : 11
 // 
 
@@ -23,5 +23,5 @@
 	try {
 		choose ( argc ) {								// terminate if command-line errors
-		  case 2, 3:
+		  case 3, 2:
 			open( in, argv[1] );						// open input file first as output creates file
 			if ( argc == 3 ) open( out, argv[2] );		// do not create output unless input opens
@@ -41,13 +41,10 @@
 
 	char ch;
-	for () {											// read all characters
-		in | ch;
-	  if ( eof( in ) ) break;							// eof ?
-		out | ch;
-	} // for
+	try {
+		for () {										// read all characters
+			in | ch;
+			out | ch;
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa copyfile.cfa" //
-// End: //
Index: tests/coroutine/.expect/fmtLines.txt
===================================================================
--- tests/coroutine/.expect/fmtLines.txt	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/coroutine/.expect/fmtLines.txt	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -9,70 +9,73 @@
 E" d  istr  ibut  ed w  ith   
 Cfor  all.  ////   fmt  Line  
-s.cc   --/  ///   Auth  or    
-             : P  eter   A.   
-Buhr  // C  reat  ed O  n     
-      : Su  n Se  p 17   21:  
-56:1  5 20  17//   Las  t Mo  
-difi  ed B  y :   Pete  r A.  
- Buh  r//   Last   Mod  ifie  
-d On   : F  ri M  ar 2  2 13  
-:41:  03 2  019/  / Up  date  
- Cou  nt       :   33/  /#in  
-clud  e <f  stre  am.h  fa>#  
-incl  ude   <cor  outi  ne.h  
-fa>c  orou  tine   For  mat   
-{	ch  ar c  h;		  				  				  
-	//   used   for   com  muni  
-cati  on	i  nt g  , b;  				  
-				  			/  / gl  obal   bec  
-ause   use  d in   des  truc  
-tor}  ;voi  d ?{  }( F  orma  
-t &   fmt   ) {      r  esum  
-e( f  mt )  ;			  				  			/  
-/ st  art   coro  utin  e}vo  
-id ^  ?{}(   For  mat   & fm  
-t )   {      if   ( fm  t.g   
-!= 0   ||   fmt.  b !=   0 )  
- sou  t |   nl;}  void   mai  
-n( F  orma  t &   fmt   ) {	  
-for   ( ;;   ) {  				  				  
-		//   for   as   many   cha  
-ract  ers	  	for   ( f  mt.g  
- = 0  ; fm  t.g   < 5;   fmt  
-.g +  = 1   ) {	  	//   grou  
+s.cc   --   form  at c  hara  
+cter  s in  to b  lock  s of  
+ 4 a  nd g  roup  s of   5 b  
+lock  s pe  r li  ne//  // A  
+utho  r                 : Pe  
+ter   A. B  uhr/  / Cr  eate  
+d On           :   Sun   Sep  
+ 17   21:5  6:15   201  7//   
+Last   Mod  ifie  d By   : P  
+eter   A.   Buhr  // L  ast   
+Modi  fied   On   : Sa  t Au  
+g 17   14:  26:0  3 20  24//  
+ Upd  ate   Coun  t       :   
+60//  #inc  lude   <fs  trea  
+m.hf  a>#i  nclu  de <  coro  
+utin  e.hf  a>co  rout  ine   
+Form  at {  	cha  r ch  ;			  
+				  				  // u  sed   for   
+comm  unic  atio  n	in  t g,  
+ b;	  				  				  		//   glo  
+bal   beca  use   used   in   
+dest  ruct  or};  void   mai  
+n( F  orma  t &   fmt   ) wi  
+th(   fmt   ) {	  for   () {  
+				  				  			/  / fo  r as  
+ man  y ch  arac  ters  		fo  
+r (   g =   0; g   < 5  ; g   
++= 1   ) {  				  	//   grou  
 ps o  f 5   bloc  ks		  	for  
- ( f  mt.b   = 0  ; fm  t.b   
-< 4;   fmt  .b +  = 1   ) {	  
-// b  lock  s of   4 c  hara  
-cter  s			  	for   ( ;  ; )   
-{			  				  // f  or n  ewli  
-ne c  hara  cter  s			  		su  
-spen  d;		  			i  f (   fmt.  
-ch !  = '\  n' )   bre  ak;	  
-	//   igno  re n  ewli  ne		  
-		}   // f  or		  		so  ut |  
- fmt  .ch;  				  			/  / pr  
-int   char  acte  r			  } //  
- for  			s  out   | "    ";	  
-				  			/  / pr  int   bloc  
-k se  para  tor	  	} /  / fo  
-r		s  out   | nl  ;			  				  
-		//   pri  nt g  roup   sep  
-arat  or	}   //   for}   //   
-main  void   prt  ( Fo  rmat  
- & f  mt,   char   ch   ) {   
-   f  mt.c  h =   ch;      r  
-esum  e( f  mt )  ;} /  / pr  
-tint   mai  n()   {	Fo  rmat  
- fmt  ;	ch  ar c  h;	f  or (  
- ;;   ) {	  	sin   | c  h;		  
-				  				  // r  ead   one   
-char  acte  r	    if (   eof  
-( si  n )   ) br  eak;  				  
-			/  / eo  f ?	  	prt  ( fm  
-t, c  h );  	} /  / fo  r} /  
-/ ma  in//   Loc  al V  aria  
-bles  : //  // t  ab-w  idth  
-: 4   ////   com  pile  -com  
-mand  : "c  fa f  mtLi  nes.  
-cfa"   ///  / En  d: /  /
+ ( b   = 0  ; b   < 4;   b +  
+= 1   ) {	  			/  / bl  ocks  
+ of   4 ch  arac  ters  				  
+for   () {  				  				  // f  
+or n  ewli  ne c  hara  cter  
+s			  		su  spen  d;		  		    
+if (   ch   != '  \n'   ) br  
+eak;  				  // i  gnor  e ne  
+wlin  e			  	} /  / fo  r			  
+	sou  t |   ch;	  				  			/  
+/ pr  int   char  acte  r			  
+} //   for  			s  out   | "   
+ ";	  				  			/  / pr  int   
+bloc  k se  para  tor	  	} /  
+/ fo  r		s  out   | nl  ;			  
+				  			/  / pr  int   grou  
+p se  para  tor	  } //   for  
+} //   mai  nvoi  d ?{  }( F  
+orma  t &   fmt   ) {	  resu  
+me(   fmt   );		  				  				  
+// p  rime   (st  art)   cor  
+outi  ne}v  oid   ^?{}  ( Fo  
+rmat   & f  mt )   wit  h( f  
+mt )   {	i  f (   g !=   0 |  
+| b   != 0   ) s  out   | nl  
+;}vo  id f  orma  t( F  orma  
+t &   fmt   ) {	  resu  me(   
+fmt   );}   // f  orma  tint  
+ mai  n()   {	Fo  rmat   fmt  
+;	so  ut |   nlO  ff;	  				  
+				  	//   turn   off   aut  
+o ne  wlin  e	tr  y {	  	for  
+ ()   {			  				  			/  / re  
+ad u  ntil   end   of   file  
+			s  in |   fmt  .ch;  				  
+				  // r  ead   one   char  
+acte  r			  form  at(   fmt   
+);		  				  		//   pus  h ch  
+arac  ter   for   form  atti  
+ng		  } //   for  	} c  atch  
+( en  d_of  _fil  e *   ) {	  
+} //   try  } //   mai  n
Index: tests/coroutine/.in/fmtLines.txt
===================================================================
--- tests/coroutine/.in/fmtLines.txt	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/coroutine/.in/fmtLines.txt	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// fmtLines.cc --
+// fmtLines.cc -- format characters into blocks of 4 and groups of 5 blocks per line
 //
 // Author           : Peter A. Buhr
 // Created On       : Sun Sep 17 21:56:15 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 22 13:41:03 2019
-// Update Count     : 33
+// Last Modified On : Sat Aug 17 14:26:03 2024
+// Update Count     : 60
 //
 
@@ -22,46 +22,42 @@
 };
 
-void ?{}( Format & fmt ) {
-    resume( fmt );										// start coroutine
-}
-
-void ^?{}( Format & fmt ) {
-    if ( fmt.g != 0 || fmt.b != 0 ) sout | nl;
-}
-
-void main( Format & fmt ) {
-	for ( ;; ) {										// for as many characters
-		for ( fmt.g = 0; fmt.g < 5; fmt.g += 1 ) {		// groups of 5 blocks
-			for ( fmt.b = 0; fmt.b < 4; fmt.b += 1 ) {	// blocks of 4 characters
-				for ( ;; ) {							// for newline characters
+void main( Format & fmt ) with( fmt ) {
+	for () {											// for as many characters
+		for ( g = 0; g < 5; g += 1 ) {					// groups of 5 blocks
+			for ( b = 0; b < 4; b += 1 ) {				// blocks of 4 characters
+				for () {								// for newline characters
 					suspend;
-					if ( fmt.ch != '\n' ) break;		// ignore newline
+				  if ( ch != '\n' ) break;				// ignore newline
 				} // for
-				sout | fmt.ch;							// print character
+				sout | ch;								// print character
 			} // for
 			sout | "  ";								// print block separator
 		} // for
-		sout | nl;									// print group separator
+		sout | nl;										// print group separator
 	} // for
 } // main
 
-void prt( Format & fmt, char ch ) {
-    fmt.ch = ch;
-    resume( fmt );
-} // prt
+void ?{}( Format & fmt ) {
+	resume( fmt );										// prime (start) coroutine
+}
+
+void ^?{}( Format & fmt ) with( fmt ) {
+	if ( g != 0 || b != 0 ) sout | nl;
+}
+
+void format( Format & fmt ) {
+	resume( fmt );
+} // format
 
 int main() {
 	Format fmt;
-	char ch;
+	sout | nlOff;										// turn off auto newline
 
-	for ( ;; ) {
-		sin | ch;										// read one character
-	  if ( eof( sin ) ) break;							// eof ?
-		prt( fmt, ch );
-	} // for
+	try {
+		for () {										// read until end of file
+			sin | fmt.ch;								// read one character
+			format( fmt );								// push character for formatting
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa fmtLines.cfa" //
-// End: //
Index: tests/coroutine/cntparens.cfa
===================================================================
--- tests/coroutine/cntparens.cfa	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/coroutine/cntparens.cfa	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -10,6 +10,6 @@
 // Created On       : Sat Apr 20 11:04:45 2019
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Apr 20 11:06:21 2019
-// Update Count     : 1
+// Last Modified On : Thu Aug 15 20:39:34 2024
+// Update Count     : 2
 //
 
@@ -46,11 +46,14 @@
 	char ch;
 
-	for () {											// read until end of file
-		sin | ch;										// read one character
-	  if ( eof( sin ) ) { sout | "Error"; break; }		// eof ?
-		Status ret = next( cpns, ch );					// push character for formatting
-	  if ( ret == Match ) { sout | "Match"; break; }
-	  if ( ret == Error ) { sout | "Error"; break; }
-	} // for
+	try {
+		for () {											// read until end of file
+			sin | ch;										// read one character
+			Status ret = next( cpns, ch );					// push character for formatting
+			if ( ret == Match ) { sout | "Match"; break; }
+			if ( ret == Error ) { sout | "Error"; break; }
+		} // for
+	} catch( end_of_file * ) {
+		sout | "Error";
+	} // try
 } // main
 
Index: tests/coroutine/devicedriver.cfa
===================================================================
--- tests/coroutine/devicedriver.cfa	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/coroutine/devicedriver.cfa	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -10,6 +10,6 @@
 // Created On       : Sat Mar 16 15:30:34 2019
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jun 17 09:11:56 2023
-// Update Count     : 94
+// Last Modified On : Thu Aug 15 18:45:45 2024
+// Update Count     : 96
 //
 
@@ -71,15 +71,17 @@
 
 	sin | nlOn;											// read newline (all) characters
-  eof: for () {											// read until end of file
-		sin | byte;										// read one character
-	  if ( eof( sin ) ) break eof;						// eof ?
-		choose( next( driver, byte ) ) {				// analyse character
-		  case CONT: ;
-		  case MSG: sout | "msg:" | msg;
-		  case ESTX: sout | "STX in message";
-		  case ELNTH: sout | "message too long";
-		  case ECRC: sout | "CRC failure";
-		} // choose
-	} // for
+	try {
+		for () {										// read until end of file
+			sin | byte;									// read one character
+			choose( next( driver, byte ) ) {			// analyse character
+			  case CONT: ;
+			  case MSG: sout | "msg:" | msg;
+			  case ESTX: sout | "STX in message";
+			  case ELNTH: sout | "message too long";
+			  case ECRC: sout | "CRC failure";
+			} // choose
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
 
Index: tests/coroutine/fmtLines.cfa
===================================================================
--- tests/coroutine/fmtLines.cfa	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/coroutine/fmtLines.cfa	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -10,6 +10,6 @@
 // Created On       : Sun Sep 17 21:56:15 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 22 13:41:16 2019
-// Update Count     : 58
+// Last Modified On : Sat Aug 17 14:26:03 2024
+// Update Count     : 60
 //
 
@@ -54,13 +54,10 @@
 	sout | nlOff;										// turn off auto newline
 
-  eof: for () {											// read until end of file
-		sin | fmt.ch;									// read one character
-	  if ( eof( sin ) ) break eof;						// eof ?
-		format( fmt );									// push character for formatting
-	} // for
+	try {
+		for () {										// read until end of file
+			sin | fmt.ch;								// read one character
+			format( fmt );								// push character for formatting
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa fmtLines.cfa" //
-// End: //
Index: tests/enum_tests/input.cfa
===================================================================
--- tests/enum_tests/input.cfa	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/enum_tests/input.cfa	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -6,13 +6,15 @@
 	E e;
 
-	for () {
-		try {
-			sin | e;
-		} catch( missing_data * ) {
-			sout | "missing data";
-			continue;									// try again
-		} // try
-	  if ( eof( sin ) ) break;
-		sout | e | "= " | value( e );
-	} // for
-}
+	try {
+		for () {
+			try {
+				sin | e;
+			} catch( missing_data * ) {
+				sout | "missing data";
+				continue;								// try again
+			} // try
+			sout | e | "= " | value( e );
+		} // for
+	} catch( end_of_file * ) {
+	} // try
+} // main
Index: tests/generator/.expect/fmtLines.txt
===================================================================
--- tests/generator/.expect/fmtLines.txt	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/generator/.expect/fmtLines.txt	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -9,70 +9,72 @@
 E" d  istr  ibut  ed w  ith   
 Cfor  all.  ////   fmt  Line  
-s.cc   --/  ///   Auth  or    
-             : P  eter   A.   
-Buhr  // C  reat  ed O  n     
-      : Su  n Se  p 17   21:  
-56:1  5 20  17//   Las  t Mo  
-difi  ed B  y :   Pete  r A.  
- Buh  r//   Last   Mod  ifie  
-d On   : F  ri M  ar 2  2 13  
-:41:  03 2  019/  / Up  date  
- Cou  nt       :   33/  /#in  
-clud  e <f  stre  am.h  fa>#  
-incl  ude   <cor  outi  ne.h  
-fa>c  orou  tine   For  mat   
-{	ch  ar c  h;		  				  				  
-	//   used   for   com  muni  
-cati  on	i  nt g  , b;  				  
-				  			/  / gl  obal   bec  
-ause   use  d in   des  truc  
-tor}  ;voi  d ?{  }( F  orma  
-t &   fmt   ) {      r  esum  
-e( f  mt )  ;			  				  			/  
-/ st  art   coro  utin  e}vo  
-id ^  ?{}(   For  mat   & fm  
-t )   {      if   ( fm  t.g   
-!= 0   ||   fmt.  b !=   0 )  
- sou  t |   nl;}  void   mai  
-n( F  orma  t &   fmt   ) {	  
-for   ( ;;   ) {  				  				  
-		//   for   as   many   cha  
-ract  ers	  	for   ( f  mt.g  
- = 0  ; fm  t.g   < 5;   fmt  
-.g +  = 1   ) {	  	//   grou  
-ps o  f 5   bloc  ks		  	for  
- ( f  mt.b   = 0  ; fm  t.b   
-< 4;   fmt  .b +  = 1   ) {	  
-// b  lock  s of   4 c  hara  
-cter  s			  	for   ( ;  ; )   
-{			  				  // f  or n  ewli  
-ne c  hara  cter  s			  		su  
-spen  d;		  			i  f (   fmt.  
-ch !  = '\  n' )   bre  ak;	  
-	//   igno  re n  ewli  ne		  
-		}   // f  or		  		so  ut |  
- fmt  .ch;  				  			/  / pr  
-int   char  acte  r			  } //  
- for  			s  out   | "    ";	  
-				  			/  / pr  int   bloc  
-k se  para  tor	  	} /  / fo  
-r		s  out   | nl  ;			  				  
-		//   pri  nt g  roup   sep  
-arat  or	}   //   for}   //   
-main  void   prt  ( Fo  rmat  
- & f  mt,   char   ch   ) {   
-   f  mt.c  h =   ch;      r  
-esum  e( f  mt )  ;} /  / pr  
-tint   mai  n()   {	Fo  rmat  
- fmt  ;	ch  ar c  h;	f  or (  
- ;;   ) {	  	sin   | c  h;		  
-				  				  // r  ead   one   
-char  acte  r	    if (   eof  
-( si  n )   ) br  eak;  				  
-			/  / eo  f ?	  	prt  ( fm  
-t, c  h );  	} /  / fo  r} /  
-/ ma  in//   Loc  al V  aria  
-bles  : //  // t  ab-w  idth  
-: 4   ////   com  pile  -com  
-mand  : "c  fa f  mtLi  nes.  
-cfa"   ///  / En  d: /  /
+s.cf  a --   for  mat   char  
+acte  rs i  nto   bloc  ks o  
+f 4   and   grou  ps o  f 5   
+bloc  ks p  er l  ine/  ///   
+Auth  or                 : T  
+hier  ry D  elis  le//   Cre  
+ated   On           :   Thu   
+Mar    5 1  6:09  :08   2020  
+// L  ast   Modi  fied   By   
+: Pe  ter   A. B  uhr/  / La  
+st M  odif  ied   On :   Sat  
+ Aug   17   14:2  1:28   202  
+4//   Upda  te C  ount        
+ : 5  //#i  nclu  de <  fstr  
+eam.  hfa>  gene  rato  r Fo  
+rmat   {	c  har   ch;	  				  
+				  		//   use  d fo  r co  
+mmun  icat  ion	  int   g, b  
+;			  				  				  // g  loba  
+l be  caus  e us  ed i  n de  
+stru  ctor  };vo  id m  ain(  
+ For  mat   & fm  t )   with  
+( fm  t )   {	fo  r ()   {		  
+				  				  	//   for   as m  
+any   char  acte  rs		  for   
+( g   = 0;   g <   5;   g +=  
+ 1 )   {		  			/  / gr  oups  
+ of   5 bl  ocks  			f  or (  
+ b =   0;   b <   4; b   +=   
+1 )   {			  	//   bloc  ks o  
+f 4   char  acte  rs		  		fo  
+r ()   {		  				  		//   for  
+ new  line   cha  ract  ers	  
+				  susp  end;  				    if  
+ ( c  h !=   '\n  ' )   brea  
+k;		  		//   ign  ore   newl  
+ine	  			}   //   for	  			s  
+out   | ch  ;			  				  	//   
+prin  t ch  arac  ter	  		}   
+// f  or		  	sou  t |   "  "  
+;			  				  	//   prin  t bl  
+ock   sepa  rato  r		}   //   
+for	  	sou  t |   nl;	  				  
+				  	//   prin  t gr  oup   
+sepa  rato  r	}   // f  or}   
+// m  ainv  oid   ?{}(   For  
+mat   & fm  t )   {	re  sume  
+( fm  t );  				  				  		//  
+ pri  me (  star  t) c  orou  
+tine  }voi  d ^?  {}(   Form  
+at &   fmt   ) w  ith(   fmt  
+ ) {  	if   ( g   != 0   ||   
+b !=   0 )   sou  t |   nl;}  
+void   for  mat(   For  mat   
+& fm  t )   {	re  sume  ( fm  
+t );  } //   for  mati  nt m  
+ain(  ) {	  Form  at f  mt;	  
+sout   | n  lOff  ;			  				  
+			/  / tu  rn o  ff a  uto   
+newl  ine	  try   {		f  or (  
+) {	  				  				  	//   read  
+ unt  il e  nd o  f fi  le		  
+	sin   | f  mt.c  h;		  				  
+		//   rea  d on  e ch  arac  
+ter	  		fo  rmat  ( fm  t );  
+				  				  // p  ush   char  
+acte  r fo  r fo  rmat  ting  
+		}   // f  or	}   cat  ch(   
+end_  of_f  ile   * )   {	}   
+// t  ry}   // m  ain
Index: tests/generator/.in/fmtLines.txt
===================================================================
--- tests/generator/.in/fmtLines.txt	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/generator/.in/fmtLines.txt	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -5,63 +5,58 @@
 // file "LICENCE" distributed with Cforall.
 //
-// fmtLines.cc --
+// fmtLines.cfa -- format characters into blocks of 4 and groups of 5 blocks per line
 //
-// Author           : Peter A. Buhr
-// Created On       : Sun Sep 17 21:56:15 2017
+// Author           : Thierry Delisle
+// Created On       : Thu Mar  5 16:09:08 2020
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 22 13:41:03 2019
-// Update Count     : 33
+// Last Modified On : Sat Aug 17 14:21:28 2024
+// Update Count     : 5
 //
 
 #include <fstream.hfa>
-#include <coroutine.hfa>
 
-coroutine Format {
+generator Format {
 	char ch;											// used for communication
 	int g, b;											// global because used in destructor
 };
 
-void ?{}( Format & fmt ) {
-    resume( fmt );										// start coroutine
-}
-
-void ^?{}( Format & fmt ) {
-    if ( fmt.g != 0 || fmt.b != 0 ) sout | nl;
-}
-
-void main( Format & fmt ) {
-	for ( ;; ) {										// for as many characters
-		for ( fmt.g = 0; fmt.g < 5; fmt.g += 1 ) {		// groups of 5 blocks
-			for ( fmt.b = 0; fmt.b < 4; fmt.b += 1 ) {	// blocks of 4 characters
-				for ( ;; ) {							// for newline characters
+void main( Format & fmt ) with( fmt ) {
+	for () {											// for as many characters
+		for ( g = 0; g < 5; g += 1 ) {					// groups of 5 blocks
+			for ( b = 0; b < 4; b += 1 ) {				// blocks of 4 characters
+				for () {								// for newline characters
 					suspend;
-					if ( fmt.ch != '\n' ) break;		// ignore newline
+				  if ( ch != '\n' ) break;				// ignore newline
 				} // for
-				sout | fmt.ch;							// print character
+				sout | ch;								// print character
 			} // for
 			sout | "  ";								// print block separator
 		} // for
-		sout | nl;									// print group separator
+		sout | nl;										// print group separator
 	} // for
 } // main
 
-void prt( Format & fmt, char ch ) {
-    fmt.ch = ch;
-    resume( fmt );
-} // prt
+void ?{}( Format & fmt ) {
+	resume( fmt );										// prime (start) coroutine
+}
+
+void ^?{}( Format & fmt ) with( fmt ) {
+	if ( g != 0 || b != 0 ) sout | nl;
+}
+
+void format( Format & fmt ) {
+	resume( fmt );
+} // format
 
 int main() {
 	Format fmt;
-	char ch;
+	sout | nlOff;										// turn off auto newline
 
-	for ( ;; ) {
-		sin | ch;										// read one character
-	  if ( eof( sin ) ) break;							// eof ?
-		prt( fmt, ch );
-	} // for
+	try {
+		for () {										// read until end of file
+			sin | fmt.ch;								// read one character
+			format( fmt );								// push character for formatting
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa fmtLines.cfa" //
-// End: //
Index: tests/generator/fmtLines.cfa
===================================================================
--- tests/generator/fmtLines.cfa	(revision afb15cfcfe805e4a6a4f0f183c6d2fcd6a5137bb)
+++ tests/generator/fmtLines.cfa	(revision 3ac5fd8bcb3728ce8676e2b55b9fd4f691a06719)
@@ -10,6 +10,6 @@
 // Created On       : Thu Mar  5 16:09:08 2020
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jun 10 21:56:22 2021
-// Update Count     : 2
+// Last Modified On : Sat Aug 17 14:21:28 2024
+// Update Count     : 5
 //
 
@@ -53,13 +53,10 @@
 	sout | nlOff;										// turn off auto newline
 
-  eof: for () {											// read until end of file
-		sin | fmt.ch;									// read one character
-	  if ( eof( sin ) ) break eof;						// eof ?
-		format( fmt );									// push character for formatting
-	} // for
+	try {
+		for () {										// read until end of file
+			sin | fmt.ch;								// read one character
+			format( fmt );								// push character for formatting
+		} // for
+	} catch( end_of_file * ) {
+	} // try
 } // main
-
-// Local Variables: //
-// tab-width: 4 //
-// compile-command: "cfa fmtLines.cfa" //
-// End: //
