Index: src/Tests/Syntax/Array.c
===================================================================
--- src/Tests/Syntax/Array.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Array.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,33 @@
+int a1[];
+int a2[*];
+int a4[3];
+
+int m1[][3];
+int m2[*][*];
+int m4[3][3];
+
+typedef int T;
+
+int fred() {
+    int a1[];
+    int a2[*];
+    int a4[3];
+    int T[3];
+}
+
+int mary( int T[3],
+	  int p1[const 3],
+	  int p2[static 3],
+	  int p3[static const 3]
+    ) {
+}
+
+int (*tom())[3] {
+}
+
+int (*(jane)())( int T[3],
+		 int p1[const 3],
+		 int p2[static 3],
+		 int p3[static const 3]
+    ) {
+}
Index: src/Tests/Syntax/AsmName.c
===================================================================
--- src/Tests/Syntax/AsmName.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/AsmName.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,14 @@
+extern int x asm( "xx" );
+
+int fred( int x ) {
+    static int y asm( "yy" );
+
+// Cforall extensions
+
+    static * int z asm( "zz" );
+}
+
+// errors
+
+//typedef int t asm( "tt" );
+//int mary( int p asm( "pp" ) ) {}
Index: src/Tests/Syntax/Attributes.c
===================================================================
--- src/Tests/Syntax/Attributes.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Attributes.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,22 @@
+int @max = 3;
+
+int main() {
+    int x;
+    type @type(type t);		// compiler intrinsic
+    type @widest(type t);
+    @type(x) *y;		// gcc: typeof(x) *y;
+    const @widest(double) *w;	// gcc: const typeof(x) *w;
+    * @type(3 + 4) z;		// cfa declaration syntax
+    y = @max;		
+    z = @max(x) + @size(int);
+    y = @min(3 + 4);
+    if ( @const(x) ) { }
+    if ( @volatile(y) ) { }
+    if ( @extern(y) ) { }
+    if ( @static(y) ) { }
+    @max;
+}
+
+int @foo(int) {
+    return 7;
+}
Index: src/Tests/Syntax/CharStringConstants.c
===================================================================
--- src/Tests/Syntax/CharStringConstants.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/CharStringConstants.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,87 @@
+int main() {
+// character constants
+
+    ' ';
+    'a';
+    '"';
+    '_';
+
+    '\a';				// simple escape
+    '\b';
+    '\e';				// GCC
+    '\f';
+    '\n';
+    '\r';
+    '\t';
+    '\v';
+    '\'';
+    '\"';
+    '\?';
+    '\\';
+
+    '\0';				// octal escape
+
+    '\377';
+
+    '\xf';				// hex escape
+    '\xff';
+
+// warnings/errors
+
+    '';					// empty character
+    'aa';				// multi-character
+    'a\na';				// multi-character, embedded escape
+    'a\0a';
+    '\xfff';				// hex escape out of range
+    '_\377_';				// multi-character
+    '_\xff_';
+    '\xffff';				// hex escape out of range
+    'a\xff34w';
+    '\xf_f';				// multi-character
+    '\xff_ff';
+
+// string constants
+
+    " ";
+    "a";
+    "'";
+    '_';
+
+    "\a";				// simple escape
+    "\b";
+    "\e";				// GCC
+    "\f";
+    "\n";
+    "\r";
+    "\t";
+    "\v";
+    "\'";
+    "\"";
+    "\?";
+    "\\";
+
+    "\0";				// octal escape
+    "\377";
+
+    "\xf";				// hex escape
+    "\xff";
+
+    "";
+    "aa";
+    "a\na";
+    "a\0a";
+    "_\377_";
+    "_\xff_";
+    "\xf_f";
+
+// warnings/errors
+
+    "\xff_ff";
+    "\xfff";				// hex escape out of range
+    "a\xff34w";
+    "\xffff";
+}
+
+// Local Variables: //
+// compile-command: "../../../bin/cfa -std=c99 CharStringConstants.c" //
+// End: //
Index: src/Tests/Syntax/CommentMisc.c
===================================================================
--- src/Tests/Syntax/CommentMisc.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/CommentMisc.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,44 @@
+/* single line */
+// single line
+
+// single line containing */
+// single line containing /*
+// single line containing /* */
+
+/* 1st */ int i;
+int i; /* 2nd */
+/* 1st */ int i; /* 2nd */
+/* 1st */ /* 2nd */
+
+/* 1st
+   2nd */ int i;
+
+/*
+*/
+
+/*
+
+*/
+
+/*
+  1st
+*/
+
+/*
+  1st
+  2nd
+*/
+
+// ignore preprocessor directives
+
+#line 2
+ #
+ #include <fred>
+	#define mary abc
+
+// alternative ANSI99 brackets
+
+int main() <%
+    int x<:10:>;
+%>
+
Index: src/Tests/Syntax/Constant0-1.c
===================================================================
--- src/Tests/Syntax/Constant0-1.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Constant0-1.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,73 @@
+// Cforall extension
+
+int fred() {
+
+// value
+    {
+	int 0;
+	const int 0;
+	int 1;
+	const int 1;
+    }
+    static const int 0;
+    static const int 1;
+    {
+	int 0, 1;
+	const int 0, 1;
+    }
+    {
+	int (0), (1);
+    }
+    {
+	int ((0)), ((1));
+    }
+    {
+	static const int 0, 1;
+    }
+    {
+	struct { int i; } 0;
+	const struct { int i; } 1;
+    }
+    static const struct { int i; } 1;
+
+// pointer
+
+    {
+	int *0, *1;
+    }
+    {
+	int *(0), *(1);
+    }
+    {
+	int (*0), (*1);
+    }
+    {
+	int ((*0)), ((*1));
+    }
+    {
+	int * const (0), * const 1;
+    }
+    {
+	int (* const 0), (* const 1);
+    }
+    {
+	int ((* const 0)), ((* const 1));
+    }
+    struct { int i; } *0;
+
+// Cforall style
+
+    {
+	* int x, 0;
+	const * int x, 0;
+    }
+    static const * int x, 0;
+    * struct { int i; } 0;
+    const * struct { int i; } 0;
+    static const * struct { int i; } 0;
+    {
+	static * int x, 0;
+	static const * int x, 0;
+    }
+    const * * int x, 0;
+}
Index: src/Tests/Syntax/DeclarationSpecifier.c
===================================================================
--- src/Tests/Syntax/DeclarationSpecifier.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/DeclarationSpecifier.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,97 @@
+typedef short int Int;
+
+
+const short int volatile x1;
+static const short int volatile x2;
+const static short int volatile x3;
+const short static int volatile x4;
+const static volatile short int x4;
+const short int static volatile x5;
+const short int volatile static x6;
+const short volatile int static x7;
+short int volatile static const x8;
+
+const volatile struct { int i; } x10;
+const struct { int i; } volatile x11;
+struct { int i; } const volatile x12;
+static const volatile struct { int i; } x13;
+const static struct { int i; } volatile x14;
+struct { int i; } static const volatile x15;
+struct { int i; } const static volatile x16;
+struct { int i; } const volatile static x17;
+
+const Int volatile x20;
+static const Int volatile x21;
+const static Int volatile x22;
+const static Int volatile x23;
+const Int static volatile x24;
+const Int volatile static x25;
+const volatile Int static x26;
+Int volatile static const x27;
+
+const volatile struct { Int i; } x29;
+const struct { Int i; } volatile x30;
+struct { Int i; } const volatile x31;
+static const volatile struct { Int i; } x32;
+const static struct { Int i; } volatile x33;
+struct { Int i; } static const volatile x34;
+struct { Int i; } const static volatile x35;
+struct { Int i; } const volatile static x36;
+
+
+const static inline const volatile int f01();		// duplicate const
+volatile inline const volatile static int f02();	// duplicate volatile
+const inline const volatile int static f03();		// duplicate const
+volatile inline static const volatile int f04();	// duplicate volatile
+const static const inline volatile int f05();		// duplicate const
+volatile static const volatile inline int f06();	// duplicate volatile
+const static const volatile int inline f07();		// duplicate const
+volatile static const int inline volatile f08();	// duplicate volatile
+
+static inline const volatile int f11();
+inline const volatile static int f12();
+inline const volatile int static f13();
+inline static const volatile int f14();
+static const inline volatile int f15();
+static const volatile inline int f16();
+static const volatile int inline f17();
+static const int inline volatile f18();
+
+short static inline const volatile int f21();
+inline short const volatile static int f22();
+inline const short volatile int static f23();
+inline static const short volatile int f24();
+static const inline volatile short int f25();
+static const volatile inline int short f26();
+static const volatile int inline short f27();
+static const int inline volatile short f28();
+
+static inline const volatile struct { int i; } f31();
+inline const volatile static struct { int i; } f32();
+inline const volatile struct { int i; } static f33();
+inline static const volatile struct { int i; } f34();
+static const inline volatile struct { int i; } f35();
+static const volatile inline struct { int i; } f36();
+static const volatile struct { int i; } inline f37();
+static const struct { int i; } inline volatile f38();
+
+static inline const volatile Int f41();
+inline const volatile static Int f42();
+inline const volatile Int static f43();
+inline static const volatile Int f44();
+static const inline volatile Int f45();
+static const volatile inline Int f46();
+static const volatile Int inline f47();
+static const Int inline volatile f48();
+
+long long ll;
+long long int lli;
+double _Complex dc;
+long double _Complex lfc;
+
+// errors
+
+//static short int volatile static const e1;		// duplicate static
+//struct { int i; } const static volatile static e2;	// duplicate static
+//struct { int i; } const static volatile static volatile e3; // duplicate static & volatile
+//static Int volatile static const e4;			// duplicate static
Index: src/Tests/Syntax/Exception.c
===================================================================
--- src/Tests/Syntax/Exception.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Exception.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,24 @@
+int fred() {
+    int x;
+    throw 3;
+    throw x = 5;
+
+    try {
+    } catch( int i ) {}
+
+    try {
+	x/4;
+    } catch( int) {
+    } catch( int 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
+}
Index: src/Tests/Syntax/Expression.c
===================================================================
--- src/Tests/Syntax/Expression.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Expression.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,67 @@
+int fred() {
+    struct s { int i; } *p;
+    int i;
+
+    // order of evaluation (GCC is different)
+/*
+    i = sizeof( (int) {3} );
+    i = sizeof (int) {3};
+*/
+    // operators
+
+    ! i;
+    ~i;
+    +i;
+    -i;
+    *p;
+    ++p;
+    --p;
+    p++;
+    p--;
+
+    i+i;
+    i-i;
+    i*i;
+
+    i/i;
+    i%i;
+    i^i;
+    i&i;
+    i|i;
+    i<i;
+    i>i;
+    i=i;
+
+    i==i;
+    i!=i;
+    i<<i;
+    i>>i;
+    i<=i;
+    i>=i;
+    i&&i;
+    i||i;
+    p->i;
+    i+=i;
+    i-=i;
+    i*=i;
+    i/=i;
+    i%=i;
+    i&=i;
+    i|=i;
+    i^=i;
+    i<<=i;
+    i>>=i;
+
+    i?i:i;
+
+    // cast
+/*
+    double d;
+    int *ip;
+    (int *) i;
+    (* int) i;
+    ([char, int *])[d, d];
+    [i,ip,ip] = ([int, * int, int *])[1,(void *)2,(void *)3];
+    [i,ip,ip] = ([int, * int, int *])([1,(void *)2,(void *)3]);
+*/
+}
Index: src/Tests/Syntax/Forall.c
===================================================================
--- src/Tests/Syntax/Forall.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Forall.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,56 @@
+typedef forall ( type T ) int (*f)( int );
+
+forall( type T )
+    void swap( T left, T right ) {
+	T temp = left;
+	left = right;
+	right = temp;
+    }
+
+context sumable( type T ) {
+    const T 0;
+    T ?+?(T, T);
+    T ?++(T*);
+    [T] ?+=?(T*,T);
+};
+
+type T1 | { const T1 0; T1 ?+?(T1, T1); T1 ?++(T1); [T1] ?+=?(T1,T1); },
+     T2(type P1, type P2 ) | (type Q, type W) { const Q 0; W ?+?(W, W); Q ?++(W); [Q] ?+=?(W,W); }(T1,T2(T1,f)),
+     T3 | sumable(T3);
+
+type T2(type P1, type P2) | sumable(T2(P1,P2)) = struct { P1 i; P2 j; };
+
+T2(int, int) w1;
+typedef T2(int, int) w2;
+w2 g2;
+type w3 = T2(int, int);
+w3 g3;
+
+forall( type T | sumable( T ) )
+    T sum( int n, T a[] ) {
+	T total = 0;
+	int i;
+	for ( i = 0; i < n; i += 1 )
+	    total = total + a[i];
+	return total;
+    }
+
+forall( type T | { T ?+?(T, T); T ?++(T*); [T] ?+=?(T*,T); } )
+    T twice( T t ) {
+	return t + t;
+    }
+
+forall( type T | { const T 0; int ?!=?(T, T); int ?<?(T, T); } )
+    T min( T t1, T t2 ) {
+	return t1 < t2 ? t1 : t2;
+    }
+
+int main() {
+    int x = 1, y = 2, a[10];
+    float f;
+
+    swap( x, y );
+    twice( x );
+    f = min( 4.0, 3.0 );
+    sum( 10, a );
+}
Index: src/Tests/Syntax/Functions.c
===================================================================
--- src/Tests/Syntax/Functions.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Functions.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,165 @@
+// ANSI function definitions
+
+void h(void) {}
+
+int f (
+    int p1(void),
+    int p2(int),
+    int (p3(void)),
+    int (p4(int)),
+    void g(void)
+  ) {
+    (*g)();
+    g();
+    g = h;
+}
+
+int f1() {}
+int (f2()) {}
+int (*f3())() {}
+int *((f4())) {}
+int ((*f5()))() {}
+int *f6() {}
+int *(f7)() {}
+int **f8() {}
+int * const *(f9)() {}
+int (*f10())[] {}
+int (*f11())[][3] {}
+int ((*f12())[])[3] {}
+
+// "implicit int" type specifier (not ANSI)
+
+fII1( int i ) {}
+const fII2( int i ) {}
+extern fII3( int i ) {}
+extern const fII4( int i ) {}
+
+*fII5() {}
+const *fII6() {}
+const long *fII7() {}
+static const long *fII8() {}
+const static long *fII9() {}
+
+// K&R function definitions
+
+fO1( i ) int i; {}
+int fO2( i ) int i; {}
+const fO3( i ) int i; {}
+extern fO4( i ) int i; {}
+extern const fO5( i ) int i; {}
+
+// Cforall extensions
+#if 1
+[] f( );
+[int] f( );
+[] f(int);
+[int] f(int);
+[] f( ) {}
+[int] f( ) {}
+[] f(int) {}
+[int] f(int) {}
+
+[int x] f( );
+[] f(int x);
+[int x] f(int x);
+[int x] f( ) {}
+[] f(int x) {}
+[int x] f(int x) {}
+
+[int, int x] f( );
+[] f(int, int x);
+[int, int x] f(int, int x);
+[int, int x] f( ) {}
+[] f(int, int x) {}
+[int, int x] f(int, int x) {}
+
+[int, int x, int] f( );
+[] f(int, int x, int);
+[int, int x, int] f(int, int x, int);
+[int, int x, int] f( ) {}
+[] f(int, int x, int) {}
+[int, int x, int] f(int, int x, int) {}
+
+[int, int x, * int y] f( );
+[] f(int, int x, * int y);
+[int, int x, * int y] f(int, int x, * int y);
+[int, int x, * int y] f( ) {}
+[] f(int, int x, * int y) {}
+[int, int x, * int y] f(int, int x, * int y) {}
+
+[ int ] f11( int ), f12;  // => int f11( int ), f12( int );
+
+[int] f(
+	int ( int, int p ),
+	[int](int)
+    ) {
+    int (*(*p)[][10])[][3];
+    * [][10] * [][3] int p;
+    * [] * [int](int) p;
+}
+
+static const int *g1() {}
+static [ const int ] g2() {}
+static inline [ const * int ] g3() {}
+static inline [ const [ * int, int ] ] g4() {}
+static [ const [ * int, const int ] ] g5() {}
+#endif
+
+// unnamed parameter
+
+int g(
+    int (),
+
+    int *(),
+    int **(),
+    int * const *(),
+    int * const * const (),
+
+    int ([]),
+    int ([10]),
+
+    int *([]),
+    int *([10]),
+    int **([]),
+    int **([10]),
+    int * const *([]),
+    int * const *([10]),
+    int * const * const ([]),
+    int * const * const ([10])
+    );
+
+int g(
+    int (),
+
+    int *(),
+    int **(),
+    int * const *(),
+    int * const * const (),
+
+    int ([]),
+    int ([10]),
+
+    int *([]),
+    int *([10]),
+    int **([]),
+    int **([10]),
+    int * const *([]),
+    int * const *([10]),
+    int * const * const ([]),
+    int * const * const ([10])
+    ) {
+}
+
+typedef int T;
+
+int g( T g(T), T T ) {
+    g(T);
+    T = 3;
+}
+
+// errors
+
+//int f()[] {}
+//int (f[])() {}
+//int f[]() {}
+//int ((*f15())())[] {}
Index: src/Tests/Syntax/GccExtensions.c
===================================================================
--- src/Tests/Syntax/GccExtensions.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/GccExtensions.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,48 @@
+int fred() {
+    asm( "nop" );
+    __asm( "nop" );
+    __asm__( "nop" );
+
+    __complex__ c1;
+    _Complex c2;
+
+    const int i1;
+    __const int i2;
+    __const__ int i3;
+
+    __extension__ const int ex;
+
+    __inline int f1();
+    __inline__ int f2();
+
+    __signed s1;
+    __signed s2;
+
+    __typeof(s1) t1;
+    __typeof__(s1) t2;
+
+    __volatile int v1;
+    __volatile__ int v2;
+
+    __attribute__(()) int a1;
+    const __attribute(()) int a2;
+    const static __attribute(()) int a3;
+    const static int __attribute(()) a4;
+    const static int a5 __attribute(());
+    const static int a6, __attribute(()) a7;
+
+    int * __attribute(()) p1;
+    int (* __attribute(()) p2);
+//    int (__attribute(()) (p3));
+//    int ( __attribute(()) (* __attribute(()) p4));
+
+    struct __attribute(()) s1;
+    struct __attribute(()) s2 { int i; };
+    struct __attribute(()) s3 { int i; } x1, __attribute(()) y1;
+    struct __attribute(()) s4 { int i; } x2, y2 __attribute(());
+
+    int m1 [10] __attribute(());
+    int m2 [10][10] __attribute(());
+    int __attribute(()) m3 [10][10];
+//    int ( __attribute(()) m4 [10] )[10];
+}
Index: src/Tests/Syntax/IdentFuncDeclarator.c
===================================================================
--- src/Tests/Syntax/IdentFuncDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/IdentFuncDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,105 @@
+int main() {
+    //int f0[]();
+    //int (f0[])();
+    //int f0()[];
+    //int f0()();
+    //int (*f0)()();
+    //int ((*f0())())[];
+    
+    int f1;
+    int (f2);
+
+    int *f3;
+    int **f4;
+    int * const *f5;
+    int * const * const f6;
+
+    int *(f7);
+    int **(f8);
+    int * const *(f9);
+    int * const * const (f10);
+
+    int (*f11);
+    int (**f12);
+    int (* const *f13);
+    int (* const * const f14);
+
+    int f15[];
+    int f16[10];
+    int (f17[]);
+    int (f18[10]);
+
+    int *f19[];
+    int *f20[10];
+    int **f21[];
+    int **f22[10];
+    int * const *f23[];
+    int * const *f24[10];
+    int * const * const f25[];
+    int * const * const f26[10];
+
+    int *(f27[]);
+    int *(f28[10]);
+    int **(f29[]);
+    int **(f30[10]);
+    int * const *(f31[]);
+    int * const *(f32[10]);
+    int * const * const (f33[]);
+    int * const * const (f34[10]);
+
+    int (*f35[]);
+    int (*f36[10]);
+    int (**f37[]);
+    int (**f38[10]);
+    int (* const *f39[]);
+    int (* const *f40[10]);
+    int (* const * const f41[]);
+    int (* const * const f42[10]);
+
+    int f43[][3];
+    int f44[3][3];
+    int (f45[])[3];
+    int (f46[3])[3];
+    int ((f47[]))[3];
+    int ((f48[3]))[3];
+
+    int *f49[][3];
+    int *f50[3][3];
+    int **f51[][3];
+    int **f52[3][3];
+    int * const *f53[][3];
+    int * const *f54[3][3];
+    int * const * const f55[][3];
+    int * const * const f56[3][3];
+
+    int (*f57[][3]);
+    int (*f58[3][3]);
+    int (**f59[][3]);
+    int (**f60[3][3]);
+    int (* const *f61[][3]);
+    int (* const *f62[3][3]);
+    int (* const * const f63[][3]);
+    int (* const * const f64[3][3]);
+
+    int f65(int);
+    int (f66)(int);
+
+    int *f67(int);
+    int **f68(int);
+    int * const *f69(int);
+    int * const * const f70(int);
+
+    int *(f71)(int);
+    int **(f72)(int);
+    int * const *(f73)(int);
+    int * const * const (f74)(int);
+
+    int (*f75)(int);
+    int (**f76)(int);
+    int (* const *f77)(int);
+    int (* const * const f78)(int);
+
+    int (*(*f79)(int))();
+    int (*(* const f80)(int))();
+    int (* const(* const f81)(int))();
+}
Index: src/Tests/Syntax/IdentFuncParamDeclarator.c
===================================================================
--- src/Tests/Syntax/IdentFuncParamDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/IdentFuncParamDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,150 @@
+int fred(
+    //int f0[](),
+    //int (f0[])(),
+    //int f0()[],
+    //int f0()(),
+    //int (*f0)()(),
+    //int ((*f0())())[],
+    
+    int f1,
+    int (f2),
+
+    int *f3,
+    int **f4,
+    int * const *f5,
+    int * const * const f6,
+
+    int *(f7),
+    int **(f8),
+    int * const *(f9),
+    int * const * const (f10),
+
+    int (*f11),
+    int (**f12),
+    int (* const *f13),
+    int (* const * const f14),
+
+    int f15[],
+    int f16[10],
+    int (f17[]),
+    int (f18[10]),
+
+    int *f19[],
+    int *f20[10],
+    int **f21[],
+    int **f22[10],
+    int * const *f23[],
+    int * const *f24[10],
+    int * const * const f25[],
+    int * const * const f26[10],
+
+    int *(f27[]),
+    int *(f28[10]),
+    int **(f29[]),
+    int **(f30[10]),
+    int * const *(f31[]),
+    int * const *(f32[10]),
+    int * const * const (f33[]),
+    int * const * const (f34[10]),
+
+    int (*f35[]),
+    int (*f36[10]),
+    int (**f37[]),
+    int (**f38[10]),
+    int (* const *f39[]),
+    int (* const *f40[10]),
+    int (* const * const f41[]),
+    int (* const * const f42[10]),
+
+    int f43[][3],
+    int f44[3][3],
+    int (f45[])[3],
+    int (f46[3])[3],
+    int ((f47[]))[3],
+    int ((f48[3]))[3],
+
+    int *f49[][3],
+    int *f50[3][3],
+    int **f51[][3],
+    int **f52[3][3],
+    int * const *f53[][3],
+    int * const *f54[3][3],
+    int * const * const f55[][3],
+    int * const * const f56[3][3],
+
+    int (*f57[][3]),
+    int (*f58[3][3]),
+    int (**f59[][3]),
+    int (**f60[3][3]),
+    int (* const *f61[][3]),
+    int (* const *f62[3][3]),
+    int (* const * const f63[][3]),
+    int (* const * const f64[3][3]),
+
+    int f65(int),
+    int (f66)(int),
+
+    int *f67(int),
+    int **f68(int),
+    int * const *f69(int),
+    int * const * const f70(int),
+
+    int *(f71)(int),
+    int **(f72)(int),
+    int * const *(f73)(int),
+    int * const * const (f74)(int),
+
+    int (*f75)(int),
+    int (**f76)(int),
+    int (* const *f77)(int),
+    int (* const * const f78)(int),
+
+    int (*(*f79)(int))(),
+    int (*(* const f80)(int))(),
+    int (* const(* const f81)(int))(),
+
+    int f82[const *],
+    int f83[const 3],
+    int f84[static 3],
+    int f85[static const 3],
+
+    int (f86[const *]),
+    int (f87[const 3]),
+    int (f88[static 3]),
+    int (f89[static const 3]),
+
+    int *f90[const *],
+    int *f91[const 3],
+    int **f92[static 3],
+    int * const *f93[static const 3],
+    int * const * const f94[static const 3],
+
+    int *(f95[const *]),
+    int *(f96[const 3]),
+    int **(f97[static 3]),
+    int * const *(f98[static const 3]),
+    int * const * const (f99[static const 3]),
+
+    int f100[const *][3],
+    int f101[const 3][3],
+    int f102[static 3][3],
+    int f103[static const 3][3],
+
+    int (f104[const *][3]),
+    int (f105[const 3][3]),
+    int (f106[static 3][3]),
+    int (f107[static const 3][3]),
+
+    int *f108[const *][3],
+    int *f109[const 3][3],
+    int **f110[static 3][3],
+    int * const *f111[static const 3][3],
+    int * const * const f112[static const 3][3],
+
+    int *(f113[const *][3]),
+    int *(f114[const 3][3]),
+    int **(f115[static 3][3]),
+    int * const *(f116[static const 3][3]),
+    int * const * const (f117[static const 3][3])
+    ) {
+}
Index: src/Tests/Syntax/Initialization.c
===================================================================
--- src/Tests/Syntax/Initialization.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Initialization.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,45 @@
+// Cforall extensions
+
+int * v1 = 0, v2 = 0;
+int * v3 = 0, v4 = 0;
+
+void fred() {
+    int y1, y2[20]  = { 1, 2, 3 };
+
+    // designators
+
+    struct {
+	[int] w;
+    } a = { .w : [2] };
+
+    struct { int a[3], b; } w [] = { [0].a : {1}, [0].b : 1, [1].a[0] : 2 };
+
+    struct {
+	int f1, f2, f3;
+	struct { int g1, g2, g3; } f4[4];
+    } v7 = {
+	.f1 : 4,
+	.f2 : 3,
+	.f4[2] : {
+	    .g1 : 3,
+	    .g3 : 0,
+	},
+	.f4[3].g3 : 7,
+    };
+}
+
+struct point { int x; int z; struct {int y1, y2, y3;} y; int w;};
+struct quintet { int v, w, x, y, z;};
+
+int foo() {
+  return 4;
+}
+
+int main() {
+  foo();
+  int i;
+  struct point p1 = { x: 3 };
+  struct point p2 = { 3, 4 };
+  struct point p3 = { .[x,z]: 5, y : { .[y3,y1] : 6, 17 } };
+  struct point p4 = { w : 5, 4 };
+}
Index: src/Tests/Syntax/LabelledExit.c
===================================================================
--- src/Tests/Syntax/LabelledExit.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/LabelledExit.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,139 @@
+int main() {
+    int i;
+    int x, y;
+
+    x = 0; y = 0;
+
+// block, labelled exits
+
+  Block: {
+	if ( x == y ) {
+	    for ( ; i < y; ) {
+		y += 1;
+		if ( y < 10 ) break Block;
+	    }
+	}
+    }
+
+// loops, labelled exits
+
+  w1: while ( y == 10 );
+
+  w2: while ( x < 10 ) {
+      while (y < 5 ) {
+	  if ( y == 3 ) break w2;
+      }
+      x += 1;
+  }
+
+  A: for ( i = 0; i < 10; i += 1 ) {
+    B: for ( i = 0; i < 10; i += 1 ) {
+      C: for ( i = 0; i < 10; i += 1 ) {
+	  goto A;
+	  goto B;
+	  goto C;
+	  continue A;
+	  continue B;
+	  continue C;
+	  continue;
+	  break A;
+	  break B;
+	  break C;
+	  break;
+      }
+    }
+  }
+
+  D: for ( ;; ) {
+      break D;
+      continue D;
+  }
+
+    Z : i += 1;
+    goto Z;
+  X: Y: for ( ;; ) {
+      i += 1;
+      if ( i > 5 ) continue X;
+      if ( i < 5 ) break X;
+      if ( i < 5 ) break Y;
+      break;
+  }
+  XX: for ( ;; ) {
+    YY: for ( ;; ) {
+      ZZ: for ( ;; ) {
+	  i += 1;
+	  if ( i > 5 ) continue XX;
+	  if ( i < 5 ) continue YY;
+	  if ( i < 5 ) continue ZZ;
+	  if ( i > 5 ) break XX;
+	  if ( i < 5 ) break YY;
+	  if ( i < 5 ) break ZZ;
+	  break;
+      }
+    }
+  }
+
+    for ( ;; ) ;
+    for ( int i = 0 ;; ) ;
+    for (  ; i < 0; ) ;
+    for (  ; ; i += 1 ) ;
+  L0:  L1:  L2:  L3:  L4:  L5:  L6:  L7:  L8:  L9:
+  L10: L11: L12: L13: L14: L15: L16: L17: L18: L19:
+  L20: L21: L22: L23: L24: L25: L26: L27: L28: L29:
+  L31: L32: L33: L34:
+    for ( ;; ) {
+	break L0;
+    }
+
+// switch/choose, labelled exits
+
+  Switch: switch ( i ) {
+    default:
+      i += 1;
+    case 0:
+      i += 1;
+      break Switch;
+    case 1:
+      switch ( i ) {
+	case 0:
+	  break Switch;
+	default:
+	  break;
+      }
+  }
+
+  Choose: choose ( i ) {
+    default:
+      i += 1;
+    case 0:
+      i += 1;
+      break Choose;
+    case 1:
+      choose ( i ) {
+	case 0:
+	  break;
+	default:
+	  break Choose;
+      }
+      fallthru;
+    case 2:
+      i += 1;
+  }
+#if 0
+// computed goto
+
+    {
+	static void *array[] = { &&foo, &&bar, &&hack };
+
+      foo: bar: hack:
+	goto *array[i];
+    }
+#endif
+#if 0
+  Q: if ( i > 5 ) {
+      i += 1;
+      break Q;
+  } else
+      i += 1;
+#endif
+}
Index: src/Tests/Syntax/Makefile
===================================================================
--- src/Tests/Syntax/Makefile	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Makefile	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,22 @@
+CFA = ../../cfa-cpp
+
+TESTS = ${shell ls *.c}
+TEST_OUT = $(TESTS:.c=.tst)
+
+%.tst:%.c $(CFA)
+	$(CFA) -nd < $< > $@ 2>&1
+
+tests: $(TEST_OUT)
+
+clean:
+	rm -rf $(TEST_OUT)
+
+force: clean tests
+
+all: $(TESTS)
+	@for i in $(TESTS); do     \
+	  echo -n $$i "... " ;     \
+	  $(CFA) -d < $$i > $$i.log;  \
+	done
+
+
Index: src/Tests/Syntax/NamedParmArg.c
===================================================================
--- src/Tests/Syntax/NamedParmArg.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/NamedParmArg.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,14 @@
+int f1( int i = 3, int *j = 0 ) {}  /* ANSI */
+[int, int ] f2( int i = 3, * int j = 0 ) {}  /* CFA */
+
+int main() {
+    f1();		/* identical calls */
+    f1( 3 );
+    f1( 3, );
+    f1( 3, 0 );
+    f1( 3, j : 0 );
+    f1( j : 0, 3 );
+    f1( i : 3, j : 0 );
+    f1( j : 0, i : 3 );
+    f1( [j, i] : f2() );
+}
Index: src/Tests/Syntax/NumericConstants.c
===================================================================
--- src/Tests/Syntax/NumericConstants.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/NumericConstants.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,54 @@
+int main() {
+    1;							/* decimal */
+    2_1;
+    2_147_483_647;
+    37LL;
+    45ull;
+    89llu;
+    99LLu;
+    56_lu;
+    88_LLu;
+
+//    0;							/* octal */
+    0u;
+    0_3_77;
+    0_377_ul;
+
+    0x1;						/* hexadecimal */
+    0x1u;
+    0xabL;
+    0x_80000000;
+    0x_fff;
+    0x_ef3d_aa5c;
+    0x_3LL;
+
+    3.;							/* integral real */
+    3_100.;
+    1_000_000.;
+
+    3.1;						/* integral/fractional real */
+    3.141_592_654L;
+    123_456.123_456;
+
+    3E1;						/* integral/exponent real */
+    3_e1f;
+    3_E1_1_F;
+    3_E_11;
+    3_e_+11;
+    3_E_-11;
+
+    3.0E1;						/* integral/fractional/exponent real */
+    3.0_E1L;
+    3.0_e1_1;
+    3.0_E_11_l;
+    3.0_e_+11l;
+    3.0_E_-11;
+    123_456.123_456E-16;
+
+    0x_ff.ffp0;						/* hex real */
+    0x_1.ffff_ffff_p_128_l;
+}
+
+// Local Variables: //
+// compile-command: "../../../bin/cfa -std=c99 NumericConstants.c" //
+// End: //
Index: src/Tests/Syntax/Scope.c
===================================================================
--- src/Tests/Syntax/Scope.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Scope.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,68 @@
+int x;
+typedef double y;
+typedef float t;
+y z;
+type u = struct { int a; double b; };
+int f( int y );
+y q;
+
+y w(y y, u v) {
+    type x | { x t(u); };
+    u u = y;
+    x z = t(u);
+}
+
+y p;
+
+context has_u( type z )
+{
+  forall( type t ) z u(t);
+};
+
+forall( type t | has_u( t ) )
+y q( t the_t )
+{
+    t y = u( the_t );
+}
+
+t f( y p ) {
+    int y;
+    typedef char x;
+
+    {
+	x y;
+	typedef x z;
+
+	{
+	    z x;
+	    typedef z y;
+	    y z = x;
+	}
+
+	z x = y;
+    }
+
+    x q = y;
+}
+
+t g( void ) {
+    typedef char x;
+    try {
+	some_func();
+    } catch ( x x ) {
+	t y = x;
+    }
+    x z;
+}
+
+y q(i)							/* K&R style */
+    int i;
+{
+    switch (i) {
+	y q = i;
+      case 0:
+	return q;
+      default:
+	return i;
+    }
+}
Index: src/Tests/Syntax/StructMember.c
===================================================================
--- src/Tests/Syntax/StructMember.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/StructMember.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,40 @@
+typedef int T;
+
+struct S {
+    int m1:3, m2:4;
+    int :2;
+    int :3, :4;
+    int m3;
+    int m4, m5, m6;
+    int *m7, *m8, *m9;
+    int (*m10)();
+    int *(*m11)(int);
+    T T;
+    T (T);
+
+// Cforall extensions
+
+    * int m12, m13;
+    * [ * int ] (int) m14;
+    int ;
+    int , , ;
+    int * , , ;
+    int *, *, *;
+    * int , , ;
+    int (*)();
+    int (**)( int );
+    T ;
+
+// errors
+
+//    void f(void);
+};
+
+struct S s;
+
+union U {
+    [5] int m1;
+    int m2[5];
+    * int m3;
+    int *m4;
+} u;
Index: src/Tests/Syntax/Subrange.c
===================================================================
--- src/Tests/Syntax/Subrange.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Subrange.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,63 @@
+// A small context defining the notion of an ordered type.  (The standard
+// library should probably contain a context for this purpose.)
+context ordered(type T) {
+    int ?<?(T, T), ?<=?(T, T);
+};
+
+// A subrange type resembling an Ada subtype with a base type and a range
+// constraint.
+type subrange(type base_t | ordered(base_t), base_t low = 0, base_t high = 8) = base_t;
+
+// Note that subrange() can be applied to floating-point and pointer types, not
+// just integral types.
+//   This requires a "type generator" extension to Cforall.  Type generators
+// must accept type and non-type parameters, which is beyond what we discussed
+// previously.  Type parameters must be usable in the declaration of
+// subsequent parameters: parameter T is used to declare parameters "low"
+// and "high".
+
+// Example usage:
+subrange(unsigned, 1, 31) day_of_month;
+subrange(char, 'a', 'z')  lcase;
+subrange(int, 0, (rand() & 0xF) ) foo;
+
+// What sorts of expressions can be used as arguments of type generators?  Is
+// "subrange(int, 0, rand() & 0xF)" legal?  Probably.  The nearest C equivalent
+// to the "low" and "high" arguments is the array size in a variable-length
+// array declaration, and C allows assignment expressions there.
+
+// Convenient access to subrange bounds, for instance for iteration:
+forall (type T, T low, T high)
+T lbound( subrange(T, low, high) v) {
+    return low;
+}
+
+forall (type T, T low, T high)
+T hbound( subrange(T, low, high) v) {
+    return high;
+}
+
+// Example usage:
+unsigned lday = lbound(day_of_month);
+
+// Assignment from the base type, with bounds checking.  I'll ignore the issue
+// of exception handling here.  Inlining allows the compiler to eliminate
+// bounds checks.
+forall (type T | ordered(T), T low, T high)
+inline subrange(T, low, high) ?=?(subrange(T, low, high)* target, T source) {
+    if (low <= source && source <= high) *((T*)target) = source;
+    else abort();
+    return target;
+}
+
+// Assignment between subranges with a common base type.  The bounds check
+// compares range bounds so that the compiler can optimize checks away when the
+// ranges are known to overlap.
+forall (type T | ordered(T), T t_low, T t_high, T s_low, T s_high)
+inline subrange(T, t_low, t_high) ?=?(subrange(T, t_low, t_high)* target,
+				      subrange(T, s_low, s_high) source) {
+    if ( (t_low <= s_low || t_low <= source)
+	 && (s_high <= t_high || source <= t_high) ) *((T*)target) = source;
+    else abort();
+    return target;
+}
Index: src/Tests/Syntax/Switch.c
===================================================================
--- src/Tests/Syntax/Switch.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Switch.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,42 @@
+int fred() {
+    int i;
+    switch ( i ) case 3 : i = 1;
+    switch ( i ) default : i = 1;
+    switch ( 3 )
+      default:
+      case 2:
+      case 3:
+	3;
+
+    switch ( i ) {
+    }
+
+    switch ( i ) {
+	int i;
+      case 8~10:
+      default:
+	i = 3;
+      case 3:
+      case 'A' ... 'Z':
+      case 5 ... 6:
+      case 2, 4:
+	i = 3;
+	break;
+    }
+
+    choose ( i ) case 3 : i = 1;
+    choose ( i ) default : i = 1;
+    choose ( i ) {
+	int i;
+      case 3:
+      case 'A' ... 'Z':
+      case 5 ... 6:
+      case 2, 4, 7:
+	i = 3;
+	fallthru;
+      default:
+	i = 3;
+      case 8~10:
+	fallthru
+    }
+}
Index: src/Tests/Syntax/Tuple.c
===================================================================
--- src/Tests/Syntax/Tuple.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Tuple.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,66 @@
+int f( int, int );
+int g( int, int, int );
+static [ int, int, int, int ] h( int a, int b, * int c, [] char d );
+
+struct inner {
+    int f2, f3;
+};
+
+struct outer {
+    int f1;
+    struct inner i;
+    double f4;
+} s, *sp;
+
+const volatile [ int, int ] t1;
+static const [ int, const int ] t2;
+const static [ int, const int ] t3;
+
+[ int rc ] printf( * char fmt, ... );
+int printf( char *fmt, ... );
+
+[ short x, unsigned y ] f1( int w ) {
+    [ y, x ] = [ x, y ] = [ w, 23 ];
+}
+
+[ [ int, char, long, int ] r ] g1() {
+    short x, p;
+    unsigned int y;
+    [ int, int ] z;
+
+    [ x, y, z ] = [ p, f( 17 ), 3 ];
+    r = [ x, y, z ];
+}
+
+[ int rc ] main( int argc, ** char argv ) {
+    int a, b, c, d;
+    struct outer t = { .[ f1,f4 ] : [ 1,7.0 ] };
+    f( [ 3,5 ] );
+    g( [ 3,5 ], 3 );
+    f( t1 );
+    g( t1, 3 );
+
+    [ ,,, ];						/* empty tuple */
+    [ 3,5 ];
+    [ a,b ] = 3;
+    [ a,b ] = [ 4.6 ];
+    [ a,b ] = [ c,d ] = [ 3,5 ];
+    [ a,b,[ c ] ] = [ 2,[ a,b ] ];
+    [ a,b ] = 3 > 4 ? [ b,6 ] : [ 7,8 ];
+
+    t1 = [ a,b ];
+    t1 = [ a, ];					/* semantic error */
+    t1 = t2 = [ a,b ];
+    [ a,b ] = [ c,d ] = d += c += 1;
+    [ a,b ] = [ c,d ] = t1;
+    [ a,b ] = t1 = [ c,d ];
+    [ a,b ] = t1 = t2 = [ c,d ];
+    t1 = [ 3,4 ] = [ 3,4 ] = t1 = [ 3,4 ];
+
+    s.[ f1, i.[ f2, f3 ], f4 ] = [ 11, 12, 13, 3.14159 ];
+    s.[ f1, i.[ f2, f3 ], f4 ] = h( 3, 3, 0, "abc" );
+    [ a, ,b, ] = h( 3, 3, 0, "abc" );			/* ignore some results */
+    sp->[ f4,f1 ] = sp->[ f1,f4 ];
+    printf( "expecting 3, 17, 23, 4; got %d, %d, %d, %d\n", s.[ f4, i.[ f3,f2 ], f1 ] );
+    rc = 0;
+}
Index: src/Tests/Syntax/TypeGenerator.c
===================================================================
--- src/Tests/Syntax/TypeGenerator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/TypeGenerator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,25 @@
+context addable(type T) {
+   T ?+?(T,T);
+};
+
+type List(type T | addable(T) ) | addable(T) = struct { T data; List(T) *next; } *;
+typedef List(int) ListOfIntegers;
+ListOfIntegers li;
+int f( List(int) ((*g))(int) );
+[int] h( * List(int) p ); // new declaration syntax
+
+struct(type T) S1;			// forward definition
+struct(type T) S1 { T i; };		// actual definition
+struct(int) S1 v1, *p;			// expansion and instantiation
+struct(type T)(int) S2 { T i; } v2;	// actual definition, expansion and instantiation
+struct(type T)(int) { T i; } v2;	// anonymous actual definition, expansion and instantiation
+
+struct(type T | addable(T) ) node { T data; struct(T) node *next; };
+type List(type T) = struct(T) node *;
+List(int) my_list;
+
+type Complex | addable(Complex);
+
+int main() {
+    (struct(int) node)my_list;
+}
Index: src/Tests/Syntax/Typedef.c
===================================================================
--- src/Tests/Syntax/Typedef.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Typedef.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,43 @@
+typedef int T;
+
+void f( void ) {
+    int T( T );
+    T( 3 );
+}
+
+struct {
+    T (T);
+} fred = { 3 };
+
+typedef int (*a)(int, char);
+a b;
+
+int g(void) {
+    double a;
+}
+a c;
+
+typedef typeof(3) x, y;  /* GCC */
+
+x p;
+y q;
+
+int main() {
+    typedef typeof(3) z, p;
+    z w;
+    p x;
+}
+
+/* new-style function definitions */
+
+typedef [10] * int arrayOf10Pointers;
+arrayOf10Pointers array;
+typedef const * int constantPointer;
+typedef * [ int ]( [] int ) funcPtr;
+typedef [ int ] funcProto( []  int );
+typedef [ int, int ] tupleType;
+typedef * [ int, int ] tupleTypePtr;
+typedef * int a, b;
+typedef [ int ] f( * int ), g;
+typedef [ * [static 10] int ] t;
+typedef [ * [static 10] int x ] f();
Index: src/Tests/Syntax/TypedefDeclarator.c
===================================================================
--- src/Tests/Syntax/TypedefDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/TypedefDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,116 @@
+typedef int
+     f0,  f1,  f2,  f3,  f4,  f5,  f6,  f7,  f8,  f9,
+    f10, f11, f12, f13, f14, f15, f16, f17, f18, f19,
+    f20, f21, f22, f23, f24, f25, f26, f27, f28, f29,
+    f30, f31, f32, f33, f34, f35, f36, f37, f38, f39,
+    f40, f41, f42, f43, f44, f45, f46, f47, f48, f49,
+    f50, f51, f52, f53, f54, f55, f56, f57, f58, f59,
+    f60, f61, f62, f63, f64, f65, f66, f67, f68, f69,
+    f70, f71, f72, f73, f74, f75, f76, f77, f78, f79,
+    f80, f81, f82, f83, f84, f85, f86, f87, f88, f89;
+
+int main() {
+    //int f0[]();
+    //int (f0[])();
+    //int f0()[];
+    //int f0()();
+    //int (*f0)()();
+    //int ((*f0())())[];
+    
+    int f1;
+    int (f2);
+
+    int *f3;
+    int **f4;
+    int * const *f5;
+    int * const * const f6;
+
+    int *(f7);
+    int **(f8);
+    int * const *(f9);
+    int * const * const (f10);
+
+    int (*f11);
+    int (**f12);
+    int (* const *f13);
+    int (* const * const f14);
+
+    int f15[];
+    int f16[10];
+    int (f17[]);
+    int (f18[10]);
+
+    int *f19[];
+    int *f20[10];
+    int **f21[];
+    int **f22[10];
+    int * const *f23[];
+    int * const *f24[10];
+    int * const * const f25[];
+    int * const * const f26[10];
+
+    int *(f27[]);
+    int *(f28[10]);
+    int **(f29[]);
+    int **(f30[10]);
+    int * const *(f31[]);
+    int * const *(f32[10]);
+    int * const * const (f33[]);
+    int * const * const (f34[10]);
+
+    int (*f35[]);
+    int (*f36[10]);
+    int (**f37[]);
+    int (**f38[10]);
+    int (* const *f39[]);
+    int (* const *f40[10]);
+    int (* const * const f41[]);
+    int (* const * const f42[10]);
+
+    int f43[][3];
+    int f44[3][3];
+    int (f45[])[3];
+    int (f46[3])[3];
+    int ((f47[]))[3];
+    int ((f48[3]))[3];
+
+    int *f49[][3];
+    int *f50[3][3];
+    int **f51[][3];
+    int **f52[3][3];
+    int * const *f53[][3];
+    int * const *f54[3][3];
+    int * const * const f55[][3];
+    int * const * const f56[3][3];
+
+    int (*f57[][3]);
+    int (*f58[3][3]);
+    int (**f59[][3]);
+    int (**f60[3][3]);
+    int (* const *f61[][3]);
+    int (* const *f62[3][3]);
+    int (* const * const f63[][3]);
+    int (* const * const f64[3][3]);
+
+    int f65(int);
+    int (f66)(int);
+
+    int *f67(int);
+    int **f68(int);
+    int * const *f69(int);
+    int * const * const f70(int);
+
+    int *(f71)(int);
+    int **(f72)(int);
+    int * const *(f73)(int);
+    int * const * const (f74)(int);
+
+    int (*f75)(int);
+    int (**f76)(int);
+    int (* const *f77)(int);
+    int (* const * const f78)(int);
+
+    int (*(*f79)(int))();
+    int (*(* const f80)(int))();
+    int (* const(* const f81)(int))();
+}
Index: src/Tests/Syntax/TypedefParamDeclarator.c
===================================================================
--- src/Tests/Syntax/TypedefParamDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/TypedefParamDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,150 @@
+typedef int
+     f0,   f1,   f2,   f3,   f4,   f5,   f6,   f7,   f8,   f9,
+    f10,  f11,  f12,  f13,  f14,  f15,  f16,  f17,  f18,  f19,
+    f20,  f21,  f22,  f23,  f24,  f25,  f26,  f27,  f28,  f29,
+    f30,  f31,  f32,  f33,  f34,  f35,  f36,  f37,  f38,  f39,
+    f40,  f41,  f42,  f43,  f44,  f45,  f46,  f47,  f48,  f49,
+    f50,  f51,  f52,  f53,  f54,  f55,  f56,  f57,  f58,  f59,
+    f60,  f61,  f62,  f63,  f64,  f65,  f66,  f67,  f68,  f69,
+    f70,  f71,  f72,  f73,  f74,  f75,  f76,  f77,  f78,  f79,
+    f80,  f81,  f82,  f83,  f84,  f85,  f86,  f87,  f88,  f89,
+    f90,  f91,  f92,  f93,  f94,  f95,  f96,  f97,  f98,  f99,
+    f100, f101, f102, f103, f104, f105, f106, f107, f108, f109,
+    f110, f111, f112, f113, f114, f115, f116, f117, f118, f119;
+
+int fred(
+/*
+    //int f0[](),
+    //int (f0[])(),
+    //int f0()[],
+    //int f0()(),
+    //int (*f0)()(),
+    //int ((*f0())())[],
+*/
+    int f1,
+
+    int *f3,
+    int **f4,
+    int * const *f5,
+    int * const * const f6,
+
+    int (*f11),
+    int (**f12),
+    int (* const *f13),
+    int (* const * const f14),
+
+    int f15[],
+    int f16[10],
+
+    int *f19[],
+    int *f20[10],
+    int **f21[],
+    int **f22[10],
+    int * const *f23[],
+    int * const *f24[10],
+    int * const * const f25[],
+    int * const * const f26[10],
+
+    int (*f35[]),
+    int (*f36[10]),
+    int (**f37[]),
+    int (**f38[10]),
+    int (* const *f39[]),
+    int (* const *f40[10]),
+    int (* const * const f41[]),
+    int (* const * const f42[10]),
+
+    int f43[][3],
+    int f44[3][3],
+/*
+    int (f45[])[3],
+    int (f46[3])[3],
+    int ((f47[]))[3],
+    int ((f48[3]))[3],
+*/
+    int *f49[][3],
+    int *f50[3][3],
+    int **f51[][3],
+    int **f52[3][3],
+    int * const *f53[][3],
+    int * const *f54[3][3],
+    int * const * const f55[][3],
+    int * const * const f56[3][3],
+
+    int (*f57[][3]),
+    int (*f58[3][3]),
+    int (**f59[][3]),
+    int (**f60[3][3]),
+    int (* const *f61[][3]),
+    int (* const *f62[3][3]),
+    int (* const * const f63[][3]),
+    int (* const * const f64[3][3]),
+
+    int f65(int),
+/*
+    int (f66)(int),
+*/
+    int *f67(int),
+    int **f68(int),
+    int * const *f69(int),
+    int * const * const f70(int),
+/*
+    int *(f71)(int),
+    int **(f72)(int),
+    int * const *(f73)(int),
+    int * const * const (f74)(int),
+*/
+    int (*f75)(int),
+    int (**f76)(int),
+    int (* const *f77)(int),
+    int (* const * const f78)(int),
+
+    int (*(*f79)(int))(),
+    int (*(* const f80)(int))(),
+    int (* const(* const f81)(int))(),
+
+    int f82[const *],
+    int f83[const 3],
+    int f84[static 3],
+    int f85[static const 3],
+
+    int (f86[const *]),
+    int (f87[const 3]),
+    int (f88[static 3]),
+    int (f89[static const 3]),
+
+    int *f90[const *],
+    int *f91[const 3],
+    int **f92[static 3],
+    int * const *f93[static const 3],
+    int * const * const f94[static const 3],
+
+    int *(f95[const *]),
+    int *(f96[const 3]),
+    int **(f97[static 3]),
+    int * const *(f98[static const 3]),
+    int * const * const (f99[static const 3]),
+
+    int f100[const *][3],
+    int f101[const 3][3],
+    int f102[static 3][3],
+    int f103[static const 3][3],
+
+    int (f104[const *][3]),
+    int (f105[const 3][3]),
+    int (f106[static 3][3]),
+    int (f107[static const 3][3]),
+
+    int *f108[const *][3],
+    int *f109[const 3][3],
+    int **f110[static 3][3],
+    int * const *f111[static const 3][3],
+    int * const * const f112[static const 3][3],
+
+    int *(f113[const *][3]),
+    int *(f114[const 3][3]),
+    int **(f115[static 3][3]),
+    int * const *(f116[static const 3][3]),
+    int * const * const (f117[static const 3][3])
+    ) {
+}
Index: src/Tests/Syntax/Typeof.c
===================================================================
--- src/Tests/Syntax/Typeof.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/Typeof.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,10 @@
+int main() {
+    int *v1;
+    typeof(v1) v2;
+    typeof(*v1) v3[4];
+    char *v4[4];
+    typeof(typeof(char *)[4]) v5;
+    typeof (int *) v6;
+    typeof( int ( int, int p ) ) *v7;
+    typeof( [int] ( int, int p ) ) *v8;
+}
Index: src/Tests/Syntax/VariableDeclarator.c
===================================================================
--- src/Tests/Syntax/VariableDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
+++ src/Tests/Syntax/VariableDeclarator.c	(revision 843054c23fcb725d2486e5e42e91b3741bc523b8)
@@ -0,0 +1,162 @@
+int f1;
+int (f2);
+
+int *f3;
+int **f4;
+int * const *f5;
+int * const * const f6;
+
+int *(f7);
+int **(f8);
+int * const *(f9);
+int * const * const (f10);
+
+int (*f11);
+int (**f12);
+int (* const *f13);
+int (* const * const f14);
+
+int f15[];
+int f16[10];
+int (f17[]);
+int (f18[10]);
+
+int *f19[];
+int *f20[10];
+int **f21[];
+int **f22[10];
+int * const *f23[];
+int * const *f24[10];
+int * const * const f25[];
+int * const * const f26[10];
+
+int *(f27[]);
+int *(f28[10]);
+int **(f29[]);
+int **(f30[10]);
+int * const *(f31[]);
+int * const *(f32[10]);
+int * const * const (f33[]);
+int * const * const (f34[10]);
+
+int (*f35)[];
+int (*f36)[10];
+int (**f37)[];
+int (**f38)[10];
+int (* const *f39)[];
+int (* const *f40)[10];
+int (* const * const f41)[];
+int (* const * const f42)[10];
+
+int f43[][3];
+int f44[3][3];
+int (f45[])[3];
+int (f46[3])[3];
+int ((f47[]))[3];
+int ((f48[3]))[3];
+
+int *f49[][3];
+int *f50[3][3];
+int **f51[][3];
+int **f52[3][3];
+int * const *f53[][3];
+int * const *f54[3][3];
+int * const * const f55[][3];
+int * const * const f56[3][3];
+
+int (*f57[][3]);
+int (*f58[3][3]);
+int (**f59[][3]);
+int (**f60[3][3]);
+int (* const *f61[][3]);
+int (* const *f62[3][3]);
+int (* const * const f63[][3]);
+int (* const * const f64[3][3]);
+
+int f65(int);
+int (f66)(int);
+
+int *f67(int);
+int **f68(int);
+int * const *f69(int);
+int * const * const f70(int);
+
+int *(f71)(int);
+int **(f72)(int);
+int * const *(f73)(int);
+
+int * const * const (f74)(int);
+
+int (*f75)(int);
+int (**f76)(int);
+int (* const *f77)(int);
+int (* const * const f78)(int);
+
+int (*(*f79)(int))();
+int (*(* const f80)(int))();
+int (* const(* const f81)(int))();
+
+// errors
+
+//int fe0[]();				// array of functions
+//int (fe1[])();				// array of functions
+//int fe2()[];				// returning an array
+//int fe3()();				// returning a function
+//int (*fe4)()();				// returning a function
+//int ((*fe5())())[];			// returning an array
+
+// Cforall extensions
+
+* int cf3;
+* * int cf4;
+* const * int cf5;
+const * const * int cf6;
+
+[] int cf15;
+[10] int cf16;
+
+[] * int cf19;
+[10] * int cf20;
+int **cf21[];
+[10] * * int cf22;
+[] * const * int cf23;
+[10] * const * int cf24;
+[] const * const * int cf25;
+[10] const * const * int cf26;
+
+* [] int cf35;
+* [10] int cf36;
+* * [] int cf37;
+* * [10] int cf38;
+* const * [] int cf39;
+* const * [10] int cf40;
+const * const * [] int cf41;
+const * const * [10] int cf42;
+
+[][3] int cf43;
+[3][3] int cf44;
+
+[][3] * int cf49;
+[3][3] * int cf50;
+[][3] * * int cf51;
+[3][3] * * int cf52;
+[][3] const * int cf53;
+[3][3] * const * int cf54;
+[][3] const * const * int cf55;
+[3][3] const * const * int cf56;
+
+[int] cf65(int);
+[int] cf66(int);
+
+[* int] cf67(int);
+[* * int] cf68(int);
+[const * * int] cf69(int);
+[const * const * int] cf70(int);
+
+
+* [20] double z;
+[20] * char w;
+
+// function pointer
+
+*[]*[]* [ *[]*[] int ]( *[]*[] int, *[]*[] int ) v3;
