Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 5e2595398be424f3bb962dc9113d737229f966bf)
+++ src/Parser/parser.yy	(revision f9c3100156c086aa3d4850dce3164f828d44dcaa)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Mar 15 13:34:17 2021
-// Update Count     : 4740
+// Last Modified On : Tue Mar 23 20:56:24 2021
+// Update Count     : 4929
 //
 
@@ -32,5 +32,5 @@
 //
 // 1. designation with and without '=' (use ':' instead)
-// 2. attributes not allowed in parenthesis of declarator
+
 //
 // All of the syntactic extensions for GCC C are marked with the comment "GCC". The second extensions are for Cforall
@@ -321,5 +321,5 @@
 %type<en> constant
 %type<en> tuple							tuple_expression_list
-%type<op> ptrref_operator				unary_operator				assignment_operator
+%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
@@ -428,5 +428,5 @@
 
 %type<decl> type_declaration_specifier type_type_specifier type_name typegen_name
-%type<decl> typedef typedef_declaration typedef_expression
+%type<decl> typedef_name typedef_declaration typedef_expression
 
 %type<decl> variable_type_redeclarator type_ptr type_array type_function
@@ -440,10 +440,10 @@
 
 %type<decl> type_qualifier type_qualifier_name forall type_qualifier_list_opt type_qualifier_list
-%type<decl> type_specifier type_specifier_nobody enum_specifier_nobody
+%type<decl> type_specifier type_specifier_nobody
 
 %type<decl> variable_declarator variable_ptr variable_array variable_function
 %type<decl> variable_abstract_declarator variable_abstract_ptr variable_abstract_array variable_abstract_function
 
-%type<decl> attribute_list_opt attribute_list attribute_opt attribute attribute_name_list attribute_name
+%type<decl> attribute_list_opt attribute_list attribute attribute_name_list attribute_name
 
 // initializers
@@ -950,7 +950,15 @@
 
 assignment_operator:
+	simple_assignment_operator
+	| compound_assignment_operator
+	;
+
+simple_assignment_operator:
 	'='											{ $$ = OperKinds::Assign; }
-	| ATassign									{ $$ = OperKinds::AtAssn; }
-	| EXPassign									{ $$ = OperKinds::ExpAssn; }
+	| ATassign									{ $$ = OperKinds::AtAssn; } // CFA
+	;
+
+compound_assignment_operator:
+	EXPassign									{ $$ = OperKinds::ExpAssn; }
 	| MULTassign								{ $$ = OperKinds::MulAssn; }
 	| DIVassign									{ $$ = OperKinds::DivAssn; }
@@ -1754,10 +1762,4 @@
 	;
 
-enum_specifier_nobody:									// type specifier - {...}
-		// Preclude SUE declarations in restricted scopes (see type_specifier_nobody)
-	basic_type_specifier
-	| sue_type_specifier_nobody
-	;
-
 type_qualifier_list_opt:								// GCC, used in asm_statement
 	// empty
@@ -2038,12 +2040,24 @@
 	  '{' field_declaration_list_opt '}' type_parameters_opt
 		{ $$ = DeclarationNode::newAggregate( $1, $3, $8, $6, true )->addQualifiers( $2 ); }
-	| aggregate_key attribute_list_opt type_name
-		{
-			// for type_name can be a qualified type name S.T, in which case only the last name in the chain needs a typedef (other names in the chain should already have one)
-			typedefTable.makeTypedef( *$3->type->leafName(), forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
+	| aggregate_key attribute_list_opt TYPEDEFname		// unqualified type name
+		{
+			typedefTable.makeTypedef( *$3, forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
 			forall = false;								// reset
 		}
 	  '{' field_declaration_list_opt '}' type_parameters_opt
-		{ $$ = DeclarationNode::newAggregate( $1, $3->type->symbolic.name, $8, $6, true )->addQualifiers( $2 ); }
+		{
+			DeclarationNode::newFromTypedef( $3 );
+			$$ = DeclarationNode::newAggregate( $1, $3, $8, $6, true )->addQualifiers( $2 );
+		}
+	| aggregate_key attribute_list_opt TYPEGENname		// unqualified type name
+		{
+			typedefTable.makeTypedef( *$3, forall || typedefTable.getEnclForall() ? TYPEGENname : TYPEDEFname ); // create typedef
+			forall = false;								// reset
+		}
+	  '{' field_declaration_list_opt '}' type_parameters_opt
+		{
+			DeclarationNode::newFromTypeGen( $3, nullptr );
+			$$ = DeclarationNode::newAggregate( $1, $3, $8, $6, true )->addQualifiers( $2 );
+		}
 	| aggregate_type_nobody
 	;
@@ -2201,39 +2215,31 @@
 	;
 
-// Cannot use attribute_list_opt because of ambiguity with enum_specifier_nobody, which already parses attribute.
-// Hence, only a single attribute is allowed after the "ENUM".
 enum_type:												// enum
-	ENUM attribute_opt '{' enumerator_list comma_opt '}'
+	ENUM attribute_list_opt '{' enumerator_list comma_opt '}'
 		{ $$ = DeclarationNode::newEnum( nullptr, $4, true )->addQualifiers( $2 ); }
-	| ENUM attribute_opt identifier
+	| ENUM attribute_list_opt identifier
 		{ typedefTable.makeTypedef( *$3 ); }
 	  '{' enumerator_list comma_opt '}'
 		{ $$ = DeclarationNode::newEnum( $3, $6, true )->addQualifiers( $2 ); }
-	| ENUM attribute_opt typedef						// enum cannot be generic
+	| ENUM attribute_list_opt typedef_name				// unqualified type name
 	  '{' enumerator_list comma_opt '}'
 		{ $$ = DeclarationNode::newEnum( $3->name, $5, true )->addQualifiers( $2 ); }
-	| ENUM enum_specifier_nobody '{' enumerator_list comma_opt '}'
-		// { $$ = DeclarationNode::newEnum( nullptr, $4, true ); }
-		{ SemanticError( yylloc, "Typed enumeration is currently unimplemented." ); $$ = nullptr; }
-	| ENUM enum_specifier_nobody declarator '{' enumerator_list comma_opt '}'
-		// {
-		// 	typedefTable.makeTypedef( *$3->name );
-		// 	$$ = DeclarationNode::newEnum( nullptr, $5, true );
-		// }
-		{ SemanticError( yylloc, "Typed enumeration is currently unimplemented." ); $$ = nullptr; }
+	| ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt '{' enumerator_list comma_opt '}'
+	 	// { SemanticError( yylloc, "Typed enumeration is currently unimplemented." ); $$ = nullptr; }
+	 	{ $$ = nullptr; }
+	| ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt identifier attribute_list_opt '{' enumerator_list comma_opt '}'
+	 	// { SemanticError( yylloc, "Typed enumeration is currently unimplemented." ); $$ = nullptr; }
+		{ typedefTable.makeTypedef( *$6 ); }
+	| ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt '{' enumerator_list comma_opt '}'
+	 	// { SemanticError( yylloc, "Typed enumeration is currently unimplemented." ); $$ = nullptr; }
+		{ typedefTable.makeTypedef( *$6->name ); }
 	| enum_type_nobody
 	;
 
 enum_type_nobody:										// enum - {...}
-	ENUM attribute_opt identifier
-		{
-			typedefTable.makeTypedef( *$3 );
-			$$ = DeclarationNode::newEnum( $3, 0, false )->addQualifiers( $2 );
-		}
-	| ENUM attribute_opt type_name						// enum cannot be generic
-		{
-			typedefTable.makeTypedef( *$3->type->symbolic.name );
-			$$ = DeclarationNode::newEnum( $3->type->symbolic.name, 0, false )->addQualifiers( $2 );
-		}
+	ENUM attribute_list_opt identifier
+		{ typedefTable.makeTypedef( *$3 ); $$ = DeclarationNode::newEnum( $3, 0, false )->addQualifiers( $2 ); }
+	| ENUM attribute_list_opt type_name					// qualified type name
+		{ typedefTable.makeTypedef( *$3->type->symbolic.name );	$$ = DeclarationNode::newEnum( $3->type->symbolic.name, 0, false )->addQualifiers( $2 ); }
 	;
 
@@ -2241,6 +2247,10 @@
 	identifier_or_type_name enumerator_value_opt
 		{ $$ = DeclarationNode::newEnumConstant( $1, $2 ); }
+	| INLINE type_name
+		{ $$ = DeclarationNode::newEnumConstant( new string("inline"), nullptr ); }
 	| enumerator_list ',' identifier_or_type_name enumerator_value_opt
 		{ $$ = $1->appendList( DeclarationNode::newEnumConstant( $3, $4 ) ); }
+	| enumerator_list ',' INLINE type_name enumerator_value_opt
+		{ $$ = $1->appendList( DeclarationNode::newEnumConstant( new string("inline"), nullptr ) ); }
 	;
 
@@ -2250,5 +2260,5 @@
 	// | '=' constant_expression
 	// 	{ $$ = $2; }
-	| '=' initializer
+	| simple_assignment_operator initializer
 		{ $$ = $2->get_expression(); }					// FIX ME: enum only deals with constant_expression
 	;
@@ -2378,10 +2388,6 @@
 	// empty
 		{ $$ = nullptr; }
-	| '=' initializer
-		{ $$ = $2; }
-	| '=' VOID
-		{ $$ = new InitializerNode( true ); }
-	| ATassign initializer
-		{ $$ = $2->set_maybeConstructed( false ); }
+	| simple_assignment_operator initializer	{ $$ = $1 == OperKinds::Assign ? $2 : $2->set_maybeConstructed( false ); }
+	| '=' VOID									{ $$ = new InitializerNode( true ); }
 	;
 
@@ -2793,10 +2799,4 @@
 	| attribute_list attribute
 		{ $$ = $2->addQualifiers( $1 ); }
-	;
-
-attribute_opt:
-	// empty
-		{ $$ = nullptr; }
-	| attribute
 	;
 
@@ -3032,12 +3032,8 @@
 
 paren_type:
-	typedef
-		// hide type name in enclosing scope by variable name
-		{
-			// if ( ! typedefTable.existsCurr( *$1->name ) ) {
-				typedefTable.addToEnclosingScope( *$1->name, IDENTIFIER, "ID" );
-			// } else {
-			// 	SemanticError( yylloc, string("'") + *$1->name + "' redeclared as different kind of symbol." ); $$ = nullptr;
-			// } // if
+	typedef_name
+		{
+			// hide type name in enclosing scope by variable name
+			typedefTable.addToEnclosingScope( *$1->name, IDENTIFIER, "ID" );
 		}
 	| '(' paren_type ')'
@@ -3152,7 +3148,7 @@
 
 type_parameter_redeclarator:
-	typedef attribute_list_opt
+	typedef_name attribute_list_opt
 		{ $$ = $1->addQualifiers( $2 ); }
-	| '&' MUTEX typedef attribute_list_opt
+	| '&' MUTEX typedef_name attribute_list_opt
 		{ $$ = $3->addPointer( DeclarationNode::newPointer( DeclarationNode::newTypeQualifier( Type::Mutex ), OperKinds::AddressOf ) )->addQualifiers( $4 ); }
 	| type_parameter_ptr
@@ -3163,5 +3159,5 @@
 	;
 
-typedef:
+typedef_name:
 	TYPEDEFname
 		{ $$ = DeclarationNode::newName( $1 ); }
@@ -3180,5 +3176,5 @@
 
 type_parameter_array:
-	typedef array_parameter_dimension
+	typedef_name array_parameter_dimension
 		{ $$ = $1->addArray( $2 ); }
 	| '(' type_parameter_ptr ')' array_parameter_dimension
@@ -3187,5 +3183,5 @@
 
 type_parameter_function:
-	typedef '(' push parameter_type_list_opt pop ')'	// empty parameter list OBSOLESCENT (see 3)
+	typedef_name '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
 		{ $$ = $1->addParamList( $4 ); }
 	| '(' type_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
