Index: tests/generator/.expect/fmtLines.txt
===================================================================
--- tests/generator/.expect/fmtLines.txt	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
+++ tests/generator/.expect/fmtLines.txt	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
@@ -0,0 +1,78 @@
+////   Cfo  rall   Ver  sion  
+ 1.0  .0 C  opyr  ight   (C)  
+ 201  7 Un  iver  sity   of   
+Wate  rloo  ////   The   con  
+tent  s of   thi  s fi  le a  
+re c  over  ed u  nder   the  
+ lic  ence   agr  eeme  nt i  
+n th  e//   file   "LI  CENC  
+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: /  /
Index: tests/generator/.expect/suspend_then.txt
===================================================================
--- tests/generator/.expect/suspend_then.txt	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
+++ tests/generator/.expect/suspend_then.txt	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
@@ -0,0 +1,30 @@
+Then!
+Then!
+0 0
+Then!
+Then!
+1 1
+Then!
+Then!
+1 1
+Then!
+Then!
+2 2
+Then!
+Then!
+3 3
+Then!
+Then!
+5 5
+Then!
+Then!
+8 8
+Then!
+Then!
+13 13
+Then!
+Then!
+21 21
+Then!
+Then!
+34 34
Index: tests/generator/.in/fmtLines.txt
===================================================================
--- tests/generator/.in/fmtLines.txt	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
+++ tests/generator/.in/fmtLines.txt	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
@@ -0,0 +1,67 @@
+//
+// 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.
+//
+// fmtLines.cc --
+//
+// 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
+//
+
+#include <fstream.hfa>
+#include <coroutine.hfa>
+
+coroutine 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
+					suspend;
+					if ( fmt.ch != '\n' ) break;		// ignore newline
+				} // for
+				sout | fmt.ch;							// print character
+			} // for
+			sout | "  ";								// print block separator
+		} // for
+		sout | nl;									// print group separator
+	} // for
+} // main
+
+void prt( Format & fmt, char ch ) {
+    fmt.ch = ch;
+    resume( fmt );
+} // prt
+
+int main() {
+	Format fmt;
+	char ch;
+
+	for ( ;; ) {
+		sin | ch;										// read one character
+	  if ( eof( sin ) ) break;							// eof ?
+		prt( fmt, ch );
+	} // for
+} // main
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa fmtLines.cfa" //
+// End: //
Index: tests/generator/fmtLines.cfa
===================================================================
--- tests/generator/fmtLines.cfa	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
+++ tests/generator/fmtLines.cfa	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
@@ -0,0 +1,65 @@
+//
+// 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.
+//
+// fmtLines.cfa -- format characters into blocks of 4 and groups of 5 blocks per line
+//
+// Author           : Thierry Delisle
+// Created On       : Thu Mar  5 16:09:08 2020
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include <fstream.hfa>
+
+generator Format {
+	char ch;											// used for communication
+	int g, b;											// global because used in destructor
+};
+
+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 ( ch != '\n' ) break;				// ignore newline
+				} // for
+				sout | ch;								// print character
+			} // for
+			sout | "  ";								// print block separator
+		} // for
+		sout | nl;										// print group separator
+	} // for
+} // main
+
+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;
+	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
+} // main
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa fmtLines.cfa" //
+// End: //
Index: tests/generator/suspend_then.cfa
===================================================================
--- tests/generator/suspend_then.cfa	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
+++ tests/generator/suspend_then.cfa	(revision 5b544a6a33b882680dc245c678d32ddb6742f4a2)
@@ -0,0 +1,49 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2019 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// suspend_then.cfa --
+//
+// Author           : Peter A. Buhr
+// Created On       : Mon Apr 29 12:01:35 2019
+// Last Modified By :
+// Last Modified On :
+// Update Count     :
+//
+
+#include <fstream.hfa>
+
+generator Fibonacci {
+	int fn1, fn2;								// retained between resumes
+	int fn;									// used for communication
+};
+
+void main( Fibonacci & fib ) with( fib ) {				// called on first resume
+	fn = 0;  fn1 = fn;							// 1st case
+	suspend { sout | "Then!"; }						// restart last resume
+	fn = 1;  fn2 = fn1;  fn1 = fn;					// 2nd case
+	suspend { sout | "Then!"; }						// restart last resume
+	for () {
+		fn = fn1 + fn2;  fn2 = fn1;  fn1 = fn;			// general case
+		suspend { sout | "Then!"; }					// restart last resume
+	} // for
+}
+
+int next( Fibonacci & fib ) with( fib ) {
+	resume( fib );								// restart last suspend
+	return fn;
+}
+
+int main() {
+	Fibonacci f1, f2;
+	for ( 10 ) {								// print N Fibonacci values
+		sout | next( f1 ) | next( f2 );
+	} // for
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa runningTotal.cfa" //
+// End: //
