Index: translator/ControlStruct/CaseRangeMutator.cc
===================================================================
--- translator/ControlStruct/CaseRangeMutator.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/CaseRangeMutator.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -13,178 +13,169 @@
 
 namespace ControlStruct {
-
-  Statement* CaseRangeMutator::mutate(ChooseStmt   *chooseStmt)
-  {
-    /* There shouldn't be any `choose' statements by now, throw an exception or something. */
-    throw( 0 ) ; /* FIXME */
-  }
-
-  Statement* CaseRangeMutator::mutate(SwitchStmt   *switchStmt)
-  {
-    std::list< Statement * > &cases = switchStmt->get_branches();
-
-    // a `for' would be more natural... all this contortions are because `replace' invalidates the iterator
-    std::list< Statement * >::iterator i = cases.begin();
-    while (  i != cases.end() ) {
-      (*i)->acceptMutator( *this );
-
-      if ( ! newCaseLabels.empty() ) {
-	std::list< Statement * > newCases;
-
-	// transform( newCaseLabels.begin(), newCaseLabels.end(), bnd1st( ptr_fun( ctor< CaseStmt, Label, Expression * > ) ) );
-
-	for ( std::list< Expression * >::iterator j = newCaseLabels.begin();
-	      j != newCaseLabels.end(); j++ ) {
-	  std::list<Label> emptyLabels;
-	  std::list< Statement *> emptyStmts;
-	  newCases.push_back( new CaseStmt( emptyLabels, *j, emptyStmts ) );
-	}
-
-	if( CaseStmt *currentCase = dynamic_cast< CaseStmt * > ( *i ) )
-	  if ( !currentCase->get_statements().empty() ) {
-	    CaseStmt *lastCase = dynamic_cast< CaseStmt * > ( newCases.back() );
-	    if ( lastCase == 0 ) { throw ( 0 ); /* FIXME */ } // something is very wrong, as I just made these, and they were all cases
-	    // transfer the statement block (if any) to the new list:
-	    lastCase->set_statements( currentCase->get_statements() );
-	  }
-	std::list< Statement * >::iterator j = i; advance( j, 1 );
-	replace ( cases, i, newCases );
-	i = j;
-	newCaseLabels.clear();
-      } else
-	i++;
+    Statement *CaseRangeMutator::mutate(ChooseStmt *chooseStmt) {
+	/* There shouldn't be any `choose' statements by now, throw an exception or something. */
+	throw( 0 ) ; /* FIXME */
     }
 
-    return switchStmt;
-  }
+    Statement *CaseRangeMutator::mutate(SwitchStmt *switchStmt) {
+	std::list< Statement * > &cases = switchStmt->get_branches();
 
-  Statement* CaseRangeMutator::mutate(FallthruStmt *fallthruStmt)
-  {
-    //delete fallthruStmt;
-    return new NullStmt();
-  }
+	// a `for' would be more natural... all this contortions are because `replace' invalidates the iterator
+	std::list< Statement * >::iterator i = cases.begin();
+	while (  i != cases.end() ) {
+	    (*i)->acceptMutator( *this );
 
-  Statement* CaseRangeMutator::mutate(CaseStmt *caseStmt)
-  {
-    UntypedExpr *cond;
-    if ( (cond = dynamic_cast< UntypedExpr * >( caseStmt->get_condition() )) != 0 ) {
-      NameExpr *nmfunc;
-      if ( (nmfunc = dynamic_cast< NameExpr *>( cond->get_function() )) != 0 ) {
-	if ( nmfunc->get_name() == std::string("Range") ) {
-	  assert( cond->get_args().size() == 2 );
-	  std::list<Expression *>::iterator i = cond->get_args().begin();
-	  Expression *lo = *i, *hi = *(++i); // "unnecessary" temporaries
-	  fillRange( lo, hi);
-	}
-      }
-    } else if ( TupleExpr *tcond = dynamic_cast< TupleExpr * >( caseStmt->get_condition() ) ) {
-      // case list
-      assert( ! tcond->get_exprs().empty() );
-      for ( std::list< Expression * >::iterator i = tcond->get_exprs().begin(); i != tcond->get_exprs().end(); i++ )
-	newCaseLabels.push_back( *i ); // do I need to clone them?
+	    if ( ! newCaseLabels.empty() ) {
+		std::list< Statement * > newCases;
+
+		// transform( newCaseLabels.begin(), newCaseLabels.end(), bnd1st( ptr_fun( ctor< CaseStmt, Label, Expression * > ) ) );
+
+		for ( std::list< Expression * >::iterator j = newCaseLabels.begin();
+		      j != newCaseLabels.end(); j++ ) {
+		    std::list<Label> emptyLabels;
+		    std::list< Statement *> emptyStmts;
+		    newCases.push_back( new CaseStmt( emptyLabels, *j, emptyStmts ) );
+		}
+
+		if ( CaseStmt *currentCase = dynamic_cast< CaseStmt * > ( *i ) )
+		    if ( ! currentCase->get_statements().empty() ) {
+			CaseStmt *lastCase = dynamic_cast< CaseStmt * > ( newCases.back() );
+			if ( lastCase == 0 ) { throw ( 0 ); /* FIXME */ } // something is very wrong, as I just made these, and they were all cases
+			// transfer the statement block (if any) to the new list:
+			lastCase->set_statements( currentCase->get_statements() );
+		    }
+		std::list< Statement * >::iterator j = i; advance( j, 1 );
+		replace ( cases, i, newCases );
+		i = j;
+		newCaseLabels.clear();
+	    } else
+		i++;
+	} // while
+
+	return switchStmt;
     }
 
-    std::list< Statement * > &stmts = caseStmt->get_statements();
-    mutateAll ( stmts, *this );
-
-    return caseStmt;
-  }
-
-  void CaseRangeMutator::fillRange(Expression *lo, Expression *hi) {
-    // generate the actual range (and check for consistency)
-    Constant *c_lo, *c_hi;
-    ConstantExpr *ce_lo, *ce_hi;
-    ce_lo = dynamic_cast< ConstantExpr * >( lo );
-    ce_hi = dynamic_cast< ConstantExpr * >( hi );
-
-    if ( ce_lo && ce_hi ) {
-      c_lo = ce_lo->get_constant(); c_hi = ce_hi->get_constant();
-    } /* else {
-      if ( !ce_lo ) ;
-      if ( !ce_hi ) ;
-      } */
-    BasicType *ty_lo = dynamic_cast< BasicType * >( c_lo->get_type() ),
-                       *ty_hi = dynamic_cast< BasicType * >( c_hi->get_type() );
-    
-    if( !ty_lo || !ty_hi )
-      return; // one of them is not a constant
-
-
-    switch( ty_lo->get_kind() ) {
-    case BasicType::Char:
-    case BasicType::UnsignedChar:
-      switch( ty_hi->get_kind() ) 
-	{
-	case BasicType::Char:
-	case BasicType::UnsignedChar:
-	  // first case, they are both printable ASCII characters represented as 'x'
-	  if ( c_lo->get_value().size() == 3 && c_hi->get_value().size() == 3 ) {
-	    char ch_lo = (c_lo->get_value())[1], ch_hi = (c_hi->get_value())[1];
-
-	    if ( ch_lo > ch_hi ) { char t=ch_lo; ch_lo=ch_hi; ch_hi=t; }
-
-	    for( char c = ch_lo; c <=  ch_hi; c++ ){
-	      Type::Qualifiers q;
-	      Constant cnst( new BasicType(q, BasicType::Char),
-				      std::string("'") + c + std::string("'") );
-	      newCaseLabels.push_back( new ConstantExpr( cnst ) );
-	    }
-
-	    return;
-	  }
-	  break;
-	default:
-	  // error: incompatible constants
-	  break;
-	}
-      break;
-    case BasicType::ShortSignedInt:
-    case BasicType::ShortUnsignedInt:
-    case BasicType::SignedInt:
-    case BasicType::UnsignedInt:
-    case BasicType::LongSignedInt:
-    case BasicType::LongUnsignedInt:
-    case BasicType::LongLongSignedInt:
-    case BasicType::LongLongUnsignedInt:
-      switch( ty_hi->get_kind() ) 
-	{
-	case BasicType::ShortSignedInt:
-	case BasicType::ShortUnsignedInt:
-	case BasicType::SignedInt:
-	case BasicType::UnsignedInt:
-	case BasicType::LongSignedInt:
-	case BasicType::LongUnsignedInt:
-	case BasicType::LongLongSignedInt:
-	case BasicType::LongLongUnsignedInt: {
-	  int i_lo = atoi(c_lo->get_value().c_str()),
-	      i_hi = atoi(c_hi->get_value().c_str());
-
-	  if ( i_lo > i_hi ) { int t=i_lo; i_lo=i_hi; i_hi=t; }
-
-	  for( int c = i_lo; c <=  i_hi; c++ ){
-	    Type::Qualifiers q;
-	    Constant cnst( new BasicType(q, ty_hi->get_kind()), // figure can't hurt (used to think in positives)
-				    toString< int >( c ) );
-	    newCaseLabels.push_back( new ConstantExpr( cnst ) );
-	  }
-
-	  return;
-	}
-	default:
-	  // error: incompatible constants
-	  break;
-	}
-      break;
-    default:
-      break;
+    Statement *CaseRangeMutator::mutate(FallthruStmt *fallthruStmt) {
+	//delete fallthruStmt;
+	return new NullStmt();
     }
 
-/* End: */{ 
-      // invalid range, signal a warning (it still generates the two case labels)
-      newCaseLabels.push_back( lo );
-      newCaseLabels.push_back( hi );
-      return;
+    Statement *CaseRangeMutator::mutate(CaseStmt *caseStmt) {
+	UntypedExpr *cond;
+	if ( (cond = dynamic_cast< UntypedExpr * >( caseStmt->get_condition() )) != 0 ) {
+	    NameExpr *nmfunc;
+	    if ( (nmfunc = dynamic_cast< NameExpr *>( cond->get_function() )) != 0 ) {
+		if ( nmfunc->get_name() == std::string("Range") ) {
+		    assert( cond->get_args().size() == 2 );
+		    std::list<Expression *>::iterator i = cond->get_args().begin();
+		    Expression *lo = *i, *hi = *(++i); // "unnecessary" temporaries
+		    fillRange( lo, hi);
+		}
+	    }
+	} else if ( TupleExpr *tcond = dynamic_cast< TupleExpr * >( caseStmt->get_condition() ) ) {
+	    // case list
+	    assert( ! tcond->get_exprs().empty() );
+	    for ( std::list< Expression * >::iterator i = tcond->get_exprs().begin(); i != tcond->get_exprs().end(); i++ )
+		newCaseLabels.push_back( *i ); // do I need to clone them?
+	} // if
+
+	std::list< Statement * > &stmts = caseStmt->get_statements();
+	mutateAll ( stmts, *this );
+
+	return caseStmt;
     }
-  }
 
+    void CaseRangeMutator::fillRange(Expression *lo, Expression *hi) {
+	// generate the actual range (and check for consistency)
+	Constant *c_lo, *c_hi;
+	ConstantExpr *ce_lo, *ce_hi;
+	ce_lo = dynamic_cast< ConstantExpr * >( lo );
+	ce_hi = dynamic_cast< ConstantExpr * >( hi );
+
+	if ( ce_lo && ce_hi ) {
+	    c_lo = ce_lo->get_constant(); c_hi = ce_hi->get_constant();
+	} /* else {
+	     if ( ! ce_lo ) ;
+	     if ( ! ce_hi ) ;
+	     } */
+	BasicType *ty_lo = dynamic_cast< BasicType * >( c_lo->get_type() ),
+	    *ty_hi = dynamic_cast< BasicType * >( c_hi->get_type() );
+    
+	if ( ! ty_lo || ! ty_hi )
+	    return; // one of them is not a constant
+
+	switch ( ty_lo->get_kind() ) {
+	  case BasicType::Char:
+	  case BasicType::UnsignedChar:
+	    switch ( ty_hi->get_kind() ){
+		  case BasicType::Char:
+		  case BasicType::UnsignedChar:
+		    // first case, they are both printable ASCII characters represented as 'x'
+		    if ( c_lo->get_value().size() == 3 && c_hi->get_value().size() == 3 ) {
+			char ch_lo = (c_lo->get_value())[1], ch_hi = (c_hi->get_value())[1];
+
+			if ( ch_lo > ch_hi ) { char t=ch_lo; ch_lo=ch_hi; ch_hi=t; }
+
+			for( char c = ch_lo; c <=  ch_hi; c++ ){
+			    Type::Qualifiers q;
+			    Constant cnst( new BasicType(q, BasicType::Char),
+					   std::string("'") + c + std::string("'") );
+			    newCaseLabels.push_back( new ConstantExpr( cnst ) );
+			}
+
+			return;
+		    }
+		    break;
+		  default:
+		    // error: incompatible constants
+		    break;
+		}
+	    break;
+	  case BasicType::ShortSignedInt:
+	  case BasicType::ShortUnsignedInt:
+	  case BasicType::SignedInt:
+	  case BasicType::UnsignedInt:
+	  case BasicType::LongSignedInt:
+	  case BasicType::LongUnsignedInt:
+	  case BasicType::LongLongSignedInt:
+	  case BasicType::LongLongUnsignedInt:
+	    switch ( ty_hi->get_kind() ) {
+	      case BasicType::ShortSignedInt:
+	      case BasicType::ShortUnsignedInt:
+	      case BasicType::SignedInt:
+	      case BasicType::UnsignedInt:
+	      case BasicType::LongSignedInt:
+	      case BasicType::LongUnsignedInt:
+	      case BasicType::LongLongSignedInt:
+	      case BasicType::LongLongUnsignedInt: {
+		  int i_lo = atoi(c_lo->get_value().c_str()),
+		      i_hi = atoi(c_hi->get_value().c_str());
+
+		  if ( i_lo > i_hi ) { int t=i_lo; i_lo=i_hi; i_hi=t; }
+
+		  for( int c = i_lo; c <=  i_hi; c++ ){
+		      Type::Qualifiers q;
+		      Constant cnst( new BasicType(q, ty_hi->get_kind()), // figure can't hurt (used to think in positives)
+				     toString< int >( c ) );
+		      newCaseLabels.push_back( new ConstantExpr( cnst ) );
+		  }
+
+		  return;
+	      }
+	      default:
+		// error: incompatible constants
+		break;
+	    }
+	    break;
+	  default:
+	    break;
+	} // switch
+
+	/* End: */{ 
+	    // invalid range, signal a warning (it still generates the two case labels)
+	    newCaseLabels.push_back( lo );
+	    newCaseLabels.push_back( hi );
+	    return;
+	}
+    }
 } // namespace ControlStruct
Index: translator/ControlStruct/CaseRangeMutator.h
===================================================================
--- translator/ControlStruct/CaseRangeMutator.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/CaseRangeMutator.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -7,25 +7,22 @@
 
 namespace ControlStruct {
+    class CaseRangeMutator : public Mutator {
+      public:
+	CaseRangeMutator() {}
 
-  class CaseRangeMutator : public Mutator
-  {
-  public:
-    CaseRangeMutator() {}
+	virtual Statement *mutate( ChooseStmt * );
+	virtual Statement *mutate( SwitchStmt * );
+	virtual Statement *mutate( FallthruStmt * );
+	virtual Statement *mutate( CaseStmt * );
+      private:
+	void fillRange( Expression *lo, Expression *hi );
 
-    virtual Statement* mutate(ChooseStmt   *);
-    virtual Statement* mutate(SwitchStmt   *);
-    virtual Statement* mutate(FallthruStmt *);
-    virtual Statement* mutate(CaseStmt     *);
-
-  private:
-    void fillRange(Expression *lo, Expression *hi);
-
-    Expression *currentCondition;
-    std::list< Expression * > newCaseLabels;
-  };
+	Expression *currentCondition;
+	std::list< Expression * > newCaseLabels;
+    };
 
 } // namespace ControlStruct
 
-#endif // #ifndef CASERNG_MUTATOR_H
+#endif // CASERNG_MUTATOR_H
 
 /*
Index: translator/ControlStruct/ChooseMutator.cc
===================================================================
--- translator/ControlStruct/ChooseMutator.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/ChooseMutator.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -5,51 +5,41 @@
 
 namespace ControlStruct {
-
-  Statement* ChooseMutator::mutate(ChooseStmt   *chooseStmt)
-  {
-    bool enclosingChoose = insideChoose;
-    insideChoose = true;
-    mutateAll( chooseStmt->get_branches(), *this );
-    insideChoose = enclosingChoose;
-
-    return new SwitchStmt( chooseStmt->get_labels(),  chooseStmt->get_condition(), chooseStmt->get_branches() );
-  }
-
-  Statement* ChooseMutator::mutate(SwitchStmt   *switchStmt)
-  {
-    bool enclosingChoose = insideChoose;
-    insideChoose = false;
-    mutateAll( switchStmt->get_branches(), *this );
-    insideChoose = enclosingChoose;
-
-    return switchStmt;
-  }
-
-  Statement* ChooseMutator::mutate(FallthruStmt *fallthruStmt)
-  {
-    delete fallthruStmt;
-    return new NullStmt();
-  }
-
-  Statement* ChooseMutator::mutate(CaseStmt *caseStmt)
-  {
-
-    std::list< Statement * > &stmts = caseStmt->get_statements();
-
-    if ( insideChoose ) {
-      BranchStmt *posBrk;
-      if ( (( posBrk = dynamic_cast< BranchStmt * > ( stmts.back() ) ) && 
-	    ( posBrk->get_type() == BranchStmt::Break ))  // last statement in the list is a (superfluous) 'break' 
-	   || dynamic_cast< FallthruStmt * > ( stmts.back() ) )
-	; 
-      else {
-	stmts.push_back( new BranchStmt( std::list< Label >(), "", BranchStmt::Break ) );
-      }
+    Statement *ChooseMutator::mutate( ChooseStmt *chooseStmt) {
+	bool enclosingChoose = insideChoose;
+	insideChoose = true;
+	mutateAll( chooseStmt->get_branches(), *this );
+	insideChoose = enclosingChoose;
+	return new SwitchStmt( chooseStmt->get_labels(),  chooseStmt->get_condition(), chooseStmt->get_branches() );
     }
 
-    mutateAll ( stmts, *this );
+    Statement *ChooseMutator::mutate( SwitchStmt *switchStmt ) {
+	bool enclosingChoose = insideChoose;
+	insideChoose = false;
+	mutateAll( switchStmt->get_branches(), *this );
+	insideChoose = enclosingChoose;
+	return switchStmt;
+    }
 
-    return caseStmt;
-  }
+    Statement *ChooseMutator::mutate( FallthruStmt *fallthruStmt ) {
+	delete fallthruStmt;
+	return new NullStmt();
+    }
 
+    Statement* ChooseMutator::mutate(CaseStmt *caseStmt) {
+	std::list< Statement * > &stmts = caseStmt->get_statements();
+
+	if ( insideChoose ) {
+	    BranchStmt *posBrk;
+	    if ( (( posBrk = dynamic_cast< BranchStmt * > ( stmts.back() ) ) && 
+		  ( posBrk->get_type() == BranchStmt::Break ))  // last statement in the list is a (superfluous) 'break' 
+		 || dynamic_cast< FallthruStmt * > ( stmts.back() ) )
+		; 
+	    else {
+		stmts.push_back( new BranchStmt( std::list< Label >(), "", BranchStmt::Break ) );
+	    } // if
+	} // if
+
+	mutateAll ( stmts, *this );
+	return caseStmt;
+    }
 } // namespace ControlStruct
Index: translator/ControlStruct/ChooseMutator.h
===================================================================
--- translator/ControlStruct/ChooseMutator.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/ChooseMutator.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -8,20 +8,18 @@
 namespace ControlStruct {
 
-  class ChooseMutator : public Mutator
-  {
-  public:
-    ChooseMutator() : insideChoose( false ) {}
+    class ChooseMutator : public Mutator {
+      public:
+	ChooseMutator() : insideChoose( false ) {}
 
-    virtual Statement* mutate(ChooseStmt   *);
-    virtual Statement* mutate(SwitchStmt   *);
-    virtual Statement* mutate(FallthruStmt *);
-    virtual Statement* mutate(CaseStmt     *);
-  private:
-    bool insideChoose;
-  };
-
+	virtual Statement *mutate( ChooseStmt * );
+	virtual Statement *mutate( SwitchStmt * );
+	virtual Statement *mutate( FallthruStmt * );
+	virtual Statement *mutate( CaseStmt * );
+      private:
+	bool insideChoose;
+    };
 } // namespace ControlStruct
 
-#endif // #ifndef CHOOSE_MUTATOR_H
+#endif // CHOOSE_MUTATOR_H
 
 /*
Index: translator/ControlStruct/ForExprMutator.cc
===================================================================
--- translator/ControlStruct/ForExprMutator.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/ForExprMutator.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -4,23 +4,20 @@
 
 namespace ControlStruct {
-  Statement* ForExprMutator::mutate(ForStmt *forStmt)
-  {
-    DeclStmt *decl;
-    if (( decl = dynamic_cast< DeclStmt * > ( forStmt->get_initialization() )) != 0 )
-      {
-	// create compound statement, move declaration outside, leave _for_ as-is
-	CompoundStmt *block = new CompoundStmt( std::list< Label >() );
-	std::list<Statement *> &stmts = block->get_kids();
+    Statement *ForExprMutator::mutate( ForStmt *forStmt ) {
+	DeclStmt *decl;
+	if (( decl = dynamic_cast< DeclStmt * > ( forStmt->get_initialization() )) != 0 ) {
+	    // create compound statement, move declaration outside, leave _for_ as-is
+	    CompoundStmt *block = new CompoundStmt( std::list< Label >() );
+	    std::list<Statement *> &stmts = block->get_kids();
 
-	stmts.push_back( decl );
-	forStmt->set_initialization( 0 );
-	stmts.push_back( forStmt );
+	    stmts.push_back( decl );
+	    forStmt->set_initialization( 0 );
+	    stmts.push_back( forStmt );
 
-	return block;
-      }
-    // ForStmt still needs to be fixed
-    else
-      return forStmt;
-  }
-
+	    return block;
+	} // if
+	// ForStmt still needs to be fixed
+	else
+	    return forStmt;
+    }
 } // namespace ControlStruct
Index: translator/ControlStruct/ForExprMutator.h
===================================================================
--- translator/ControlStruct/ForExprMutator.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/ForExprMutator.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -7,14 +7,11 @@
 
 namespace ControlStruct {
-
-  class ForExprMutator : public Mutator
-  {
-  public:
-    virtual Statement* mutate(ForStmt   *);
-  };
-
+    class ForExprMutator : public Mutator {
+      public:
+	virtual Statement *mutate( ForStmt * );
+    };
 } // namespace ControlStruct
 
-#endif // #ifndef CHOOSE_MUTATOR_H
+#endif // CHOOSE_MUTATOR_H
 
 /*
Index: translator/ControlStruct/LabelFixer.cc
===================================================================
--- translator/ControlStruct/LabelFixer.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/LabelFixer.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -9,132 +9,121 @@
 
 namespace ControlStruct {
-  LabelFixer::Entry::Entry( Statement *to, Statement *from ) :
-    definition ( to )
-  {
-    if ( from != 0 )
-    usage.push_back( from );
-  }
+    LabelFixer::Entry::Entry( Statement *to, Statement *from ) : definition ( to ) {
+	if ( from != 0 )
+	    usage.push_back( from );
+    }
 
-  bool LabelFixer::Entry::insideLoop()
-  {
-    return ( dynamic_cast< ForStmt * > ( definition ) ||
-	     dynamic_cast< WhileStmt * > ( definition )  );
-  }
+    bool LabelFixer::Entry::insideLoop() {
+	return ( dynamic_cast< ForStmt * > ( definition ) ||
+		 dynamic_cast< WhileStmt * > ( definition )  );
+    }
 
-  LabelFixer::LabelFixer( LabelGenerator *gen ) : generator ( gen )
-  {
-    if ( generator == 0 )
-      generator = LabelGenerator::getGenerator();
-  }
+    LabelFixer::LabelFixer( LabelGenerator *gen ) : generator ( gen ) {
+	if ( generator == 0 )
+	    generator = LabelGenerator::getGenerator();
+    }
 
-  void LabelFixer::visit(FunctionDecl *functionDecl)
-  {
-    if ( functionDecl->get_statements() != 0 )
-      functionDecl->get_statements()->accept( *this );
+    void LabelFixer::visit(FunctionDecl *functionDecl) {
+	if ( functionDecl->get_statements() != 0 )
+	    functionDecl->get_statements()->accept( *this );
 
-    MLEMutator mlemut( resolveJumps(), generator );
-    functionDecl->acceptMutator( mlemut );
-  }
+	MLEMutator mlemut( resolveJumps(), generator );
+	functionDecl->acceptMutator( mlemut );
+    }
 
-  void LabelFixer::visit(Statement *stmt )
-  {
-    std::list< Label > &labels = stmt->get_labels();
+    void LabelFixer::visit(Statement *stmt ) {
+	std::list< Label > &labels = stmt->get_labels();
 
-    if ( ! labels.empty() ) {
-      Label current = setLabelsDef( labels, stmt );
-      labels.clear();
-      labels.push_front( current );
+	if ( ! labels.empty() ) {
+	    Label current = setLabelsDef( labels, stmt );
+	    labels.clear();
+	    labels.push_front( current );
+	} // if
     }
-  }
 
-  void LabelFixer::visit(BranchStmt *branchStmt)
-  {
-    visit ( ( Statement * )branchStmt );  // the labels this statement might have
+    void LabelFixer::visit(BranchStmt *branchStmt) {
+	visit ( ( Statement * )branchStmt );  // the labels this statement might have
 
-    Label target;
-    if ( (target = branchStmt->get_target()) != "" ) {
-      setLabelsUsg( target, branchStmt );
-    } //else       /* computed goto or normal exit-loop statements */
-  }
+	Label target;
+	if ( (target = branchStmt->get_target()) != "" ) {
+	    setLabelsUsg( target, branchStmt );
+	} //else       /* computed goto or normal exit-loop statements */
+    }
 
 
-  Label LabelFixer::setLabelsDef( std::list< Label > &llabel, Statement *definition )
-  {
-    assert( definition != 0 );
-    Entry *entry = new Entry( definition );
-    bool used = false;
+    Label LabelFixer::setLabelsDef( std::list< Label > &llabel, Statement *definition ) {
+	assert( definition != 0 );
+	Entry *entry = new Entry( definition );
+	bool used = false;
 
-    for ( std::list< Label >::iterator i = llabel.begin(); i != llabel.end(); i++ )
-      if ( labelTable.find( *i ) == labelTable.end() )
-	{ used = true; labelTable[ *i ] = entry; } // undefined and unused
-      else
-	if( labelTable[ *i ]->defined() )
-	  throw SemanticError("Duplicate definition of label: " + *i );
-	else
-	  labelTable[ *i ]->set_definition( definition );
+	for ( std::list< Label >::iterator i = llabel.begin(); i != llabel.end(); i++ )
+	    if ( labelTable.find( *i ) == labelTable.end() )
+		{ used = true; labelTable[ *i ] = entry; } // undefined and unused
+	    else
+		if( labelTable[ *i ]->defined() )
+		    throw SemanticError("Duplicate definition of label: " + *i );
+		else
+		    labelTable[ *i ]->set_definition( definition );
 
-    if (! used ) delete entry;
+	if (! used ) delete entry;
 
-    return labelTable[ llabel.front() ]->get_label();  // this *must* exist
-  }
-
-  Label LabelFixer::setLabelsUsg( Label orgValue, Statement *use )
-  {
-    assert( use != 0 );
-
-    if ( labelTable.find( orgValue ) != labelTable.end() )
-      labelTable[ orgValue ]->add_use( use );         // the label has been defined or used before
-    else
-      labelTable[ orgValue ] = new Entry( 0, use );
-
-    return labelTable[ orgValue ]->get_label();
-  }
-
-  std::map < Label, Statement * > *LabelFixer::resolveJumps() throw ( SemanticError )
-  {
-    std::map < Statement *, Entry * > def_us;
-
-    for( std::map < Label, Entry *>::iterator i = labelTable.begin(); i != labelTable.end(); i++ ) {
-      Entry *e = i->second;
-
-      if ( def_us.find ( e->get_definition() ) == def_us.end() )
-	  def_us[ e->get_definition() ] = e;
-      else
-	if(e->used())
-	  def_us[ e->get_definition() ]->add_uses( e->get_uses() );
+	return labelTable[ llabel.front() ]->get_label();  // this *must* exist
     }
 
-    // get rid of labelTable
-    for( std::map < Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); i++ ) {
-      Statement *to = (*i).first;
-      std::list < Statement *> &from = (*i).second->get_uses();
-      Label finalLabel = generator->newLabel();
-      (*i).second->set_label( finalLabel );
+    Label LabelFixer::setLabelsUsg( Label orgValue, Statement *use ) {
+	assert( use != 0 );
 
-      if ( to == 0 ) {
-	BranchStmt *first_use = dynamic_cast<BranchStmt *>(from.back());
-	Label undef("");
-	if ( first_use != 0 )
-	  undef = first_use->get_target();
-	throw SemanticError ( "'" + undef + "' label not defined");
-      }
+	if ( labelTable.find( orgValue ) != labelTable.end() )
+	    labelTable[ orgValue ]->add_use( use );         // the label has been defined or used before
+	else
+	    labelTable[ orgValue ] = new Entry( 0, use );
 
-      to->get_labels().clear();
-      to->get_labels().push_back( finalLabel );
-
-      for ( std::list< Statement *>::iterator j = from.begin(); j != from.end(); j++ ) {
-	BranchStmt *jumpTo = dynamic_cast < BranchStmt * > ( *j );
-	assert( jumpTo != 0 );
-	jumpTo->set_target( finalLabel );
-      }
+	return labelTable[ orgValue ]->get_label();
     }
 
-    // reverse table
-    std::map < Label, Statement * > *ret = new std::map < Label, Statement * >();
-    for(std::map < Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); i++ ) 
-      (*ret)[ (*i).second->get_label() ] = (*i).first;
+    std::map < Label, Statement * > *LabelFixer::resolveJumps() throw ( SemanticError ) {
+	std::map < Statement *, Entry * > def_us;
 
-    return ret;
-  }
+	for ( std::map < Label, Entry *>::iterator i = labelTable.begin(); i != labelTable.end(); i++ ) {
+	    Entry *e = i->second;
 
+	    if ( def_us.find ( e->get_definition() ) == def_us.end() )
+		def_us[ e->get_definition() ] = e;
+	    else
+		if(e->used())
+		    def_us[ e->get_definition() ]->add_uses( e->get_uses() );
+	}
+
+	// get rid of labelTable
+	for ( std::map < Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); i++ ) {
+	    Statement *to = (*i).first;
+	    std::list < Statement *> &from = (*i).second->get_uses();
+	    Label finalLabel = generator->newLabel();
+	    (*i).second->set_label( finalLabel );
+
+	    if ( to == 0 ) {
+		BranchStmt *first_use = dynamic_cast<BranchStmt *>(from.back());
+		Label undef("");
+		if ( first_use != 0 )
+		    undef = first_use->get_target();
+		throw SemanticError ( "'" + undef + "' label not defined");
+	    }
+
+	    to->get_labels().clear();
+	    to->get_labels().push_back( finalLabel );
+
+	    for ( std::list< Statement *>::iterator j = from.begin(); j != from.end(); j++ ) {
+		BranchStmt *jumpTo = dynamic_cast < BranchStmt * > ( *j );
+		assert( jumpTo != 0 );
+		jumpTo->set_target( finalLabel );
+	    } // for
+	} // for
+
+	// reverse table
+	std::map < Label, Statement * > *ret = new std::map < Label, Statement * >();
+	for (std::map < Statement *, Entry * >::iterator i = def_us.begin(); i != def_us.end(); i++ ) 
+	    (*ret)[ (*i).second->get_label() ] = (*i).first;
+
+	return ret;
+    }
 }  // namespace ControlStruct
Index: translator/ControlStruct/LabelFixer.h
===================================================================
--- translator/ControlStruct/LabelFixer.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/LabelFixer.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -12,70 +12,66 @@
 
 namespace ControlStruct {
+    class LabelFixer : public Visitor {
+	typedef Visitor Parent;
+      public:
+	LabelFixer( LabelGenerator *gen = 0 );
 
-  class LabelFixer : public Visitor 
-    {
-      typedef Visitor Parent;
+	std::map < Label, Statement * > *resolveJumps() throw ( SemanticError );
 
-    public:
-      LabelFixer( LabelGenerator *gen = 0 );
+	// Declarations
+	virtual void visit( FunctionDecl *functionDecl );
 
-      std::map < Label, Statement * > *resolveJumps() throw ( SemanticError );
+	// Statements
+	void visit( Statement *stmt );
 
-      // Declarations
-      virtual void visit(FunctionDecl *functionDecl);
+	virtual void visit( CompoundStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( NullStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( ExprStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( IfStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( WhileStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( ForStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( SwitchStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( ChooseStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( FallthruStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( CaseStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( ReturnStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( TryStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( CatchStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( DeclStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+	virtual void visit( BranchStmt *branchStmt );
 
-      // Statements
-      void visit(Statement *stmt);
+	Label setLabelsDef( std::list< Label > &, Statement *definition );
+	Label setLabelsUsg( Label, Statement *usage = 0 );
 
-      virtual void visit(CompoundStmt *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(NullStmt     *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(ExprStmt     *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(IfStmt       *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(WhileStmt    *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(ForStmt      *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(SwitchStmt   *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(ChooseStmt   *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(FallthruStmt *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(CaseStmt     *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(ReturnStmt   *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(TryStmt      *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(CatchStmt    *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(DeclStmt     *stmt) {  visit( (Statement *)stmt ); return Parent::visit(stmt); }
-      virtual void visit(BranchStmt   *branchStmt);
+      private:
+	class Entry {
+	  public:
+	    Entry( Statement *to = 0, Statement *from = 0 );
+	    bool used() { return ( usage.empty() ); }
+	    bool defined() { return ( definition != 0 ); }
+	    bool insideLoop();
 
-      Label setLabelsDef( std::list< Label > &, Statement *definition );
-      Label setLabelsUsg( Label, Statement *usage = 0 );
+	    Label get_label() const { return label; }
+	    Statement *get_definition() const { return definition; }
+	    std::list< Statement *> &get_uses() { return usage; }
 
-    private:
-      class Entry
-      {
-      public:
-	Entry( Statement *to = 0, Statement *from = 0 );
-	bool used() { return ( usage.empty() ); }
-	bool defined() { return ( definition != 0 ); }
-	bool insideLoop();
+	    void add_use ( Statement *use ) { usage.push_back( use ); }
+	    void add_uses ( std::list<Statement *> uses ) { usage.insert( usage.end(), uses.begin(), uses.end() ); }
+	    void set_definition( Statement *def ) { definition = def; }
 
-	Label get_label() const { return label; }
-	Statement *get_definition() const { return definition; }
-	std::list< Statement *> &get_uses() { return usage; }
-
-	void add_use ( Statement *use ) { usage.push_back(use); }
-	void add_uses ( std::list<Statement *> uses ) { usage.insert( usage.end(), uses.begin(), uses.end() ); }
-	void set_definition( Statement *def ) { definition = def; }
-
-	void set_label( Label lab ) { label = lab; }
-	Label gset_label() const { return label; }
-      private:
-	Label label;  
-	Statement *definition;
-	std::list<Statement *> usage;
-      };
+	    void set_label( Label lab ) { label = lab; }
+	    Label gset_label() const { return label; }
+	  private:
+	    Label label;  
+	    Statement *definition;
+	    std::list<Statement *> usage;
+	};
               
-      std::map < Label, Entry *> labelTable;
-      LabelGenerator *generator;
+	std::map < Label, Entry *> labelTable;
+	LabelGenerator *generator;
     };
 } // namespace ControlStruct
 
-#endif // #ifndef LABEL_FIXER_H
+#endif // LABEL_FIXER_H
 
 /*
Index: translator/ControlStruct/LabelGenerator.cc
===================================================================
--- translator/ControlStruct/LabelGenerator.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/LabelGenerator.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -5,21 +5,19 @@
 
 namespace ControlStruct {
+    LabelGenerator *LabelGenerator::labelGenerator = 0;
 
-  LabelGenerator *LabelGenerator::labelGenerator = 0;
+    LabelGenerator *LabelGenerator::getGenerator() {
+	if ( LabelGenerator::labelGenerator == 0 )
+	    LabelGenerator::labelGenerator = new LabelGenerator();
 
-  LabelGenerator *LabelGenerator::getGenerator() {
-    if ( LabelGenerator::labelGenerator == 0 )
-      LabelGenerator::labelGenerator = new LabelGenerator();
+	return labelGenerator;
+    }
 
-    return labelGenerator;
-  }
-
-  Label LabelGenerator::newLabel() {
-    std::ostrstream os;
-    os << "__L" << current++ << "__";// << std::ends;
-    os.freeze( false );
-    std::string ret = std::string (os.str(), os.pcount());
-    return Label( ret );
-  }
-
+    Label LabelGenerator::newLabel() {
+	std::ostrstream os;
+	os << "__L" << current++ << "__";// << std::ends;
+	os.freeze( false );
+	std::string ret = std::string (os.str(), os.pcount());
+	return Label( ret );
+    }
 } // namespace ControlStruct
Index: translator/ControlStruct/LabelGenerator.h
===================================================================
--- translator/ControlStruct/LabelGenerator.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/LabelGenerator.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -5,24 +5,19 @@
 
 namespace ControlStruct {
-
-  class LabelGenerator
-  {
-  public:
-    static LabelGenerator *getGenerator();
-    Label newLabel();
-    void reset() { current = 0; }
-    void rewind() { current--; }
-
-  protected:
-    LabelGenerator(): current(0) {}
-
-  private:
-    int current;
-    static LabelGenerator *labelGenerator;
-  };
-
+    class LabelGenerator {
+      public:
+	static LabelGenerator *getGenerator();
+	Label newLabel();
+	void reset() { current = 0; }
+	void rewind() { current--; }
+      protected:
+	LabelGenerator(): current(0) {}
+      private:
+	int current;
+	static LabelGenerator *labelGenerator;
+    };
 } // namespace ControlStruct
 
-#endif // #ifndef LABEL_GENERATOR_H
+#endif // LABEL_GENERATOR_H
 
 /*
Index: translator/ControlStruct/LabelTypeChecker.cc
===================================================================
--- translator/ControlStruct/LabelTypeChecker.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/LabelTypeChecker.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -11,62 +11,56 @@
 
 namespace ControlStruct {
+    void LabelTypeChecker::visit(UntypedExpr *untypedExpr){
+	assert( untypedExpr != 0 );
+	NameExpr *fname;
+	if ( ((fname = dynamic_cast<NameExpr *>(untypedExpr->get_function())) != 0) 
+	    && fname->get_name() == std::string("LabAddress") )
+	    std::cerr << "Taking the label of an address." << std::endl;
+	else {
+	    acceptAll( untypedExpr->get_results(), *this );
+	    acceptAll( untypedExpr->get_args(), *this );
+	} // if
+	return;
+    }
 
-  void LabelTypeChecker::visit(UntypedExpr *untypedExpr){
-    assert( untypedExpr != 0 );
-    NameExpr *fname;
-    if( ((fname = dynamic_cast<NameExpr *>(untypedExpr->get_function())) != 0) 
-	&& fname->get_name() == std::string("LabAddress") )
-      std::cerr << "Taking the label of an address." << std::endl;
-    else {
-      acceptAll( untypedExpr->get_results(), *this );
-      acceptAll( untypedExpr->get_args(), *this );
+    void LabelTypeChecker::visit(CompoundStmt *compoundStmt) {
+	index.enterScope();
+	acceptAll( compoundStmt->get_kids(), *this );
+	index.leaveScope();
     }
-    return;
-  }
 
-  void LabelTypeChecker::visit(CompoundStmt *compoundStmt) {
-    index.enterScope();
-    acceptAll( compoundStmt->get_kids(), *this );
-    index.leaveScope();
-  }
+    void LabelTypeChecker::visit(DeclStmt *declStmt){
+	declStmt->accept( index );
 
-  void LabelTypeChecker::visit(DeclStmt *declStmt){
-    declStmt->accept( index );
+	//ObjectDecl *odecl = 0;
+	// if ( ( odecl = dynamic_cast<ObjectDecl *>(declStmt->get_decl()) ) != 0 ){
+	return;
+    }
 
-    //ObjectDecl *odecl = 0;
-    // if( ( odecl = dynamic_cast<ObjectDecl *>(declStmt->get_decl()) ) != 0 ){
-    return;
-  }
+    void LabelTypeChecker::visit(BranchStmt *branchStmt) {
+	if ( branchStmt->get_type() != BranchStmt::Goto ) return;
+	Expression *target;
+	if ( (target = branchStmt->get_computedTarget()) == 0 ) return;
 
-  void LabelTypeChecker::visit(BranchStmt *branchStmt) {
-    if( branchStmt->get_type() != BranchStmt::Goto ) return;
-    Expression *target;
-    if( (target = branchStmt->get_computedTarget()) == 0 ) return;
+	NameExpr *name;
+	if ( ((name = dynamic_cast<NameExpr *>(target)) == 0) )
+	    return; // Not a name expression
+    
+	std::list< DeclarationWithType * > interps;
+	index.lookupId(name->get_name(), interps);
+	if ( interps.size() != 1)
+	    // in case of multiple declarations
+	    throw SemanticError("Illegal label expression: " + name->get_name() );
 
-    NameExpr *name;
-    if( ((name = dynamic_cast<NameExpr *>(target)) == 0) )
-      return; // Not a name expression
-    
-    std::list< DeclarationWithType * > interps;
-    index.lookupId(name->get_name(), interps);
-    if ( interps.size() != 1)
-      // in case of multiple declarations
-      throw SemanticError("Illegal label expression: " + name->get_name() );
+	PointerType *ptr;
+	if ( (ptr = dynamic_cast<PointerType *>(interps.front()->get_type())) != 0 )
+	    if ( dynamic_cast<VoidType *>(ptr->get_base()) != 0 )
+		return;
+	    else
+		throw SemanticError("Wrong type of parameter for computed goto");
+	else
+	    throw SemanticError("Wrong type of parameter for computed goto");
 
-    PointerType *ptr;
-    if ( (ptr = dynamic_cast<PointerType *>(interps.front()->get_type())) != 0 )
-      if ( dynamic_cast<VoidType *>(ptr->get_base()) != 0 )
 	return;
-      else
-	throw SemanticError("Wrong type of parameter for computed goto");
-    else
-	throw SemanticError("Wrong type of parameter for computed goto");
-
-    return;
-  }
+    }
 } // namespace ControlStruct
-
-
-
-
-
Index: translator/ControlStruct/LabelTypeChecker.h
===================================================================
--- translator/ControlStruct/LabelTypeChecker.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/LabelTypeChecker.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -9,21 +9,18 @@
 
 namespace ControlStruct {
+    class LabelTypeChecker : public Visitor {
+      public:
+	//LabelTypeChecker() {
 
-  class LabelTypeChecker : public Visitor
-  {
-  public:
-    //LabelTypeChecker() {
-
-    virtual void visit(CompoundStmt *compoundStmt);
-    virtual void visit(DeclStmt *declStmt);
-    virtual void visit(BranchStmt *branchStmt);
-    virtual void visit(UntypedExpr *untypedExpr);
-  private:
-    SymTab::Indexer index;
-  };
-
+	virtual void visit( CompoundStmt *compoundStmt );
+	virtual void visit( DeclStmt *declStmt );
+	virtual void visit( BranchStmt *branchStmt );
+	virtual void visit( UntypedExpr *untypedExpr );
+      private:
+	SymTab::Indexer index;
+    };
 } // namespace ControlStruct
 
-#endif // #ifndef LABEL_TYPE_H
+#endif // LABEL_TYPE_H
 
 /*
Index: translator/ControlStruct/MLEMutator.cc
===================================================================
--- translator/ControlStruct/MLEMutator.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/MLEMutator.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -7,198 +7,182 @@
 
 namespace ControlStruct {
-  MLEMutator::~MLEMutator()
-  {
-    delete targetTable;
-    targetTable = 0;
-  }
-
-  CompoundStmt* MLEMutator::mutate(CompoundStmt *cmpndStmt)
-  {
-    bool labeledBlock = false;
-    if (!((cmpndStmt->get_labels()).empty())) {
-      labeledBlock = true;
-      enclosingBlocks.push_back( Entry( cmpndStmt ) );
+    MLEMutator::~MLEMutator() {
+	delete targetTable;
+	targetTable = 0;
     }
 
-    std::list< Statement * > &kids = cmpndStmt->get_kids();
-    for( std::list< Statement * >::iterator k = kids.begin(); k != kids.end(); k++ ) {
-      *k = (*k)->acceptMutator(*this);
+    CompoundStmt* MLEMutator::mutate(CompoundStmt *cmpndStmt) {
+	bool labeledBlock = false;
+	if ( !((cmpndStmt->get_labels()).empty()) ) {
+	    labeledBlock = true;
+	    enclosingBlocks.push_back( Entry( cmpndStmt ) );
+	}
 
-      if (!get_breakLabel().empty()) {
-	std::list< Statement * >::iterator next = k; next++;
-	if( next == kids.end() ) {
-	  std::list<Label> ls; ls.push_back( get_breakLabel() );
-	  kids.push_back( new NullStmt(ls) );
-	} else
-	  (*next)->get_labels().push_back( get_breakLabel() );
+	std::list< Statement * > &kids = cmpndStmt->get_kids();
+	for ( std::list< Statement * >::iterator k = kids.begin(); k != kids.end(); k++ ) {
+	    *k = (*k)->acceptMutator(*this);
 
-	set_breakLabel("");
-      }
+	    if ( !get_breakLabel().empty() ) {
+		std::list< Statement * >::iterator next = k; next++;
+		if ( next == kids.end() ) {
+		    std::list<Label> ls; ls.push_back( get_breakLabel() );
+		    kids.push_back( new NullStmt(ls) );
+		} else
+		    (*next)->get_labels().push_back( get_breakLabel() );
+
+		set_breakLabel("");
+	    } // if
+	} // for
+
+	if ( labeledBlock ) {
+	    assert( ! enclosingBlocks.empty() );
+	    if ( ! enclosingBlocks.back().get_breakExit().empty() )
+		set_breakLabel( enclosingBlocks.back().get_breakExit() );
+	    enclosingBlocks.pop_back();
+	} // if
+
+	//mutateAll( cmpndStmt->get_kids(), *this );
+	return cmpndStmt;
     }
 
-    if ( labeledBlock ) {
-      assert( ! enclosingBlocks.empty() );
-      if( ! enclosingBlocks.back().get_breakExit().empty() )
-	set_breakLabel( enclosingBlocks.back().get_breakExit() );
-      enclosingBlocks.pop_back();
+    Statement *MLEMutator::mutate( WhileStmt *whileStmt ) {
+	enclosingLoops.push_back( Entry( whileStmt ) );
+	whileStmt->set_body ( whileStmt->get_body()->acceptMutator( *this ) );
+
+	Entry &e = enclosingLoops.back();
+	assert ( e == whileStmt );
+	whileStmt->set_body( mutateLoop( whileStmt->get_body(), e ) );
+	enclosingLoops.pop_back();
+
+	return whileStmt;
     }
 
-    //mutateAll( cmpndStmt->get_kids(), *this );
-    return cmpndStmt;
-  }
+    Statement *MLEMutator::mutate( ForStmt *forStmt ) {
+	enclosingLoops.push_back( Entry( forStmt ) );
+	maybeMutate( forStmt->get_body(), *this );
 
-  Statement *MLEMutator::mutate( WhileStmt *whileStmt )
-  {
-    enclosingLoops.push_back( Entry( whileStmt ) );
-    whileStmt->set_body ( whileStmt->get_body()->acceptMutator( *this ) );
+	Entry &e = enclosingLoops.back();
+	assert ( e == forStmt );
+	forStmt->set_body( mutateLoop( forStmt->get_body(), e ) );
+	enclosingLoops.pop_back();
 
-    Entry &e = enclosingLoops.back();
-    assert ( e == whileStmt );
-    whileStmt->set_body( mutateLoop( whileStmt->get_body(), e ) );
-    enclosingLoops.pop_back();
-
-    return whileStmt;
-  }
-
-  Statement *MLEMutator::mutate( ForStmt *forStmt )
-  {
-    enclosingLoops.push_back( Entry( forStmt ) );
-    maybeMutate( forStmt->get_body(), *this );
-
-    Entry &e = enclosingLoops.back();
-    assert ( e == forStmt );
-    forStmt->set_body( mutateLoop( forStmt->get_body(), e ) );
-    enclosingLoops.pop_back();
-
-    return forStmt;
-  }
-
-  Statement *MLEMutator::mutate( BranchStmt *branchStmt )
-    throw ( SemanticError )
-  {
-    if ( branchStmt->get_type() == BranchStmt::Goto )
-      return branchStmt;
-
-    // test if continue target is a loop
-    if ( branchStmt->get_type() == BranchStmt::Continue && enclosingLoops.empty() )
-      throw SemanticError( "'continue' outside a loop" );
-
-  if ( branchStmt->get_type() == BranchStmt::Break && (enclosingLoops.empty() && enclosingSwitches.empty() && enclosingBlocks.empty() ) )
-      throw SemanticError( "'break' outside a loop or switch" );
-
-    if ( branchStmt->get_target() == "" ) return branchStmt;
-
-    if ( targetTable->find( branchStmt->get_target() ) == targetTable->end() )
-      throw SemanticError("The label defined in the exit loop statement does not exist." );  // shouldn't happen (since that's already checked)
-
-    std::list< Entry >::iterator check;
-    if ( ( check = std::find( enclosingLoops.begin(), enclosingLoops.end(), (*targetTable)[branchStmt->get_target()] ) ) == enclosingLoops.end() )
-      // not in loop, checking if in switch/choose
-      if ( (check = std::find( enclosingBlocks.begin(), enclosingBlocks.end(), (*targetTable)[branchStmt->get_target()] )) == enclosingBlocks.end() )
-	// neither in loop nor in block, checking if in switch/choose
-	if ( (check = std::find( enclosingSwitches.begin(), enclosingSwitches.end(), (*targetTable)[branchStmt->get_target()] )) == enclosingSwitches.end() )
-	  throw SemanticError("The target specified in the exit loop statement does not correspond to an enclosing loop.");
-
-    if ( enclosingLoops.back() == (*check) )
-      return branchStmt;                      // exit the innermost loop (labels not necessary)
-
-    Label newLabel;
-    switch( branchStmt->get_type() ) {
-    case BranchStmt::Break:
-      if ( check->get_breakExit() != "" )
-	newLabel = check->get_breakExit();
-      else
-	{ newLabel = generator->newLabel(); check->set_breakExit( newLabel ); }
-      break;
-    case BranchStmt::Continue:
-      if ( check->get_contExit() != "" )
-	newLabel = check->get_contExit();
-      else
-	{ newLabel = generator->newLabel(); check->set_contExit( newLabel ); }
-      break;
-
-    default:
-      // shouldn't be here
-      return 0;
+	return forStmt;
     }
 
-    return new BranchStmt(std::list<Label>(), newLabel, BranchStmt::Goto );
-  }
+    Statement *MLEMutator::mutate( BranchStmt *branchStmt ) throw ( SemanticError ) {
+	if ( branchStmt->get_type() == BranchStmt::Goto )
+	    return branchStmt;
+
+	// test if continue target is a loop
+	if ( branchStmt->get_type() == BranchStmt::Continue && enclosingLoops.empty() )
+	    throw SemanticError( "'continue' outside a loop" );
+
+	if ( branchStmt->get_type() == BranchStmt::Break && (enclosingLoops.empty() && enclosingSwitches.empty() && enclosingBlocks.empty() ) )
+	    throw SemanticError( "'break' outside a loop or switch" );
+
+	if ( branchStmt->get_target() == "" ) return branchStmt;
+
+	if ( targetTable->find( branchStmt->get_target() ) == targetTable->end() )
+	    throw SemanticError("The label defined in the exit loop statement does not exist." );  // shouldn't happen (since that's already checked)
+
+	std::list< Entry >::iterator check;
+	if ( ( check = std::find( enclosingLoops.begin(), enclosingLoops.end(), (*targetTable)[branchStmt->get_target()] ) ) == enclosingLoops.end() )
+	    // not in loop, checking if in switch/choose
+	    if ( (check = std::find( enclosingBlocks.begin(), enclosingBlocks.end(), (*targetTable)[branchStmt->get_target()] )) == enclosingBlocks.end() )
+		// neither in loop nor in block, checking if in switch/choose
+		if ( (check = std::find( enclosingSwitches.begin(), enclosingSwitches.end(), (*targetTable)[branchStmt->get_target()] )) == enclosingSwitches.end() )
+		    throw SemanticError("The target specified in the exit loop statement does not correspond to an enclosing loop.");
+
+	if ( enclosingLoops.back() == (*check) )
+	    return branchStmt;                      // exit the innermost loop (labels not necessary)
+
+	Label newLabel;
+	switch( branchStmt->get_type() ) {
+	  case BranchStmt::Break:
+	    if ( check->get_breakExit() != "" )
+		newLabel = check->get_breakExit();
+	    else { newLabel = generator->newLabel(); check->set_breakExit( newLabel ); }
+	    break;
+	  case BranchStmt::Continue:
+	    if ( check->get_contExit() != "" )
+		newLabel = check->get_contExit();
+	    else { newLabel = generator->newLabel(); check->set_contExit( newLabel ); }
+	    break;
+	  default:
+	    // shouldn't be here
+	    return 0;
+	} // switch
+
+	return new BranchStmt(std::list<Label>(), newLabel, BranchStmt::Goto );
+    }
 
 
-  Statement *MLEMutator::mutate(SwitchStmt *switchStmt)
-  {
-    Label brkLabel = generator->newLabel();
-    enclosingSwitches.push_back( Entry(switchStmt, "", brkLabel) );
-    mutateAll( switchStmt->get_branches(), *this );
-    {
-      // check if this is necessary (if there is a break to this point, otherwise do not generate
-      std::list<Label> temp; temp.push_back( brkLabel );
-      switchStmt->get_branches().push_back( new BranchStmt( temp, Label(""), BranchStmt::Break ) );
-    }
-    assert ( enclosingSwitches.back() == switchStmt );
-    enclosingSwitches.pop_back();
-    return switchStmt;
-  }
-
-  Statement *MLEMutator::mutate(ChooseStmt *switchStmt)
-  {
-    Label brkLabel = generator->newLabel();
-    enclosingSwitches.push_back( Entry(switchStmt,"", brkLabel) );
-    mutateAll( switchStmt->get_branches(), *this );
-    {
-      // check if this is necessary (if there is a break to this point, otherwise do not generate
-      std::list<Label> temp; temp.push_back( brkLabel );
-      switchStmt->get_branches().push_back( new BranchStmt( temp, Label(""), BranchStmt::Break ) );
-    }
-    assert ( enclosingSwitches.back() == switchStmt );
-    enclosingSwitches.pop_back();
-    return switchStmt;
-  }
-
-  Statement *MLEMutator::mutateLoop( Statement *bodyLoop, Entry &e ) {
-    CompoundStmt *newBody;
-    if ( ! (newBody = dynamic_cast<CompoundStmt *>( bodyLoop )) ) {
-      newBody = new CompoundStmt( std::list< Label >() );
-      newBody->get_kids().push_back( bodyLoop );
+    Statement *MLEMutator::mutate(SwitchStmt *switchStmt) {
+	Label brkLabel = generator->newLabel();
+	enclosingSwitches.push_back( Entry(switchStmt, "", brkLabel) );
+	mutateAll( switchStmt->get_branches(), *this ); {
+	    // check if this is necessary (if there is a break to this point, otherwise do not generate
+	    std::list<Label> temp; temp.push_back( brkLabel );
+	    switchStmt->get_branches().push_back( new BranchStmt( temp, Label(""), BranchStmt::Break ) );
+	}
+	assert ( enclosingSwitches.back() == switchStmt );
+	enclosingSwitches.pop_back();
+	return switchStmt;
     }
 
-    Label endLabel = e.get_contExit();
-
-    if ( e.get_breakExit() != "" ) {
-      if ( endLabel == "" ) endLabel = generator->newLabel();
-      // check for whether this label is used or not, so as to not generate extraneous gotos
-      if (e.breakExitUsed)
-	newBody->get_kids().push_back( new BranchStmt( std::list< Label >(), endLabel, BranchStmt::Goto ) );
-      // xxx
-      //std::list< Label > ls; ls.push_back( e.get_breakExit() );
-      set_breakLabel( e.get_breakExit() );
-      //newBody->get_kids().push_back( new BranchStmt( ls, "", BranchStmt::Break ) );
+    Statement *MLEMutator::mutate(ChooseStmt *switchStmt) {
+	Label brkLabel = generator->newLabel();
+	enclosingSwitches.push_back( Entry(switchStmt,"", brkLabel) );
+	mutateAll( switchStmt->get_branches(), *this ); {
+	    // check if this is necessary (if there is a break to this point, otherwise do not generate
+	    std::list<Label> temp; temp.push_back( brkLabel );
+	    switchStmt->get_branches().push_back( new BranchStmt( temp, Label(""), BranchStmt::Break ) );
+	}
+	assert ( enclosingSwitches.back() == switchStmt );
+	enclosingSwitches.pop_back();
+	return switchStmt;
     }
 
-    if ( e.get_breakExit() != "" || e.get_contExit() != "" ){
-      if(dynamic_cast< NullStmt *>( newBody->get_kids().back() ))
-	newBody->get_kids().back()->get_labels().push_back( endLabel );
-      else {
-	std::list < Label > ls; ls.push_back( endLabel );
-	newBody->get_kids().push_back( new NullStmt( ls ) );
-      }
+    Statement *MLEMutator::mutateLoop( Statement *bodyLoop, Entry &e ) {
+	CompoundStmt *newBody;
+	if ( ! (newBody = dynamic_cast<CompoundStmt *>( bodyLoop )) ) {
+	    newBody = new CompoundStmt( std::list< Label >() );
+	    newBody->get_kids().push_back( bodyLoop );
+	} // if
+
+	Label endLabel = e.get_contExit();
+
+	if ( e.get_breakExit() != "" ) {
+	    if ( endLabel == "" ) endLabel = generator->newLabel();
+	    // check for whether this label is used or not, so as to not generate extraneous gotos
+	    if (e.breakExitUsed)
+		newBody->get_kids().push_back( new BranchStmt( std::list< Label >(), endLabel, BranchStmt::Goto ) );
+	    // xxx
+	    //std::list< Label > ls; ls.push_back( e.get_breakExit() );
+	    set_breakLabel( e.get_breakExit() );
+	    //newBody->get_kids().push_back( new BranchStmt( ls, "", BranchStmt::Break ) );
+	} // if
+
+	if ( e.get_breakExit() != "" || e.get_contExit() != "" ){
+	    if (dynamic_cast< NullStmt *>( newBody->get_kids().back() ))
+		newBody->get_kids().back()->get_labels().push_back( endLabel );
+	    else {
+		std::list < Label > ls; ls.push_back( endLabel );
+		newBody->get_kids().push_back( new NullStmt( ls ) );
+	    } // if
+	} // if
+
+	return newBody;
     }
 
-    return newBody;
-  }
+    //*** Entry's methods
+    void MLEMutator::Entry::set_contExit( Label l ) {
+	assert ( contExit == "" || contExit == l );
+	contExit = l;
+    }
 
-  //*** Entry's methods
-  void MLEMutator::Entry::set_contExit( Label l )
-  {
-    assert ( contExit == "" || contExit == l );
-    contExit = l;
-  }
-
-  void MLEMutator::Entry::set_breakExit( Label l )
-  {
-    assert ( breakExit == "" || breakExit == l );
-    breakExit = l;
-  }
-
+    void MLEMutator::Entry::set_breakExit( Label l ) {
+	assert ( breakExit == "" || breakExit == l );
+	breakExit = l;
+    }
 } // namespace ControlStruct
Index: translator/ControlStruct/MLEMutator.h
===================================================================
--- translator/ControlStruct/MLEMutator.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/MLEMutator.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -12,56 +12,53 @@
 
 namespace ControlStruct {
+    class MLEMutator : public Mutator {
+	class Entry;
+      public:
+	MLEMutator( std::map <Label, Statement *> *t, LabelGenerator *gen = 0 ) : targetTable( t ), breakLabel(std::string("")), generator( gen ) {}
+	~MLEMutator();
 
-  class MLEMutator : public Mutator {
-    class Entry;
+	CompoundStmt *mutate( CompoundStmt *cmpndStmt );
+	Statement *mutate( WhileStmt *whileStmt );
+	Statement *mutate( ForStmt *forStmt );
+	Statement *mutate( BranchStmt *branchStmt ) throw ( SemanticError );
 
-  public:
-    MLEMutator( std::map <Label, Statement *> *t, LabelGenerator *gen = 0 ) : targetTable( t ), breakLabel(std::string("")), generator( gen ) {}
-    ~MLEMutator();
+	Statement *mutate( SwitchStmt *switchStmt );
+	Statement *mutate( ChooseStmt *switchStmt );
 
-    CompoundStmt *mutate( CompoundStmt *cmpndStmt );
-    Statement *mutate( WhileStmt *whileStmt );
-    Statement *mutate( ForStmt *forStmt );
-    Statement *mutate( BranchStmt *branchStmt ) throw ( SemanticError );
+	Statement *mutateLoop( Statement *bodyLoop, Entry &e );
 
-    Statement *mutate( SwitchStmt *switchStmt );
-    Statement *mutate( ChooseStmt *switchStmt );
+	Label &get_breakLabel() { return breakLabel; }
+	void set_breakLabel( Label newValue ) { breakLabel = newValue; }
+      private:
+	class Entry {
+	  public:
+	    explicit Entry( Statement *_loop = 0, Label _contExit = Label(""), Label _breakExit = Label("") ) :
+		loop( _loop ), contExit( _contExit ), breakExit( _breakExit ), contExitUsed( false ), breakExitUsed( false ) {}
 
-    Statement *mutateLoop( Statement *bodyLoop, Entry &e );
+	    bool operator==( const Statement *stmt ) { return ( loop == stmt ); }
+	    bool operator!=( const Statement *stmt ) { return ( loop != stmt ); }
 
-    Label &get_breakLabel() { return breakLabel; }
-    void set_breakLabel( Label newValue ) { breakLabel = newValue; }
+	    bool operator==( const Entry &other ) { return ( loop == other.get_loop() ); }
 
-  private:
-    class Entry {
-    public:
-      explicit Entry( Statement *_loop = 0, Label _contExit = Label(""), Label _breakExit = Label("") ) :
-	loop( _loop ), contExit( _contExit ), breakExit( _breakExit ), contExitUsed( false ), breakExitUsed( false ) {}
+	    Statement *get_loop() const { return loop; }
 
-      bool operator==( const Statement *stmt ) { return ( loop == stmt ) ; }
-      bool operator!=( const Statement *stmt ) { return ( loop != stmt ) ; }
+	    Label get_contExit() const { return contExit; }
+	    void set_contExit( Label );
 
-      bool operator==( const Entry &other ) { return ( loop == other.get_loop() ) ; }
+	    Label get_breakExit() const { return breakExit; }
+	    void set_breakExit( Label );
 
-      Statement *get_loop() const { return loop; }
+	  private:
+	    Statement *loop;
+	    Label contExit, breakExit;
+	  public: // hack, provide proper [sg]etters
+	    bool contExitUsed, breakExitUsed;
+	};
 
-      Label get_contExit() const { return contExit; }
-      void set_contExit( Label );
-
-      Label get_breakExit() const { return breakExit; }
-      void set_breakExit( Label );
-
-    private:
-      Statement *loop;
-      Label contExit, breakExit;
-    public: // hack, provide proper [sg]etters
-      bool contExitUsed, breakExitUsed;
+	std::map <Label, Statement *> *targetTable;
+	std::list < Entry > enclosingBlocks,enclosingLoops,enclosingSwitches;
+	Label breakLabel;
+	LabelGenerator *generator;
     };
-
-    std::map <Label, Statement *> *targetTable;
-    std::list < Entry > enclosingBlocks,enclosingLoops,enclosingSwitches;
-    Label breakLabel;
-    LabelGenerator *generator;
-  };
 
 } // namespace ControlStruct
Index: translator/ControlStruct/Mutate.cc
===================================================================
--- translator/ControlStruct/Mutate.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/Mutate.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -20,23 +20,18 @@
 
 namespace ControlStruct {
+    void mutate( std::list< Declaration * > translationUnit ) {
+	ChooseMutator chmut;
+	ForExprMutator formut;
+	CaseRangeMutator ranges;  // has to run after ChooseMutator
+	LabelFixer lfix;
+	//ExceptMutator exc;
+	LabelTypeChecker lbl;
 
-  void mutate( std::list< Declaration * > translationUnit )
-  {
-    ChooseMutator chmut;
-    ForExprMutator formut;
-    CaseRangeMutator ranges;  // has to run after ChooseMutator
-    LabelFixer lfix;
-    //ExceptMutator exc;
-    LabelTypeChecker lbl;
-
-    mutateAll( translationUnit , formut );
-    acceptAll( translationUnit , lfix );
-    mutateAll( translationUnit , chmut );
-    mutateAll( translationUnit , ranges );
-    //mutateAll( translationUnit , exc );
-    //acceptAll( translationUnit , lbl );
-  }
-
+	mutateAll( translationUnit, formut );
+	acceptAll( translationUnit, lfix );
+	mutateAll( translationUnit, chmut );
+	mutateAll( translationUnit, ranges );
+	//mutateAll( translationUnit, exc );
+	//acceptAll( translationUnit, lbl );
+    }
 } // namespace CodeGen
-
-
Index: translator/ControlStruct/Mutate.h
===================================================================
--- translator/ControlStruct/Mutate.h	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/Mutate.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -8,10 +8,8 @@
 
 namespace ControlStruct {
-
-  void mutate( std::list< Declaration* > translationUnit );
-
+    void mutate( std::list< Declaration* > translationUnit );
 } // namespace ControlStruct
 
-#endif // #ifndef CTRLS_MUTATE_H
+#endif // CTRLS_MUTATE_H
 
 /*
Index: translator/ControlStruct/module.mk
===================================================================
--- translator/ControlStruct/module.mk	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
+++ translator/ControlStruct/module.mk	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
