Index: src/SynTree/Statement.cc
===================================================================
--- src/SynTree/Statement.cc	(revision 4e7171f0f34eb877951aba5628b824cdf5f60cdd)
+++ src/SynTree/Statement.cc	(revision a389ffefab79a6abe8bfb6b39563d0f64348c758)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb  2 11:55:19 2022
-// Update Count     : 80
+// Last Modified On : Wed Feb  2 20:19:33 2022
+// Update Count     : 90
 //
 
@@ -29,10 +29,10 @@
 #include "SynTree/Label.h"         // for Label, operator<<
 
-using std::string;
-using std::endl;
-
-Statement::Statement( const std::list<Label> & labels ) : labels( labels ) {}
-
-void Statement::print( std::ostream & os, Indenter indent ) const {
+using namespace std;
+
+
+Statement::Statement( const list<Label> & labels ) : labels( labels ) {}
+
+void Statement::print( ostream & os, Indenter indent ) const {
 	if ( ! labels.empty() ) {
 		os << indent << "... Labels: {";
@@ -54,11 +54,11 @@
 }
 
-void ExprStmt::print( std::ostream & os, Indenter indent ) const {
-	os << "Expression Statement:" << endl << indent+1;
-	expr->print( os, indent+1 );
-}
-
-
-AsmStmt::AsmStmt( bool voltile, Expression * instruction, std::list<Expression *> output, std::list<Expression *> input, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels ) : Statement(), voltile( voltile ), instruction( instruction ), output( output ), input( input ), clobber( clobber ), gotolabels( gotolabels ) {}
+void ExprStmt::print( ostream & os, Indenter indent ) const {
+	os << "Expression Statement:" << endl << indent + 1;
+	expr->print( os, indent + 1 );
+}
+
+
+AsmStmt::AsmStmt( bool voltile, Expression * instruction, const list<Expression *> output, const list<Expression *> input, const list<ConstantExpr *> clobber, const list<Label> gotolabels ) : Statement(), voltile( voltile ), instruction( instruction ), output( output ), input( input ), clobber( clobber ), gotolabels( gotolabels ) {}
 
 AsmStmt::AsmStmt( const AsmStmt & other ) : Statement( other ), voltile( other.voltile ), instruction( maybeClone( other.instruction ) ), gotolabels( other.gotolabels ) {
@@ -75,26 +75,26 @@
 }
 
-void AsmStmt::print( std::ostream & os, Indenter indent ) const {
+void AsmStmt::print( ostream & os, Indenter indent ) const {
 	os << "Assembler Statement:" << endl;
-	os << indent+1 << "instruction: " << endl << indent;
-	instruction->print( os, indent+1 );
+	os << indent + 1 << "instruction: " << endl << indent;
+	instruction->print( os, indent + 1 );
 	if ( ! output.empty() ) {
-		os << endl << indent+1 << "output: " << endl;
-		printAll( output, os, indent+1 );
+		os << endl << indent + 1 << "output: " << endl;
+		printAll( output, os, indent + 1 );
 	} // if
 	if ( ! input.empty() ) {
-		os << indent+1 << "input: " << endl;
-		printAll( input, os, indent+1 );
+		os << indent + 1 << "input: " << endl;
+		printAll( input, os, indent + 1 );
 	} // if
 	if ( ! clobber.empty() ) {
-		os << indent+1 << "clobber: " << endl;
-		printAll( clobber, os, indent+1 );
+		os << indent + 1 << "clobber: " << endl;
+		printAll( clobber, os, indent + 1 );
 	} // if
 }
 
 
-DirectiveStmt::DirectiveStmt( const std::string & directive ) : Statement(), directive( directive ) {}
-
-void DirectiveStmt::print( std::ostream & os, Indenter ) const {
+DirectiveStmt::DirectiveStmt( const string & directive ) : Statement(), directive( directive ) {}
+
+void DirectiveStmt::print( ostream & os, Indenter ) const {
 	os << "GCC Directive:" << directive << endl;
 }
@@ -120,10 +120,10 @@
 }
 
-void BranchStmt::print( std::ostream & os, Indenter indent ) const {
-	assert(type < 5);
+void BranchStmt::print( ostream & os, Indenter indent ) const {
+	assertf(type < BranchStmts, "CFA internal error: invalid branch statement" );
 	os << "Branch (" << brType[type] << ")" << endl ;
-	if ( target != "" ) os << indent+1 << "with target: " << target << endl;
-	if ( originalTarget != "" ) os << indent+1 << "with original target: " << originalTarget << endl;
-	if ( computedTarget != nullptr ) os << indent+1 << "with computed target: " << computedTarget << endl;
+	if ( target != "" ) os << indent + 1 << "with target: " << target << endl;
+	if ( originalTarget != "" ) os << indent + 1 << "with original target: " << originalTarget << endl;
+	if ( computedTarget != nullptr ) os << indent + 1 << "with computed target: " << computedTarget << endl;
 }
 
@@ -136,14 +136,14 @@
 }
 
-void ReturnStmt::print( std::ostream & os, Indenter indent ) const {
+void ReturnStmt::print( ostream & os, Indenter indent ) const {
 	os << "Return Statement, returning: ";
 	if ( expr != nullptr ) {
-		os << endl << indent+1;
-		expr->print( os, indent+1 );
+		os << endl << indent + 1;
+		expr->print( os, indent + 1 );
 	}
 	os << endl;
 }
 
-IfStmt::IfStmt( Expression * condition, Statement * then, Statement * else_, std::list<Statement *> initialization ):
+IfStmt::IfStmt( Expression * condition, Statement * then, Statement * else_, const list<Statement *> initialization ):
 	Statement(), condition( condition ), then( then ), else_( else_ ), initialization( initialization ) {}
 
@@ -160,14 +160,14 @@
 }
 
-void IfStmt::print( std::ostream & os, Indenter indent ) const {
+void IfStmt::print( ostream & os, Indenter indent ) const {
 	os << "If on condition: " << endl;
-	os << indent+1;
-	condition->print( os, indent+1 );
+	os << indent + 1;
+	condition->print( os, indent + 1 );
 
 	if ( !initialization.empty() ) {
 		os << indent << "... with initialization: \n";
 		for ( const Statement * stmt : initialization ) {
-			os << indent+1;
-			stmt->print( os, indent+1 );
+			os << indent + 1;
+			stmt->print( os, indent + 1 );
 		}
 		os << endl;
@@ -176,15 +176,15 @@
 	os << indent << "... then: " << endl;
 
-	os << indent+1;
-	then->print( os, indent+1 );
+	os << indent + 1;
+	then->print( os, indent + 1 );
 
 	if ( else_ != nullptr ) {
 		os << indent << "... else: " << endl;
-		os << indent+1;
-		else_->print( os, indent+1 );
+		os << indent + 1;
+		else_->print( os, indent + 1 );
 	} // if
 }
 
-SwitchStmt::SwitchStmt( Expression * condition, const std::list<Statement *> & statements ):
+SwitchStmt::SwitchStmt( Expression * condition, const list<Statement *> & statements ):
 	Statement(), condition( condition ), statements( statements ) {
 }
@@ -201,5 +201,5 @@
 }
 
-void SwitchStmt::print( std::ostream & os, Indenter indent ) const {
+void SwitchStmt::print( ostream & os, Indenter indent ) const {
 	os << "Switch on condition: ";
 	condition->print( os );
@@ -207,15 +207,15 @@
 
 	for ( const Statement * stmt : statements ) {
-		stmt->print( os, indent+1 );
-	}
-}
-
-CaseStmt::CaseStmt( Expression * condition, const std::list<Statement *> & statements, bool deflt ) throw ( SemanticErrorException ) :
-	Statement(), condition( condition ), stmts( statements ), _isDefault( deflt ) {
+		stmt->print( os, indent + 1 );
+	}
+}
+
+CaseStmt::CaseStmt( Expression * condition, const list<Statement *> & statements, bool deflt ) throw ( SemanticErrorException ) :
+		Statement(), condition( condition ), stmts( statements ), _isDefault( deflt ) {
 	if ( isDefault() && condition != nullptr ) SemanticError( condition, "default case with condition: " );
 }
 
 CaseStmt::CaseStmt( const CaseStmt & other ) :
-	Statement( other ), condition( maybeClone(other.condition ) ), _isDefault( other._isDefault ) {
+		Statement( other ), condition( maybeClone(other.condition ) ), _isDefault( other._isDefault ) {
 	cloneAll( other.stmts, stmts );
 }
@@ -226,5 +226,5 @@
 }
 
-CaseStmt * CaseStmt::makeDefault( const std::list<Label> & labels, std::list<Statement *> stmts ) {
+CaseStmt * CaseStmt::makeDefault( const list<Label> & labels, list<Statement *> stmts ) {
 	CaseStmt * stmt = new CaseStmt( nullptr, stmts, true );
 	stmt->labels = labels;
@@ -232,5 +232,5 @@
 }
 
-void CaseStmt::print( std::ostream & os, Indenter indent ) const {
+void CaseStmt::print( ostream & os, Indenter indent ) const {
 	if ( isDefault() ) os << indent << "Default ";
 	else {
@@ -241,14 +241,14 @@
 
 	for ( Statement * stmt : stmts ) {
-		os << indent+1;
-		stmt->print( os, indent+1 );
-	}
-}
-
-WhileDoStmt::WhileDoStmt( Expression * condition, Statement * body, const std::list< Statement * > & initialization, bool isDoWhile ):
+		os << indent + 1;
+		stmt->print( os, indent + 1 );
+	}
+}
+
+WhileDoStmt::WhileDoStmt( Expression * condition, Statement * body, const list< Statement * > & initialization, bool isDoWhile ):
 	Statement(), condition( condition ), body( body ), else_( nullptr ), initialization( initialization ), isDoWhile( isDoWhile) {
 }
 
-WhileDoStmt::WhileDoStmt( Expression * condition, Statement * body, Statement * else_, const std::list< Statement * > & initialization, bool isDoWhile ):
+WhileDoStmt::WhileDoStmt( Expression * condition, Statement * body, Statement * else_, const list< Statement * > & initialization, bool isDoWhile ):
 	Statement(), condition( condition), body( body ), else_( else_ ), initialization( initialization ), isDoWhile( isDoWhile) {
 }
@@ -263,14 +263,14 @@
 }
 
-void WhileDoStmt::print( std::ostream & os, Indenter indent ) const {
+void WhileDoStmt::print( ostream & os, Indenter indent ) const {
 	os << "While on condition: " << endl ;
-	condition->print( os, indent+1 );
+	condition->print( os, indent + 1 );
 
 	os << indent << "... with body: " << endl;
 
-	if ( body != nullptr ) body->print( os, indent+1 );
-}
-
-ForStmt::ForStmt( std::list<Statement *> initialization, Expression * condition, Expression * increment, Statement * body, Statement * else_ ):
+	if ( body != nullptr ) body->print( os, indent + 1 );
+}
+
+ForStmt::ForStmt( const list<Statement *> initialization, Expression * condition, Expression * increment, Statement * body, Statement * else_ ):
 	Statement(), initialization( initialization ), condition( condition ), increment( increment ), body( body ), else_( else_ ) {
 }
@@ -290,5 +290,5 @@
 }
 
-void ForStmt::print( std::ostream & os, Indenter indent ) const {
+void ForStmt::print( ostream & os, Indenter indent ) const {
 	Statement::print( os, indent ); // print labels
 
@@ -298,27 +298,27 @@
 		os << indent << "... initialization: \n";
 		for ( Statement * stmt : initialization ) {
-			os << indent+1;
-			stmt->print( os, indent+1 );
+			os << indent + 1;
+			stmt->print( os, indent + 1 );
 		}
 	}
 
 	if ( condition != nullptr ) {
-		os << indent << "... condition: \n" << indent+1;
-		condition->print( os, indent+1 );
+		os << indent << "... condition: \n" << indent + 1;
+		condition->print( os, indent + 1 );
 	}
 
 	if ( increment != nullptr ) {
-		os << "\n" << indent << "... increment: \n" << indent+1;
-		increment->print( os, indent+1 );
+		os << "\n" << indent << "... increment: \n" << indent + 1;
+		increment->print( os, indent + 1 );
 	}
 
 	if ( body != nullptr ) {
-		os << "\n" << indent << "... with body: \n" << indent+1;
-		body->print( os, indent+1 );
+		os << "\n" << indent << "... with body: \n" << indent + 1;
+		body->print( os, indent + 1 );
 	}
 
 	if ( else_ != nullptr ) {
-		os << "\n" << indent << "... with body: \n" << indent+1;
-		else_->print( os, indent+1 );
+		os << "\n" << indent << "... with body: \n" << indent + 1;
+		else_->print( os, indent + 1 );
 	}
 	os << endl;
@@ -339,15 +339,15 @@
 }
 
-void ThrowStmt::print( std::ostream & os, Indenter indent) const {
+void ThrowStmt::print( ostream & os, Indenter indent) const {
 	if ( target ) os << "Non-Local ";
 	os << "Throw Statement, raising: ";
-	expr->print(os, indent+1);
+	expr->print(os, indent + 1);
 	if ( target ) {
 		os << "... at: ";
-		target->print(os, indent+1);
-	}
-}
-
-TryStmt::TryStmt( CompoundStmt * tryBlock, std::list<CatchStmt *> & handlers, FinallyStmt * finallyBlock ) :
+		target->print(os, indent + 1);
+	}
+}
+
+TryStmt::TryStmt( CompoundStmt * tryBlock, const list<CatchStmt *> & handlers, FinallyStmt * finallyBlock ) :
 	Statement(), block( tryBlock ),  handlers( handlers ), finallyBlock( finallyBlock ) {
 }
@@ -363,20 +363,20 @@
 }
 
-void TryStmt::print( std::ostream & os, Indenter indent ) const {
+void TryStmt::print( ostream & os, Indenter indent ) const {
 	os << "Try Statement" << endl;
-	os << indent << "... with block:" << endl << indent+1;
-	block->print( os, indent+1 );
+	os << indent << "... with block:" << endl << indent + 1;
+	block->print( os, indent + 1 );
 
 	// handlers
 	os << indent << "... and handlers:" << endl;
 	for ( const CatchStmt * stmt : handlers ) {
-		os << indent+1;
-		stmt->print( os, indent+1 );
+		os << indent + 1;
+		stmt->print( os, indent + 1 );
 	}
 
 	// finally block
 	if ( finallyBlock != nullptr ) {
-		os << indent << "... and finally:" << endl << indent+1;
-		finallyBlock->print( os, indent+1 );
+		os << indent << "... and finally:" << endl << indent + 1;
+		finallyBlock->print( os, indent + 1 );
 	} // if
 }
@@ -396,19 +396,19 @@
 }
 
-void CatchStmt::print( std::ostream & os, Indenter indent ) const {
+void CatchStmt::print( ostream & os, Indenter indent ) const {
 	os << "Catch " << ((Terminate == kind) ? "Terminate" : "Resume") << " Statement" << endl;
 
 	os << indent << "... catching: ";
-	decl->printShort( os, indent+1 );
+	decl->printShort( os, indent + 1 );
 	os << endl;
 
 	if ( cond ) {
-		os << indent << "... with conditional:" << endl << indent+1;
-		cond->print( os, indent+1 );
+		os << indent << "... with conditional:" << endl << indent + 1;
+		cond->print( os, indent + 1 );
 	}
 
 	os << indent << "... with block:" << endl;
-	os << indent+1;
-	body->print( os, indent+1 );
+	os << indent + 1;
+	body->print( os, indent + 1 );
 }
 
@@ -424,8 +424,8 @@
 }
 
-void FinallyStmt::print( std::ostream & os, Indenter indent ) const {
+void FinallyStmt::print( ostream & os, Indenter indent ) const {
 	os << "Finally Statement" << endl;
-	os << indent << "... with block:" << endl << indent+1;
-	block->print( os, indent+1 );
+	os << indent << "... with block:" << endl << indent + 1;
+	block->print( os, indent + 1 );
 }
 
@@ -439,5 +439,5 @@
 }
 
-void SuspendStmt::print( std::ostream & os, Indenter indent ) const {
+void SuspendStmt::print( ostream & os, Indenter indent ) const {
 	os << "Suspend Statement";
 	switch (type) {
@@ -496,5 +496,5 @@
 }
 
-void WaitForStmt::print( std::ostream & os, Indenter indent ) const {
+void WaitForStmt::print( ostream & os, Indenter indent ) const {
 	os << "Waitfor Statement" << endl;
 	indent += 1;
@@ -531,5 +531,5 @@
 
 
-WithStmt::WithStmt( const std::list< Expression * > & exprs, Statement * stmt ) : Declaration("", noStorageClasses, LinkageSpec::Cforall), exprs( exprs ), stmt( stmt ) {}
+WithStmt::WithStmt( const list< Expression * > & exprs, Statement * stmt ) : Declaration("", noStorageClasses, LinkageSpec::Cforall), exprs( exprs ), stmt( stmt ) {}
 WithStmt::WithStmt( const WithStmt & other ) : Declaration( other ), stmt( maybeClone( other.stmt ) ) {
 	cloneAll( other.exprs, exprs );
@@ -540,17 +540,17 @@
 }
 
-void WithStmt::print( std::ostream & os, Indenter indent ) const {
+void WithStmt::print( ostream & os, Indenter indent ) const {
 	os << "With statement" << endl;
 	os << indent << "... with expressions: " << endl;
-	printAll( exprs, os, indent+1 );
-	os << indent << "... with statement:" << endl << indent+1;
-	stmt->print( os, indent+1 );
-}
-
-
-NullStmt::NullStmt( const std::list<Label> & labels ) : Statement( labels ) {
-}
-
-void NullStmt::print( std::ostream & os, Indenter indent ) const {
+	printAll( exprs, os, indent + 1 );
+	os << indent << "... with statement:" << endl << indent + 1;
+	stmt->print( os, indent + 1 );
+}
+
+
+NullStmt::NullStmt( const list<Label> & labels ) : Statement( labels ) {
+}
+
+void NullStmt::print( ostream & os, Indenter indent ) const {
 	os << "Null Statement" << endl;
 	Statement::print( os, indent );
@@ -568,12 +568,12 @@
 }
 
-void ImplicitCtorDtorStmt::print( std::ostream & os, Indenter indent ) const {
+void ImplicitCtorDtorStmt::print( ostream & os, Indenter indent ) const {
 	os << "Implicit Ctor Dtor Statement" << endl;
 	os << indent << "... with Ctor/Dtor: ";
-	callStmt->print( os, indent+1);
+	callStmt->print( os, indent + 1);
 	os << endl;
 }
 
-MutexStmt::MutexStmt( Statement * stmt, std::list<Expression *> mutexObjs ) 
+MutexStmt::MutexStmt( Statement * stmt, const list<Expression *> mutexObjs ) 
 	: Statement(), stmt( stmt ), mutexObjs( mutexObjs ) { }
 
@@ -587,14 +587,14 @@
 }
 
-void MutexStmt::print( std::ostream & os, Indenter indent ) const {
+void MutexStmt::print( ostream & os, Indenter indent ) const {
 	os << "Mutex Statement" << endl;
 	os << indent << "... with Expressions: " << endl;
 	for (auto * obj : mutexObjs) {
-		os << indent+1;
-		obj->print( os, indent+1);
+		os << indent + 1;
+		obj->print( os, indent + 1);
 		os << endl;
 	}
-	os << indent << "... with Statement: " << endl << indent+1;
-	stmt->print( os, indent+1 );
+	os << indent << "... with Statement: " << endl << indent + 1;
+	stmt->print( os, indent + 1 );
 }
 
