Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 1dc58fda13aa9cec81035fe578fe64dcb988ab71)
+++ src/Parser/parser.yy	(revision c0a33d2718e90087f8e19043f7cdfa88d48808f8)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue May 22 08:41:57 2018
-// Update Count     : 3353
+// Last Modified On : Thu May 24 16:49:58 2018
+// Update Count     : 3367
 //
 
@@ -837,8 +837,8 @@
 //	'[' push assignment_expression pop ']'
 //		{ $$ = new ExpressionNode( build_tuple( $3 ) ); }
-	'[' ',' tuple_expression_list ']'
-		{ $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( $3 ) ) ); }
-	| '[' assignment_expression ',' tuple_expression_list ']'
-		{ $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$2->set_last( $4 ) ) ); }
+	'[' push ',' tuple_expression_list pop ']'
+		{ $$ = new ExpressionNode( build_tuple( (ExpressionNode *)(new ExpressionNode( nullptr ) )->set_last( $4 ) ) ); }
+	| '[' push assignment_expression ',' tuple_expression_list pop ']'
+		{ $$ = new ExpressionNode( build_tuple( (ExpressionNode *)$3->set_last( $5 ) ) ); }
 	;
 
@@ -866,5 +866,5 @@
 	labeled_statement
 	| compound_statement
-	| expression_statement						{ $$ = $1; }
+	| expression_statement
 	| selection_statement
 	| iteration_statement
@@ -1183,13 +1183,9 @@
 	type_specifier_nobody
 	| type_specifier_nobody declarator
-		{
-			$$ = $2->addType( $1 );
-		}
+		{ $$ = $2->addType( $1 ); }
 	| type_specifier_nobody variable_abstract_declarator
 		{ $$ = $2->addType( $1 ); }
 	| cfa_abstract_declarator_tuple no_attr_identifier	// CFA
-		{
-			$$ = $1->addName( $2 );
-		}
+		{ $$ = $1->addName( $2 ); }
 	| cfa_abstract_declarator_tuple						// CFA
 	;
@@ -1304,6 +1300,6 @@
 
 local_label_list:										// GCC, local label
-	no_attr_identifier_or_type_name				{}
-	| local_label_list ',' no_attr_identifier_or_type_name {}
+	no_attr_identifier_or_type_name
+	| local_label_list ',' no_attr_identifier_or_type_name
 	;
 
@@ -1400,18 +1396,18 @@
 		// type_specifier can resolve to just TYPEDEFname (e.g., typedef int T; int f( T );). Therefore this must be
 		// flattened to allow lookahead to the '(' without having to reduce identifier_or_type_name.
-	cfa_abstract_tuple identifier_or_type_name '(' cfa_parameter_type_list_opt ')'
+	cfa_abstract_tuple identifier_or_type_name '(' push cfa_parameter_type_list_opt pop ')'
 		// To obtain LR(1 ), this rule must be factored out from function return type (see cfa_abstract_declarator).
-		{ $$ = DeclarationNode::newFunction( $2, $1, $4, 0 ); }
-	| cfa_function_return identifier_or_type_name '(' cfa_parameter_type_list_opt ')'
-		{ $$ = DeclarationNode::newFunction( $2, $1, $4, 0 ); }
+		{ $$ = DeclarationNode::newFunction( $2, $1, $5, 0 ); }
+	| cfa_function_return identifier_or_type_name '(' push cfa_parameter_type_list_opt pop ')'
+		{ $$ = DeclarationNode::newFunction( $2, $1, $5, 0 ); }
 	;
 
 cfa_function_return:									// CFA
-	'[' cfa_parameter_list ']'
-		{ $$ = DeclarationNode::newTuple( $2 ); }
-	| '[' cfa_parameter_list ',' cfa_abstract_parameter_list ']'
+	'[' push cfa_parameter_list pop ']'
+		{ $$ = DeclarationNode::newTuple( $3 ); }
+	| '[' push cfa_parameter_list pop ',' push cfa_abstract_parameter_list pop ']'
 		// To obtain LR(1 ), the last cfa_abstract_parameter_list is added into this flattened rule to lookahead to the
 		// ']'.
-		{ $$ = DeclarationNode::newTuple( $2->appendList( $4 ) ); }
+		{ $$ = DeclarationNode::newTuple( $3->appendList( $7 ) ); }
 	;
 
@@ -1587,13 +1583,6 @@
 
 forall:
-	FORALL '('
-		{
-			typedefTable.enterScope();
-		}
-	  type_parameter_list ')'							// CFA
-		{
-			typedefTable.leaveScope();
-			$$ = DeclarationNode::newForall( $4 );
-		}
+	FORALL '(' push type_parameter_list pop ')'					// CFA
+		{ $$ = DeclarationNode::newForall( $4 ); }
 	;
 
@@ -1970,9 +1959,9 @@
 	| cfa_abstract_parameter_list
 	| cfa_parameter_list
-	| cfa_parameter_list ',' cfa_abstract_parameter_list
-		{ $$ = $1->appendList( $3 ); }
-	| cfa_abstract_parameter_list ',' ELLIPSIS
+	| cfa_parameter_list pop ',' push cfa_abstract_parameter_list
+		{ $$ = $1->appendList( $5 ); }
+	| cfa_abstract_parameter_list pop ',' push ELLIPSIS
 		{ $$ = $1->addVarArgs(); }
-	| cfa_parameter_list ',' ELLIPSIS
+	| cfa_parameter_list pop ',' push ELLIPSIS
 		{ $$ = $1->addVarArgs(); }
 	;
@@ -1982,16 +1971,16 @@
 		// factored out from cfa_parameter_list, flattening the rules to get lookahead to the ']'.
 	cfa_parameter_declaration
-	| cfa_abstract_parameter_list ',' cfa_parameter_declaration
-		{ $$ = $1->appendList( $3 ); }
-	| cfa_parameter_list ',' cfa_parameter_declaration
-		{ $$ = $1->appendList( $3 ); }
-	| cfa_parameter_list ',' cfa_abstract_parameter_list ',' cfa_parameter_declaration
-		{ $$ = $1->appendList( $3 )->appendList( $5 ); }
+	| cfa_abstract_parameter_list pop ',' push cfa_parameter_declaration
+		{ $$ = $1->appendList( $5 ); }
+	| cfa_parameter_list pop ',' push cfa_parameter_declaration
+		{ $$ = $1->appendList( $5 ); }
+	| cfa_parameter_list pop ',' push cfa_abstract_parameter_list pop ',' push cfa_parameter_declaration
+		{ $$ = $1->appendList( $5 )->appendList( $9 ); }
 	;
 
 cfa_abstract_parameter_list:							// CFA, new & old style abstract
 	cfa_abstract_parameter_declaration
-	| cfa_abstract_parameter_list ',' cfa_abstract_parameter_declaration
-		{ $$ = $1->appendList( $3 ); }
+	| cfa_abstract_parameter_list pop ',' push cfa_abstract_parameter_declaration
+		{ $$ = $1->appendList( $5 ); }
 	;
 
@@ -2142,13 +2131,13 @@
 	'.' no_attr_identifier								// C99, field name
 		{ $$ = new ExpressionNode( build_varref( $2 ) ); }
-	| '[' assignment_expression ']'						// C99, single array element
+	| '[' push assignment_expression pop ']'			// C99, single array element
 		// assignment_expression used instead of constant_expression because of shift/reduce conflicts with tuple.
-		{ $$ = $2; }
-	| '[' subrange ']'									// CFA, multiple array elements
-		{ $$ = $2; }
-	| '[' constant_expression ELLIPSIS constant_expression ']' // GCC, multiple array elements
-		{ $$ = new ExpressionNode( new RangeExpr( maybeMoveBuild< Expression >( $2 ), maybeMoveBuild< Expression >( $4 ) ) ); }
-	| '.' '[' field_list ']'							// CFA, tuple field selector
 		{ $$ = $3; }
+	| '[' push subrange pop ']'							// CFA, multiple array elements
+		{ $$ = $3; }
+	| '[' push constant_expression ELLIPSIS constant_expression pop ']' // GCC, multiple array elements
+		{ $$ = new ExpressionNode( new RangeExpr( maybeMoveBuild< Expression >( $3 ), maybeMoveBuild< Expression >( $5 ) ) ); }
+	| '.' '[' push field_list pop ']'					// CFA, tuple field selector
+		{ $$ = $4; }
 	;
 
@@ -2288,7 +2277,5 @@
 cfa_trait_declaring_list:								// CFA
 	cfa_variable_specifier
-		{ $$ = $1; }
 	| cfa_function_specifier
-		{ $$ = $1; }
 	| cfa_trait_declaring_list pop ',' push identifier_or_type_name
 		{ $$ = $1->appendList( $1->cloneType( $5 ) ); }
@@ -2349,7 +2336,5 @@
 		}
 	| type_qualifier_list
-		{
-			if ( $1->type->forall ) xxx = forall = true; // remember generic type
-		}
+		{ if ( $1->type->forall ) xxx = forall = true; } // remember generic type
 	  push '{' external_definition_list '}'				// CFA, namespace
 		{
@@ -2364,7 +2349,5 @@
 		}
 	| declaration_qualifier_list
-		{
-			if ( $1->type->forall ) xxx = forall = true; // remember generic type
-		}
+		{ if ( $1->type->forall ) xxx = forall = true; } // remember generic type
 	  push '{' external_definition_list '}'				// CFA, namespace
 		{
@@ -2406,13 +2389,7 @@
 		// declaration must still have a type_specifier.  OBSOLESCENT (see 1)
 	| function_declarator compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $1->addFunctionBody( $2 );
-		}
+		{ $$ = $1->addFunctionBody( $2 ); }
 	| KR_function_declarator KR_declaration_list_opt compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $1->addOldDeclList( $2 )->addFunctionBody( $3 );
-		}
+		{ $$ = $1->addOldDeclList( $2 )->addFunctionBody( $3 ); }
 	;
 
@@ -2427,5 +2404,4 @@
 	cfa_function_declaration with_clause_opt compound_statement	// CFA
 		{
-			typedefTable.leaveScope();
 			// Add the function body to the last identifier in the function definition list, i.e., foo3:
 			//   [const double] foo1(), foo2( int ), foo3( double ) { return 3.0; }
@@ -2436,5 +2412,4 @@
 		{
 			rebindForall( $1, $2 );
-			typedefTable.leaveScope();
 			$$ = $2->addFunctionBody( $4, $3 )->addType( $1 );
 		}
@@ -2442,25 +2417,15 @@
 		{
 			rebindForall( $1, $2 );
-			typedefTable.leaveScope();
 			$$ = $2->addFunctionBody( $4, $3 )->addType( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
 	| type_qualifier_list function_declarator with_clause_opt compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
-		}
+		{ $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 ); }
 		// handles default int return type, OBSOLESCENT (see 1)
 	| declaration_qualifier_list function_declarator with_clause_opt compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 );
-		}
+		{ $$ = $2->addFunctionBody( $4, $3 )->addQualifiers( $1 ); }
 		// handles default int return type, OBSOLESCENT (see 1)
 	| declaration_qualifier_list type_qualifier_list function_declarator with_clause_opt compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $3->addFunctionBody( $5, $4 )->addQualifiers( $2 )->addQualifiers( $1 );
-		}
+		{ $$ = $3->addFunctionBody( $5, $4 )->addQualifiers( $2 )->addQualifiers( $1 ); }
 
 		// Old-style K&R function definition, OBSOLESCENT (see 4)
@@ -2468,25 +2433,15 @@
 		{
 			rebindForall( $1, $2 );
-			typedefTable.leaveScope();
 			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addType( $1 );
 		}
 		// handles default int return type, OBSOLESCENT (see 1)
 	| type_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
-		}
+		{ $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 ); }
 		// handles default int return type, OBSOLESCENT (see 1)
 	| declaration_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 );
-		}
+		{ $$ = $2->addOldDeclList( $3 )->addFunctionBody( $5, $4 )->addQualifiers( $1 ); }
 		// handles default int return type, OBSOLESCENT (see 1)
 	| declaration_qualifier_list type_qualifier_list KR_function_declarator KR_declaration_list_opt with_clause_opt compound_statement
-		{
-			typedefTable.leaveScope();
-			$$ = $3->addOldDeclList( $4 )->addFunctionBody( $6, $5 )->addQualifiers( $2 )->addQualifiers( $1 );
-		}
+		{ $$ = $3->addOldDeclList( $4 )->addFunctionBody( $6, $5 )->addQualifiers( $2 )->addQualifiers( $1 ); }
 	;
 
@@ -2685,6 +2640,6 @@
 	paren_identifier '(' identifier_list ')'			// function_declarator handles empty parameter
 		{ $$ = $1->addIdList( $3 ); }
-	| '(' KR_function_ptr ')' '(' parameter_type_list_opt ')'
-		{ $$ = $2->addParamList( $5 ); }
+	| '(' KR_function_ptr ')' '(' push parameter_type_list_opt pop ')'
+		{ $$ = $2->addParamList( $6 ); }
 	| '(' KR_function_no_ptr ')'						// redundant parenthesis
 		{ $$ = $2; }
@@ -2804,8 +2759,8 @@
 
 identifier_parameter_function:
-	paren_identifier '(' parameter_type_list_opt ')'	// empty parameter list OBSOLESCENT (see 3)
-		{ $$ = $1->addParamList( $3 ); }
-	| '(' identifier_parameter_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
-		{ $$ = $2->addParamList( $5 ); }
+	paren_identifier '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
+		{ $$ = $1->addParamList( $4 ); }
+	| '(' identifier_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
+		{ $$ = $2->addParamList( $6 ); }
 	| '(' identifier_parameter_function ')'				// redundant parenthesis
 		{ $$ = $2; }
@@ -2857,8 +2812,8 @@
 
 type_parameter_function:
-	typedef '(' parameter_type_list_opt ')'				// empty parameter list OBSOLESCENT (see 3)
-		{ $$ = $1->addParamList( $3 ); }
-	| '(' type_parameter_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
-		{ $$ = $2->addParamList( $5 ); }
+	typedef '(' 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)
+		{ $$ = $2->addParamList( $6 ); }
 	;
 
@@ -2907,8 +2862,8 @@
 
 abstract_function:
-	'(' parameter_type_list_opt ')'						// empty parameter list OBSOLESCENT (see 3)
-		{ $$ = DeclarationNode::newFunction( nullptr, nullptr, $2, nullptr ); }
-	| '(' abstract_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
-		{ $$ = $2->addParamList( $5 ); }
+	'(' push parameter_type_list_opt pop ')'			// empty parameter list OBSOLESCENT (see 3)
+		{ $$ = DeclarationNode::newFunction( nullptr, nullptr, $3, nullptr ); }
+	| '(' abstract_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
+		{ $$ = $2->addParamList( $6 ); }
 	| '(' abstract_function ')'							// redundant parenthesis
 		{ $$ = $2; }
@@ -2925,11 +2880,11 @@
 
 multi_array_dimension:
-	'[' assignment_expression ']'
-		{ $$ = DeclarationNode::newArray( $2, 0, false ); }
-	| '[' '*' ']'										// C99
+	'[' push assignment_expression pop ']'
+		{ $$ = DeclarationNode::newArray( $3, 0, false ); }
+	| '[' push '*' pop ']'								// C99
 		{ $$ = DeclarationNode::newVarArray( 0 ); }
-	| multi_array_dimension '[' assignment_expression ']'
-		{ $$ = $1->addArray( DeclarationNode::newArray( $3, 0, false ) ); }
-	| multi_array_dimension '[' '*' ']'					// C99
+	| multi_array_dimension '[' push assignment_expression pop ']'
+		{ $$ = $1->addArray( DeclarationNode::newArray( $4, 0, false ) ); }
+	| multi_array_dimension '[' push '*' pop ']'		// C99
 		{ $$ = $1->addArray( DeclarationNode::newVarArray( 0 ) ); }
 	;
@@ -2998,8 +2953,8 @@
 
 abstract_parameter_function:
-	'(' parameter_type_list_opt ')'						// empty parameter list OBSOLESCENT (see 3)
-		{ $$ = DeclarationNode::newFunction( nullptr, nullptr, $2, nullptr ); }
-	| '(' abstract_parameter_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
-		{ $$ = $2->addParamList( $5 ); }
+	'(' push parameter_type_list_opt pop ')'			// empty parameter list OBSOLESCENT (see 3)
+		{ $$ = DeclarationNode::newFunction( nullptr, nullptr, $3, nullptr ); }
+	| '(' abstract_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
+		{ $$ = $2->addParamList( $6 ); }
 	| '(' abstract_parameter_function ')'				// redundant parenthesis
 		{ $$ = $2; }
@@ -3023,15 +2978,15 @@
 		{ $$ = DeclarationNode::newArray( 0, 0, false ); }
 	// multi_array_dimension handles the '[' '*' ']' case
-	| '[' type_qualifier_list '*' ']'					// remaining C99
-		{ $$ = DeclarationNode::newVarArray( $2 ); }
-	| '[' type_qualifier_list ']'
-		{ $$ = DeclarationNode::newArray( 0, $2, false ); }
+	| '[' push type_qualifier_list '*' pop ']'			// remaining C99
+		{ $$ = DeclarationNode::newVarArray( $3 ); }
+	| '[' push type_qualifier_list pop ']'
+		{ $$ = DeclarationNode::newArray( 0, $3, false ); }
 	// multi_array_dimension handles the '[' assignment_expression ']' case
-	| '[' type_qualifier_list assignment_expression ']'
-		{ $$ = DeclarationNode::newArray( $3, $2, false ); }
-	| '[' STATIC type_qualifier_list_opt assignment_expression ']'
-		{ $$ = DeclarationNode::newArray( $4, $3, true ); }
-	| '[' type_qualifier_list STATIC assignment_expression ']'
-		{ $$ = DeclarationNode::newArray( $4, $2, true ); }
+	| '[' push type_qualifier_list assignment_expression pop ']'
+		{ $$ = DeclarationNode::newArray( $4, $3, false ); }
+	| '[' push STATIC type_qualifier_list_opt assignment_expression pop ']'
+		{ $$ = DeclarationNode::newArray( $5, $4, true ); }
+	| '[' push type_qualifier_list STATIC assignment_expression pop ']'
+		{ $$ = DeclarationNode::newArray( $5, $3, true ); }
 	;
 
@@ -3077,6 +3032,6 @@
 
 variable_abstract_function:
-	'(' variable_abstract_ptr ')' '(' parameter_type_list_opt ')' // empty parameter list OBSOLESCENT (see 3)
-		{ $$ = $2->addParamList( $5 ); }
+	'(' variable_abstract_ptr ')' '(' push parameter_type_list_opt pop ')' // empty parameter list OBSOLESCENT (see 3)
+		{ $$ = $2->addParamList( $6 ); }
 	| '(' variable_abstract_function ')'				// redundant parenthesis
 		{ $$ = $2; }
@@ -3141,15 +3096,15 @@
 
 cfa_array_parameter_1st_dimension:
-	'[' type_qualifier_list '*' ']'						// remaining C99
-		{ $$ = DeclarationNode::newVarArray( $2 ); }
-	| '[' type_qualifier_list assignment_expression ']'
-		{ $$ = DeclarationNode::newArray( $3, $2, false ); }
-	| '[' declaration_qualifier_list assignment_expression ']'
+	'[' push type_qualifier_list '*' pop ']'			// remaining C99
+		{ $$ = DeclarationNode::newVarArray( $3 ); }
+	| '[' push type_qualifier_list assignment_expression pop ']'
+		{ $$ = DeclarationNode::newArray( $4, $3, false ); }
+	| '[' push declaration_qualifier_list assignment_expression pop ']'
 		// declaration_qualifier_list must be used because of shift/reduce conflict with
 		// assignment_expression, so a semantic check is necessary to preclude them as a type_qualifier cannot
 		// appear in this context.
-		{ $$ = DeclarationNode::newArray( $3, $2, true ); }
-	| '[' declaration_qualifier_list type_qualifier_list assignment_expression ']'
-		{ $$ = DeclarationNode::newArray( $4, $3->addQualifiers( $3 ), true ); }
+		{ $$ = DeclarationNode::newArray( $4, $3, true ); }
+	| '[' push declaration_qualifier_list type_qualifier_list assignment_expression pop ']'
+		{ $$ = DeclarationNode::newArray( $5, $4->addQualifiers( $3 ), true ); }
 	;
 
@@ -3220,6 +3175,6 @@
 
 cfa_abstract_tuple:										// CFA
-	'[' cfa_abstract_parameter_list ']'
-		{ $$ = DeclarationNode::newTuple( $2 ); }
+	'[' push cfa_abstract_parameter_list pop ']'
+		{ $$ = DeclarationNode::newTuple( $3 ); }
 	;
 
@@ -3227,8 +3182,8 @@
 //	'[' ']' '(' cfa_parameter_type_list_opt ')'
 //		{ $$ = DeclarationNode::newFunction( nullptr, DeclarationNode::newTuple( nullptr ), $4, nullptr ); }
-	cfa_abstract_tuple '(' cfa_parameter_type_list_opt ')'
-		{ $$ = DeclarationNode::newFunction( nullptr, $1, $3, nullptr ); }
-	| cfa_function_return '(' cfa_parameter_type_list_opt ')'
-		{ $$ = DeclarationNode::newFunction( nullptr, $1, $3, nullptr ); }
+	cfa_abstract_tuple '(' push cfa_parameter_type_list_opt pop ')'
+		{ $$ = DeclarationNode::newFunction( nullptr, $1, $4, nullptr ); }
+	| cfa_function_return '(' push cfa_parameter_type_list_opt pop ')'
+		{ $$ = DeclarationNode::newFunction( nullptr, $1, $4, nullptr ); }
 	;
 
