Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision e307e12f8cb3e70b7a3e22f11583c9e108c0e472)
+++ src/Parser/DeclarationNode.cc	(revision 312029a731fd1bf1cdd24d3e1d75abf51eb09d71)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 25 22:17:10 2019
-// Update Count     : 1116
+// Last Modified On : Wed Dec 11 07:40:14 2019
+// Update Count     : 1123
 //
 
@@ -47,5 +47,4 @@
 const char * DeclarationNode::signednessNames[] = { "signed", "unsigned", "NoSignednessNames" };
 const char * DeclarationNode::lengthNames[] = { "short", "long", "long long", "NoLengthNames" };
-const char * DeclarationNode::aggregateNames[] = { "struct", "union", "trait", "coroutine", "monitor", "thread", "NoAggregateNames" };
 const char * DeclarationNode::typeClassNames[] = { "otype", "dtype", "ftype", "NoTypeClassNames" };
 const char * DeclarationNode::builtinTypeNames[] = { "__builtin_va_list", "__auto_type", "zero_t", "one_t", "NoBuiltinTypeNames" };
@@ -267,5 +266,5 @@
 }
 
-DeclarationNode * DeclarationNode::newAggregate( Aggregate kind, const string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body ) {
+DeclarationNode * DeclarationNode::newAggregate( AggregateDecl::Aggregate kind, const string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body ) {
 	DeclarationNode * newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Aggregate );
@@ -328,5 +327,5 @@
 	newnode->type = new TypeData( TypeData::Aggregate );
 	newnode->type->aggregate.name = name;
-	newnode->type->aggregate.kind = Trait;
+	newnode->type->aggregate.kind = AggregateDecl::Trait;
 	newnode->type->aggregate.params = params;
 	newnode->type->aggregate.fields = asserts;
@@ -338,5 +337,5 @@
 	newnode->type = new TypeData( TypeData::AggregateInst );
 	newnode->type->aggInst.aggregate = new TypeData( TypeData::Aggregate );
-	newnode->type->aggInst.aggregate->aggregate.kind = Trait;
+	newnode->type->aggInst.aggregate->aggregate.kind = AggregateDecl::Trait;
 	newnode->type->aggInst.aggregate->aggregate.name = name;
 	newnode->type->aggInst.params = params;
Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision e307e12f8cb3e70b7a3e22f11583c9e108c0e472)
+++ src/Parser/ExpressionNode.cc	(revision 312029a731fd1bf1cdd24d3e1d75abf51eb09d71)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:17:07 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Aug  4 20:57:55 2019
-// Update Count     : 978
+// Last Modified On : Tue Dec 10 23:01:47 2019
+// Update Count     : 980
 //
 
@@ -434,5 +434,5 @@
 } // build_cast
 
-Expression * build_keyword_cast( KeywordCastExpr::Target target, ExpressionNode * expr_node ) {
+Expression * build_keyword_cast( AggregateDecl::Aggregate target, ExpressionNode * expr_node ) {
 	return new KeywordCastExpr( maybeMoveBuild< Expression >(expr_node), target );
 }
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision e307e12f8cb3e70b7a3e22f11583c9e108c0e472)
+++ src/Parser/ParseNode.h	(revision 312029a731fd1bf1cdd24d3e1d75abf51eb09d71)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 25 22:17:10 2019
-// Update Count     : 876
+// Last Modified On : Wed Dec 11 07:40:07 2019
+// Update Count     : 882
 //
 
@@ -29,4 +29,5 @@
 #include "Common/utility.h"        // for maybeClone, maybeBuild
 #include "Parser/LinkageSpec.h"    // for Spec
+#include "SynTree/Declaration.h"   // for Aggregate
 #include "SynTree/Expression.h"    // for Expression, ConstantExpr (ptr only)
 #include "SynTree/Label.h"         // for Label
@@ -184,5 +185,5 @@
 
 Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
-Expression * build_keyword_cast( KeywordCastExpr::Target target, ExpressionNode * expr_node );
+Expression * build_keyword_cast( AggregateDecl::Aggregate target, ExpressionNode * expr_node );
 Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node );
 Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member );
@@ -217,6 +218,4 @@
 	enum Length { Short, Long, LongLong, NoLength };
 	static const char * lengthNames[];
-	enum Aggregate { Struct, Union, Exception, Trait, Coroutine, Monitor, Thread, NoAggregate };
-	static const char * aggregateNames[];
 	enum TypeClass { Otype, Dtype, Ftype, Ttype, NoTypeClass };
 	static const char * typeClassNames[];
@@ -237,5 +236,5 @@
 	static DeclarationNode * newQualifiedType( DeclarationNode *, DeclarationNode * );
 	static DeclarationNode * newFunction( const std::string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body );
-	static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
+	static DeclarationNode * newAggregate( AggregateDecl::Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
 	static DeclarationNode * newEnum( const std::string * name, DeclarationNode * constants, bool body );
 	static DeclarationNode * newEnumConstant( const std::string * name, ExpressionNode * constant );
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision e307e12f8cb3e70b7a3e22f11583c9e108c0e472)
+++ src/Parser/TypeData.cc	(revision 312029a731fd1bf1cdd24d3e1d75abf51eb09d71)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 13 18:16:23 2019
-// Update Count     : 649
+// Last Modified On : Wed Dec 11 07:48:33 2019
+// Update Count     : 659
 //
 
@@ -67,5 +67,5 @@
 	  case Aggregate:
 		// aggregate = new Aggregate_t;
-		aggregate.kind = DeclarationNode::NoAggregate;
+		aggregate.kind = AggregateDecl::NoAggregate;
 		aggregate.name = nullptr;
 		aggregate.params = nullptr;
@@ -345,5 +345,5 @@
 		break;
 	  case Aggregate:
-		os << DeclarationNode::aggregateNames[ aggregate.kind ] << ' ' << *aggregate.name << endl;
+		os << AggregateDecl::aggrString( aggregate.kind ) << ' ' << *aggregate.name << endl;
 		if ( aggregate.params ) {
 			os << string( indent + 2, ' ' ) << "with type parameters" << endl;
@@ -768,16 +768,16 @@
 	AggregateDecl * at;
 	switch ( td->aggregate.kind ) {
-	  case DeclarationNode::Struct:
-	  case DeclarationNode::Coroutine:
-	  case DeclarationNode::Monitor:
-	  case DeclarationNode::Thread:
+	  case AggregateDecl::Struct:
+	  case AggregateDecl::Coroutine:
+	  case AggregateDecl::Monitor:
+	  case AggregateDecl::Thread:
 		at = new StructDecl( *td->aggregate.name, td->aggregate.kind, attributes, linkage );
 		buildForall( td->aggregate.params, at->get_parameters() );
 		break;
-	  case DeclarationNode::Union:
+	  case AggregateDecl::Union:
 		at = new UnionDecl( *td->aggregate.name, attributes, linkage );
 		buildForall( td->aggregate.params, at->get_parameters() );
 		break;
-	  case DeclarationNode::Trait:
+	  case AggregateDecl::Trait:
 		at = new TraitDecl( *td->aggregate.name, attributes, linkage );
 		buildList( td->aggregate.params, at->get_parameters() );
@@ -809,14 +809,14 @@
 			  AggregateDecl * typedecl = buildAggregate( type, attributes, linkage );
 			  switch ( type->aggregate.kind ) {
-				case DeclarationNode::Struct:
-				case DeclarationNode::Coroutine:
-				case DeclarationNode::Monitor:
-				case DeclarationNode::Thread:
+				case AggregateDecl::Struct:
+				case AggregateDecl::Coroutine:
+				case AggregateDecl::Monitor:
+				case AggregateDecl::Thread:
 				  ret = new StructInstType( buildQualifiers( type ), (StructDecl *)typedecl );
 				  break;
-				case DeclarationNode::Union:
+				case AggregateDecl::Union:
 				  ret = new UnionInstType( buildQualifiers( type ), (UnionDecl *)typedecl );
 				  break;
-				case DeclarationNode::Trait:
+				case AggregateDecl::Trait:
 				  assert( false );
 				  //ret = new TraitInstType( buildQualifiers( type ), (TraitDecl *)typedecl );
@@ -827,14 +827,14 @@
 		  } else {
 			  switch ( type->aggregate.kind ) {
-				case DeclarationNode::Struct:
-				case DeclarationNode::Coroutine:
-				case DeclarationNode::Monitor:
-				case DeclarationNode::Thread:
+				case AggregateDecl::Struct:
+				case AggregateDecl::Coroutine:
+				case AggregateDecl::Monitor:
+				case AggregateDecl::Thread:
 				  ret = new StructInstType( buildQualifiers( type ), *type->aggregate.name );
 				  break;
-				case DeclarationNode::Union:
+				case AggregateDecl::Union:
 				  ret = new UnionInstType( buildQualifiers( type ), *type->aggregate.name );
 				  break;
-				case DeclarationNode::Trait:
+				case AggregateDecl::Trait:
 				  ret = new TraitInstType( buildQualifiers( type ), *type->aggregate.name );
 				  break;
@@ -863,14 +863,14 @@
 	  case TypeData::Aggregate: {
 		  switch ( type->aggregate.kind ) {
-			case DeclarationNode::Struct:
-			case DeclarationNode::Coroutine:
-			case DeclarationNode::Monitor:
-			case DeclarationNode::Thread:
+			case AggregateDecl::Struct:
+			case AggregateDecl::Coroutine:
+			case AggregateDecl::Monitor:
+			case AggregateDecl::Thread:
 			  ret = new StructInstType( buildQualifiers( type ), *type->aggregate.name );
 			  break;
-			case DeclarationNode::Union:
+			case AggregateDecl::Union:
 			  ret = new UnionInstType( buildQualifiers( type ), *type->aggregate.name );
 			  break;
-			case DeclarationNode::Trait:
+			case AggregateDecl::Trait:
 			  ret = new TraitInstType( buildQualifiers( type ), *type->aggregate.name );
 			  break;
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision e307e12f8cb3e70b7a3e22f11583c9e108c0e472)
+++ src/Parser/TypeData.h	(revision 312029a731fd1bf1cdd24d3e1d75abf51eb09d71)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:18:36 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Nov  1 20:56:46 2018
-// Update Count     : 196
+// Last Modified On : Tue Dec 10 23:01:07 2019
+// Update Count     : 198
 //
 
@@ -30,5 +30,5 @@
 
 	struct Aggregate_t {
-		DeclarationNode::Aggregate kind;
+		AggregateDecl::Aggregate kind;
 		const std::string * name = nullptr;
 		DeclarationNode * params = nullptr;
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision e307e12f8cb3e70b7a3e22f11583c9e108c0e472)
+++ src/Parser/parser.yy	(revision 312029a731fd1bf1cdd24d3e1d75abf51eb09d71)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Dec  7 10:43:44 2019
-// Update Count     : 4394
+// Last Modified On : Tue Dec 10 23:07:17 2019
+// Update Count     : 4400
 //
 
@@ -51,4 +51,5 @@
 using namespace std;
 
+#include "SynTree/Declaration.h"
 #include "ParseNode.h"
 #include "TypedefTable.h"
@@ -211,16 +212,4 @@
 } // forCtrl
 
-KeywordCastExpr::Target Aggregate2Target( DeclarationNode::Aggregate aggr ) {
-	KeywordCastExpr::Target target;
-	switch ( aggr ) {
-	  case DeclarationNode::Coroutine: target = KeywordCastExpr::Coroutine; break;
-	  case DeclarationNode::Monitor: target = KeywordCastExpr::Monitor; break;
-	  case DeclarationNode::Thread: target = KeywordCastExpr::Thread; break;
-	  default: abort();
-	} // switch
-	return target;
-} // Aggregate2Target
-
-
 bool forall = false, yyy = false;						// aggregate have one or more forall qualifiers ?
 
@@ -248,5 +237,5 @@
 	ExpressionNode * en;
 	DeclarationNode * decl;
-	DeclarationNode::Aggregate aggKey;
+	AggregateDecl::Aggregate aggKey;
 	DeclarationNode::TypeClass tclass;
 	StatementNode * sn;
@@ -662,5 +651,5 @@
 		{ $$ = new ExpressionNode( build_fieldSel( $1, build_tuple( $4 ) ) ); }
 	| postfix_expression '.' aggregate_control
-		{ $$ = new ExpressionNode( build_keyword_cast( Aggregate2Target( $3 ), $1 ) ); }
+		{ $$ = new ExpressionNode( build_keyword_cast( $3, $1 ) ); }
 	| postfix_expression ARROW identifier
 		{ $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); }
@@ -807,5 +796,5 @@
 		{ $$ = new ExpressionNode( build_cast( $2, $4 ) ); }
 	| '(' aggregate_control '&' ')' cast_expression		// CFA
-		{ $$ = new ExpressionNode( build_keyword_cast( Aggregate2Target( $2 ), $5 ) ); }
+		{ $$ = new ExpressionNode( build_keyword_cast( $2, $5 ) ); }
 		// VIRTUAL cannot be opt because of look ahead issues
 	| '(' VIRTUAL ')' cast_expression					// CFA
@@ -2071,20 +2060,20 @@
 aggregate_data:
 	STRUCT
-		{ yyy = true; $$ = DeclarationNode::Struct; }
+		{ yyy = true; $$ = AggregateDecl::Struct; }
 	| UNION
-		{ yyy = true; $$ = DeclarationNode::Union; }
+		{ yyy = true; $$ = AggregateDecl::Union; }
 	| EXCEPTION											// CFA
-		{ yyy = true; $$ = DeclarationNode::Exception; }
+		{ yyy = true; $$ = AggregateDecl::Exception; }
 	;
 
 aggregate_control:										// CFA
 	GENERATOR
-		{ yyy = true; $$ = DeclarationNode::Coroutine; }
+		{ yyy = true; $$ = AggregateDecl::Coroutine; }
 	| COROUTINE
-		{ yyy = true; $$ = DeclarationNode::Coroutine; }
+		{ yyy = true; $$ = AggregateDecl::Coroutine; }
 	| MONITOR
-		{ yyy = true; $$ = DeclarationNode::Monitor; }
+		{ yyy = true; $$ = AggregateDecl::Monitor; }
 	| THREAD
-		{ yyy = true; $$ = DeclarationNode::Thread; }
+		{ yyy = true; $$ = AggregateDecl::Thread; }
 	;
 
