Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 8f6f47d7dda0117750908df7f55ff6a7f7349277)
+++ src/Parser/DeclarationNode.cc	(revision 28307be7d2cda5127601e285d00fb951c75f442f)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Aug 29 15:55:12 2016
-// Update Count     : 311
+// Last Modified On : Mon Aug 29 22:30:56 2016
+// Update Count     : 327
 //
 
@@ -42,4 +42,30 @@
 
 extern LinkageSpec::Spec linkage;						// defined in parser.yy
+
+DeclarationNode::DeclarationNode()
+		: type( 0 )
+		, storageClass( NoStorageClass )
+		, isInline( false )
+		, isNoreturn( false )
+		, bitfieldWidth( 0 )
+		, initializer( 0 )
+		, hasEllipsis( false )
+		, linkage( ::linkage )
+		, extension( false )
+		, error() {
+	attr.expr = nullptr;
+	attr.type = nullptr;
+
+	variable.tyClass = DeclarationNode::Type;
+	variable.assertions = nullptr;
+}
+
+DeclarationNode::~DeclarationNode() {
+	delete attr.expr;
+	delete attr.type;
+	delete type;
+	delete bitfieldWidth;
+	delete initializer;
+}
 
 DeclarationNode *DeclarationNode::clone() const {
@@ -55,25 +81,13 @@
 	newnode->set_next( maybeClone( get_next() ) );
 	newnode->linkage = linkage;
+
+	newnode->variable.assertions = maybeClone( variable.assertions );
+	newnode->variable.name = variable.name;
+	newnode->variable.tyClass = variable.tyClass;
+
+	newnode->attr.expr = maybeClone( attr.expr );
+	newnode->attr.type = maybeClone( attr.type );
 	return newnode;
 } // DeclarationNode::clone
-
-DeclarationNode::DeclarationNode()
-	: type( 0 )
-	, storageClass( NoStorageClass )
-	, isInline( false )
-	, isNoreturn( false )
-	, bitfieldWidth( 0 )
-	, initializer( 0 )
-	, hasEllipsis( false )
-	, linkage( ::linkage )
-	, extension( false )
-	, error() {
-}
-
-DeclarationNode::~DeclarationNode() {
-	delete type;
-	delete bitfieldWidth;
-	delete initializer;
-}
 
 bool DeclarationNode::get_hasEllipsis() const {
@@ -248,6 +262,6 @@
 	newnode->name = assign_strptr( name );
 	newnode->type = new TypeData( TypeData::Variable );
-	newnode->type->variable.tyClass = tc;
-	newnode->type->variable.name = newnode->name;
+	newnode->variable.tyClass = tc;
+	newnode->variable.name = newnode->name;
 	return newnode;
 } // DeclarationNode::newTypeParam
@@ -341,6 +355,6 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Attr );
-	newnode->type->attr.name = assign_strptr( name );
-	newnode->type->attr.expr = expr;
+	newnode->attr.name = assign_strptr( name );
+	newnode->attr.expr = expr;
 	return newnode;
 }
@@ -349,6 +363,6 @@
 	DeclarationNode *newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Attr );
-	newnode->type->attr.name = assign_strptr( name );
-	newnode->type->attr.type = type;
+	newnode->attr.name = assign_strptr( name );
+	newnode->attr.type = type;
 	return newnode;
 }
@@ -542,8 +556,8 @@
 		break;
 	  case TypeData::Variable:
-		if ( type->variable.assertions ) {
-			type->variable.assertions->appendList( assertions );
+		if ( variable.assertions ) {
+			variable.assertions->appendList( assertions );
 		} else {
-			type->variable.assertions = assertions;
+			variable.assertions = assertions;
 		} // if
 		break;
@@ -896,5 +910,12 @@
 	if ( ! error.empty() ) throw SemanticError( error, this );
 	if ( type ) {
-		return buildDecl( type, name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
+		if ( type->kind == TypeData::Variable ) {
+			static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
+			TypeDecl * ret = new TypeDecl( variable.name, DeclarationNode::NoStorageClass, 0, kindMap[ variable.tyClass ] );
+			buildList( variable.assertions, ret->get_assertions() );
+			return ret;
+		} else {
+			return buildDecl( type, name, storageClass, maybeBuild< Expression >( bitfieldWidth ), isInline, isNoreturn, linkage, maybeBuild< Initializer >(initializer) )->set_extension( extension );
+		} // if
 	} // if
 	if ( ! isInline && ! isNoreturn ) {
@@ -933,4 +954,16 @@
 		  return ret;
 	  }
+	  case TypeData::Attr: {
+		  assert( type->kind == TypeData::Attr );
+		  // assert( type->attr );
+		  AttrType * ret;
+		  if ( attr.expr ) {
+			  ret = new AttrType( buildQualifiers( type ), attr.name, attr.expr->build() );
+		  } else {
+			  assert( attr.type );
+			  ret = new AttrType( buildQualifiers( type ), attr.name, attr.type->buildType() );
+		  } // if
+		  return ret;
+	  }
 	  default:
 		return typebuild( type );
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 8f6f47d7dda0117750908df7f55ff6a7f7349277)
+++ src/Parser/ParseNode.h	(revision 28307be7d2cda5127601e285d00fb951c75f442f)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Aug 29 10:19:01 2016
-// Update Count     : 579
+// Last Modified On : Mon Aug 29 21:45:43 2016
+// Update Count     : 583
 //
 
@@ -290,4 +290,24 @@
 	// bool buildFuncSpecifier( StorageClass key ) const;
 
+	struct Enumeration_t {
+		std::string name;
+		DeclarationNode * constants;
+	};
+	Enumeration_t enumeration;
+
+	struct Variable_t {
+		DeclarationNode::TypeClass tyClass;
+		std::string name;
+		DeclarationNode * assertions;
+	};
+	Variable_t variable;
+
+	struct Attr_t {
+		std::string name;
+		ExpressionNode * expr;
+		DeclarationNode * type;
+	};
+	Attr_t attr;
+
 	BuiltinType builtin;
 
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision 8f6f47d7dda0117750908df7f55ff6a7f7349277)
+++ src/Parser/TypeData.cc	(revision 28307be7d2cda5127601e285d00fb951c75f442f)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Aug 29 15:54:55 2016
-// Update Count     : 266
+// Last Modified On : Mon Aug 29 22:31:53 2016
+// Update Count     : 277
 //
 
@@ -74,6 +74,6 @@
 	  case Variable:
 		// variable = new Variable_t;
-		variable.tyClass = DeclarationNode::Type;
-		variable.assertions = 0;
+		// variable.tyClass = DeclarationNode::Type;
+		// variable.assertions = 0;
 		break;
 	  case Tuple:
@@ -85,11 +85,11 @@
 		typeexpr = nullptr;
 		break;
+	  case Attr:
+		// attr = new Attr_t;
+		// attr.expr = nullptr;
+		// attr.type = nullptr;
+		break;
 	  case Builtin:
 		// builtin = new Builtin_t;
-		break;
-	  case Attr:
-		// attr = new Attr_t;
-		attr.expr = nullptr;
-		attr.type = nullptr;
 		break;
 	} // switch
@@ -143,5 +143,5 @@
 		break;
 	  case Variable:
-		delete variable.assertions;
+		// delete variable.assertions;
 		// delete variable;
 		break;
@@ -154,11 +154,11 @@
 		delete typeexpr;
 		break;
+	  case Attr:
+		// delete attr.expr;
+		// delete attr.type;
+		// delete attr;
+		break;
 	  case Builtin:
 		// delete builtin;
-		break;
-	  case Attr:
-		delete attr.expr;
-		delete attr.type;
-		// delete attr;
 		break;
 	} // switch
@@ -219,7 +219,8 @@
 		break;
 	  case Variable:
-		newtype->variable.assertions = maybeClone( variable.assertions );
-		newtype->variable.name = variable.name;
-		newtype->variable.tyClass = variable.tyClass;
+		assert( false );
+		// newtype->variable.assertions = maybeClone( variable.assertions );
+		// newtype->variable.name = variable.name;
+		// newtype->variable.tyClass = variable.tyClass;
 		break;
 	  case Tuple:
@@ -229,10 +230,12 @@
 		newtype->typeexpr = maybeClone( typeexpr );
 		break;
+	  case Attr:
+		assert( false );
+		// newtype->attr.expr = maybeClone( attr.expr );
+		// newtype->attr.type = maybeClone( attr.type );
+		break;
 	  case Builtin:
+		assert( false );
 		// newtype->builtin = builtin;
-		break;
-	  case Attr:
-		newtype->attr.expr = maybeClone( attr.expr );
-		newtype->attr.type = maybeClone( attr.type );
 		break;
 	} // switch
@@ -382,10 +385,10 @@
 		break;
 	  case Variable:
-		os << DeclarationNode::typeClassName[ variable.tyClass ] << " variable ";
-		if ( variable.assertions ) {
-			os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
-			variable.assertions->printList( os, indent + 4 );
-			os << string( indent + 2, ' ' );
-		} // if
+		// os << DeclarationNode::typeClassName[ variable.tyClass ] << " variable ";
+		// if ( variable.assertions ) {
+		// 	os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
+		// 	variable.assertions->printList( os, indent + 4 );
+		// 	os << string( indent + 2, ' ' );
+		// } // if
 		break;
 	  case Tuple:
@@ -403,11 +406,11 @@
 		break;
 	  case Attr:
-		os << "attribute type decl " << attr.name << " applied to ";
-		if ( attr.expr ) {
-			attr.expr->print( os, indent + 2 );
-		} // if
-		if ( attr.type ) {
-			attr.type->print( os, indent + 2 );
-		} // if
+		// os << "attribute type decl " << attr.name << " applied to ";
+		// if ( attr.expr ) {
+		// 	attr.expr->print( os, indent + 2 );
+		// } // if
+		// if ( attr.type ) {
+		// 	attr.type->print( os, indent + 2 );
+		// } // if
 		break;
 	  case Builtin:
@@ -479,4 +482,5 @@
 		return new VarArgsType( buildQualifiers( td ) );
 	  case TypeData::Attr:
+		assert( false );
 		return buildAttr( td );
 	  case TypeData::Symbolic:
@@ -824,10 +828,12 @@
 
 TypeDecl * buildVariable( const TypeData * td ) {
-	assert( td->kind == TypeData::Variable );
-	static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
-
-	TypeDecl * ret = new TypeDecl( td->variable.name, DeclarationNode::NoStorageClass, 0, kindMap[ td->variable.tyClass ] );
-	buildList( td->variable.assertions, ret->get_assertions() );
-	return ret;
+	assert( false );
+	return nullptr;
+	// assert( td->kind == TypeData::Variable );
+	// static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
+
+	// TypeDecl * ret = new TypeDecl( td->variable.name, DeclarationNode::NoStorageClass, 0, kindMap[ td->variable.tyClass ] );
+	// buildList( td->variable.assertions, ret->get_assertions() );
+	// return ret;
 } // buildSymbolic
 
@@ -870,14 +876,16 @@
 
 AttrType * buildAttr( const TypeData * td ) {
-	assert( td->kind == TypeData::Attr );
-	// assert( td->attr );
-	AttrType * ret;
-	if ( td->attr.expr ) {
-		ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.expr->build() );
-	} else {
-		assert( td->attr.type );
-		ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.type->buildType() );
-	} // if
-	return ret;
+	assert( false );
+	return nullptr;
+	// assert( td->kind == TypeData::Attr );
+	// // assert( td->attr );
+	// AttrType * ret;
+	// if ( td->attr.expr ) {
+	// 	ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.expr->build() );
+	// } else {
+	// 	assert( td->attr.type );
+	// 	ret = new AttrType( buildQualifiers( td ), td->attr.name, td->attr.type->buildType() );
+	// } // if
+	// return ret;
 } // buildAttr
 
@@ -912,4 +920,5 @@
 		return buildSymbolic( td, name, sc );
 	} else if ( td->kind == TypeData::Variable ) {
+		assert( false );
 		return buildVariable( td );
 	} else {
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision 8f6f47d7dda0117750908df7f55ff6a7f7349277)
+++ src/Parser/TypeData.h	(revision 28307be7d2cda5127601e285d00fb951c75f442f)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:18:36 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Aug 29 15:54:00 2016
-// Update Count     : 106
+// Last Modified On : Mon Aug 29 22:31:52 2016
+// Update Count     : 110
 //
 
@@ -24,5 +24,5 @@
 struct TypeData {
 	enum Kind { Unknown, Basic, Pointer, Array, Function, Aggregate, AggregateInst,
-				Enum, EnumConstant, Symbolic, SymbolicInst, Variable, Tuple, Typeof, Builtin, Attr } kind;
+				Enum, EnumConstant, Symbolic, SymbolicInst, Variable, Tuple, Typeof, Builtin, Attr };
 
 	struct Basic_t {
@@ -73,10 +73,4 @@
 	};
 
-	struct Variable_t {
-		DeclarationNode::TypeClass tyClass;
-		std::string name;
-		DeclarationNode * assertions;
-	};
-
 	// struct Tuple_t {
 	// 	DeclarationNode * members;
@@ -91,10 +85,5 @@
 	// };
 
-	struct Attr_t {
-		std::string name;
-		ExpressionNode * expr;
-		DeclarationNode * type;
-	};
-
+	Kind kind;
 	TypeData * base;
 	typedef std::bitset< DeclarationNode::NoOfQualifier > Qualifiers;
@@ -109,8 +98,7 @@
 		Function_t function;
 		Symbolic_t symbolic;
-		Variable_t variable;
 		DeclarationNode * tuple;
 		ExpressionNode * typeexpr;
-		Attr_t attr;
+		//Attr_t attr;
 		// DeclarationNode::BuiltinType builtin;
 
