Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/DeclarationNode.cc	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -10,7 +10,9 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Tue Apr  4 10:28:00 2023
-// Update Count     : 1392
+// Last Modified On : Thr Apr 20 11:46:00 2023
+// Update Count     : 1393
 //
+
+#include "DeclarationNode.h"
 
 #include <cassert>                 // for assert, assertf, strict_dynamic_cast
@@ -34,5 +36,7 @@
 #include "Common/UniqueName.h"     // for UniqueName
 #include "Common/utility.h"        // for maybeClone
-#include "Parser/ParseNode.h"      // for DeclarationNode, ExpressionNode
+#include "Parser/ExpressionNode.h" // for ExpressionNode
+#include "Parser/InitializerNode.h"// for InitializerNode
+#include "Parser/StatementNode.h"  // for StatementNode
 #include "TypeData.h"              // for TypeData, TypeData::Aggregate_t
 #include "TypedefTable.h"          // for TypedefTable
@@ -999,66 +1003,116 @@
 }
 
-void buildList( const DeclarationNode * firstNode,
+// If a typedef wraps an anonymous declaration, name the inner declaration
+// so it has a consistent name across translation units.
+static void nameTypedefedDecl(
+		DeclarationNode * innerDecl,
+		const DeclarationNode * outerDecl ) {
+	TypeData * outer = outerDecl->type;
+	assert( outer );
+	// First make sure this is a typedef:
+	if ( outer->kind != TypeData::Symbolic || !outer->symbolic.isTypedef ) {
+		return;
+	}
+	TypeData * inner = innerDecl->type;
+	assert( inner );
+	// Always clear any CVs associated with the aggregate:
+	inner->qualifiers.reset();
+	// Handle anonymous aggregates: typedef struct { int i; } foo
+	if ( inner->kind == TypeData::Aggregate && inner->aggregate.anon ) {
+		delete inner->aggregate.name;
+		inner->aggregate.name = new string( "__anonymous_" + *outerDecl->name );
+		inner->aggregate.anon = false;
+		assert( outer->base );
+		delete outer->base->aggInst.aggregate->aggregate.name;
+		outer->base->aggInst.aggregate->aggregate.name = new string( "__anonymous_" + *outerDecl->name );
+		outer->base->aggInst.aggregate->aggregate.anon = false;
+		outer->base->aggInst.aggregate->qualifiers.reset();
+	// Handle anonymous enumeration: typedef enum { A, B, C } foo
+	} else if ( inner->kind == TypeData::Enum && inner->enumeration.anon ) {
+		delete inner->enumeration.name;
+		inner->enumeration.name = new string( "__anonymous_" + *outerDecl->name );
+		inner->enumeration.anon = false;
+		assert( outer->base );
+		delete outer->base->aggInst.aggregate->enumeration.name;
+		outer->base->aggInst.aggregate->enumeration.name = new string( "__anonymous_" + *outerDecl->name );
+		outer->base->aggInst.aggregate->enumeration.anon = false;
+		// No qualifiers.reset() here.
+	}
+}
+
+// This code handles a special issue with the attribute transparent_union.
+//
+//    typedef union U { int i; } typedef_name __attribute__(( aligned(16) )) __attribute__(( transparent_union ))
+//
+// Here the attribute aligned goes with the typedef_name, so variables declared of this type are
+// aligned.  However, the attribute transparent_union must be moved from the typedef_name to
+// alias union U.  Currently, this is the only know attribute that must be moved from typedef to
+// alias.
+static void moveUnionAttribute( ast::Decl * decl, ast::UnionDecl * unionDecl ) {
+	if ( auto typedefDecl = dynamic_cast<ast::TypedefDecl *>( decl ) ) {
+		// Is the typedef alias a union aggregate?
+		if ( nullptr == unionDecl ) return;
+
+		// If typedef is an alias for a union, then its alias type was hoisted above and remembered.
+		if ( auto unionInstType = typedefDecl->base.as<ast::UnionInstType>() ) {
+			auto instType = ast::mutate( unionInstType );
+			// Remove all transparent_union attributes from typedef and move to alias union.
+			for ( auto attr = instType->attributes.begin() ; attr != instType->attributes.end() ; ) {
+				assert( *attr );
+				if ( (*attr)->name == "transparent_union" || (*attr)->name == "__transparent_union__" ) {
+					unionDecl->attributes.emplace_back( attr->release() );
+					attr = instType->attributes.erase( attr );
+				} else {
+					attr++;
+				}
+			}
+			typedefDecl->base = instType;
+		}
+	}
+}
+
+// Get the non-anonymous name of the instance type of the declaration,
+// if one exists.
+static const std::string * getInstTypeOfName( ast::Decl * decl ) {
+	if ( auto dwt = dynamic_cast<ast::DeclWithType *>( decl ) ) {
+		if ( auto aggr = dynamic_cast<ast::BaseInstType const *>( dwt->get_type() ) ) {
+			if ( aggr->name.find("anonymous") == std::string::npos ) {
+				return &aggr->name;
+			}
+		}
+	}
+	return nullptr;
+}
+
+void buildList( DeclarationNode * firstNode,
 		std::vector<ast::ptr<ast::Decl>> & outputList ) {
 	SemanticErrorException errors;
 	std::back_insert_iterator<std::vector<ast::ptr<ast::Decl>>> out( outputList );
 
-	for ( const DeclarationNode * cur = firstNode; cur; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ) ) {
+	for ( const DeclarationNode * cur = firstNode ; cur ; cur = strict_next( cur ) ) {
 		try {
-			bool extracted = false, anon = false;
-			ast::AggregateDecl * unionDecl = nullptr;
+			bool extracted_named = false;
+			ast::UnionDecl * unionDecl = nullptr;
 
 			if ( DeclarationNode * extr = cur->extractAggregate() ) {
-				// Handle the case where a SUE declaration is contained within an object or type declaration.
-
 				assert( cur->type );
-				// Replace anonymous SUE name with typedef name to prevent anonymous naming problems across translation units.
-				if ( cur->type->kind == TypeData::Symbolic && cur->type->symbolic.isTypedef ) {
-					assert( extr->type );
-					// Handle anonymous aggregates: typedef struct { int i; } foo
-					extr->type->qualifiers.reset();		// clear any CVs associated with the aggregate
-					if ( extr->type->kind == TypeData::Aggregate && extr->type->aggregate.anon ) {
-						delete extr->type->aggregate.name;
-						extr->type->aggregate.name = new string( "__anonymous_" + *cur->name );
-						extr->type->aggregate.anon = false;
-						assert( cur->type->base );
-						if ( cur->type->base ) {
-							delete cur->type->base->aggInst.aggregate->aggregate.name;
-							cur->type->base->aggInst.aggregate->aggregate.name = new string( "__anonymous_" + *cur->name );
-							cur->type->base->aggInst.aggregate->aggregate.anon = false;
-							cur->type->base->aggInst.aggregate->qualifiers.reset();
-						} // if
-					} // if
-					// Handle anonymous enumeration: typedef enum { A, B, C } foo
-					if ( extr->type->kind == TypeData::Enum && extr->type->enumeration.anon ) {
-						delete extr->type->enumeration.name;
-						extr->type->enumeration.name = new string( "__anonymous_" + *cur->name );
-						extr->type->enumeration.anon = false;
-						assert( cur->type->base );
-						if ( cur->type->base ) {
-							delete cur->type->base->aggInst.aggregate->enumeration.name;
-							cur->type->base->aggInst.aggregate->enumeration.name = new string( "__anonymous_" + *cur->name );
-							cur->type->base->aggInst.aggregate->enumeration.anon = false;
-						} // if
-					} // if
-				} // if
-
-				ast::Decl * decl = extr->build();
-				if ( decl ) {
+				nameTypedefedDecl( extr, cur );
+
+				if ( ast::Decl * decl = extr->build() ) {
 					// Remember the declaration if it is a union aggregate ?
 					unionDecl = dynamic_cast<ast::UnionDecl *>( decl );
 
-					decl->location = cur->location;
 					*out++ = decl;
 
 					// need to remember the cases where a declaration contains an anonymous aggregate definition
-					extracted = true;
 					assert( extr->type );
 					if ( extr->type->kind == TypeData::Aggregate ) {
 						// typedef struct { int A } B is the only case?
-						anon = extr->type->aggregate.anon;
+						extracted_named = !extr->type->aggregate.anon;
 					} else if ( extr->type->kind == TypeData::Enum ) {
 						// typedef enum { A } B is the only case?
-						anon = extr->type->enumeration.anon;
+						extracted_named = !extr->type->enumeration.anon;
+					} else {
+						extracted_named = true;
 					}
 				} // if
@@ -1066,60 +1120,28 @@
 			} // if
 
-			ast::Decl * decl = cur->build();
-			if ( decl ) {
-				if ( auto typedefDecl = dynamic_cast<ast::TypedefDecl *>( decl ) ) {
-					if ( unionDecl ) {					// is the typedef alias a union aggregate ?
-						// This code handles a special issue with the attribute transparent_union.
-						//
-						//    typedef union U { int i; } typedef_name __attribute__(( aligned(16) )) __attribute__(( transparent_union ))
-						//
-						// Here the attribute aligned goes with the typedef_name, so variables declared of this type are
-						// aligned.  However, the attribute transparent_union must be moved from the typedef_name to
-						// alias union U.  Currently, this is the only know attribute that must be moved from typedef to
-						// alias.
-
-						// If typedef is an alias for a union, then its alias type was hoisted above and remembered.
-						if ( auto unionInstType = typedefDecl->base.as<ast::UnionInstType>() ) {
-							auto instType = ast::mutate( unionInstType );
-							// Remove all transparent_union attributes from typedef and move to alias union.
-							for ( auto attr = instType->attributes.begin() ; attr != instType->attributes.end() ; ) { // forward order
-								assert( *attr );
-								if ( (*attr)->name == "transparent_union" || (*attr)->name == "__transparent_union__" ) {
-									unionDecl->attributes.emplace_back( attr->release() );
-									attr = instType->attributes.erase( attr );
-								} else {
-									attr++;
-								} // if
-							} // for
-							typedefDecl->base = instType;
-						} // if
-					} // if
+			if ( ast::Decl * decl = cur->build() ) {
+				moveUnionAttribute( decl, unionDecl );
+
+				if ( "" == decl->name && !cur->get_inLine() ) {
+					// Don't include anonymous declaration for named aggregates,
+					// but do include them for anonymous aggregates, e.g.:
+					// struct S {
+					//   struct T { int x; }; // no anonymous member
+					//   struct { int y; };   // anonymous member
+					//   struct T;            // anonymous member
+					// };
+					if ( extracted_named ) {
+						continue;
+					}
+
+					if ( auto name = getInstTypeOfName( decl ) ) {
+						// Temporary: warn about anonymous member declarations of named types, since
+						// this conflicts with the syntax for the forward declaration of an anonymous type.
+						SemanticWarning( cur->location, Warning::AggrForwardDecl, name->c_str() );
+					}
 				} // if
-
-				// don't include anonymous declaration for named aggregates, but do include them for anonymous aggregates, e.g.:
-				// struct S {
-				//   struct T { int x; }; // no anonymous member
-				//   struct { int y; };   // anonymous member
-				//   struct T;            // anonymous member
-				// };
-				if ( ! (extracted && decl->name == "" && ! anon && ! cur->get_inLine()) ) {
-					if ( decl->name == "" ) {
-						if ( auto dwt = dynamic_cast<ast::DeclWithType *>( decl ) ) {
-							if ( auto aggr = dynamic_cast<ast::BaseInstType const *>( dwt->get_type() ) ) {
-								if ( aggr->name.find("anonymous") == std::string::npos ) {
-									if ( ! cur->get_inLine() ) {
-										// temporary: warn about anonymous member declarations of named types, since
-										// this conflicts with the syntax for the forward declaration of an anonymous type
-										SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() );
-									} // if
-								} // if
-							} // if
-						} // if
-					} // if
-					decl->location = cur->location;
-					*out++ = decl;
-				} // if
+				*out++ = decl;
 			} // if
-		} catch( SemanticErrorException & e ) {
+		} catch ( SemanticErrorException & e ) {
 			errors.append( e );
 		} // try
@@ -1132,12 +1154,12 @@
 
 // currently only builds assertions, function parameters, and return values
-void buildList( const DeclarationNode * firstNode, std::vector<ast::ptr<ast::DeclWithType>> & outputList ) {
+void buildList( DeclarationNode * firstNode, std::vector<ast::ptr<ast::DeclWithType>> & outputList ) {
 	SemanticErrorException errors;
 	std::back_insert_iterator<std::vector<ast::ptr<ast::DeclWithType>>> out( outputList );
 
-	for ( const DeclarationNode * cur = firstNode; cur; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ) ) {
+	for ( const DeclarationNode * cur = firstNode; cur; cur = strict_next( cur ) ) {
 		try {
 			ast::Decl * decl = cur->build();
-			assert( decl );
+			assertf( decl, "buildList: build for ast::DeclWithType." );
 			if ( ast::DeclWithType * dwt = dynamic_cast<ast::DeclWithType *>( decl ) ) {
 				dwt->location = cur->location;
@@ -1168,6 +1190,8 @@
 				);
 				*out++ = obj;
+			} else {
+				assertf( false, "buildList: Could not convert to ast::DeclWithType." );
 			} // if
-		} catch( SemanticErrorException & e ) {
+		} catch ( SemanticErrorException & e ) {
 			errors.append( e );
 		} // try
@@ -1183,14 +1207,12 @@
 	SemanticErrorException errors;
 	std::back_insert_iterator<std::vector<ast::ptr<ast::Type>>> out( outputList );
-	const DeclarationNode * cur = firstNode;
-
-	while ( cur ) {
+
+	for ( const DeclarationNode * cur = firstNode ; cur ; cur = strict_next( cur ) ) {
 		try {
 			* out++ = cur->buildType();
-		} catch( SemanticErrorException & e ) {
+		} catch ( SemanticErrorException & e ) {
 			errors.append( e );
 		} // try
-		cur = dynamic_cast< DeclarationNode * >( cur->get_next() );
-	} // while
+	} // for
 
 	if ( ! errors.isEmpty() ) {
Index: src/Parser/DeclarationNode.h
===================================================================
--- src/Parser/DeclarationNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
+++ src/Parser/DeclarationNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -0,0 +1,219 @@
+//
+// 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.
+//
+// DeclarationNode.h --
+//
+// Author           : Andrew Beach
+// Created On       : Wed Apr  5 11:38:00 2023
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Apr  5 11:55:00 2023
+// Update Count     : 0
+//
+
+#pragma once
+
+#include "ParseNode.h"
+
+struct TypeData;
+class InitializerNode;
+
+struct DeclarationNode : public ParseNode {
+	// These enumerations must harmonize with their names in DeclarationNode.cc.
+	enum BasicType {
+		Void, Bool, Char, Int, Int128,
+		Float, Double, LongDouble, uuFloat80, uuFloat128,
+		uFloat16, uFloat32, uFloat32x, uFloat64, uFloat64x, uFloat128, uFloat128x,
+		NoBasicType
+	};
+	static const char * basicTypeNames[];
+	enum ComplexType { Complex, NoComplexType, Imaginary };
+	// Imaginary unsupported => parse, but make invisible and print error message
+	static const char * complexTypeNames[];
+	enum Signedness { Signed, Unsigned, NoSignedness };
+	static const char * signednessNames[];
+	enum Length { Short, Long, LongLong, NoLength };
+	static const char * lengthNames[];
+	enum BuiltinType { Valist, AutoType, Zero, One, NoBuiltinType };
+	static const char * builtinTypeNames[];
+
+	static DeclarationNode * newStorageClass( ast::Storage::Classes );
+	static DeclarationNode * newFuncSpecifier( ast::Function::Specs );
+	static DeclarationNode * newTypeQualifier( ast::CV::Qualifiers );
+	static DeclarationNode * newBasicType( BasicType );
+	static DeclarationNode * newComplexType( ComplexType );
+	static DeclarationNode * newSignedNess( Signedness );
+	static DeclarationNode * newLength( Length );
+	static DeclarationNode * newBuiltinType( BuiltinType );
+	static DeclarationNode * newForall( DeclarationNode * );
+	static DeclarationNode * newFromTypedef( const std::string * );
+	static DeclarationNode * newFromGlobalScope();
+	static DeclarationNode * newQualifiedType( DeclarationNode *, DeclarationNode * );
+	static DeclarationNode * newFunction( const std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body );
+	static DeclarationNode * newAggregate( ast::AggregateDecl::Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
+	static DeclarationNode * newEnum( const std::string * name, DeclarationNode * constants, bool body, bool typed, DeclarationNode * base = nullptr, EnumHiding hiding = EnumHiding::Visible );
+	static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant );
+	static DeclarationNode * newEnumValueGeneric( const std::string * name, InitializerNode * init );
+	static DeclarationNode * newEnumInLine( const std::string name );
+	static DeclarationNode * newName( const std::string * );
+	static DeclarationNode * newFromTypeGen( const std::string *, ExpressionNode * params );
+	static DeclarationNode * newTypeParam( ast::TypeDecl::Kind, const std::string * );
+	static DeclarationNode * newTrait( const std::string * name, DeclarationNode * params, DeclarationNode * asserts );
+	static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params );
+	static DeclarationNode * newTypeDecl( const std::string * name, DeclarationNode * typeParams );
+	static DeclarationNode * newPointer( DeclarationNode * qualifiers, OperKinds kind );
+	static DeclarationNode * newArray( ExpressionNode * size, DeclarationNode * qualifiers, bool isStatic );
+	static DeclarationNode * newVarArray( DeclarationNode * qualifiers );
+	static DeclarationNode * newBitfield( ExpressionNode * size );
+	static DeclarationNode * newTuple( DeclarationNode * members );
+	static DeclarationNode * newTypeof( ExpressionNode * expr, bool basetypeof = false );
+	static DeclarationNode * newVtableType( DeclarationNode * expr );
+	static DeclarationNode * newAttribute( const std::string *, ExpressionNode * expr = nullptr ); // gcc attributes
+	static DeclarationNode * newDirectiveStmt( StatementNode * stmt ); // gcc external directive statement
+	static DeclarationNode * newAsmStmt( StatementNode * stmt ); // gcc external asm statement
+	static DeclarationNode * newStaticAssert( ExpressionNode * condition, ast::Expr * message );
+
+	DeclarationNode();
+	~DeclarationNode();
+	DeclarationNode * clone() const override;
+
+	DeclarationNode * addQualifiers( DeclarationNode * );
+	void checkQualifiers( const TypeData *, const TypeData * );
+	void checkSpecifiers( DeclarationNode * );
+	DeclarationNode * copySpecifiers( DeclarationNode * );
+	DeclarationNode * addType( DeclarationNode * );
+	DeclarationNode * addTypedef();
+	DeclarationNode * addEnumBase( DeclarationNode * );
+	DeclarationNode * addAssertions( DeclarationNode * );
+	DeclarationNode * addName( std::string * );
+	DeclarationNode * addAsmName( DeclarationNode * );
+	DeclarationNode * addBitfield( ExpressionNode * size );
+	DeclarationNode * addVarArgs();
+	DeclarationNode * addFunctionBody( StatementNode * body, ExpressionNode * with = nullptr );
+	DeclarationNode * addOldDeclList( DeclarationNode * list );
+	DeclarationNode * setBase( TypeData * newType );
+	DeclarationNode * copyAttribute( DeclarationNode * attr );
+	DeclarationNode * addPointer( DeclarationNode * qualifiers );
+	DeclarationNode * addArray( DeclarationNode * array );
+	DeclarationNode * addNewPointer( DeclarationNode * pointer );
+	DeclarationNode * addNewArray( DeclarationNode * array );
+	DeclarationNode * addParamList( DeclarationNode * list );
+	DeclarationNode * addIdList( DeclarationNode * list ); // old-style functions
+	DeclarationNode * addInitializer( InitializerNode * init );
+	DeclarationNode * addTypeInitializer( DeclarationNode * init );
+
+	DeclarationNode * cloneType( std::string * newName );
+	DeclarationNode * cloneBaseType( DeclarationNode * newdecl );
+
+	DeclarationNode * appendList( DeclarationNode * node ) {
+		return (DeclarationNode *)set_last( node );
+	}
+
+	virtual void print( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
+	virtual void printList( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
+
+	ast::Decl * build() const;
+	ast::Type * buildType() const;
+
+	ast::Linkage::Spec get_linkage() const { return linkage; }
+	DeclarationNode * extractAggregate() const;
+	bool has_enumeratorValue() const { return (bool)enumeratorValue; }
+	ExpressionNode * consume_enumeratorValue() const { return const_cast<DeclarationNode *>(this)->enumeratorValue.release(); }
+
+	bool get_extension() const { return extension; }
+	DeclarationNode * set_extension( bool exten ) { extension = exten; return this; }
+
+	bool get_inLine() const { return inLine; }
+	DeclarationNode * set_inLine( bool inL ) { inLine = inL; return this; }
+
+	DeclarationNode * get_last() { return (DeclarationNode *)ParseNode::get_last(); }
+
+	struct Variable_t {
+//		const std::string * name;
+		ast::TypeDecl::Kind tyClass;
+		DeclarationNode * assertions;
+		DeclarationNode * initializer;
+	};
+	Variable_t variable;
+
+	struct StaticAssert_t {
+		ExpressionNode * condition;
+		ast::Expr * message;
+	};
+	StaticAssert_t assert;
+
+	BuiltinType builtin = NoBuiltinType;
+
+	TypeData * type = nullptr;
+
+	bool inLine = false;
+	bool enumInLine = false;
+	ast::Function::Specs funcSpecs;
+	ast::Storage::Classes storageClasses;
+
+	ExpressionNode * bitfieldWidth = nullptr;
+	std::unique_ptr<ExpressionNode> enumeratorValue;
+	bool hasEllipsis = false;
+	ast::Linkage::Spec linkage;
+	ast::Expr * asmName = nullptr;
+	std::vector<ast::ptr<ast::Attribute>> attributes;
+	InitializerNode * initializer = nullptr;
+	bool extension = false;
+	std::string error;
+	StatementNode * asmStmt = nullptr;
+	StatementNode * directiveStmt = nullptr;
+
+	static UniqueName anonymous;
+}; // DeclarationNode
+
+ast::Type * buildType( TypeData * type );
+
+static inline ast::Type * maybeMoveBuildType( const DeclarationNode * orig ) {
+	ast::Type * ret = orig ? orig->buildType() : nullptr;
+	delete orig;
+	return ret;
+}
+
+template<typename NodeType>
+NodeType * strict_next( NodeType * node ) {
+	ParseNode * next = node->get_next();
+	if ( nullptr == next ) return nullptr;
+	if ( NodeType * ret = dynamic_cast<NodeType *>( next ) ) return ret;
+	SemanticError( next->location, "internal error, non-homogeneous nodes founds in buildList processing." );
+}
+
+// This generic buildList is here along side its overloads.
+template<typename AstType, typename NodeType,
+		template<typename, typename...> class Container, typename... Args>
+void buildList( NodeType * firstNode,
+		Container<ast::ptr<AstType>, Args...> & output ) {
+	SemanticErrorException errors;
+	std::back_insert_iterator<Container<ast::ptr<AstType>, Args...>> out( output );
+
+	for ( NodeType * cur = firstNode ; cur ; cur = strict_next( cur ) ) {
+		try {
+			AstType * node = dynamic_cast<AstType *>( maybeBuild( cur ) );
+			assertf( node, "buildList: Did not build node of correct type." );
+			*out++ = node;
+		} catch ( SemanticErrorException & e ) {
+			errors.append( e );
+		} // try
+	} // for
+	if ( ! errors.isEmpty() ) {
+		throw errors;
+	} // if
+}
+
+void buildList( DeclarationNode * firstNode, std::vector<ast::ptr<ast::Decl>> & outputList );
+void buildList( DeclarationNode * firstNode, std::vector<ast::ptr<ast::DeclWithType>> & outputList );
+void buildTypeList( const DeclarationNode * firstNode, std::vector<ast::ptr<ast::Type>> & outputList );
+
+template<typename AstType, typename NodeType,
+		template<typename, typename...> class Container, typename... Args>
+void buildMoveList( NodeType * firstNode,
+		Container<ast::ptr<AstType>, Args...> & output ) {
+	buildList<AstType, NodeType, Container, Args...>( firstNode, output );
+	delete firstNode;
+}
Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/ExpressionNode.cc	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -13,4 +13,6 @@
 // Update Count     : 1083
 //
+
+#include "ExpressionNode.h"
 
 #include <cassert>                 // for assert
@@ -25,5 +27,6 @@
 #include "Common/SemanticError.h"  // for SemanticError
 #include "Common/utility.h"        // for maybeMoveBuild, maybeBuild, CodeLo...
-#include "ParseNode.h"             // for ExpressionNode, maybeMoveBuildType
+#include "DeclarationNode.h"       // for DeclarationNode
+#include "InitializerNode.h"       // for InitializerNode
 #include "parserutility.h"         // for notZeroExpr
 
@@ -699,11 +702,4 @@
 } // build_binary_val
 
-ast::Expr * build_binary_ptr( const CodeLocation & location,
-		OperKinds op,
-		ExpressionNode * expr_node1,
-		ExpressionNode * expr_node2 ) {
-	return build_binary_val( location, op, expr_node1, expr_node2 );
-} // build_binary_ptr
-
 ast::Expr * build_cond( const CodeLocation & location,
 		ExpressionNode * expr_node1,
Index: src/Parser/ExpressionNode.h
===================================================================
--- src/Parser/ExpressionNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
+++ src/Parser/ExpressionNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -0,0 +1,84 @@
+//
+// 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.
+//
+// ExpressionNode.h --
+//
+// Author           : Andrew Beach
+// Created On       : Wed Apr  5 11:34:00 2023
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Apr  5 11:50:00 2023
+// Update Count     : 0
+//
+
+#pragma once
+
+#include "ParseNode.h"
+
+class InitializerNode;
+
+class ExpressionNode final : public ParseNode {
+public:
+	ExpressionNode( ast::Expr * expr = nullptr ) : expr( expr ) {}
+	virtual ~ExpressionNode() {}
+	virtual ExpressionNode * clone() const override {
+		if ( nullptr == expr ) return nullptr;
+		return static_cast<ExpressionNode*>(
+			(new ExpressionNode( ast::shallowCopy( expr.get() ) ))->set_next( maybeCopy( get_next() ) ));
+	}
+
+	bool get_extension() const { return extension; }
+	ExpressionNode * set_extension( bool exten ) { extension = exten; return this; }
+
+	virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
+		os << expr.get();
+	}
+	void printOneLine( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {}
+
+	template<typename T>
+	bool isExpressionType() const {  return nullptr != dynamic_cast<T>(expr.get()); }
+
+	ast::Expr * build() {
+		ast::Expr * node = expr.release();
+		node->set_extension( this->get_extension() );
+		node->location = this->location;
+		return node;
+	}
+
+	// Public because of lifetime implications (what lifetime implications?)
+	std::unique_ptr<ast::Expr> expr;
+private:
+	bool extension = false;
+}; // ExpressionNode
+
+// These 4 routines modify the string:
+ast::Expr * build_constantInteger( const CodeLocation &, std::string & );
+ast::Expr * build_constantFloat( const CodeLocation &, std::string & );
+ast::Expr * build_constantChar( const CodeLocation &, std::string & );
+ast::Expr * build_constantStr( const CodeLocation &, std::string & );
+ast::Expr * build_field_name_FLOATING_FRACTIONconstant( const CodeLocation &, const std::string & str );
+ast::Expr * build_field_name_FLOATING_DECIMALconstant( const CodeLocation &, const std::string & str );
+ast::Expr * build_field_name_FLOATINGconstant( const CodeLocation &, const std::string & str );
+ast::Expr * build_field_name_fraction_constants( const CodeLocation &, ast::Expr * fieldName, ExpressionNode * fracts );
+
+ast::NameExpr * build_varref( const CodeLocation &, const std::string * name );
+ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation &, const DeclarationNode * decl_node, const ast::NameExpr * name );
+ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation &, const ast::EnumDecl * decl, const ast::NameExpr * name );
+ast::DimensionExpr * build_dimensionref( const CodeLocation &, const std::string * name );
+
+ast::Expr * build_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node );
+ast::Expr * build_keyword_cast( const CodeLocation &, ast::AggregateDecl::Aggregate target, ExpressionNode * expr_node );
+ast::Expr * build_virtual_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node );
+ast::Expr * build_fieldSel( const CodeLocation &, ExpressionNode * expr_node, ast::Expr * member );
+ast::Expr * build_pfieldSel( const CodeLocation &, ExpressionNode * expr_node, ast::Expr * member );
+ast::Expr * build_offsetOf( const CodeLocation &, DeclarationNode * decl_node, ast::NameExpr * member );
+ast::Expr * build_and( const CodeLocation &, ExpressionNode * expr_node1, ExpressionNode * expr_node2 );
+ast::Expr * build_and_or( const CodeLocation &, ExpressionNode * expr_node1, ExpressionNode * expr_node2, ast::LogicalFlag flag );
+ast::Expr * build_unary_val( const CodeLocation &, OperKinds op, ExpressionNode * expr_node );
+ast::Expr * build_binary_val( const CodeLocation &, OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 );
+ast::Expr * build_cond( const CodeLocation &, ExpressionNode * expr_node1, ExpressionNode * expr_node2, ExpressionNode * expr_node3 );
+ast::Expr * build_tuple( const CodeLocation &, ExpressionNode * expr_node = nullptr );
+ast::Expr * build_func( const CodeLocation &, ExpressionNode * function, ExpressionNode * expr_node );
+ast::Expr * build_compoundLiteral( const CodeLocation &, DeclarationNode * decl_node, InitializerNode * kids );
Index: src/Parser/InitializerNode.cc
===================================================================
--- src/Parser/InitializerNode.cc	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/InitializerNode.cc	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -14,9 +14,9 @@
 //
 
+#include "InitializerNode.h"
+
 #include <iostream>                // for operator<<, ostream, basic_ostream
 #include <list>                    // for list
 #include <string>                  // for operator<<, string
-
-using namespace std;
 
 #include "AST/Expr.hpp"            // for Expr
@@ -24,5 +24,8 @@
 #include "Common/SemanticError.h"  // for SemanticError
 #include "Common/utility.h"        // for maybeBuild
-#include "ParseNode.h"             // for InitializerNode, ExpressionNode
+#include "ExpressionNode.h"        // for ExpressionNode
+#include "DeclarationNode.h"       // for buildList
+
+using namespace std;
 
 static ast::ConstructFlag toConstructFlag( bool maybeConstructed ) {
Index: src/Parser/InitializerNode.h
===================================================================
--- src/Parser/InitializerNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
+++ src/Parser/InitializerNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -0,0 +1,51 @@
+//
+// 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.
+//
+// InitializerNode.h --
+//
+// Author           : Andrew Beach
+// Created On       : Wed Apr  5 11:31:00 2023
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Apr  5 11:48:00 2023
+// Update Count     : 0
+//
+
+#pragma once
+
+#include "ParseNode.h"
+
+class InitializerNode : public ParseNode {
+public:
+	InitializerNode( ExpressionNode *, bool aggrp = false, ExpressionNode * des = nullptr );
+	InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode * des = nullptr );
+	InitializerNode( bool isDelete );
+	~InitializerNode();
+	virtual InitializerNode * clone() const { assert( false ); return nullptr; }
+
+	ExpressionNode * get_expression() const { return expr; }
+
+	InitializerNode * set_designators( ExpressionNode * des ) { designator = des; return this; }
+	ExpressionNode * get_designators() const { return designator; }
+
+	InitializerNode * set_maybeConstructed( bool value ) { maybeConstructed = value; return this; }
+	bool get_maybeConstructed() const { return maybeConstructed; }
+
+	bool get_isDelete() const { return isDelete; }
+
+	InitializerNode * next_init() const { return kids; }
+
+	void print( std::ostream & os, int indent = 0 ) const;
+	void printOneLine( std::ostream & ) const;
+
+	virtual ast::Init * build() const;
+private:
+	ExpressionNode * expr;
+	bool aggregate;
+	ExpressionNode * designator;                        // may be list
+	InitializerNode * kids;
+	bool maybeConstructed;
+	bool isDelete;
+}; // InitializerNode
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/ParseNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -38,4 +38,5 @@
 class DeclarationWithType;
 class Initializer;
+class InitializerNode;
 class ExpressionNode;
 struct StatementNode;
@@ -80,75 +81,4 @@
 }; // ParseNode
 
-//##############################################################################
-
-class InitializerNode : public ParseNode {
-  public:
-	InitializerNode( ExpressionNode *, bool aggrp = false, ExpressionNode * des = nullptr );
-	InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode * des = nullptr );
-	InitializerNode( bool isDelete );
-	~InitializerNode();
-	virtual InitializerNode * clone() const { assert( false ); return nullptr; }
-
-	ExpressionNode * get_expression() const { return expr; }
-
-	InitializerNode * set_designators( ExpressionNode * des ) { designator = des; return this; }
-	ExpressionNode * get_designators() const { return designator; }
-
-	InitializerNode * set_maybeConstructed( bool value ) { maybeConstructed = value; return this; }
-	bool get_maybeConstructed() const { return maybeConstructed; }
-
-	bool get_isDelete() const { return isDelete; }
-
-	InitializerNode * next_init() const { return kids; }
-
-	void print( std::ostream & os, int indent = 0 ) const;
-	void printOneLine( std::ostream & ) const;
-
-	virtual ast::Init * build() const;
-  private:
-	ExpressionNode * expr;
-	bool aggregate;
-	ExpressionNode * designator;						// may be list
-	InitializerNode * kids;
-	bool maybeConstructed;
-	bool isDelete;
-}; // InitializerNode
-
-//##############################################################################
-
-class ExpressionNode final : public ParseNode {
-  public:
-	ExpressionNode( ast::Expr * expr = nullptr ) : expr( expr ) {}
-	virtual ~ExpressionNode() {}
-	virtual ExpressionNode * clone() const override {
-		if ( nullptr == expr ) return nullptr;
-		return static_cast<ExpressionNode*>(
-			(new ExpressionNode( ast::shallowCopy( expr.get() ) ))->set_next( maybeCopy( get_next() ) ));
-	}
-
-	bool get_extension() const { return extension; }
-	ExpressionNode * set_extension( bool exten ) { extension = exten; return this; }
-
-	virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
-		os << expr.get();
-	}
-	void printOneLine( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {}
-
-	template<typename T>
-	bool isExpressionType() const {	return nullptr != dynamic_cast<T>(expr.get()); }
-
-	ast::Expr * build() const {
-		ast::Expr * node = const_cast<ExpressionNode *>(this)->expr.release();
-		node->set_extension( this->get_extension() );
-		node->location = this->location;
-		return node;
-	}
-
-	// Public because of lifetime implications (what lifetime implications?)
-	std::unique_ptr<ast::Expr> expr;
-  private:
-	bool extension = false;
-}; // ExpressionNode
-
 // Must harmonize with OperName.
 enum class OperKinds {
@@ -169,330 +99,4 @@
 };
 
-// These 4 routines modify the string:
-ast::Expr * build_constantInteger( const CodeLocation &, std::string & );
-ast::Expr * build_constantFloat( const CodeLocation &, std::string & );
-ast::Expr * build_constantChar( const CodeLocation &, std::string & );
-ast::Expr * build_constantStr( const CodeLocation &, std::string & );
-ast::Expr * build_field_name_FLOATING_FRACTIONconstant( const CodeLocation &, const std::string & str );
-ast::Expr * build_field_name_FLOATING_DECIMALconstant( const CodeLocation &, const std::string & str );
-ast::Expr * build_field_name_FLOATINGconstant( const CodeLocation &, const std::string & str );
-ast::Expr * build_field_name_fraction_constants( const CodeLocation &, ast::Expr * fieldName, ExpressionNode * fracts );
-
-ast::NameExpr * build_varref( const CodeLocation &, const std::string * name );
-ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation &, const DeclarationNode * decl_node, const ast::NameExpr * name );
-ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation &, const ast::EnumDecl * decl, const ast::NameExpr * name );
-ast::DimensionExpr * build_dimensionref( const CodeLocation &, const std::string * name );
-
-ast::Expr * build_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node );
-ast::Expr * build_keyword_cast( const CodeLocation &, ast::AggregateDecl::Aggregate target, ExpressionNode * expr_node );
-ast::Expr * build_virtual_cast( const CodeLocation &, DeclarationNode * decl_node, ExpressionNode * expr_node );
-ast::Expr * build_fieldSel( const CodeLocation &, ExpressionNode * expr_node, ast::Expr * member );
-ast::Expr * build_pfieldSel( const CodeLocation &, ExpressionNode * expr_node, ast::Expr * member );
-ast::Expr * build_offsetOf( const CodeLocation &, DeclarationNode * decl_node, ast::NameExpr * member );
-ast::Expr * build_and( const CodeLocation &, ExpressionNode * expr_node1, ExpressionNode * expr_node2 );
-ast::Expr * build_and_or( const CodeLocation &, ExpressionNode * expr_node1, ExpressionNode * expr_node2, ast::LogicalFlag flag );
-ast::Expr * build_unary_val( const CodeLocation &, OperKinds op, ExpressionNode * expr_node );
-ast::Expr * build_binary_val( const CodeLocation &, OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 );
-ast::Expr * build_binary_ptr( const CodeLocation &, OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 );
-ast::Expr * build_cond( const CodeLocation &, ExpressionNode * expr_node1, ExpressionNode * expr_node2, ExpressionNode * expr_node3 );
-ast::Expr * build_tuple( const CodeLocation &, ExpressionNode * expr_node = nullptr );
-ast::Expr * build_func( const CodeLocation &, ExpressionNode * function, ExpressionNode * expr_node );
-ast::Expr * build_compoundLiteral( const CodeLocation &, DeclarationNode * decl_node, InitializerNode * kids );
-
-//##############################################################################
-
-struct TypeData;
-
-struct DeclarationNode : public ParseNode {
-	// These enumerations must harmonize with their names in DeclarationNode.cc.
-	enum BasicType {
-		Void, Bool, Char, Int, Int128,
-		Float, Double, LongDouble, uuFloat80, uuFloat128,
-		uFloat16, uFloat32, uFloat32x, uFloat64, uFloat64x, uFloat128, uFloat128x,
-		NoBasicType
-	};
-	static const char * basicTypeNames[];
-	enum ComplexType { Complex, NoComplexType, Imaginary };	// Imaginary unsupported => parse, but make invisible and print error message
-	static const char * complexTypeNames[];
-	enum Signedness { Signed, Unsigned, NoSignedness };
-	static const char * signednessNames[];
-	enum Length { Short, Long, LongLong, NoLength };
-	static const char * lengthNames[];
-	enum BuiltinType { Valist, AutoType, Zero, One, NoBuiltinType };
-	static const char * builtinTypeNames[];
-
-	static DeclarationNode * newStorageClass( ast::Storage::Classes );
-	static DeclarationNode * newFuncSpecifier( ast::Function::Specs );
-	static DeclarationNode * newTypeQualifier( ast::CV::Qualifiers );
-	static DeclarationNode * newBasicType( BasicType );
-	static DeclarationNode * newComplexType( ComplexType );
-	static DeclarationNode * newSignedNess( Signedness );
-	static DeclarationNode * newLength( Length );
-	static DeclarationNode * newBuiltinType( BuiltinType );
-	static DeclarationNode * newForall( DeclarationNode * );
-	static DeclarationNode * newFromTypedef( const std::string * );
-	static DeclarationNode * newFromGlobalScope();
-	static DeclarationNode * newQualifiedType( DeclarationNode *, DeclarationNode * );
-	static DeclarationNode * newFunction( const std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body );
-	static DeclarationNode * newAggregate( ast::AggregateDecl::Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
-	static DeclarationNode * newEnum( const std::string * name, DeclarationNode * constants, bool body, bool typed, DeclarationNode * base = nullptr, EnumHiding hiding = EnumHiding::Visible );
-	static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant );
-	static DeclarationNode * newEnumValueGeneric( const std::string * name, InitializerNode * init );
-	static DeclarationNode * newEnumInLine( const std::string name );
-	static DeclarationNode * newName( const std::string * );
-	static DeclarationNode * newFromTypeGen( const std::string *, ExpressionNode * params );
-	static DeclarationNode * newTypeParam( ast::TypeDecl::Kind, const std::string * );
-	static DeclarationNode * newTrait( const std::string * name, DeclarationNode * params, DeclarationNode * asserts );
-	static DeclarationNode * newTraitUse( const std::string * name, ExpressionNode * params );
-	static DeclarationNode * newTypeDecl( const std::string * name, DeclarationNode * typeParams );
-	static DeclarationNode * newPointer( DeclarationNode * qualifiers, OperKinds kind );
-	static DeclarationNode * newArray( ExpressionNode * size, DeclarationNode * qualifiers, bool isStatic );
-	static DeclarationNode * newVarArray( DeclarationNode * qualifiers );
-	static DeclarationNode * newBitfield( ExpressionNode * size );
-	static DeclarationNode * newTuple( DeclarationNode * members );
-	static DeclarationNode * newTypeof( ExpressionNode * expr, bool basetypeof = false );
-	static DeclarationNode * newVtableType( DeclarationNode * expr );
-	static DeclarationNode * newAttribute( const std::string *, ExpressionNode * expr = nullptr ); // gcc attributes
-	static DeclarationNode * newDirectiveStmt( StatementNode * stmt ); // gcc external directive statement
-	static DeclarationNode * newAsmStmt( StatementNode * stmt ); // gcc external asm statement
-	static DeclarationNode * newStaticAssert( ExpressionNode * condition, ast::Expr * message );
-
-	DeclarationNode();
-	~DeclarationNode();
-	DeclarationNode * clone() const override;
-
-	DeclarationNode * addQualifiers( DeclarationNode * );
-	void checkQualifiers( const TypeData *, const TypeData * );
-	void checkSpecifiers( DeclarationNode * );
-	DeclarationNode * copySpecifiers( DeclarationNode * );
-	DeclarationNode * addType( DeclarationNode * );
-	DeclarationNode * addTypedef();
-	DeclarationNode * addEnumBase( DeclarationNode * );
-	DeclarationNode * addAssertions( DeclarationNode * );
-	DeclarationNode * addName( std::string * );
-	DeclarationNode * addAsmName( DeclarationNode * );
-	DeclarationNode * addBitfield( ExpressionNode * size );
-	DeclarationNode * addVarArgs();
-	DeclarationNode * addFunctionBody( StatementNode * body, ExpressionNode * with = nullptr );
-	DeclarationNode * addOldDeclList( DeclarationNode * list );
-	DeclarationNode * setBase( TypeData * newType );
-	DeclarationNode * copyAttribute( DeclarationNode * attr );
-	DeclarationNode * addPointer( DeclarationNode * qualifiers );
-	DeclarationNode * addArray( DeclarationNode * array );
-	DeclarationNode * addNewPointer( DeclarationNode * pointer );
-	DeclarationNode * addNewArray( DeclarationNode * array );
-	DeclarationNode * addParamList( DeclarationNode * list );
-	DeclarationNode * addIdList( DeclarationNode * list ); // old-style functions
-	DeclarationNode * addInitializer( InitializerNode * init );
-	DeclarationNode * addTypeInitializer( DeclarationNode * init );
-
-	DeclarationNode * cloneType( std::string * newName );
-	DeclarationNode * cloneBaseType( DeclarationNode * newdecl );
-
-	DeclarationNode * appendList( DeclarationNode * node ) {
-		return (DeclarationNode *)set_last( node );
-	}
-
-	virtual void print( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
-	virtual void printList( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
-
-	ast::Decl * build() const;
-	ast::Type * buildType() const;
-
-	ast::Linkage::Spec get_linkage() const { return linkage; }
-	DeclarationNode * extractAggregate() const;
-	bool has_enumeratorValue() const { return (bool)enumeratorValue; }
-	ExpressionNode * consume_enumeratorValue() const { return const_cast<DeclarationNode *>(this)->enumeratorValue.release(); }
-
-	bool get_extension() const { return extension; }
-	DeclarationNode * set_extension( bool exten ) { extension = exten; return this; }
-
-	bool get_inLine() const { return inLine; }
-	DeclarationNode * set_inLine( bool inL ) { inLine = inL; return this; }
-
-	DeclarationNode * get_last() { return (DeclarationNode *)ParseNode::get_last(); }
-
-	struct Variable_t {
-//		const std::string * name;
-		ast::TypeDecl::Kind tyClass;
-		DeclarationNode * assertions;
-		DeclarationNode * initializer;
-	};
-	Variable_t variable;
-
-	struct StaticAssert_t {
-		ExpressionNode * condition;
-		ast::Expr * message;
-	};
-	StaticAssert_t assert;
-
-	BuiltinType builtin = NoBuiltinType;
-
-	TypeData * type = nullptr;
-
-	bool inLine = false;
-	bool enumInLine = false;
-	ast::Function::Specs funcSpecs;
-	ast::Storage::Classes storageClasses;
-
-	ExpressionNode * bitfieldWidth = nullptr;
-	std::unique_ptr<ExpressionNode> enumeratorValue;
-	bool hasEllipsis = false;
-	ast::Linkage::Spec linkage;
-	ast::Expr * asmName = nullptr;
-	std::vector<ast::ptr<ast::Attribute>> attributes;
-	InitializerNode * initializer = nullptr;
-	bool extension = false;
-	std::string error;
-	StatementNode * asmStmt = nullptr;
-	StatementNode * directiveStmt = nullptr;
-
-	static UniqueName anonymous;
-}; // DeclarationNode
-
-ast::Type * buildType( TypeData * type );
-
-static inline ast::Type * maybeMoveBuildType( const DeclarationNode * orig ) {
-	ast::Type * ret = orig ? orig->buildType() : nullptr;
-	delete orig;
-	return ret;
-}
-
-//##############################################################################
-
-struct StatementNode final : public ParseNode {
-	StatementNode() :
-		stmt( nullptr ), clause( nullptr ) {}
-	StatementNode( ast::Stmt * stmt ) :
-		stmt( stmt ), clause( nullptr ) {}
-	StatementNode( ast::StmtClause * clause ) :
-		stmt( nullptr ), clause( clause ) {}
-	StatementNode( DeclarationNode * decl );
-	virtual ~StatementNode() {}
-
-	virtual StatementNode * clone() const final { assert( false ); return nullptr; }
-	ast::Stmt * build() const { return const_cast<StatementNode *>(this)->stmt.release(); }
-
-	virtual StatementNode * add_label(
-			const CodeLocation & location,
-			const std::string * name,
-			DeclarationNode * attr = nullptr ) {
-		stmt->labels.emplace_back( location,
-			*name,
-			attr ? std::move( attr->attributes )
-				: std::vector<ast::ptr<ast::Attribute>>{} );
-		delete attr;
-		delete name;
-		return this;
-	}
-
-	virtual StatementNode * append_last_case( StatementNode * );
-
-	virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
-		os << stmt.get() << std::endl;
-	}
-
-	std::unique_ptr<ast::Stmt> stmt;
-	std::unique_ptr<ast::StmtClause> clause;
-}; // StatementNode
-
-ast::Stmt * build_expr( CodeLocation const &, ExpressionNode * ctl );
-
-struct CondCtl {
-	CondCtl( DeclarationNode * decl, ExpressionNode * condition ) :
-		init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {}
-
-	StatementNode * init;
-	ExpressionNode * condition;
-};
-
-struct ForCtrl {
-	ForCtrl( StatementNode * stmt, ExpressionNode * condition, ExpressionNode * change ) :
-		init( stmt ), condition( condition ), change( change ) {}
-
-	StatementNode * init;
-	ExpressionNode * condition;
-	ExpressionNode * change;
-};
-
-ast::Stmt * build_if( const CodeLocation &, CondCtl * ctl, StatementNode * then, StatementNode * else_ );
-ast::Stmt * build_switch( const CodeLocation &, bool isSwitch, ExpressionNode * ctl, StatementNode * stmt );
-ast::CaseClause * build_case( ExpressionNode * ctl );
-ast::CaseClause * build_default( const CodeLocation & );
-ast::Stmt * build_while( const CodeLocation &, CondCtl * ctl, StatementNode * stmt, StatementNode * else_ = nullptr );
-ast::Stmt * build_do_while( const CodeLocation &, ExpressionNode * ctl, StatementNode * stmt, StatementNode * else_ = nullptr );
-ast::Stmt * build_for( const CodeLocation &, ForCtrl * forctl, StatementNode * stmt, StatementNode * else_ = nullptr );
-ast::Stmt * build_branch( const CodeLocation &, ast::BranchStmt::Kind kind );
-ast::Stmt * build_branch( const CodeLocation &, std::string * identifier, ast::BranchStmt::Kind kind );
-ast::Stmt * build_computedgoto( ExpressionNode * ctl );
-ast::Stmt * build_return( const CodeLocation &, ExpressionNode * ctl );
-ast::Stmt * build_throw( const CodeLocation &, ExpressionNode * ctl );
-ast::Stmt * build_resume( const CodeLocation &, ExpressionNode * ctl );
-ast::Stmt * build_resume_at( ExpressionNode * ctl , ExpressionNode * target );
-ast::Stmt * build_try( const CodeLocation &, StatementNode * try_, StatementNode * catch_, StatementNode * finally_ );
-ast::CatchClause * build_catch( const CodeLocation &, ast::ExceptionKind kind, DeclarationNode * decl, ExpressionNode * cond, StatementNode * body );
-ast::FinallyClause * build_finally( const CodeLocation &, StatementNode * stmt );
-ast::Stmt * build_compound( const CodeLocation &, StatementNode * first );
-StatementNode * maybe_build_compound( const CodeLocation &, StatementNode * first );
-ast::Stmt * build_asm( const CodeLocation &, bool voltile, ast::Expr * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );
-ast::Stmt * build_directive( const CodeLocation &, std::string * directive );
-ast::SuspendStmt * build_suspend( const CodeLocation &, StatementNode *, ast::SuspendStmt::Type );
-ast::WaitForStmt * build_waitfor( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, ExpressionNode * targetExpr, StatementNode * stmt );
-ast::WaitForStmt * build_waitfor_else( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, StatementNode * stmt );
-ast::WaitForStmt * build_waitfor_timeout( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, ExpressionNode * timeout, StatementNode * stmt );
-ast::WaitUntilStmt::ClauseNode * build_waituntil_clause( const CodeLocation &, ExpressionNode * when, ExpressionNode * targetExpr, StatementNode * stmt );
-ast::WaitUntilStmt::ClauseNode * build_waituntil_else( const CodeLocation &, ExpressionNode * when, StatementNode * stmt );
-ast::WaitUntilStmt::ClauseNode * build_waituntil_timeout( const CodeLocation &, ExpressionNode * when, ExpressionNode * timeout, StatementNode * stmt );
-ast::WaitUntilStmt * build_waituntil_stmt( const CodeLocation &, ast::WaitUntilStmt::ClauseNode * root );
-ast::Stmt * build_with( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
-ast::Stmt * build_mutex( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
-
-//##############################################################################
-
-template<typename AstType, typename NodeType,
-	template<typename, typename...> class Container, typename... Args>
-void buildList( const NodeType * firstNode,
-		Container<ast::ptr<AstType>, Args...> & output ) {
-	SemanticErrorException errors;
-	std::back_insert_iterator<Container<ast::ptr<AstType>, Args...>> out( output );
-	const NodeType * cur = firstNode;
-
-	while ( cur ) {
-		try {
-			if ( auto result = dynamic_cast<AstType *>( maybeBuild( cur ) ) ) {
-				*out++ = result;
-			} else {
-				assertf(false, __PRETTY_FUNCTION__ );
-				SemanticError( cur->location, "type specifier declaration in forall clause is currently unimplemented." );
-			} // if
-		} catch( SemanticErrorException & e ) {
-			errors.append( e );
-		} // try
-		const ParseNode * temp = cur->get_next();
-		// Should not return nullptr, then it is non-homogeneous:
-		cur = dynamic_cast<const NodeType *>( temp );
-		if ( !cur && temp ) {
-			SemanticError( temp->location, "internal error, non-homogeneous nodes founds in buildList processing." );
-		} // if
-	} // while
-	if ( ! errors.isEmpty() ) {
-		throw errors;
-	} // if
-}
-
-// in DeclarationNode.cc
-void buildList( const DeclarationNode * firstNode, std::vector<ast::ptr<ast::Decl>> & outputList );
-void buildList( const DeclarationNode * firstNode, std::vector<ast::ptr<ast::DeclWithType>> & outputList );
-void buildTypeList( const DeclarationNode * firstNode, std::vector<ast::ptr<ast::Type>> & outputList );
-
-template<typename AstType, typename NodeType,
-	template<typename, typename...> class Container, typename... Args>
-void buildMoveList( const NodeType * firstNode,
-		Container<ast::ptr<AstType>, Args...> & output ) {
-	buildList<AstType, NodeType, Container, Args...>( firstNode, output );
-	delete firstNode;
-}
-
-// in ParseNode.cc
 std::ostream & operator<<( std::ostream & out, const ParseNode * node );
 
Index: src/Parser/RunParser.cpp
===================================================================
--- src/Parser/RunParser.cpp	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/RunParser.cpp	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -20,5 +20,5 @@
 #include "CodeTools/TrackLoc.h"             // for fillLocations
 #include "Common/CodeLocationTools.hpp"     // for forceFillCodeLocations
-#include "Parser/ParseNode.h"               // for DeclarationNode, buildList
+#include "Parser/DeclarationNode.h"         // for DeclarationNode, buildList
 #include "Parser/TypedefTable.h"            // for TypedefTable
 
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/StatementNode.cc	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -11,7 +11,9 @@
 // Created On       : Sat May 16 14:59:41 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Tue Apr  4 11:40:00 2023
-// Update Count     : 427
+// Last Modified On : Tue Apr 11 10:16:00 2023
+// Update Count     : 428
 //
+
+#include "StatementNode.h"
 
 #include <cassert>                 // for assert, strict_dynamic_cast, assertf
@@ -23,5 +25,6 @@
 #include "Common/SemanticError.h"  // for SemanticError
 #include "Common/utility.h"        // for maybeMoveBuild, maybeBuild
-#include "ParseNode.h"             // for StatementNode, ExpressionNode, bui...
+#include "DeclarationNode.h"       // for DeclarationNode
+#include "ExpressionNode.h"        // for ExpressionNode
 #include "parserutility.h"         // for notZeroExpr
 
@@ -29,4 +32,19 @@
 
 using namespace std;
+
+// Some helpers for cases that really want a single node but check for lists.
+static const ast::Stmt * buildMoveSingle( StatementNode * node ) {
+	std::vector<ast::ptr<ast::Stmt>> list;
+	buildMoveList( node, list );
+	assertf( list.size() == 1, "CFA Internal Error: Extra/Missing Nodes" );
+	return list.front().release();
+}
+
+static const ast::Stmt * buildMoveOptional( StatementNode * node ) {
+	std::vector<ast::ptr<ast::Stmt>> list;
+	buildMoveList( node, list );
+	assertf( list.size() <= 1, "CFA Internal Error: Extra Nodes" );
+	return list.empty() ? nullptr : list.front().release();
+}
 
 StatementNode::StatementNode( DeclarationNode * decl ) {
@@ -53,15 +71,27 @@
 } // StatementNode::StatementNode
 
-StatementNode * StatementNode::append_last_case( StatementNode * stmt ) {
-	StatementNode * prev = this;
+StatementNode * StatementNode::add_label(
+		const CodeLocation & location,
+		const std::string * name,
+		DeclarationNode * attr ) {
+	stmt->labels.emplace_back( location,
+		*name,
+		attr ? std::move( attr->attributes )
+			: std::vector<ast::ptr<ast::Attribute>>{} );
+	delete attr;
+	delete name;
+	return this;
+}
+
+ClauseNode * ClauseNode::append_last_case( StatementNode * stmt ) {
+	ClauseNode * prev = this;
 	// find end of list and maintain previous pointer
-	for ( StatementNode * curr = prev; curr != nullptr; curr = (StatementNode *)curr->get_next() ) {
-		StatementNode * node = strict_dynamic_cast< StatementNode * >(curr);
-		assert( nullptr == node->stmt.get() );
+	for ( ClauseNode * curr = prev; curr != nullptr; curr = (ClauseNode *)curr->get_next() ) {
+		ClauseNode * node = strict_dynamic_cast< ClauseNode * >(curr);
 		assert( dynamic_cast<ast::CaseClause *>( node->clause.get() ) );
 		prev = curr;
 	} // for
+	ClauseNode * node = dynamic_cast< ClauseNode * >(prev);
 	// convert from StatementNode list to Statement list
-	StatementNode * node = dynamic_cast< StatementNode * >(prev);
 	std::vector<ast::ptr<ast::Stmt>> stmts;
 	buildMoveList( stmt, stmts );
@@ -73,5 +103,5 @@
 	stmts.clear();
 	return this;
-} // StatementNode::append_last_case
+} // ClauseNode::append_last_case
 
 ast::Stmt * build_expr( CodeLocation const & location, ExpressionNode * ctl ) {
@@ -97,7 +127,5 @@
 		for ( ast::ptr<ast::Stmt> & stmt : inits ) {
 			// build the && of all of the declared variables compared against 0
-			//auto declStmt = strict_dynamic_cast<ast::DeclStmt *>( stmt );
 			auto declStmt = stmt.strict_as<ast::DeclStmt>();
-			//ast::DeclWithType * dwt = strict_dynamic_cast<ast::DeclWithType *>( declStmt->decl );
 			auto dwt = declStmt->decl.strict_as<ast::DeclWithType>();
 			ast::Expr * nze = notZeroExpr( new ast::VariableExpr( dwt->location, dwt ) );
@@ -113,16 +141,6 @@
 	ast::Expr * astcond = build_if_control( ctl, astinit ); // ctl deleted, cond/init set
 
-	std::vector<ast::ptr<ast::Stmt>> aststmt;
-	buildMoveList( then, aststmt );
-	assert( aststmt.size() == 1 );
-	ast::Stmt const * astthen = aststmt.front().release();
-
-	ast::Stmt const * astelse = nullptr;
-	if ( else_ ) {
-		std::vector<ast::ptr<ast::Stmt>> aststmt;
-		buildMoveList( else_, aststmt );
-		assert( aststmt.size() == 1 );
-		astelse = aststmt.front().release();
-	} // if
+	ast::Stmt const * astthen = buildMoveSingle( then );
+	ast::Stmt const * astelse = buildMoveOptional( else_ );
 
 	return new ast::IfStmt( location, astcond, astthen, astelse,
@@ -131,42 +149,7 @@
 } // build_if
 
-// Temporary work around. Split StmtClause off from StatementNode.
-template<typename clause_t>
-static void buildMoveClauseList( StatementNode * firstNode,
-		std::vector<ast::ptr<clause_t>> & output ) {
-	SemanticErrorException errors;
-	std::back_insert_iterator<std::vector<ast::ptr<clause_t>>>
-		out( output );
-	StatementNode * cur = firstNode;
-
-	while ( cur ) {
-		try {
-			auto clause = cur->clause.release();
-			if ( auto result = dynamic_cast<clause_t *>( clause ) ) {
-				*out++ = result;
-			} else {
-				assertf(false, __PRETTY_FUNCTION__ );
-				SemanticError( cur->location, "type specifier declaration in forall clause is currently unimplemented." );
-			} // if
-		} catch( SemanticErrorException & e ) {
-			errors.append( e );
-		} // try
-		ParseNode * temp = cur->get_next();
-		// Should not return nullptr, then it is non-homogeneous:
-		cur = dynamic_cast<StatementNode *>( temp );
-		if ( !cur && temp ) {
-			SemanticError( temp->location, "internal error, non-homogeneous nodes founds in buildList processing." );
-		} // if
-	} // while
-	if ( ! errors.isEmpty() ) {
-		throw errors;
-	} // if
-	// Usually in the wrapper.
-	delete firstNode;
-}
-
-ast::Stmt * build_switch( const CodeLocation & location, bool isSwitch, ExpressionNode * ctl, StatementNode * stmt ) {
+ast::Stmt * build_switch( const CodeLocation & location, bool isSwitch, ExpressionNode * ctl, ClauseNode * stmt ) {
 	std::vector<ast::ptr<ast::CaseClause>> aststmt;
-	buildMoveClauseList( stmt, aststmt );
+	buildMoveList( stmt, aststmt );
 	// If it is not a switch it is a choose statement.
 	if ( ! isSwitch ) {
@@ -190,8 +173,8 @@
 } // build_switch
 
-ast::CaseClause * build_case( ExpressionNode * ctl ) {
+ast::CaseClause * build_case( const CodeLocation & location, ExpressionNode * ctl ) {
 	// stmt starts empty and then added to
 	auto expr = maybeMoveBuild( ctl );
-	return new ast::CaseClause( expr->location, expr, {} );
+	return new ast::CaseClause( location, expr, {} );
 } // build_case
 
@@ -205,37 +188,21 @@
 	ast::Expr * astcond = build_if_control( ctl, astinit ); // ctl deleted, cond/init set
 
-	std::vector<ast::ptr<ast::Stmt>> aststmt;						// loop body, compound created if empty
-	buildMoveList( stmt, aststmt );
-	assert( aststmt.size() == 1 );
-
-	std::vector<ast::ptr<ast::Stmt>> astelse;						// else clause, maybe empty
-	buildMoveList( else_, astelse );
-	assert( astelse.size() <= 1 );
-
 	return new ast::WhileDoStmt( location,
 		astcond,
-		aststmt.front(),
-		astelse.empty() ? nullptr : astelse.front().release(),
+		buildMoveSingle( stmt ),
+		buildMoveOptional( else_ ),
 		std::move( astinit ),
-		false
+		ast::While
 	);
 } // build_while
 
 ast::Stmt * build_do_while( const CodeLocation & location, ExpressionNode * ctl, StatementNode * stmt, StatementNode * else_ ) {
-	std::vector<ast::ptr<ast::Stmt>> aststmt;						// loop body, compound created if empty
-	buildMoveList( stmt, aststmt );
-	assert( aststmt.size() == 1 );						// compound created if empty
-
-	std::vector<ast::ptr<ast::Stmt>> astelse;						// else clause, maybe empty
-	buildMoveList( else_, astelse );
-	assert( astelse.size() <= 1 );
-
 	// do-while cannot have declarations in the contitional, so init is always empty
 	return new ast::WhileDoStmt( location,
 		notZeroExpr( maybeMoveBuild( ctl ) ),
-		aststmt.front(),
-		astelse.empty() ? nullptr : astelse.front().release(),
+		buildMoveSingle( stmt ),
+		buildMoveOptional( else_ ),
 		{},
-		true
+		ast::DoWhile
 	);
 } // build_do_while
@@ -251,12 +218,4 @@
 	astincr = maybeMoveBuild( forctl->change );
 	delete forctl;
-
-	std::vector<ast::ptr<ast::Stmt>> aststmt;						// loop body, compound created if empty
-	buildMoveList( stmt, aststmt );
-	assert( aststmt.size() == 1 );
-
-	std::vector<ast::ptr<ast::Stmt>> astelse;						// else clause, maybe empty
-	buildMoveList( else_, astelse );
-	assert( astelse.size() <= 1 );
 
 	return new ast::ForStmt( location,
@@ -264,6 +223,6 @@
 		astcond,
 		astincr,
-		aststmt.front(),
-		astelse.empty() ? nullptr : astelse.front().release()
+		buildMoveSingle( stmt ),
+		buildMoveOptional( else_ )
 	);
 } // build_for
@@ -326,7 +285,7 @@
 } // build_resume_at
 
-ast::Stmt * build_try( const CodeLocation & location, StatementNode * try_, StatementNode * catch_, StatementNode * finally_ ) {
+ast::Stmt * build_try( const CodeLocation & location, StatementNode * try_, ClauseNode * catch_, ClauseNode * finally_ ) {
 	std::vector<ast::ptr<ast::CatchClause>> aststmt;
-	buildMoveClauseList( catch_, aststmt );
+	buildMoveList( catch_, aststmt );
 	ast::CompoundStmt * tryBlock = strict_dynamic_cast<ast::CompoundStmt *>( maybeMoveBuild( try_ ) );
 	ast::FinallyClause * finallyBlock = nullptr;
@@ -342,35 +301,27 @@
 
 ast::CatchClause * build_catch( const CodeLocation & location, ast::ExceptionKind kind, DeclarationNode * decl, ExpressionNode * cond, StatementNode * body ) {
-	std::vector<ast::ptr<ast::Stmt>> aststmt;
-	buildMoveList( body, aststmt );
-	assert( aststmt.size() == 1 );
 	return new ast::CatchClause( location,
 		kind,
 		maybeMoveBuild( decl ),
 		maybeMoveBuild( cond ),
-		aststmt.front().release()
+		buildMoveSingle( body )
 	);
 } // build_catch
 
 ast::FinallyClause * build_finally( const CodeLocation & location, StatementNode * stmt ) {
-	std::vector<ast::ptr<ast::Stmt>> aststmt;
-	buildMoveList( stmt, aststmt );
-	assert( aststmt.size() == 1 );
 	return new ast::FinallyClause( location,
-		aststmt.front().strict_as<ast::CompoundStmt>()
+		strict_dynamic_cast<const ast::CompoundStmt *>(
+			buildMoveSingle( stmt )
+		)
 	);
 } // build_finally
 
-ast::SuspendStmt * build_suspend( const CodeLocation & location, StatementNode * then, ast::SuspendStmt::Type type ) {
-	std::vector<ast::ptr<ast::Stmt>> stmts;
-	buildMoveList( then, stmts );
-	ast::CompoundStmt const * then2 = nullptr;
-	if(!stmts.empty()) {
-		assert( stmts.size() == 1 );
-		then2 = stmts.front().strict_as<ast::CompoundStmt>();
-	}
-	auto node = new ast::SuspendStmt( location, then2, ast::SuspendStmt::None );
-	node->type = type;
-	return node;
+ast::SuspendStmt * build_suspend( const CodeLocation & location, StatementNode * then, ast::SuspendStmt::Kind kind ) {
+	return new ast::SuspendStmt( location,
+		strict_dynamic_cast<const ast::CompoundStmt *, nullptr>(
+			buildMoveOptional( then )
+		),
+		kind
+	);
 } // build_suspend
 
@@ -525,5 +476,5 @@
 
 // Question
-ast::Stmt * build_asm( const CodeLocation & location, bool voltile, ast::Expr * instruction, ExpressionNode * output, ExpressionNode * input, ExpressionNode * clobber, LabelNode * gotolabels ) {
+ast::Stmt * build_asm( const CodeLocation & location, bool is_volatile, ExpressionNode * instruction, ExpressionNode * output, ExpressionNode * input, ExpressionNode * clobber, LabelNode * gotolabels ) {
 	std::vector<ast::ptr<ast::Expr>> out, in;
 	std::vector<ast::ptr<ast::ConstantExpr>> clob;
@@ -533,6 +484,6 @@
 	buildMoveList( clobber, clob );
 	return new ast::AsmStmt( location,
-		voltile,
-		instruction,
+		is_volatile,
+		maybeMoveBuild( instruction ),
 		std::move( out ),
 		std::move( in ),
Index: src/Parser/StatementNode.h
===================================================================
--- src/Parser/StatementNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
+++ src/Parser/StatementNode.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -0,0 +1,107 @@
+//
+// 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.
+//
+// StatementNode.h --
+//
+// Author           : Andrew Beach
+// Created On       : Wed Apr  5 11:42:00 2023
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue Apr 11  9:43:00 2023
+// Update Count     : 1
+//
+
+#pragma once
+
+#include "ParseNode.h"
+
+struct StatementNode final : public ParseNode {
+	StatementNode() : stmt( nullptr ) {}
+	StatementNode( ast::Stmt * stmt ) : stmt( stmt ) {}
+	StatementNode( DeclarationNode * decl );
+	virtual ~StatementNode() {}
+
+	virtual StatementNode * clone() const final { assert( false ); return nullptr; }
+	ast::Stmt * build() { return stmt.release(); }
+
+	StatementNode * add_label(
+			const CodeLocation & location,
+			const std::string * name,
+			DeclarationNode * attr = nullptr );
+
+	virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
+		os << stmt.get() << std::endl;
+	}
+
+	std::unique_ptr<ast::Stmt> stmt;
+}; // StatementNode
+
+struct ClauseNode final : public ParseNode {
+	ClauseNode( ast::StmtClause * clause ) : clause( clause ) {}
+	virtual ~ClauseNode() {}
+
+	ClauseNode * set_last( ParseNode * newlast ) {
+		ParseNode::set_last( newlast );
+        return this;
+    }
+
+	virtual ClauseNode * clone() const final { assert( false ); return nullptr; }
+	ast::StmtClause * build() { return clause.release(); }
+
+	virtual ClauseNode * append_last_case( StatementNode * );
+
+	std::unique_ptr<ast::StmtClause> clause;
+};
+
+ast::Stmt * build_expr( CodeLocation const &, ExpressionNode * ctl );
+
+struct CondCtl {
+	CondCtl( DeclarationNode * decl, ExpressionNode * condition ) :
+		init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {}
+
+	StatementNode * init;
+	ExpressionNode * condition;
+};
+
+struct ForCtrl {
+	ForCtrl( StatementNode * stmt, ExpressionNode * condition, ExpressionNode * change ) :
+		init( stmt ), condition( condition ), change( change ) {}
+
+	StatementNode * init;
+	ExpressionNode * condition;
+	ExpressionNode * change;
+};
+
+ast::Stmt * build_if( const CodeLocation &, CondCtl * ctl, StatementNode * then, StatementNode * else_ );
+ast::Stmt * build_switch( const CodeLocation &, bool isSwitch, ExpressionNode * ctl, ClauseNode * stmt );
+ast::CaseClause * build_case( const CodeLocation &, ExpressionNode * ctl );
+ast::CaseClause * build_default( const CodeLocation & );
+ast::Stmt * build_while( const CodeLocation &, CondCtl * ctl, StatementNode * stmt, StatementNode * else_ = nullptr );
+ast::Stmt * build_do_while( const CodeLocation &, ExpressionNode * ctl, StatementNode * stmt, StatementNode * else_ = nullptr );
+ast::Stmt * build_for( const CodeLocation &, ForCtrl * forctl, StatementNode * stmt, StatementNode * else_ = nullptr );
+ast::Stmt * build_branch( const CodeLocation &, ast::BranchStmt::Kind kind );
+ast::Stmt * build_branch( const CodeLocation &, std::string * identifier, ast::BranchStmt::Kind kind );
+ast::Stmt * build_computedgoto( ExpressionNode * ctl );
+ast::Stmt * build_return( const CodeLocation &, ExpressionNode * ctl );
+ast::Stmt * build_throw( const CodeLocation &, ExpressionNode * ctl );
+ast::Stmt * build_resume( const CodeLocation &, ExpressionNode * ctl );
+ast::Stmt * build_resume_at( ExpressionNode * ctl , ExpressionNode * target );
+ast::Stmt * build_try( const CodeLocation &, StatementNode * try_, ClauseNode * catch_, ClauseNode * finally_ );
+ast::CatchClause * build_catch( const CodeLocation &, ast::ExceptionKind kind, DeclarationNode * decl, ExpressionNode * cond, StatementNode * body );
+ast::FinallyClause * build_finally( const CodeLocation &, StatementNode * stmt );
+ast::Stmt * build_compound( const CodeLocation &, StatementNode * first );
+StatementNode * maybe_build_compound( const CodeLocation &, StatementNode * first );
+ast::Stmt * build_asm( const CodeLocation &, bool is_volatile, ExpressionNode * instruction, ExpressionNode * output = nullptr, ExpressionNode * input = nullptr, ExpressionNode * clobber = nullptr, LabelNode * gotolabels = nullptr );
+ast::Stmt * build_directive( const CodeLocation &, std::string * directive );
+ast::SuspendStmt * build_suspend( const CodeLocation &, StatementNode *, ast::SuspendStmt::Kind );
+ast::WaitForStmt * build_waitfor( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, ExpressionNode * targetExpr, StatementNode * stmt );
+ast::WaitForStmt * build_waitfor_else( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, StatementNode * stmt );
+ast::WaitForStmt * build_waitfor_timeout( const CodeLocation &, ast::WaitForStmt * existing, ExpressionNode * when, ExpressionNode * timeout, StatementNode * stmt );
+ast::WaitUntilStmt::ClauseNode * build_waituntil_clause( const CodeLocation &, ExpressionNode * when, ExpressionNode * targetExpr, StatementNode * stmt );
+ast::WaitUntilStmt::ClauseNode * build_waituntil_else( const CodeLocation &, ExpressionNode * when, StatementNode * stmt );
+ast::WaitUntilStmt::ClauseNode * build_waituntil_timeout( const CodeLocation &, ExpressionNode * when, ExpressionNode * timeout, StatementNode * stmt );
+ast::WaitUntilStmt * build_waituntil_stmt( const CodeLocation &, ast::WaitUntilStmt::ClauseNode * root );
+ast::Stmt * build_with( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
+ast::Stmt * build_mutex( const CodeLocation &, ExpressionNode * exprs, StatementNode * stmt );
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/TypeData.cc	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -24,6 +24,6 @@
 #include "Common/SemanticError.h"  // for SemanticError
 #include "Common/utility.h"        // for splice, spliceBegin
-#include "Parser/parserutility.h"  // for maybeCopy, maybeBuild, maybeMoveB...
-#include "Parser/ParseNode.h"      // for DeclarationNode, ExpressionNode
+#include "Parser/ExpressionNode.h" // for ExpressionNode
+#include "Parser/StatementNode.h"  // for StatementNode
 
 class Attribute;
@@ -1397,5 +1397,5 @@
 		std::move( attributes ),
 		funcSpec,
-		isVarArgs
+		(isVarArgs) ? ast::VariableArgs : ast::FixedArgs
 	);
 	buildList( td->function.withExprs, decl->withExprs );
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/TypeData.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -16,10 +16,10 @@
 #pragma once
 
-#include <iosfwd>										// for ostream
-#include <list>											// for list
-#include <string>										// for string
+#include <iosfwd>                                   // for ostream
+#include <list>                                     // for list
+#include <string>                                   // for string
 
-#include "AST/Type.hpp"									// for Type
-#include "ParseNode.h"									// for DeclarationNode, DeclarationNode::Ag...
+#include "AST/Type.hpp"                             // for Type
+#include "DeclarationNode.h"                        // for DeclarationNode
 
 struct TypeData {
Index: src/Parser/TypedefTable.cc
===================================================================
--- src/Parser/TypedefTable.cc	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/TypedefTable.cc	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -16,29 +16,34 @@
 
 #include "TypedefTable.h"
-#include <cassert>										// for assert
-#include <iostream>
+
+#include <cassert>                                // for assert
+#include <string>                                 // for string
+#include <iostream>                               // for iostream
+
+#include "ExpressionNode.h"                       // for LabelNode
+#include "ParserTypes.h"                          // for Token
+#include "StatementNode.h"                        // for CondCtl, ForCtrl
+// This (generated) header must come late as it is missing includes.
+#include "parser.hh"              // for IDENTIFIER, TYPEDEFname, TYPEGENname
+
 using namespace std;
 
 #if 0
 #define debugPrint( code ) code
+
+static const char *kindName( int kind ) {
+	switch ( kind ) {
+	case IDENTIFIER: return "identifier";
+	case TYPEDIMname: return "typedim";
+	case TYPEDEFname: return "typedef";
+	case TYPEGENname: return "typegen";
+	default:
+		cerr << "Error: cfa-cpp internal error, invalid kind of identifier" << endl;
+		abort();
+	} // switch
+} // kindName
 #else
 #define debugPrint( code )
 #endif
-
-using namespace std;									// string, iostream
-
-debugPrint(
-	static const char *kindName( int kind ) {
-		switch ( kind ) {
-		case IDENTIFIER: return "identifier";
-		case TYPEDIMname: return "typedim";
-		case TYPEDEFname: return "typedef";
-		case TYPEGENname: return "typegen";
-		default:
-			cerr << "Error: cfa-cpp internal error, invalid kind of identifier" << endl;
-			abort();
-		} // switch
-	} // kindName
-);
 
 TypedefTable::~TypedefTable() {
@@ -78,4 +83,8 @@
 		typedefTable.addToEnclosingScope( name, kind, "MTD" );
 	} // if
+} // TypedefTable::makeTypedef
+
+void TypedefTable::makeTypedef( const string & name ) {
+	return makeTypedef( name, TYPEDEFname );
 } // TypedefTable::makeTypedef
 
Index: src/Parser/TypedefTable.h
===================================================================
--- src/Parser/TypedefTable.h	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/TypedefTable.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -19,11 +19,9 @@
 
 #include "Common/ScopedMap.h"							// for ScopedMap
-#include "ParserTypes.h"
-#include "parser.hh"									// for IDENTIFIER, TYPEDEFname, TYPEGENname
 
 class TypedefTable {
 	struct Note { size_t level; bool forall; };
 	typedef ScopedMap< std::string, int, Note > KindTable;
-	KindTable kindTable;	
+	KindTable kindTable;
 	unsigned int level = 0;
   public:
@@ -33,5 +31,6 @@
 	bool existsCurr( const std::string & identifier ) const;
 	int isKind( const std::string & identifier ) const;
-	void makeTypedef( const std::string & name, int kind = TYPEDEFname );
+	void makeTypedef( const std::string & name, int kind );
+	void makeTypedef( const std::string & name );
 	void addToScope( const std::string & identifier, int kind, const char * );
 	void addToEnclosingScope( const std::string & identifier, int kind, const char * );
Index: src/Parser/lex.ll
===================================================================
--- src/Parser/lex.ll	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/lex.ll	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -44,6 +44,13 @@
 
 #include "config.h"										// configure info
+#include "DeclarationNode.h"                            // for DeclarationNode
+#include "ExpressionNode.h"                             // for LabelNode
+#include "InitializerNode.h"                            // for InitializerNode
 #include "ParseNode.h"
+#include "ParserTypes.h"                                // for Token
+#include "StatementNode.h"                              // for CondCtl, ForCtrl
 #include "TypedefTable.h"
+// This (generated) header must come late as it is missing includes.
+#include "parser.hh"                                    // generated info
 
 string * build_postfix_name( string * name );
Index: src/Parser/module.mk
===================================================================
--- src/Parser/module.mk	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/module.mk	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -21,6 +21,9 @@
 SRC += \
        Parser/DeclarationNode.cc \
+       Parser/DeclarationNode.h \
        Parser/ExpressionNode.cc \
+       Parser/ExpressionNode.h \
        Parser/InitializerNode.cc \
+       Parser/InitializerNode.h \
        Parser/lex.ll \
        Parser/ParseNode.cc \
@@ -33,4 +36,5 @@
        Parser/RunParser.hpp \
        Parser/StatementNode.cc \
+       Parser/StatementNode.h \
        Parser/TypeData.cc \
        Parser/TypeData.h \
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/parser.yy	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -9,7 +9,7 @@
 // Author           : Peter A. Buhr
 // Created On       : Sat Sep  1 20:22:55 2001
-// Last Modified By : Andrew Beach
-// Last Modified On : Tue Apr  4 14:02:00 2023
-// Update Count     : 6329
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Apr 26 16:45:37 2023
+// Update Count     : 6330
 //
 
@@ -48,9 +48,12 @@
 using namespace std;
 
-#include "SynTree/Declaration.h"
-#include "ParseNode.h"
+#include "SynTree/Type.h"                               // for Type
+#include "DeclarationNode.h"                            // for DeclarationNode, ...
+#include "ExpressionNode.h"                             // for ExpressionNode, ...
+#include "InitializerNode.h"                            // for InitializerNode, ...
+#include "ParserTypes.h"
+#include "StatementNode.h"                              // for build_...
 #include "TypedefTable.h"
 #include "TypeData.h"
-#include "SynTree/LinkageSpec.h"
 #include "Common/SemanticError.h"						// error_str
 #include "Common/utility.h"								// for maybeMoveBuild, maybeBuild, CodeLo...
@@ -297,23 +300,21 @@
 %union {
 	Token tok;
-	ParseNode * pn;
-	ExpressionNode * en;
+	ExpressionNode * expr;
 	DeclarationNode * decl;
 	ast::AggregateDecl::Aggregate aggKey;
 	ast::TypeDecl::Kind tclass;
-	StatementNode * sn;
+	StatementNode * stmt;
+	ClauseNode * clause;
 	ast::WaitForStmt * wfs;
-    ast::WaitUntilStmt::ClauseNode * wuscn;
-	ast::Expr * constant;
+    ast::WaitUntilStmt::ClauseNode * wucn;
 	CondCtl * ifctl;
-	ForCtrl * fctl;
-	OperKinds compop;
-	LabelNode * label;
-	InitializerNode * in;
-	OperKinds op;
+	ForCtrl * forctl;
+	LabelNode * labels;
+	InitializerNode * init;
+	OperKinds oper;
 	std::string * str;
-	bool flag;
-	EnumHiding hide;
-	ast::ExceptionKind catch_kind;
+	bool is_volatile;
+	EnumHiding enum_hiding;
+	ast::ExceptionKind except_kind;
 	ast::GenericExpr * genexpr;
 }
@@ -381,51 +382,52 @@
 %type<tok> identifier					identifier_at				identifier_or_type_name		attr_name
 %type<tok> quasi_keyword
-%type<constant> string_literal
+%type<expr> string_literal
 %type<str> string_literal_list
 
-%type<hide> hide_opt					visible_hide_opt
+%type<enum_hiding> hide_opt					visible_hide_opt
 
 // expressions
-%type<en> constant
-%type<en> tuple							tuple_expression_list
-%type<op> ptrref_operator				unary_operator				assignment_operator			simple_assignment_operator	compound_assignment_operator
-%type<en> primary_expression			postfix_expression			unary_expression
-%type<en> cast_expression_list			cast_expression				exponential_expression		multiplicative_expression	additive_expression
-%type<en> shift_expression				relational_expression		equality_expression
-%type<en> AND_expression				exclusive_OR_expression		inclusive_OR_expression
-%type<en> logical_AND_expression		logical_OR_expression
-%type<en> conditional_expression		constant_expression			assignment_expression		assignment_expression_opt
-%type<en> comma_expression				comma_expression_opt
-%type<en> argument_expression_list_opt	argument_expression_list	argument_expression			default_initializer_opt
+%type<expr> constant
+%type<expr> tuple							tuple_expression_list
+%type<oper> ptrref_operator				unary_operator				assignment_operator			simple_assignment_operator	compound_assignment_operator
+%type<expr> primary_expression			postfix_expression			unary_expression
+%type<expr> cast_expression_list			cast_expression				exponential_expression		multiplicative_expression	additive_expression
+%type<expr> shift_expression				relational_expression		equality_expression
+%type<expr> AND_expression				exclusive_OR_expression		inclusive_OR_expression
+%type<expr> logical_AND_expression		logical_OR_expression
+%type<expr> conditional_expression		constant_expression			assignment_expression		assignment_expression_opt
+%type<expr> comma_expression				comma_expression_opt
+%type<expr> argument_expression_list_opt	argument_expression_list	argument_expression			default_initializer_opt
 %type<ifctl> conditional_declaration
-%type<fctl> for_control_expression		for_control_expression_list
-%type<compop> upupeq updown updowneq downupdowneq
-%type<en> subrange
+%type<forctl> for_control_expression		for_control_expression_list
+%type<oper> upupeq updown updowneq downupdowneq
+%type<expr> subrange
 %type<decl> asm_name_opt
-%type<en> asm_operands_opt				asm_operands_list			asm_operand
-%type<label> label_list
-%type<en> asm_clobbers_list_opt
-%type<flag> asm_volatile_opt
-%type<en> handler_predicate_opt
+%type<expr> asm_operands_opt				asm_operands_list			asm_operand
+%type<labels> label_list
+%type<expr> asm_clobbers_list_opt
+%type<is_volatile> asm_volatile_opt
+%type<expr> handler_predicate_opt
 %type<genexpr> generic_association		generic_assoc_list
 
 // statements
-%type<sn> statement						labeled_statement			compound_statement
-%type<sn> statement_decl				statement_decl_list			statement_list_nodecl
-%type<sn> selection_statement			if_statement
-%type<sn> switch_clause_list_opt		switch_clause_list
-%type<en> case_value
-%type<sn> case_clause					case_value_list				case_label					case_label_list
-%type<sn> iteration_statement			jump_statement
-%type<sn> expression_statement			asm_statement
-%type<sn> with_statement
-%type<en> with_clause_opt
-%type<sn> exception_statement			handler_clause				finally_clause
-%type<catch_kind> handler_key
-%type<sn> mutex_statement
-%type<en> when_clause					when_clause_opt				waitfor		waituntil		timeout
-%type<sn> waitfor_statement				waituntil_statement
+%type<stmt> statement						labeled_statement			compound_statement
+%type<stmt> statement_decl				statement_decl_list			statement_list_nodecl
+%type<stmt> selection_statement			if_statement
+%type<clause> switch_clause_list_opt		switch_clause_list
+%type<expr> case_value
+%type<clause> case_clause				case_value_list				case_label					case_label_list
+%type<stmt> iteration_statement			jump_statement
+%type<stmt> expression_statement			asm_statement
+%type<stmt> with_statement
+%type<expr> with_clause_opt
+%type<stmt> exception_statement
+%type<clause> handler_clause			finally_clause
+%type<except_kind> handler_key
+%type<stmt> mutex_statement
+%type<expr> when_clause					when_clause_opt				waitfor		waituntil		timeout
+%type<stmt> waitfor_statement				waituntil_statement
 %type<wfs> wor_waitfor_clause
-%type<wuscn> waituntil_clause			wand_waituntil_clause       wor_waituntil_clause
+%type<wucn> waituntil_clause			wand_waituntil_clause       wor_waituntil_clause
 
 // declarations
@@ -439,5 +441,5 @@
 %type<decl> assertion assertion_list assertion_list_opt
 
-%type<en> bit_subrange_size_opt bit_subrange_size
+%type<expr> bit_subrange_size_opt bit_subrange_size
 
 %type<decl> basic_declaration_specifier basic_type_name basic_type_specifier direct_type indirect_type
@@ -452,5 +454,5 @@
 
 %type<decl> enumerator_list enum_type enum_type_nobody
-%type<in> enumerator_value_opt
+%type<init> enumerator_value_opt
 
 %type<decl> external_definition external_definition_list external_definition_list_opt
@@ -459,5 +461,5 @@
 
 %type<decl> field_declaration_list_opt field_declaration field_declaring_list_opt field_declarator field_abstract_list_opt field_abstract
-%type<en> field field_name_list field_name fraction_constants_opt
+%type<expr> field field_name_list field_name fraction_constants_opt
 
 %type<decl> external_function_definition function_definition function_array function_declarator function_no_ptr function_ptr
@@ -508,5 +510,5 @@
 %type<decl> type_parameter type_parameter_list type_initializer_opt
 
-%type<en> type_parameters_opt type_list array_type_list
+%type<expr> type_parameters_opt type_list array_type_list
 
 %type<decl> type_qualifier type_qualifier_name forall type_qualifier_list_opt type_qualifier_list
@@ -519,8 +521,8 @@
 
 // initializers
-%type<in>  initializer initializer_list_opt initializer_opt
+%type<init>  initializer initializer_list_opt initializer_opt
 
 // designators
-%type<en>  designator designator_list designation
+%type<expr>  designator designator_list designation
 
 
@@ -644,5 +646,5 @@
 
 string_literal:
-	string_literal_list							{ $$ = build_constantStr( yylloc, *$1 ); }
+	string_literal_list							{ $$ = new ExpressionNode( build_constantStr( yylloc, *$1 ) ); }
 	;
 
@@ -739,5 +741,5 @@
 		{ $$ = new ExpressionNode( build_binary_val( yylloc, OperKinds::Index, $1, $3 ) ); }
 	| string_literal '[' assignment_expression ']'		// "abc"[3], 3["abc"]
-		{ $$ = new ExpressionNode( build_binary_val( yylloc, OperKinds::Index, new ExpressionNode( $1 ), $3 ) ); }
+		{ $$ = new ExpressionNode( build_binary_val( yylloc, OperKinds::Index, $1, $3 ) ); }
 	| postfix_expression '{' argument_expression_list_opt '}' // CFA, constructor call
 		{
@@ -757,5 +759,5 @@
 		{ $$ = new ExpressionNode( build_func( yylloc, new ExpressionNode( build_varref( yylloc, build_postfix_name( $3 ) ) ), $1 ) ); }
 	| string_literal '`' identifier						// CFA, postfix call
-		{ $$ = new ExpressionNode( build_func( yylloc, new ExpressionNode( build_varref( yylloc, build_postfix_name( $3 ) ) ), new ExpressionNode( $1 ) ) ); }
+		{ $$ = new ExpressionNode( build_func( yylloc, new ExpressionNode( build_varref( yylloc, build_postfix_name( $3 ) ) ), $1 ) ); }
 	| postfix_expression '.' identifier
 		{ $$ = new ExpressionNode( build_fieldSel( yylloc, $1, build_varref( yylloc, $3 ) ) ); }
@@ -857,5 +859,5 @@
 	| constant
 	| string_literal
-		{ $$ = new ExpressionNode( $1 ); }
+		{ $$ = $1; }
 	| EXTENSION cast_expression							// GCC
 		{ $$ = $2->set_extension( true ); }
@@ -1260,7 +1262,7 @@
 
 case_value_list:										// CFA
-	case_value									{ $$ = new StatementNode( build_case( $1 ) ); }
+	case_value									{ $$ = new ClauseNode( build_case( yylloc, $1 ) ); }
 		// convert case list, e.g., "case 1, 3, 5:" into "case 1: case 3: case 5"
-	| case_value_list ',' case_value			{ $$ = (StatementNode *)($1->set_last( new StatementNode( build_case( $3 ) ) ) ); }
+	| case_value_list ',' case_value			{ $$ = $1->set_last( new ClauseNode( build_case( yylloc, $3 ) ) ); }
 	;
 
@@ -1271,5 +1273,5 @@
 	| CASE case_value_list error						// syntax error
 		{ SemanticError( yylloc, "Missing colon after case list." ); $$ = nullptr; }
-	| DEFAULT ':'								{ $$ = new StatementNode( build_default( yylloc ) ); }
+	| DEFAULT ':'								{ $$ = new ClauseNode( build_default( yylloc ) ); }
 		// A semantic check is required to ensure only one default clause per switch/choose statement.
 	| DEFAULT error										//  syntax error
@@ -1279,5 +1281,5 @@
 case_label_list:										// CFA
 	case_label
-	| case_label_list case_label				{ $$ = (StatementNode *)( $1->set_last( $2 )); }
+	| case_label_list case_label				{ $$ = $1->set_last( $2 ); }
 	;
 
@@ -1296,5 +1298,5 @@
 		{ $$ = $1->append_last_case( new StatementNode( build_compound( yylloc, $2 ) ) ); }
 	| switch_clause_list case_label_list statement_list_nodecl
-		{ $$ = (StatementNode *)( $1->set_last( $2->append_last_case( new StatementNode( build_compound( yylloc, $3 ) ) ) ) ); }
+		{ $$ = $1->set_last( $2->append_last_case( new StatementNode( build_compound( yylloc, $3 ) ) ) ); }
 	;
 
@@ -1679,5 +1681,5 @@
 
 waituntil:
-	WAITUNTIL '(' cast_expression ')'
+	WAITUNTIL '(' comma_expression ')'
 		{ $$ = $3; }
 	;
@@ -1736,7 +1738,7 @@
 handler_clause:
 	handler_key '(' push exception_declaration pop handler_predicate_opt ')' compound_statement
-		{ $$ = new StatementNode( build_catch( yylloc, $1, $4, $6, $8 ) ); }
+		{ $$ = new ClauseNode( build_catch( yylloc, $1, $4, $6, $8 ) ); }
 	| handler_clause handler_key '(' push exception_declaration pop handler_predicate_opt ')' compound_statement
-		{ $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( yylloc, $2, $5, $7, $9 ) ) ); }
+		{ $$ = $1->set_last( new ClauseNode( build_catch( yylloc, $2, $5, $7, $9 ) ) ); }
 	;
 
@@ -1755,5 +1757,5 @@
 
 finally_clause:
-	FINALLY compound_statement					{ $$ = new StatementNode( build_finally( yylloc, $2 ) ); }
+	FINALLY compound_statement					{ $$ = new ClauseNode( build_finally( yylloc, $2 ) ); }
 	;
 
@@ -1813,8 +1815,8 @@
 asm_operand:											// GCC
 	string_literal '(' constant_expression ')'
-		{ $$ = new ExpressionNode( new ast::AsmExpr( yylloc, "", $1, maybeMoveBuild( $3 ) ) ); }
+		{ $$ = new ExpressionNode( new ast::AsmExpr( yylloc, "", maybeMoveBuild( $1 ), maybeMoveBuild( $3 ) ) ); }
 	| '[' IDENTIFIER ']' string_literal '(' constant_expression ')'
 		{
-			$$ = new ExpressionNode( new ast::AsmExpr( yylloc, *$2.str, $4, maybeMoveBuild( $6 ) ) );
+			$$ = new ExpressionNode( new ast::AsmExpr( yylloc, *$2.str, maybeMoveBuild( $4 ), maybeMoveBuild( $6 ) ) );
 			delete $2.str;
 		}
@@ -1825,7 +1827,7 @@
 		{ $$ = nullptr; }								// use default argument
 	| string_literal
-		{ $$ = new ExpressionNode( $1 ); }
+		{ $$ = $1; }
 	| asm_clobbers_list_opt ',' string_literal
-		{ $$ = (ExpressionNode *)($1->set_last( new ExpressionNode( $3 ) )); }
+		{ $$ = (ExpressionNode *)( $1->set_last( $3 ) ); }
 	;
 
@@ -1899,5 +1901,5 @@
 static_assert:
 	STATICASSERT '(' constant_expression ',' string_literal ')' ';' // C11
-		{ $$ = DeclarationNode::newStaticAssert( $3, $5 ); }
+		{ $$ = DeclarationNode::newStaticAssert( $3, maybeMoveBuild( $5 ) ); }
 	| STATICASSERT '(' constant_expression ')' ';'		// CFA
 		{ $$ = DeclarationNode::newStaticAssert( $3, build_constantStr( yylloc, *new string( "\"\"" ) ) ); }
@@ -3329,5 +3331,5 @@
 		{
 			DeclarationNode * name = new DeclarationNode();
-			name->asmName = $3;
+			name->asmName = maybeMoveBuild( $3 );
 			$$ = name->addQualifiers( $5 );
 		}
Index: src/Parser/parserutility.h
===================================================================
--- src/Parser/parserutility.h	(revision c86b08de42d13ee7646e48f36c60ff65633dc0ea)
+++ src/Parser/parserutility.h	(revision 6e1e2d0299e4210d269f7a30ec3864a8bddceabb)
@@ -24,10 +24,10 @@
 
 template< typename T >
-static inline auto maybeBuild( const T *orig ) -> decltype(orig->build()) {
+static inline auto maybeBuild( T * orig ) -> decltype(orig->build()) {
 	return (orig) ? orig->build() : nullptr;
 }
 
 template< typename T >
-static inline auto maybeMoveBuild( const T *orig ) -> decltype(orig->build()) {
+static inline auto maybeMoveBuild( T * orig ) -> decltype(orig->build()) {
 	auto ret = maybeBuild<T>(orig);
 	delete orig;
