Index: src/tests/.expect/designations.txt
===================================================================
--- src/tests/.expect/designations.txt	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
+++ src/tests/.expect/designations.txt	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
@@ -0,0 +1,53 @@
+=====A=====
+(A){ 2 3 (nil) }
+(A){ 2 3 (nil) }
+(A){ 0 3 (nil) }
+=====A=====
+
+=====B=====
+(B){
+  (A){ 5 0 (nil) }
+  (A){ 0 0 (nil) }
+}
+(B){
+  (A){ 5 2 (nil) }
+  (A){ 6 0 (nil) }
+}
+(B){
+  (A){ 1 0 (nil) }
+  (A){ 2 3 (nil) }
+}
+(B){
+  (A){ 1 2 (nil) }
+  (A){ 4 5 (nil) }
+}
+(B){
+  (A){ 1 0 (nil) }
+  (A){ 2 3 (nil) }
+}
+(B){
+  (A){ 1 0 (nil) }
+  (A){ 2 3 (nil) }
+}
+=====B=====
+
+=====C=====
+(C){
+  (int[]{ 2 3 4 }
+  (B){
+    (A){ 5 6 (nil) }
+    (A){ 7 8 (nil) }
+  }
+}
+=====C=====
+
+=====E=====
+(A){ 2 3 (nil) }
+(A){ 2 3 (nil) }
+(A){ 2 3 (nil) }
+(B){
+  (A){ 2 3 (nil) }
+  (A){ 5 6 (nil) }
+}
+=====E=====
+
Index: src/tests/.expect/io.txt
===================================================================
--- src/tests/.expect/io.txt	(revision 11dbfe1a3caa7b8b2ac60e61a9bee57433ea08bf)
+++ src/tests/.expect/io.txt	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
@@ -4,6 +4,11 @@
 123
 
+opening delimiters 
 x (1 x [2 x {3 x =4 x $5 x £6 x ¥7 x ¡8 x ¿9 x «10
-1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x
+
+closing delimiters 
+1, x 2. x 3; x 4! x 5? x 6% x 7¢ x 8» x 9) x 10] x 11} x 
+
+opening/closing delimiters 
 x`1`x'2'x"3"x:4:x 5 x	6	x
 7
@@ -14,6 +19,12 @@
 x
 10
-x
+x 
+
+override opening/closing delimiters 
 x ( 1 ) x 2 , x 3 :x: 4
+
+input bacis types 
+
+output basic types 
 A 
 1 2 3 4 5 6 7 8
@@ -21,27 +32,47 @@
 1.1+2.3i 1.1-2.3i 1.1-2.3i
 
+tuples 
+1, 2, 3 3, 4, 5
+
+toggle separator 
 1.11.21.3
 1.1+2.3i1.1-2.3i1.1-2.3i
- abcxyz
-abcxyz
+ abcxyz 
+abcxyz 
 
+change separator 
+from "  "to " , $"
 1.1, $1.2, $1.3
 1.1+2.3i, $1.1-2.3i, $1.1-2.3i
-abc, $xyz
+abc, $xyz, $
+1, 2, 3, $3, 4, 5
 
-1, 2, 3, 4
-1, $2, $3 ", $"
-1 2 3 " "
+from ", $"to " "
+1.1 1.2 1.3
+1.1+2.3i 1.1-2.3i 1.1-2.3i
+abc xyz 
+1, 2, 3 3, 4, 5
+
+ 1 2 3 
+12 3
  1 2 3
-12 3
+1 2 3
+ 1 2 3
+
 123
 1 23
 1 2 3
-1 2 3 4 " "
-1, 2, 3, 4 ", "
-1, 2, 3, 4
+123
+1 2 3
+123 
+1 2 3
+
+1 2 3 3 4 5 " "
+1, 2, 3 3, 4, 5 ", "
+1, 2, 3 3, 4, 5
+
 3, 4, a, 7.2
 3, 4, a, 7.2
 3 4 a 7.2
  3 4 a 7.234a7.23 4 a 7.2
-3-4-a-7.2^3^4-3-4-a-7.2
+3-4-a-7.2^3^4^3-4-a-7.2
Index: src/tests/designations.c
===================================================================
--- src/tests/designations.c	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
+++ src/tests/designations.c	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
@@ -0,0 +1,246 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// designations.c --
+//
+// Author           : Rob Schluntz
+// Created On       : Thu Jun 29 15:26:36 2017
+// Last Modified By : Rob Schluntz
+// Last Modified On : Thu Jun 29 15:27:05 2017
+// Update Count     : 2
+//
+
+// Note: this test case has been crafted so that it compiles with both cfa and with gcc without any modifications.
+// In particular, since the syntax for designations in Cforall differs from that of C, preprocessor substitution
+// is used for the designation syntax
+#ifdef __CFORALL__
+#define DES :
+#else
+int printf(const char *, ...);
+#define DES =
+#endif
+
+const int indentAmt = 2;
+void indent(int level) {
+	for (int i = 0; i < level; ++i) {
+		printf(" ");
+	}
+}
+
+// A contains fields with different types (int vs. int *)
+struct A {
+	int x, y;
+	int * ptr;
+};
+void printA(struct A a, int level) {
+	indent(level);
+	printf("(A){ %d %d %p }\n", a.x, a.y, a.ptr);
+}
+
+// B contains struct members
+struct B {
+	struct A a0, a1;
+};
+void printB(struct B b, int level) {
+	indent(level);
+	printf("(B){\n");
+	printA(b.a0, level+indentAmt);
+	printA(b.a1, level+indentAmt);
+	indent(level);
+	printf("}\n");
+}
+
+// C contains an array - tests that after 3 ints, the members of B are initialized.
+struct C {
+	int arr[3];
+	struct B b;
+};
+void printC(struct C c, int level) {
+	indent(level);
+	printf("(C){\n");
+	indent(level+indentAmt);
+	printf("(int[]{ %d %d %d }\n", c.arr[0], c.arr[1], c.arr[2]);
+	printB(c.b, level+indentAmt);
+	indent(level);
+	printf("}\n");
+}
+
+// D contains an unnamed aggregate - tests that this doesn't interfere with initialization.
+struct D {
+	struct {
+		int x;
+	};
+};
+void printD(struct D d, int level) {
+	indent(level);
+	printf("(D){ %d }\n", d.x);
+}
+
+// E tests unions
+union E {
+	struct A a;
+	struct B b;
+	struct C c;
+	struct D d;
+	int i;
+};
+
+int main() {
+	// simple designation case - starting from beginning of structure, leaves ptr default-initialized (zero)
+	struct A y0 = {
+		.x DES 2,
+		.y DES 3
+	};
+
+	// simple initializaiton case - initialize all elements explicitly with no designations
+	struct A y1 = {
+		2, 3, 0
+	};
+
+
+	// use designation to move to member y, leaving x default-initialized (zero)
+	struct A y2 = {
+		.y DES 3,
+		0
+	};
+
+#if ERROR
+	struct A yErr0 = {
+		{} // error - empty scalar initializer is illegal
+	};
+#endif
+
+	printf("=====A=====\n");
+	printA(y0, 0);
+	printA(y1, 0);
+	printA(y2, 0);
+	printf("=====A=====\n\n");
+
+	// initialize only first element (z0.a.x), leaving everything else default-initialized (zero), no nested curly-braces
+	struct B z0 = { 5 };
+
+	// some nested curly braces, use designation to 'jump around' within structure, leaving some members default-initialized
+	struct B z1 = {
+		{ 3 }, // z1.a0
+		{ 4 }, // z1.a1
+		.a0 DES { 5 }, // z1.a0
+		{ 6 }, // z1.a1
+		.a0.y DES 2, // z1.a0.y
+		0, // z1.a0.ptr
+	};
+
+	// z2.a0.y and z2.a0.ptr default-initialized, everything else explicit
+	struct B z2 = {
+		{ 1 },
+		{ 2, 3, 0 }
+	};
+
+	// initialize every member, omitting nested curly braces
+	struct B z3 = {
+		1, 2, 0, 4, 5, 0
+	};
+
+	// no initializer - legal C, but garbage values - don't print this one
+	struct B z4;
+
+	// no curly braces - initialize with object of same type
+	struct B z5 = z2;
+
+	// z6.a0.y and z6.a0.ptr default-initialized, everything else explicit.
+	// no curly braces on z6.a1 initializers
+	struct B z6 = {
+		{ 1 },
+		2, 3, 0
+	};
+
+	printf("=====B=====\n");
+	printB(z0, 0);
+	printB(z1, 0);
+	printB(z2, 0);
+	printB(z3, 0);
+	printB(z5, 0);
+	printB(z6, 0);
+	printf("=====B=====\n\n");
+
+	// TODO: what about extra things in a nested init? are empty structs skipped??
+
+	// test that initializing 'past array bound' correctly moves to next member.
+	struct C c1 = {
+		2, 3, 4,  // arr
+		5, 6, 0,  // b.a0
+		7, 8, 0,  // b.a1
+	};
+
+	printf("=====C=====\n");
+	printC(c1, 0);
+	printf("=====C=====\n\n");
+
+#if ERROR
+	// nested initializer can't refer to same type in C
+	struct C cErr0 = { c1 };
+
+	// must use curly braces to initialize members
+	struct C cErr1 = 2;
+
+	// can't initialize with array compound literal
+	struct C cErr2 = {
+		(int[3]) { 1, 2, 3 }  // error: array initialized from non-constant array expression
+	};
+#endif
+
+#if WARNING
+	// can't initialize array with array - converts to int*
+	int cWarn0_arr[3] = { 1, 2, 3 };
+	struct C cWarn0 = {
+		cWarn0_arr  // warning: initialization makes integer from ptr without cast
+	};
+#endif
+
+	// allowed to have 'too many' initialized lists - essentially they are ignored.
+	int i1 = { 3 };
+
+	// doesn't work yet.
+	// designate unnamed object's members
+	// struct D d = { .x DES 3 };
+#if ERROR
+	struct D d1 = { .y DES 3 };
+#endif
+
+	// simple union initialization - initialized first member (e0.a)
+	union E e0 = {
+		y0
+	};
+
+	// simple union initialization - initializes first member (e1.a) - with nested initializer list
+	union E e1 = {
+		{ 2, 3, 0 }
+	};
+
+	// simple union initialization - initializes first member (e2.a) - without nested initializer list
+	union E e2 = {
+		2, 3, 0
+	};
+
+	// move cursor to e4.b.a0.x and initialize until e3.b.a1.ptr inclusive
+	union E e3 = {
+		.b.a0.x DES 2, 3, 0, 5, 6, 0
+	};
+
+	printf("=====E=====\n");
+	printA(e0.a, 0);
+	printA(e1.a, 0);
+	printA(e2.a, 0);
+	printB(e3.b, 0);
+	printf("=====E=====\n\n");
+
+	// special case of initialization: char[] can be initialized with a string literal
+	const char * str0 = "hello";
+	char str1[] = "hello";
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// End: //
Index: src/tests/except-0.c
===================================================================
--- src/tests/except-0.c	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
+++ src/tests/except-0.c	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
@@ -0,0 +1,219 @@
+// Draft of tests for exception handling.
+
+#include <stdio.h>
+#include <stdbool.h>
+
+struct signal_exit {
+	const char * area;
+};
+
+void ?{}(signal_exit * this, const char * area) {
+	this->area = area;
+}
+
+void ^?{}(signal_exit * this) {
+	printf("Exiting: %s\n", this->area);
+//	sout | "Exiting:" | this->area | endl;
+}
+
+void terminate(int except_value) {
+	signal_exit a = {"terminate function"};
+	throw except_value;
+	printf("terminate returned\n");
+}
+
+void resume(int except_value) {
+	signal_exit a = {"resume function"};
+	throwResume except_value;
+	printf("resume returned\n");
+}
+
+// Termination Test: Two handlers: no catch, catch
+void bar() {
+	signal_exit a = {"bar function"};
+	try {
+		terminate(4);
+	} catch (3) {
+		printf("bar caught exception 3.\n");
+	}
+}
+
+void foo() {
+	signal_exit a = {"foo function"};
+	try {
+		bar();
+	} catch (4) {
+		printf("foo caught exception 4.\n");
+	} catch (2) {
+		printf("foo caught exception 2.\n");
+	}
+}
+
+// Resumption Two Handler Test: no catch, catch.
+void beta() {
+	signal_exit a = {"beta function"};
+	try {
+		resume(4);
+	} catchResume (3) {
+		printf("beta caught exception 3\n");
+	}
+}
+
+void alpha() {
+	signal_exit a = {"alpha function"};
+	try {
+		beta();
+	} catchResume (2) {
+		printf("alpha caught exception 2\n");
+	} catchResume (4) {
+		printf("alpha caught exception 4\n");
+	}
+}
+
+// Finally Test:
+void farewell(bool jump) {
+	try {
+		if (jump) {
+			printf("jump out of farewell\n");
+			goto endoffunction;
+		} else {
+			printf("walk out of farewell\n");
+		}
+	} finally {
+		printf("See you next time\n");
+	}
+	endoffunction:
+	printf("leaving farewell\n");
+}
+
+// Resume-to-Terminate Test:
+void fallback() {
+	try {
+		resume(2);
+	} catch (2) {
+		printf("fallback caught termination 2\n");
+	}
+}
+
+// Terminate Throw New Exception:
+void terminate_swap() {
+	signal_exit a = {"terminate_swap"};
+	try {
+		terminate(2);
+	} catch (2) {
+		terminate(3);
+	}
+}
+
+void terminate_swapped() {
+	signal_exit a = {"terminate_swapped"};
+	try {
+		terminate_swap();
+	} catch (3) {
+		printf("terminate_swapped caught exception 3\n");
+	}
+}
+
+// Resume Throw New Exception:
+void resume_swap() {
+	signal_exit a = {"terminate_swap"};
+	try {
+		resume(2);
+	} catchResume (2) {
+		resume(3);
+	}
+}
+
+void resume_swapped() {
+	try {
+		resume_swap();
+	} catchResume (3) {
+		printf("resume_swapped caught exception 3\n");
+	}
+}
+
+// Terminate Rethrow:
+void reterminate() {
+	try {
+		try {
+			terminate(2);
+		} catch (2) {
+			printf("reterminate 2 caught and "
+			       "will rethrow exception 2\n");
+			throw;
+		}
+	} catch (2) {
+		printf("reterminate 1 caught exception 2\n");
+	}
+}
+
+// Resume Rethrow:
+void reresume() {
+	try {
+		try {
+			resume(2);
+		} catchResume (2) {
+			printf("reresume 2 caught and rethrows exception 2\n");
+			throwResume;
+		}
+	} catchResume (2) {
+		printf("reresume 1 caught exception 2\n");
+	}
+}
+
+// Terminate-Resume interaction:
+void fum() {
+	// terminate block, call resume
+	try {
+		resume(3);
+	} catch (3) {
+		printf("fum caught exception 3\n");
+	}
+}
+
+void foe() {
+	// resume block, call terminate
+	try {
+		terminate(3);
+	} catchResume (3) {
+		printf("foe caught exception 3\n");
+	}
+}
+
+void fy() {
+	// terminate block calls fum, call foe
+	try {
+		foe();
+	} catch (3) {
+		printf("fy caught exception 3\n");
+		fum();
+	}
+}
+
+void fee() {
+	// resume block, call fy
+	try {
+		fy();
+	} catchResume (3) {
+		printf("fee caught exception 3\n");
+	}
+}
+
+
+// main: choose which tests to run
+int main(int argc, char * argv[]) {
+	signal_exit a = {"main function"};
+
+	foo(); printf("\n");
+	alpha(); printf("\n");
+	farewell(false); printf("\n");
+	farewell(true); printf("\n");
+	fallback(); printf("\n");
+	terminate_swapped(); printf("\n");
+	resume_swapped(); printf("\n");
+	reterminate(); printf("\n");
+	reresume(); printf("\n");
+	fee(); printf("\n");
+	// Uncaught termination test.
+	terminate(7);
+}
Index: src/tests/exception.c
===================================================================
--- src/tests/exception.c	(revision 11dbfe1a3caa7b8b2ac60e61a9bee57433ea08bf)
+++ 	(revision )
@@ -1,31 +1,0 @@
-//Testing esceptions syntax
-int fred() {
-    int x;
-    throw 3;
-    throw x = 5;
-
-    try {
-    } catch( int i ) {}
-
-    try {
-	x/4;
-    } catch( int ) {
-    } catch( float x ) {
-    } catch( struct { int i; } ) {
-    } catch( struct { int i; } x ) {
-    } catch( struct { int i; } *x ) {
-
-// Cforall extensions
-
-    } catch( * struct { int i; } ) {
-    } catch( * struct { int i; } x ) {
-    } catch( ... ) {
-    } finally {
-    } // try
-}
-
-//Dummy main
-int main(int argc, char const *argv[])
-{
-	return 0;
-}
Index: src/tests/io.c
===================================================================
--- src/tests/io.c	(revision 11dbfe1a3caa7b8b2ac60e61a9bee57433ea08bf)
+++ src/tests/io.c	(revision 67fa9f99aebe68e73094bddc3ebf1c0d1c2d7844)
@@ -10,6 +10,6 @@
 // Created On       : Wed Mar  2 16:56:02 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jun  8 09:52:10 2017
-// Update Count     : 51
+// Last Modified On : Sun Jul  2 09:40:58 2017
+// Update Count     : 68
 // 
 
@@ -42,6 +42,6 @@
 	sout | endl;
 
+	sout | "opening delimiters" | endl;
 	sout
-		// opening delimiters
 		| "x (" | 1
 		| "x [" | 2
@@ -54,7 +54,8 @@
 		| "x ¿" | 9
 		| "x «" | 10
-		| endl;
+		| endl | endl;
+
+	sout | "closing delimiters" | endl;
 	sout
-		// closing delimiters
 		| 1 | ", x"
 		| 2 | ". x"
@@ -68,7 +69,8 @@
 		| 10 | "] x"
 		| 11 | "} x"
-		| endl;
+		| endl | endl;
+
+	sout | "opening/closing delimiters" | endl;
 	sout
-		// opening-closing delimiters
 		| "x`" | 1 | "`x'" | 2
 		| "'x\"" | 3 | "\"x:" | 4
@@ -76,11 +78,15 @@
 		| "\tx\f" | 7 | "\fx\v" | 8
 		| "\vx\n" | 9 | "\nx\r" | 10
-		| "\rx" |
-		endl;
+		| "\rx"
+		| endl | endl;
+
+	sout | "override opening/closing delimiters" | endl;
 	sout | "x ( " | 1 | " ) x" | 2 | " , x" | 3 | " :x: " | 4 | endl;
+	sout | endl;
 
 	ifstream in;										// create / open file
 	open( &in, "io.data", "r" );
 
+	sout | "input bacis types" | endl;
 	&in | &c											// character
 		| &si | &usi | &i | &ui | &li | &uli | &lli | &ulli	// integral
@@ -88,5 +94,7 @@
 		| &fc | &dc | &ldc								// floating-point complex
 		| cstr( s1 ) | cstr( s2, size );				// C string, length unchecked and checked
+	sout | endl;
 
+	sout | "output basic types" | endl;
 	sout | c | ' ' | endl								// character
 		| si | usi | i | ui | li | uli | lli | ulli | endl // integral
@@ -94,4 +102,11 @@
 		| fc | dc | ldc | endl;							// complex
 	sout | endl;
+
+	sout | "tuples" | endl;
+	[int, [ int, int ] ] t1 = [ 1, [ 2, 3 ] ], t2 = [ 3, [ 4, 5 ] ];
+	sout | t1 | t2 | endl;								// print tuple
+	sout | endl;
+
+	sout | "toggle separator" | endl;
 	sout | f | "" | d | "" | ld | endl					// floating point without separator
 		| sepDisable | fc | dc | ldc | sepEnable | endl	// complex without separator
@@ -100,25 +115,37 @@
 	sout | endl;
 
+	sout | "change separator" | endl;
+	sout | "from \" " | sepGet( sout ) | "\"";
 	sepSet( sout, ", $" );								// change separator, maximum of 15 characters
+	sout | "to \" " | sepGet( sout ) | "\"" | endl;
 	sout | f | d | ld | endl
 		| fc | dc | ldc | endl
-		| s1 | s2 | endl;
+		| s1 | s2 | endl
+		| t1 | t2 | endl;								// print tuple
+	sout | endl;
+	sout | "from \"" | sepGet( sout ) | "\"";
+	sepSet( sout, " " );								// restore separator
+	sout | "to \"" | sepGet( sout ) | "\"" | endl;
+	sout | f | d | ld | endl
+		| fc | dc | ldc | endl
+		| s1 | s2 | endl
+		| t1 | t2 | endl;								// print tuple
 	sout | endl;
 
-	[int, int] t1 = [1, 2], t2 = [3, 4];
-	sout | t1 | t2 | endl;								// print tuple
-
-	sepSet( sout, " " );
-	sepSet( sout, ", $" );								// set separator from " " to ", $"
-	sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;
-	sepSet( sout, " " );								// reset separator to " "
-	sout | 1 | 2 | 3 | " \"" | sepGet( sout ) | "\"" | endl;
-
-	sout | sepOn | 1 | 2 | 3 | sepOn | endl;			// separator at start of line
+	sout | sepOn | 1 | 2 | 3 | sepOn | endl;			// separator at start/end of line
 	sout | 1 | sepOff | 2 | 3 | endl;					// locally turn off implicit separator
+	sout | sepOn | 1 | 2 | 3 | sepOn | sepOff | endl;	// separator at start of line
+	sout | 1 | 2 | 3 | endl | sepOn;					// separator at start of next line
+	sout | 1 | 2 | 3 | endl;
+	sout | endl;
 
 	sout | sepDisable | 1 | 2 | 3 | endl;				// globally turn off implicit separation
 	sout | 1 | sepOn | 2 | 3 | endl;					// locally turn on implicit separator
-	sout | sepEnable | 1 | 2 | 3 | endl;				// globally turn on implicit separation
+	sout | sepEnable | 1 | 2 | 3 | endl | sepDisable;	// globally turn on/off implicit separation
+	sout | 1 | 2 | 3 | endl | sepEnable;				// globally turn on implicit separation
+	sout | 1 | 2 | 3 | sepOn | sepDisable | endl;		// ignore seperate at end of line
+	sout | 1 | 2 | 3 | sepOn | sepEnable | endl;		// separator at end of line
+	sout | 1 | 2 | 3 | endl;
+	sout | endl;
 
 	sepSetTuple( sout, " " );							// set tuple separator from ", " to " "
@@ -126,6 +153,6 @@
 	sepSetTuple( sout, ", " );							// reset tuple separator to ", "
 	sout | t1 | t2 | " \"" | sepGetTuple( sout ) | "\"" | endl;
-
 	sout | t1 | t2 | endl;								// print tuple
+	sout | endl;
 
 	[int, int, const char *, double] t3 = { 3, 4, "a", 7.2 };
