Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ src/Parser/DeclarationNode.cc	(revision bffcd663a600d87ff5b237df6c2c43c0d99f2c02)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Dec 11 07:40:14 2019
-// Update Count     : 1123
+// Last Modified On : Mon Dec 16 09:32:40 2019
+// Update Count     : 1132
 //
 
@@ -24,6 +24,6 @@
 #include "Common/UniqueName.h"     // for UniqueName
 #include "Common/utility.h"        // for maybeClone, maybeBuild, CodeLocation
-#include "Parser/LinkageSpec.h"    // for Spec, linkageName, Cforall
 #include "Parser/ParseNode.h"      // for DeclarationNode, ExpressionNode
+#include "SynTree/LinkageSpec.h"   // for Spec, linkageName, Cforall
 #include "SynTree/Attribute.h"     // for Attribute
 #include "SynTree/Declaration.h"   // for TypeDecl, ObjectDecl, Declaration
@@ -47,5 +47,4 @@
 const char * DeclarationNode::signednessNames[] = { "signed", "unsigned", "NoSignednessNames" };
 const char * DeclarationNode::lengthNames[] = { "short", "long", "long long", "NoLengthNames" };
-const char * DeclarationNode::typeClassNames[] = { "otype", "dtype", "ftype", "NoTypeClassNames" };
 const char * DeclarationNode::builtinTypeNames[] = { "__builtin_va_list", "__auto_type", "zero_t", "one_t", "NoBuiltinTypeNames" };
 
@@ -58,5 +57,5 @@
 
 //	variable.name = nullptr;
-	variable.tyClass = NoTypeClass;
+	variable.tyClass = TypeDecl::NUMBER_OF_KINDS;
 	variable.assertions = nullptr;
 	variable.initializer = nullptr;
@@ -312,5 +311,5 @@
 } // DeclarationNode::newFromTypeGen
 
-DeclarationNode * DeclarationNode::newTypeParam( TypeClass tc, const string * name ) {
+DeclarationNode * DeclarationNode::newTypeParam( TypeDecl::Kind tc, const string * name ) {
 	DeclarationNode * newnode = new DeclarationNode;
 	newnode->type = nullptr;
@@ -670,5 +669,5 @@
 
 DeclarationNode * DeclarationNode::addAssertions( DeclarationNode * assertions ) {
-	if ( variable.tyClass != NoTypeClass ) {
+	if ( variable.tyClass != TypeDecl::NUMBER_OF_KINDS ) {
 	  	if ( variable.assertions ) {
 	  		variable.assertions->appendList( assertions );
@@ -875,5 +874,5 @@
 
 DeclarationNode * DeclarationNode::addTypeInitializer( DeclarationNode * init ) {
-	assertf( variable.tyClass != NoTypeClass, "Called addTypeInitializer on something that isn't a type variable." );
+	assertf( variable.tyClass != TypeDecl::NUMBER_OF_KINDS, "Called addTypeInitializer on something that isn't a type variable." );
 	variable.initializer = init;
 	return this;
@@ -1074,10 +1073,10 @@
 	} // if
 
-	if ( variable.tyClass != NoTypeClass ) {
+	if ( variable.tyClass != TypeDecl::NUMBER_OF_KINDS ) {
 		// otype is internally converted to dtype + otype parameters
 		static const TypeDecl::Kind kindMap[] = { TypeDecl::Dtype, TypeDecl::Dtype, TypeDecl::Ftype, TypeDecl::Ttype };
-		assertf( sizeof(kindMap)/sizeof(kindMap[0]) == NoTypeClass, "DeclarationNode::build: kindMap is out of sync." );
+		static_assert( sizeof(kindMap)/sizeof(kindMap[0]) == TypeDecl::NUMBER_OF_KINDS, "DeclarationNode::build: kindMap is out of sync." );
 		assertf( variable.tyClass < sizeof(kindMap)/sizeof(kindMap[0]), "Variable's tyClass is out of bounds." );
-		TypeDecl * ret = new TypeDecl( *name, Type::StorageClasses(), nullptr, kindMap[ variable.tyClass ], variable.tyClass == Otype, variable.initializer ? variable.initializer->buildType() : nullptr );
+		TypeDecl * ret = new TypeDecl( *name, Type::StorageClasses(), nullptr, kindMap[ variable.tyClass ], variable.tyClass == TypeDecl::Otype, variable.initializer ? variable.initializer->buildType() : nullptr );
 		buildList( variable.assertions, ret->get_assertions() );
 		return ret;
Index: src/Parser/LinkageSpec.cc
===================================================================
--- src/Parser/LinkageSpec.cc	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ 	(revision )
@@ -1,67 +1,0 @@
-//
-// 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.
-//
-// LinkageSpec.cc --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Sat May 16 13:22:09 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Thr Spt 12 15:59:00 2018
-// Update Count     : 26
-//
-
-#include <memory>
-#include <string>
-#include <cassert>
-using namespace std;
-
-#include "LinkageSpec.h"
-#include "Common/SemanticError.h"
-
-namespace LinkageSpec {
-
-Spec linkageUpdate( CodeLocation location, Spec old_spec, const string * cmd ) {
-	assert( cmd );
-	unique_ptr<const string> guard( cmd ); // allocated by lexer
-	if ( *cmd == "\"Cforall\"" ) {
-		old_spec.is_mangled = true;
-		return old_spec;
-	} else if ( *cmd == "\"C\"" ) {
-		old_spec.is_mangled = false;
-		return old_spec;
-	} else {
-		SemanticError( location, "Invalid linkage specifier " + *cmd );
-	} // if
-}
-
-std::string linkageName( Spec linkage ) {
-    switch ( linkage ) {
-    case Intrinsic:
-        return "intrinsic";
-    case C:
-        return "C";
-    case Cforall:
-        return "Cforall";
-    case AutoGen:
-        return "autogenerated cfa";
-    case Compiler:
-        return "compiler built-in";
-    case BuiltinCFA:
-        return "cfa built-in";
-    case BuiltinC:
-        return "c built-in";
-    default:
-        return "<unnamed linkage spec>";
-    }
-}
-
-} // LinkageSpec
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/Parser/LinkageSpec.h
===================================================================
--- src/Parser/LinkageSpec.h	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ 	(revision )
@@ -1,79 +1,0 @@
-//
-// 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.
-//
-// LinkageSpec.h --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Sat May 16 13:24:28 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jul 10 16:02:34 2019
-// Update Count     : 18
-//
-
-#pragma once
-
-#include <string>
-
-#include "Common/CodeLocation.h"
-
-namespace LinkageSpec {
-	// All linkage specs are some combination of these flags:
-	enum { Mangle = 1 << 0, Generate = 1 << 1, Overrideable = 1 << 2, Builtin = 1 << 3, GccBuiltin = 1 << 4, NoOfSpecs = 1 << 5, };
-
-	union Spec {
-		unsigned int val;
-		struct {
-			bool is_mangled : 1;
-			bool is_generatable : 1;
-			bool is_overridable : 1;
-			bool is_builtin : 1;
-			bool is_gcc_builtin : 1;
-		};
-		constexpr Spec( unsigned int val ) : val( val ) {}
-		constexpr Spec( Spec const & other ) : val( other.val ) {}
-		constexpr Spec & operator=( const Spec & ) = default;
-		// Operators may go here.
-		// Supports == and !=
-		constexpr operator unsigned int() const { return val; }
-	};
-
-
-	Spec linkageUpdate( CodeLocation location, Spec old_spec, const std::string * cmd );
-	/* If cmd = "C" returns a Spec that is old_spec with is_mangled = false
-	 * If cmd = "Cforall" returns old_spec Spec with is_mangled = true
-	 */
-
-	std::string linkageName( Spec );
-
-	// To Update: LinkageSpec::isXyz( cur_spec ) -> cur_spec.is_xyz
-	inline bool isMangled( Spec spec ) { return spec.is_mangled; }
-	inline bool isGeneratable( Spec spec ) { return spec.is_generatable; }
-	inline bool isOverridable( Spec spec ) { return spec.is_overridable; }
-	inline bool isBuiltin( Spec spec ) { return spec.is_builtin; }
-	inline bool isGccBuiltin( Spec spec ) { return spec.is_gcc_builtin; }
-
-	// Pre-defined flag combinations:
-	// C built-in defined in prelude
-	constexpr Spec const Intrinsic = { Mangle | Generate | Overrideable | Builtin };
-	// ordinary
-	constexpr Spec const Cforall = { Mangle | Generate };
-	// not overloadable, not mangled
-	constexpr Spec const C = { Generate };
-	// built by translator (struct assignment)
-	constexpr Spec const AutoGen = { Mangle | Generate | Overrideable };
-	// gcc internal
-	constexpr Spec const Compiler = { Mangle | Builtin | GccBuiltin };
-	// mangled builtins
-	constexpr Spec const BuiltinCFA = { Mangle | Generate | Builtin };
-	// non-mangled builtins
-	constexpr Spec const BuiltinC = { Generate | Builtin };
-};
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ src/Parser/ParseNode.h	(revision bffcd663a600d87ff5b237df6c2c43c0d99f2c02)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Dec 11 07:40:07 2019
-// Update Count     : 882
+// Last Modified On : Mon Dec 16 07:46:01 2019
+// Update Count     : 888
 //
 
@@ -28,5 +28,5 @@
 #include "Common/UniqueName.h"     // for UniqueName
 #include "Common/utility.h"        // for maybeClone, maybeBuild
-#include "Parser/LinkageSpec.h"    // for Spec
+#include "SynTree/LinkageSpec.h"   // for Spec
 #include "SynTree/Declaration.h"   // for Aggregate
 #include "SynTree/Expression.h"    // for Expression, ConstantExpr (ptr only)
@@ -218,6 +218,4 @@
 	enum Length { Short, Long, LongLong, NoLength };
 	static const char * lengthNames[];
-	enum TypeClass { Otype, Dtype, Ftype, Ttype, NoTypeClass };
-	static const char * typeClassNames[];
 	enum BuiltinType { Valist, AutoType, Zero, One, NoBuiltinType };
 	static const char * builtinTypeNames[];
@@ -241,5 +239,5 @@
 	static DeclarationNode * newName( const std::string * );
 	static DeclarationNode * newFromTypeGen( const std::string *, ExpressionNode * params );
-	static DeclarationNode * newTypeParam( TypeClass, const std::string * );
+	static DeclarationNode * newTypeParam( 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 );
@@ -311,5 +309,5 @@
 	struct Variable_t {
 //		const std::string * name;
-		DeclarationNode::TypeClass tyClass;
+		TypeDecl::Kind tyClass;
 		DeclarationNode * assertions;
 		DeclarationNode * initializer;
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ src/Parser/TypeData.cc	(revision bffcd663a600d87ff5b237df6c2c43c0d99f2c02)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Dec 11 07:48:33 2019
-// Update Count     : 659
+// Last Modified On : Mon Dec 16 07:56:46 2019
+// Update Count     : 662
 //
 
@@ -489,5 +489,5 @@
 	for ( typename ForallList::iterator i = outputList.begin(); i != outputList.end(); ++i, n = (DeclarationNode*)n->get_next() ) {
 		TypeDecl * td = static_cast<TypeDecl *>(*i);
-		if ( n->variable.tyClass == DeclarationNode::Otype ) {
+		if ( n->variable.tyClass == TypeDecl::Otype ) {
 			// add assertion parameters to `type' tyvars in reverse order
 			// add dtor:  void ^?{}(T *)
@@ -522,46 +522,45 @@
 	switch ( td->kind ) {
 	  case TypeData::Unknown:
-			// fill in implicit int
-			return new BasicType( buildQualifiers( td ), BasicType::SignedInt );
+		// fill in implicit int
+		return new BasicType( buildQualifiers( td ), BasicType::SignedInt );
 	  case TypeData::Basic:
-			return buildBasicType( td );
+		return buildBasicType( td );
 	  case TypeData::Pointer:
-			return buildPointer( td );
+		return buildPointer( td );
 	  case TypeData::Array:
-			return buildArray( td );
+		return buildArray( td );
 	  case TypeData::Reference:
-			return buildReference( td );
+		return buildReference( td );
 	  case TypeData::Function:
-			return buildFunction( td );
+		return buildFunction( td );
 	  case TypeData::AggregateInst:
-			return buildAggInst( td );
+		return buildAggInst( td );
 	  case TypeData::EnumConstant:
-			// the name gets filled in later -- by SymTab::Validate
-			return new EnumInstType( buildQualifiers( td ), "" );
+		// the name gets filled in later -- by SymTab::Validate
+		return new EnumInstType( buildQualifiers( td ), "" );
 	  case TypeData::SymbolicInst:
-			return buildSymbolicInst( td );
+		return buildSymbolicInst( td );
 	  case TypeData::Tuple:
-			return buildTuple( td );
+		return buildTuple( td );
 	  case TypeData::Typeof:
 	  case TypeData::Basetypeof:
-			return buildTypeof( td );
+		return buildTypeof( td );
 	  case TypeData::Builtin:
-			if (td->builtintype == DeclarationNode::Zero) {
-				return new ZeroType( noQualifiers );
-			}
-			else if (td->builtintype == DeclarationNode::One) {
-				return new OneType( noQualifiers );
-			}
-			else {
-				return new VarArgsType( buildQualifiers( td ) );
-			}
+		switch ( td->builtintype ) {
+		  case DeclarationNode::Zero:
+			return new ZeroType( noQualifiers );
+		  case DeclarationNode::One:
+			return new OneType( noQualifiers );
+		  default:
+			return new VarArgsType( buildQualifiers( td ) );
+		} // switch
 	  case TypeData::GlobalScope:
-			return new GlobalScopeType();
-		case TypeData::Qualified:
-			return new QualifiedType( buildQualifiers( td ), typebuild( td->qualified.parent ), typebuild( td->qualified.child ) );
+		return new GlobalScopeType();
+	  case TypeData::Qualified:
+		return new QualifiedType( buildQualifiers( td ), typebuild( td->qualified.parent ), typebuild( td->qualified.child ) );
 	  case TypeData::Symbolic:
 	  case TypeData::Enum:
 	  case TypeData::Aggregate:
-			assert( false );
+		assert( false );
 	} // switch
 
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ src/Parser/TypeData.h	(revision bffcd663a600d87ff5b237df6c2c43c0d99f2c02)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:18:36 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Dec 10 23:01:07 2019
-// Update Count     : 198
+// Last Modified On : Fri Dec 13 23:42:35 2019
+// Update Count     : 199
 //
 
@@ -21,5 +21,5 @@
 
 #include "ParseNode.h"           // for DeclarationNode, DeclarationNode::Ag...
-#include "Parser/LinkageSpec.h"  // for Spec
+#include "SynTree/LinkageSpec.h" // for Spec
 #include "SynTree/Type.h"        // for Type, ReferenceToType (ptr only)
 #include "SynTree/SynTree.h"     // for Visitor Nodes
Index: src/Parser/module.mk
===================================================================
--- src/Parser/module.mk	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ src/Parser/module.mk	(revision bffcd663a600d87ff5b237df6c2c43c0d99f2c02)
@@ -11,6 +11,6 @@
 ## Created On       : Sat May 16 15:29:09 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Wed Jun 28 21:58:29 2017
-## Update Count     : 104
+## Last Modified On : Sat Dec 14 07:34:47 2019
+## Update Count     : 107
 ###############################################################################
 
@@ -19,19 +19,15 @@
 AM_YFLAGS = -d -t -v
 
-SRC += Parser/parser.yy \
-       Parser/lex.ll \
-       Parser/TypedefTable.cc \
-       Parser/ParseNode.cc \
+SRC += \
        Parser/DeclarationNode.cc \
        Parser/ExpressionNode.cc \
+       Parser/InitializerNode.cc \
+       Parser/ParseNode.cc \
        Parser/StatementNode.cc \
-       Parser/InitializerNode.cc \
        Parser/TypeData.cc \
-       Parser/LinkageSpec.cc \
+       Parser/TypedefTable.cc \
+       Parser/lex.ll \
+       Parser/parser.yy \
        Parser/parserutility.cc
 
-SRCDEMANGLE += \
-	Parser/LinkageSpec.cc
-
-
 MOSTLYCLEANFILES += Parser/lex.cc Parser/parser.cc Parser/parser.hh Parser/parser.output
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 9853d9b09f5b20cc2d6bea1b03a978a2ece5e9c3)
+++ src/Parser/parser.yy	(revision bffcd663a600d87ff5b237df6c2c43c0d99f2c02)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Dec 12 17:54:22 2019
-// Update Count     : 4404
+// Last Modified On : Mon Dec 16 07:45:59 2019
+// Update Count     : 4408
 //
 
@@ -55,5 +55,5 @@
 #include "TypedefTable.h"
 #include "TypeData.h"
-#include "LinkageSpec.h"
+#include "SynTree/LinkageSpec.h"
 #include "Common/SemanticError.h"						// error_str
 #include "Common/utility.h"								// for maybeMoveBuild, maybeBuild, CodeLo...
@@ -238,5 +238,5 @@
 	DeclarationNode * decl;
 	AggregateDecl::Aggregate aggKey;
-	DeclarationNode::TypeClass tclass;
+	TypeDecl::Kind tclass;
 	StatementNode * sn;
 	WaitForStmt * wfs;
@@ -2437,16 +2437,16 @@
 	| type_specifier identifier_parameter_declarator
 	| assertion_list
-		{ $$ = DeclarationNode::newTypeParam( DeclarationNode::Dtype, new string( DeclarationNode::anonymous.newName() ) )->addAssertions( $1 ); }
+		{ $$ = DeclarationNode::newTypeParam( TypeDecl::Dtype, new string( DeclarationNode::anonymous.newName() ) )->addAssertions( $1 ); }
 	;
 
 type_class:												// CFA
 	OTYPE
-		{ $$ = DeclarationNode::Otype; }
+		{ $$ = TypeDecl::Otype; }
 	| DTYPE
-		{ $$ = DeclarationNode::Dtype; }
+		{ $$ = TypeDecl::Dtype; }
 	| FTYPE
-		{ $$ = DeclarationNode::Ftype; }
+		{ $$ = TypeDecl::Ftype; }
 	| TTYPE
-		{ $$ = DeclarationNode::Ttype; }
+		{ $$ = TypeDecl::Ttype; }
 	;
 
