Index: translator/ControlStruct/CaseRangeMutator.cc
===================================================================
--- translator/ControlStruct/CaseRangeMutator.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/CaseRangeMutator.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/CaseRangeMutator.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/ChooseMutator.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/ChooseMutator.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/ForExprMutator.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/ForExprMutator.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/LabelFixer.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/LabelFixer.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/LabelGenerator.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/LabelGenerator.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/LabelTypeChecker.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/LabelTypeChecker.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/MLEMutator.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/MLEMutator.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/Mutate.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/Mutate.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -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 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ControlStruct/module.mk	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
Index: translator/Designators/Processor.cc
===================================================================
--- translator/Designators/Processor.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/Designators/Processor.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -6,146 +6,142 @@
 
 namespace Designators {
+    Matcher::Matcher( const std::list< DeclarationWithType * > &decls ) {
+	int cnt = 0;
+	for ( std::list< DeclarationWithType * >::const_iterator i = decls.begin();
+	     i != decls.end(); i++, cnt++ ) {
+	    std::string newName = (*i)->get_name();
+	    if ( table.find( newName ) == table.end() ) {
+		table.insert( std::pair<std::string, int>(newName, cnt) );
+		order.push_back( newName );
+		declarations.push_back( *i );
+		alternatives.push_back( 0 );
+	    }
+	}
+    }
 
-  Matcher::Matcher( const std::list< DeclarationWithType * > &decls ) {
-    int cnt = 0;
-    for( std::list< DeclarationWithType * >::const_iterator i = decls.begin();
-	 i != decls.end(); i++, cnt++ ) {
-      std::string newName = (*i)->get_name();
-      if( table.find( newName ) == table.end() ) {
-	table.insert( std::pair<std::string, int>(newName, cnt) );
-	order.push_back( newName );
-	declarations.push_back( *i );
-	alternatives.push_back( 0 );
-      }
+    template< class InputIterator >
+    bool Matcher::add(InputIterator begin, InputIterator end, ResolvExpr::Alternative &alt ) {
+	while ( begin != end ) {
+	    if ( table.find( *begin ) != table.end() )
+		alternatives[ table[ *begin ] ] = new ResolvExpr::Alternative(alt);
+	    else
+		return false;
+	    begin++;
+	}
+	return true;
     }
-  }
 
-  template< class InputIterator >
-  bool Matcher::add(InputIterator begin, InputIterator end, ResolvExpr::Alternative &alt ) {
-    while( begin != end ) {
-      if ( table.find( *begin ) != table.end() )
-	alternatives[ table[ *begin ] ] = new ResolvExpr::Alternative(alt);
-      else
-	return false;
-      begin++;
+    template< class InputIterator, class OutputIterator >
+    bool Matcher::slice(InputIterator begin, InputIterator end, OutputIterator out ) {
+	while ( begin != end )
+	    if ( table.find( *begin ) != table.end() )
+		*out++ = declarations [ table[ *begin++ ] ];
+	    else
+		return false; // throw 0;
+	return true;
     }
-    return true;
-  }
 
-  template< class InputIterator, class OutputIterator >
-  bool Matcher::slice(InputIterator begin, InputIterator end, OutputIterator out ) {
-    while( begin != end )
-      if ( table.find( *begin ) != table.end() )
-	*out++ = declarations [ table[ *begin++ ] ];
-      else
-	return false; // throw 0;
-    return true;
-  }
+    template< class OutputIterator >
+    bool Matcher::get_reorderedCall( OutputIterator out ) {
+	// fill call with defaults, if need be
+	for (Matcher::iterator o = begin(); o != end(); o++ )
+	    if ( alternatives[ table[ *o ] ] == 0 )
+		return false;
+	    else
+		out++ = *alternatives[table[ *o ]];
+	return true;
+    }
 
-  template< class OutputIterator >
-  bool Matcher::get_reorderedCall( OutputIterator out ) {
-    // fill call with defaults, if need be
-    for (Matcher::iterator o = begin(); o != end(); o++ )
-      if ( alternatives[ table[ *o ] ] == 0 )
-	return false;
-      else
-	out++ = *alternatives[table[ *o ]];
-    return true;
-  }
+    bool fixDesignations( ResolvExpr::AlternativeFinder &finder, Expression *designation ) {
+	// Distribute `designation' over alternatives contained in `finder'
+	if ( ! designation) return false;
+	else
+	    for ( ResolvExpr::AlternativeFinder::iterator alt = finder.begin(); alt != finder.end(); alt++ )
+		alt->expr->set_argName( designation );
+	return true;
+    }
 
-  bool fixDesignations( ResolvExpr::AlternativeFinder &finder, Expression *designation ) {
-    /* Distribute `designation' over alternatives contained in `finder' */
-    if (!designation) return false;
-    else
-      for( ResolvExpr::AlternativeFinder::iterator alt = finder.begin(); alt != finder.end(); alt++ )
-	alt->expr->set_argName( designation );
-    return true;
-  }
+    template < class OutputIterator >
+    bool extractNames( Expression *expr, OutputIterator out, Matcher matcher ) {
+	Expression *designator = expr->get_argName();
+	if ( designator == 0 ) return false;
 
-  template < class OutputIterator >
-  bool extractNames( Expression *expr, OutputIterator out, Matcher matcher ) {
-    Expression *designator = expr->get_argName();
-    if ( designator == 0 ) return false;
+	if ( NameExpr *ndes = dynamic_cast<NameExpr *>(designator) )
+	    out++ = ndes->get_name();
+	else if ( TupleExpr *tdes = dynamic_cast<TupleExpr *>(designator) ) {
+	    std::cerr << "Tuple designation" << std::endl;
+//      ObjectDecl *decl = extractTupleV(matcher, tdes); // xxx
+	    // transform?
+	    for ( std::list< Expression * >::iterator n = tdes->get_exprs().begin();
+		 n != tdes->get_exprs().end(); n++ ) {
 
-    if( NameExpr *ndes = dynamic_cast<NameExpr *>(designator) )
-	out++ = ndes->get_name();
-    else if ( TupleExpr *tdes = dynamic_cast<TupleExpr *>(designator) ) {
-      std::cerr << "Tuple designation" << std::endl;
-//      ObjectDecl *decl = extractTupleV(matcher, tdes); // xxx
-      // transform?
-      for( std::list< Expression * >::iterator n = tdes->get_exprs().begin();
-	   n != tdes->get_exprs().end(); n++ ) {
+		if ( NameExpr *name = dynamic_cast<NameExpr *>(*n) )
+		    out++ = name->get_name();
+		else
+		    // flatten nested Tuples
+		    throw SemanticError( "Invalid tuple designation." );
+	    }
+	}
+	return true;
+    }
 
-	if ( NameExpr *name = dynamic_cast<NameExpr *>(*n) )
-	  out++ = name->get_name();
-	else
-	  // flatten nested Tuples
-	  throw SemanticError( "Invalid tuple designation." );
-      }
+    std::string extractName( Expression *expr ) /* throw NoNameExtraction */ {
+	if ( NameExpr *name = dynamic_cast< NameExpr *>(expr) )
+	    return name->get_name();
+	else /* if () */
+	    throw 0;
     }
-    return true;
-  }
 
-  std::string extractName( Expression *expr ) /* throw NoNameExtraction */ {
-    if( NameExpr *name = dynamic_cast< NameExpr *>(expr) )
-      return name->get_name();
-    else /* if() */
-      throw 0;
-  }
+    DeclarationWithType *gensym( DeclarationWithType *, std::string prefix ) {
+	return 0;
+    }
 
-  DeclarationWithType *gensym( DeclarationWithType *, std::string prefix ) {
-    return 0;
-  }
+    ObjectDecl *extractTupleV( Matcher matcher, TupleExpr *nmTuple ) {
+	// extract a subtuple of the function `fun' argument list, corresponding to the tuple of names requested by
+	// `nmTuple'.
+	std::list< Expression * > &exprs = nmTuple->get_exprs();
+	std::cerr << "In extractTupleV, the tuple has " << exprs.size() << " components." << std::endl;
+	std::list< std::string > names;
+	std::transform( exprs.begin(), exprs.end(), back_inserter(names), extractName );
+	std::list< DeclarationWithType * > decls;
+	matcher.slice( names.begin(), names.end(), back_inserter(decls) );
+	//std::for_each( decls.begin(), decls.end(), gensym );
+	std::cerr << "Returning declaration with " << decls.size() << " components." << std::endl;
 
-  ObjectDecl *extractTupleV( Matcher matcher, TupleExpr *nmTuple ) {
-    /* extract a subtuple of the function `fun' argument list, corresponding to the tuple
-       of names requested by `nmTuple'.
-     */
-    std::list< Expression * > &exprs = nmTuple->get_exprs();
-    std::cerr << "In extractTupleV, the tuple has " << exprs.size() << " components." << std::endl;
-    std::list< std::string > names;
-    std::transform( exprs.begin(), exprs.end(), back_inserter(names), extractName );
-    std::list< DeclarationWithType * > decls;
-    matcher.slice( names.begin(), names.end(), back_inserter(decls) );
-    //std::for_each( decls.begin(), decls.end(), gensym );
-    std::cerr << "Returning declaration with " << decls.size() << " components." << std::endl;
+	return 0;//new ObjectDecl()
+    }
 
-    return 0;//new ObjectDecl()
-  }
+    void check_alternative( FunctionType *fun, ResolvExpr::AltList &args ) {
+	using namespace ResolvExpr;
 
-  void check_alternative( FunctionType *fun, ResolvExpr::AltList &args ) {
-    using namespace ResolvExpr;
+	Matcher matcher( fun->get_parameters() );
+	for ( AltList::iterator a = args.begin(); a != args.end(); a++ ) {
+	    std::list< std::string > actNames;
+	    if ( ! extractNames( a->expr, back_inserter(actNames), matcher ) ) {
+		return; // not a designated call, leave alternative alone
+	    } else {
+		// see if there's a match
+		matcher.add( actNames.begin(), actNames.end(), *a );
+	    }
+	}
+	//AltList newArgs;
+	args.clear();
+	matcher.get_reorderedCall( back_inserter(args) );
 
-    Matcher matcher( fun->get_parameters() );
-    for ( AltList::iterator a = args.begin(); a != args.end(); a++ ) {
-      std::list< std::string > actNames;
-      if ( !extractNames( a->expr, back_inserter(actNames), matcher ) ) {
-	return; // not a designated call, leave alternative alone
-      } else {
-	// see if there's a match
-	matcher.add( actNames.begin(), actNames.end(), *a );
-      }
+	return;
     }
-    //AltList newArgs;
-    args.clear();
-    matcher.get_reorderedCall( back_inserter(args) );
-
-    return;
-  }
-
-  /*
-  void pruneAlternatives( Expression *expr, ResolvExpr::AlternativeFinder &finder ) {
-    if ( expr->get_argName() != 0 ) {
-      // Looking at designated expression
-	using namespace ResolvExpr;
-	AltList &alternatives = finder.get_alternatives();
-	std::cerr << "Now printing alternatives: " << std::endl;
-	for( AltList::iterator a = alternatives.begin(); a != alternatives.end(); a++ )
-	  a->expr->print( std::cerr );
-	//std::cerr << "Looking for constructions of length no more than: " << tdes->get_exprs().size() << "." << std::endl;
-      }
+#if 0
+    void pruneAlternatives( Expression *expr, ResolvExpr::AlternativeFinder &finder ) {
+	if ( expr->get_argName() != 0 ) {
+	    // Looking at designated expression
+	    using namespace ResolvExpr;
+	    AltList &alternatives = finder.get_alternatives();
+	    std::cerr << "Now printing alternatives: " << std::endl;
+	    for ( AltList::iterator a = alternatives.begin(); a != alternatives.end(); a++ )
+		a->expr->print( std::cerr );
+	    //std::cerr << "Looking for constructions of length no more than: " << tdes->get_exprs().size() << "." << std::endl;
+	}
+	return;
     }
-    return;
-  }
-  */
+#endif // 0
 } // namespaces Designators
Index: translator/Parser.old/DeclarationNode.cc
===================================================================
--- translator/Parser.old/DeclarationNode.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,1102 +1,0 @@
-#include <string>
-#include <list>
-#include <iterator>
-#include <algorithm>
-#include <cassert>
-
-#include "ParseNode.h"
-#include "TypeData.h"
-#include "utility.h"
-#include "SynTree/Declaration.h"
-#include "SynTree/Expression.h"
-#include "SynTree/Initializer.h"
-#include "SemanticError.h"
-#include "UniqueName.h"
-#include "LinkageSpec.h"
-
-using namespace std;
-
-/* these must remain in the same order as the corresponding DeclarationNode enumerations */
-const char *DeclarationNode::qualifierName[] = { "const", "restrict", "volatile", "lvalue" };
-const char *DeclarationNode::basicTypeName[] = { "char", "int", "float", "double", "void", "bool", "complex", "imaginary" };
-const char *DeclarationNode::modifierName[] = { "signed", "unsigned", "short", "long" };
-const char *DeclarationNode::tyConName[] = { "struct", "union", "context" };
-const char *DeclarationNode::typeClassName[] = { "type", "dtype", "ftype" };
-
-UniqueName DeclarationNode::anonymous( "__anonymous" );
-
-extern LinkageSpec::Type linkage;		/* defined in cfa.y */
-
-DeclarationNode*
-DeclarationNode::clone() const
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = maybeClone( type );
-  newnode->name = name;
-  newnode->storageClasses = storageClasses;
-  newnode->bitfieldWidth = maybeClone( bitfieldWidth );
-  newnode->hasEllipsis = hasEllipsis;
-  newnode->initializer = initializer;
-  newnode->next = maybeClone( next );
-  newnode->linkage = linkage;
-  return newnode;
-}
-
-DeclarationNode::DeclarationNode( char *filename, int lineno )
-  : ParseNode( "", filename, lineno ), type( 0 ), bitfieldWidth( 0 ), initializer( 0 ), hasEllipsis( false ), linkage( ::linkage )
-{
-}
-
-DeclarationNode::~DeclarationNode()
-{
-  delete type;
-  delete bitfieldWidth;
-  delete initializer;
-}
-
-bool
-DeclarationNode::get_hasEllipsis() const
-{
-  return hasEllipsis;
-}
-
-const char *storageClassName[] =
-{
-  // order must correspond with DeclarationNode::StorageClass
-  "static",
-  "auto",
-  "extern",
-  "register",
-  "inline",
-  "fortran",
-};
-
-void
-DeclarationNode::print( std::ostream &os, int indent ) const
-{
-  os << string(indent,  ' ');
-  if( name == "" ) {
-///     os << "An unnamed ";
-  } else {
-    os << name << ": a ";
-  }
-  if( linkage != LinkageSpec::Cforall ) {
-    os << LinkageSpec::toString( linkage ) << " ";
-  }
-  printEnums( storageClasses.begin(), storageClasses.end(), storageClassName, os );
-  if( type ) {
-    type->print( os, indent );
-  } else {
-    os << "untyped entity ";
-  }
-  if( bitfieldWidth ) {
-    os << endl << string(indent+2,  ' ') << "with bitfield width ";
-    bitfieldWidth->printOneLine( os );
-  }
-
-  if( initializer != 0 ) {
-    os << endl << string(indent+2,  ' ') << "with initializer ";
-    initializer->printOneLine( os );
-  }
-
-  os << endl;
-}
-
-void
-DeclarationNode::printList( std::ostream &os, int indent ) const
-{
-  ParseNode::printList( os, indent );
-  if( hasEllipsis ) {
-    os << string( indent, ' ' )  << "and a variable number of other arguments" << endl;
-  }
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newFunction( struct token &tok, DeclarationNode *ret, DeclarationNode *param, StatementNode *body )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->name = assign_strptr( tok.str );
-
-  newnode->type = new TypeData( TypeData::Function );
-  newnode->type->function->params = param;
-  newnode->type->function->body = body;
-  if( body ) {
-    newnode->type->function->hasBody = true;
-  }
-
-  if( ret ) {
-    newnode->type->base = ret->type;
-    ret->type = 0;
-    delete ret;
-  }
-
-  return newnode;
-}
-
-DeclarationNode *
-DeclarationNode::newFunction( char *filename, int lineno, DeclarationNode *ret, DeclarationNode *param, StatementNode *body )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-
-  newnode->type = new TypeData( TypeData::Function );
-  newnode->type->function->params = param;
-  newnode->type->function->body = body;
-  if( body ) {
-    newnode->type->function->hasBody = true;
-  }
-
-  if( ret ) {
-    newnode->type->base = ret->type;
-    ret->type = 0;
-    delete ret;
-  }
-
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newQualifier( Qualifier q, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData();
-  newnode->type->qualifiers.push_back( q );
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newStorageClass( StorageClass sc, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->storageClasses.push_back( sc );
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newBasicType( BasicType bt, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Basic );
-  newnode->type->basic->typeSpec.push_back( bt );
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newModifier( Modifier mod, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Basic );
-  newnode->type->basic->modifiers.push_back( mod );
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newForall( DeclarationNode* forall, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Unknown );
-  newnode->type->forall = forall;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newFromTypedef( struct token &tok )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->type = new TypeData( TypeData::SymbolicInst );
-  newnode->type->symbolic->name = assign_strptr( tok.str );
-  newnode->type->symbolic->isTypedef = true;
-  newnode->type->symbolic->params = 0;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newAggregate( TyCon kind, struct token &tok, DeclarationNode *formals, ExpressionNode *actuals, DeclarationNode *fields )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->type = new TypeData( TypeData::Aggregate );
-  newnode->type->aggregate->kind = kind;
-  newnode->type->aggregate->name = assign_strptr( tok.str );
-  if( newnode->type->aggregate->name == "" ) {
-    newnode->type->aggregate->name = DeclarationNode::anonymous.newName();
-  }
-  newnode->type->aggregate->params = formals;
-  newnode->type->aggregate->actuals = actuals;
-  newnode->type->aggregate->members = fields;
-  return newnode;
-}
-
-DeclarationNode *
-DeclarationNode::newAggregate( TyCon kind, char *filename, int lineno, DeclarationNode *formals, ExpressionNode *actuals, DeclarationNode *fields )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Aggregate );
-  newnode->type->aggregate->kind = kind;
-  newnode->type->aggregate->name = DeclarationNode::anonymous.newName();
-  newnode->type->aggregate->params = formals;
-  newnode->type->aggregate->actuals = actuals;
-  newnode->type->aggregate->members = fields;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newEnum( struct token &tok, DeclarationNode *constants )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->name = assign_strptr( tok.str );
-  newnode->type = new TypeData( TypeData::Enum );
-  newnode->type->enumeration->name = newnode->name;
-  if( newnode->type->enumeration->name == "" ) {
-    newnode->type->enumeration->name = DeclarationNode::anonymous.newName();
-  }
-  newnode->type->enumeration->constants = constants;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newEnum( char *filename, int lineno, DeclarationNode *constants )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Enum );
-  newnode->type->enumeration->name = newnode->name;
-  newnode->type->enumeration->name = DeclarationNode::anonymous.newName();
-  newnode->type->enumeration->constants = constants;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newEnumConstant( struct token &tok, ExpressionNode *constant )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->name = assign_strptr( tok.str );
-  // do something with the constant
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newName( struct token &tok )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->name = assign_strptr( tok.str );
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newFromTypeGen( struct token &tok, ExpressionNode *params )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->type = new TypeData( TypeData::SymbolicInst );
-  newnode->type->symbolic->name = assign_strptr( tok.str );
-  newnode->type->symbolic->isTypedef = false;
-  newnode->type->symbolic->actuals = params;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newTypeParam( TypeClass tc, std::string* name, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->name = assign_strptr( name );
-  newnode->type = new TypeData( TypeData::Variable );
-  newnode->type->variable->tyClass = tc;
-  newnode->type->variable->name = newnode->name;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newContext( struct token &tok, DeclarationNode *params, DeclarationNode *asserts )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->type = new TypeData( TypeData::Aggregate );
-  newnode->type->aggregate->kind = Context;
-  newnode->type->aggregate->params = params;
-  newnode->type->aggregate->members = asserts;
-  newnode->type->aggregate->name = assign_strptr( tok.str );
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newContextUse( struct token &tok, ExpressionNode *params )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->type = new TypeData( TypeData::AggregateInst );
-  newnode->type->aggInst->aggregate = new TypeData( TypeData::Aggregate );
-  newnode->type->aggInst->aggregate->aggregate->kind = Context;
-  newnode->type->aggInst->aggregate->aggregate->name = assign_strptr( tok.str );
-  newnode->type->aggInst->params = params;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newTypeDecl( struct token &tok, DeclarationNode *typeParams )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->name = assign_strptr( tok.str );
-  newnode->type = new TypeData( TypeData::Symbolic );
-  newnode->type->symbolic->isTypedef = false;
-  newnode->type->symbolic->params = typeParams;
-  newnode->type->symbolic->name = newnode->name;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newPointer( DeclarationNode *qualifiers, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Pointer );
-  return newnode->addQualifiers( qualifiers );
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newArray( ExpressionNode *size, DeclarationNode *qualifiers, bool isStatic, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Array );
-  newnode->type->array->dimension = size;
-  newnode->type->array->isStatic = isStatic;
-  newnode->type->array->isVarLen = false;
-  return newnode->addQualifiers( qualifiers );
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newVarArray( DeclarationNode *qualifiers, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Array );
-  newnode->type->array->dimension = 0;
-  newnode->type->array->isStatic = false;
-  newnode->type->array->isVarLen = true;
-  return newnode->addQualifiers( qualifiers );
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newBitfield( ExpressionNode *size )
-{
-  DeclarationNode *newnode = new DeclarationNode( size->get_filename(), size->get_lineno() );
-  newnode->bitfieldWidth = size;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newTuple( DeclarationNode *members, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Tuple );
-  newnode->type->tuple->members = members;
-  return newnode;
-}
-
-/* static class method */
-DeclarationNode *
-DeclarationNode::newTypeof( ExpressionNode *expr, char *filename, int lineno )
-{
-  DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-  newnode->type = new TypeData( TypeData::Typeof );
-  newnode->type->typeexpr->expr = expr;
-  return newnode;
-}
-
-static void
-addQualifiersToType( TypeData *&src, TypeData *dst )
-{
-  if( src && dst ) {
-    if( src->forall && dst->kind == TypeData::Function ) {
-      if( dst->forall ) {
-	dst->forall->appendList( src->forall );
-      } else {
-	dst->forall = src->forall;
-      }
-      src->forall = 0;
-    }
-    if( dst->base ) {
-      addQualifiersToType( src, dst->base );
-    } else if( dst->kind == TypeData::Function ) {
-      dst->base = src;
-      src = 0;
-    } else {
-      dst->qualifiers.splice( dst->qualifiers.end(), src->qualifiers );
-    }
-  }
-}
-      
-DeclarationNode *
-DeclarationNode::addQualifiers( DeclarationNode *q )
-{
-  if( q ) {
-    storageClasses.splice( storageClasses.end(), q->storageClasses );
-    if( q->type ) {
-      if( !type ) {
-	type = new TypeData;
-      }
-      addQualifiersToType( q->type, type );
-      if( q->type && q->type->forall ) {
-        if( type->forall ) {
-          type->forall->appendList( q->type->forall );
-        } else {
-          type->forall = q->type->forall;
-        }
-        q->type->forall = 0;
-      }
-    }
-  }
-  lineno = min( lineno, q->lineno );
-  delete q;
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::copyStorageClasses( DeclarationNode *q )
-{
-  storageClasses = q->storageClasses;
-  return this;
-}
-
-static void
-addTypeToType( TypeData *&src, TypeData *&dst )
-{
-  if( src && dst ) {
-    if( src->forall && dst->kind == TypeData::Function ) {
-      if( dst->forall ) {
-        dst->forall->appendList( src->forall );
-      } else {
-        dst->forall = src->forall;
-      }
-      src->forall = 0;
-    }
-    if( dst->base ) {
-      addTypeToType( src, dst->base );
-    } else {
-      switch( dst->kind ) {
-      case TypeData::Unknown:
-	src->qualifiers.splice( src->qualifiers.end(), dst->qualifiers );
-	dst = src;
-	src = 0;
-	break;
-
-      case TypeData::Basic:
-	dst->qualifiers.splice( dst->qualifiers.end(), src->qualifiers );
-        if( src->kind != TypeData::Unknown ) {
-	  assert( src->kind == TypeData::Basic );
-	  dst->basic->modifiers.splice( dst->basic->modifiers.end(), src->basic->modifiers );
-	  dst->basic->typeSpec.splice( dst->basic->typeSpec.end(), src->basic->typeSpec );
-	}
-	break;
-
-      default:
-        switch( src->kind ) {
-        case TypeData::Aggregate:
-        case TypeData::Enum:
-          dst->base = new TypeData( TypeData::AggregateInst );
-          dst->base->aggInst->aggregate = src;
-          if( src->kind == TypeData::Aggregate ) {
-            dst->base->aggInst->params = maybeClone( src->aggregate->actuals );
-          }
-          dst->base->qualifiers.splice( dst->base->qualifiers.end(), src->qualifiers );
-          src = 0;
-          break;
-          
-        default:
-          if( dst->forall ) {
-            dst->forall->appendList( src->forall );
-          } else {
-            dst->forall = src->forall;
-          }
-          src->forall = 0;
-          dst->base = src;
-          src = 0;
-        }
-      }
-    }
-  }
-}
-
-DeclarationNode *
-DeclarationNode::addType( DeclarationNode *o )
-{
-  if( o ) {
-    storageClasses.splice( storageClasses.end(), o->storageClasses );
-    if ( o->type ) {
-      if( !type ) {
-        if( o->type->kind == TypeData::Aggregate || o->type->kind == TypeData::Enum ) {
-	  type = new TypeData( TypeData::AggregateInst );
-	  type->aggInst->aggregate = o->type;
-	  if( o->type->kind == TypeData::Aggregate ) {
-	    type->aggInst->params = maybeClone( o->type->aggregate->actuals );
-          }
-          type->qualifiers.splice( type->qualifiers.end(), o->type->qualifiers );
-	} else {
-	  type = o->type;
-	}
-	o->type = 0;
-      } else {
-	addTypeToType( o->type, type );
-      }
-    }
-    if( o->bitfieldWidth ) {
-      bitfieldWidth = o->bitfieldWidth;
-    }
-  }
-  lineno = min( lineno, o->lineno );
-  delete o;
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addTypedef()
-{
-  TypeData *newtype = new TypeData( TypeData::Symbolic );
-  newtype->symbolic->params = 0;
-  newtype->symbolic->isTypedef = true;
-  newtype->symbolic->name = name;
-  newtype->base = type;
-  type = newtype;
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addAssertions( DeclarationNode* assertions )
-{
-  assert( type );
-  switch( type->kind ) {
-  case TypeData::Symbolic:
-    if( type->symbolic->assertions ) {
-      type->symbolic->assertions->appendList( assertions );
-    } else {
-      type->symbolic->assertions = assertions;
-    }
-    break;
-    
-  case TypeData::Variable:
-    if( type->variable->assertions ) {
-      type->variable->assertions->appendList( assertions );
-    } else {
-      type->variable->assertions = assertions;
-    }
-    break;
-    
-  default:
-    assert( false );
-  }
-    
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addName( struct token &tok )
-{
-  name = assign_strptr( tok.str );
-  lineno = min( lineno, tok.lineno );
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addBitfield( ExpressionNode *size )
-{
-  bitfieldWidth = size;
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addVarArgs()
-{
-  assert( type );
-  hasEllipsis = true;
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addFunctionBody( StatementNode *body )
-{
-  assert( type );
-  assert( type->kind == TypeData::Function );
-  assert( type->function->body == 0 );
-  type->function->body = body;
-  type->function->hasBody = true;
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addOldDeclList( DeclarationNode *list )
-{
-  assert( type );
-  assert( type->kind == TypeData::Function );
-  assert( type->function->oldDeclList == 0 );
-  type->function->oldDeclList = list;
-  return this;
-}
-
-static void
-setBase( TypeData *&type, TypeData *newType )
-{
-  if( type ) {
-    TypeData *prevBase = type;
-    TypeData *curBase = type->base;
-    while( curBase != 0 ) {
-      prevBase = curBase;
-      curBase = curBase->base;
-    }
-    prevBase->base = newType;
-  } else {
-    type = newType;
-  }
-}
-
-DeclarationNode *
-DeclarationNode::addPointer( DeclarationNode *p )
-{
-  if( p ) {
-    assert( p->type->kind == TypeData::Pointer );
-    setBase( type, p->type );
-    p->type = 0;
-    delete p;
-  }
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addArray( DeclarationNode *a )
-{
-  if( a ) {
-    assert( a->type->kind == TypeData::Array );
-    setBase( type, a->type );
-    a->type = 0;
-    delete a;
-  }
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addNewPointer( DeclarationNode *p )
-{
-  if( p ) {
-    assert( p->type->kind == TypeData::Pointer );
-    if( type ) {
-      switch( type->kind ) {
-      case TypeData::Aggregate:
-      case TypeData::Enum:
-        p->type->base = new TypeData( TypeData::AggregateInst );
-        p->type->base->aggInst->aggregate = type;
-       	if( type->kind == TypeData::Aggregate ) {
-       	  p->type->base->aggInst->params = maybeClone( type->aggregate->actuals );
-       	}
-        p->type->base->qualifiers.splice( p->type->base->qualifiers.end(), type->qualifiers );
-        break;
-        
-      default:
-        p->type->base = type;
-      }
-      type = 0;
-    }
-    delete this;
-    return p;
-  } else {
-    return this;
-  }
-}
-
-static TypeData *
-findLast( TypeData *a )
-{
-  assert( a );
-  TypeData *cur = a;
-  while( cur->base ) {
-    cur = cur->base;
-  }
-  return cur;
-}
-
-DeclarationNode *
-DeclarationNode::addNewArray( DeclarationNode *a )
-{
-  if( a ) {
-    assert( a->type->kind == TypeData::Array );
-    TypeData *lastArray = findLast( a->type );
-    if( type ) {  
-      switch( type->kind ) {
-      case TypeData::Aggregate:
-      case TypeData::Enum:
-        lastArray->base = new TypeData( TypeData::AggregateInst );
-        lastArray->base->aggInst->aggregate = type;
-        if( type->kind == TypeData::Aggregate ) {
-          lastArray->base->aggInst->params = maybeClone( type->aggregate->actuals );
-        }
-        lastArray->base->qualifiers.splice( lastArray->base->qualifiers.end(), type->qualifiers );
-        break;
-        
-      default:
-        lastArray->base = type;
-      }
-      type = 0;
-    }
-    delete this;
-    return a;
-  } else {
-    return this;
-  }
-}
-
-DeclarationNode *
-DeclarationNode::addParamList( DeclarationNode *params )
-{
-  TypeData *ftype = new TypeData( TypeData::Function );
-  ftype->function->params = params;
-  setBase( type, ftype );
-  return this;
-}
-
-static TypeData*
-addIdListToType( TypeData *type, DeclarationNode *ids )
-{
-  if( type ) {
-    if( type->kind != TypeData::Function ) {
-      type->base = addIdListToType( type->base, ids );
-    } else {
-      type->function->idList = ids;
-    }
-    return type;
-  } else {
-    TypeData *newtype = new TypeData( TypeData::Function );
-    newtype->function->idList = ids;
-    return newtype;
-  }
-}
-    
-DeclarationNode *
-DeclarationNode::addIdList( DeclarationNode *ids )
-{
-  type = addIdListToType( type, ids );
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::addInitializer( InitializerNode *init )
-{
-  //assert
-  initializer = init;
-  return this;
-}
-
-DeclarationNode *
-DeclarationNode::cloneBaseType( struct token &tok )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  TypeData *srcType = type;
-  while( srcType->base ) {
-    srcType = srcType->base;
-  }
-  newnode->type = maybeClone( srcType );
-  if( newnode->type->kind == TypeData::AggregateInst ) {
-    // don't duplicate members
-    if( newnode->type->aggInst->aggregate->kind == TypeData::Enum ) {
-      delete newnode->type->aggInst->aggregate->enumeration->constants;
-      newnode->type->aggInst->aggregate->enumeration->constants = 0;
-    } else {
-      assert( newnode->type->aggInst->aggregate->kind == TypeData::Aggregate );
-      delete newnode->type->aggInst->aggregate->aggregate->members;
-      newnode->type->aggInst->aggregate->aggregate->members = 0;
-    }
-  }
-  newnode->type->forall = maybeClone( type->forall );
-  newnode->storageClasses = storageClasses;
-  newnode->name = assign_strptr( tok.str );
-  return newnode;
-}
-
-DeclarationNode *
-DeclarationNode::cloneBaseType( DeclarationNode *o )
-{
-  if( o ) {
-    o->storageClasses.insert( o->storageClasses.end(), storageClasses.begin(), storageClasses.end() );
-    if ( type ) {
-      TypeData *srcType = type;
-      while( srcType->base ) {
-	srcType = srcType->base;
-      }
-      TypeData *newType = srcType->clone();
-      if( newType->kind == TypeData::AggregateInst ) {
-        // don't duplicate members
-        if( newType->aggInst->aggregate->kind == TypeData::Enum ) {
-          delete newType->aggInst->aggregate->enumeration->constants;
-          newType->aggInst->aggregate->enumeration->constants = 0;
-        } else {
-          assert( newType->aggInst->aggregate->kind == TypeData::Aggregate );
-          delete newType->aggInst->aggregate->aggregate->members;
-          newType->aggInst->aggregate->aggregate->members = 0;
-        }
-      }
-      newType->forall = maybeClone( type->forall );
-      if( !o->type ) {
-	o->type = newType;
-      } else {
-	addTypeToType( newType, o->type );
-	delete newType;
-      }
-    }
-  }
-  return o;
-}
-
-DeclarationNode *
-DeclarationNode::cloneType( struct token &tok )
-{
-  DeclarationNode *newnode = new DeclarationNode( tok.filename, tok.lineno );
-  newnode->type = maybeClone( type );
-  newnode->storageClasses = storageClasses;
-  newnode->name = assign_strptr( tok.str );
-  return newnode;
-}
-
-DeclarationNode *
-DeclarationNode::cloneType( DeclarationNode *o )
-{
-  if( o ) {
-    o->storageClasses.insert( o->storageClasses.end(), storageClasses.begin(), storageClasses.end() );
-    if ( type ) {
-      TypeData *newType = type->clone();
-      if( !o->type ) {
-	o->type = newType;
-      } else {
-	addTypeToType( newType, o->type );
-	delete newType;
-      }
-    }
-  }
-  return o;
-}
-
-DeclarationNode *
-DeclarationNode::appendList( DeclarationNode *node )
-{
-  if( node != 0 ) {
-    set_link( node );
-  }
-  return this;
-}
-
-DeclarationNode*
-DeclarationNode::extractAggregate() const
-{
-  if( type ) {
-    TypeData *ret = type->extractAggregate();
-    if( ret ) {
-      DeclarationNode *newnode = new DeclarationNode( filename, lineno );
-      newnode->type = ret;
-      return newnode;
-    } else {
-      return 0;
-    }
-  } else {
-    return 0;
-  }
-}
-
-void buildList( const DeclarationNode *firstNode, std::list< Declaration* > &outputList )
-{
-  SemanticError errors;
-  std::back_insert_iterator< std::list< Declaration* > > out( outputList );
-  const DeclarationNode *cur = firstNode;
-  while( cur ) {
-    try {
-      if( DeclarationNode *extr = cur->extractAggregate() ) {
-	// handle the case where a structure declaration is contained within an object or type
-	// declaration
-	Declaration *decl = extr->build();
-	if( decl ) {
-	  *out++ = decl;
-	}
-      }
-      Declaration *decl = cur->build();
-      if( decl ) {
-        *out++ = decl;
-      }
-    } catch( SemanticError &e ) {
-      errors.append( e );
-    }
-    cur = dynamic_cast< DeclarationNode* >( cur->get_link() );
-  }
-  if( !errors.isEmpty() ) {
-    throw errors;
-  }
-}
-
-void buildList( const DeclarationNode *firstNode, std::list< DeclarationWithType* > &outputList )
-{
-  SemanticError errors;
-  std::back_insert_iterator< std::list< DeclarationWithType* > > out( outputList );
-  const DeclarationNode *cur = firstNode;
-  while( cur ) {
-    try {
-///       if( DeclarationNode *extr = cur->extractAggregate() ) {
-/// 	// handle the case where a structure declaration is contained within an object or type
-/// 	// declaration
-/// 	Declaration *decl = extr->build();
-/// 	if( decl ) {
-///           *out++ = decl;
-/// 	}
-///       }
-      Declaration *decl = cur->build();
-      if( decl ) {
-        if( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( decl ) ) {
-          *out++ = dwt;
-        } else if( StructDecl *agg = dynamic_cast< StructDecl* >( decl ) ) {
-          StructInstType *inst = new StructInstType( Type::Qualifiers(), agg->get_name() );
-          *out++ = new ObjectDecl( "", Declaration::NoStorageClass, linkage, 0, inst, 0 );
-          delete agg;
-        } else if( UnionDecl *agg = dynamic_cast< UnionDecl* >( decl ) ) {
-          UnionInstType *inst = new UnionInstType( Type::Qualifiers(), agg->get_name() );
-          *out++ = new ObjectDecl( "", Declaration::NoStorageClass, linkage, 0, inst, 0 );
-        }
-      }
-    } catch( SemanticError &e ) {
-      errors.append( e );
-    }
-    cur = dynamic_cast< DeclarationNode* >( cur->get_link() );
-  }
-  if( !errors.isEmpty() ) {
-    throw errors;
-  }
-}
-
-void buildTypeList( const DeclarationNode *firstNode, std::list< Type* > &outputList )
-{
-  SemanticError errors;
-  std::back_insert_iterator< std::list< Type* > > out( outputList );
-  const DeclarationNode *cur = firstNode;
-  while( cur ) {
-    try {
-      *out++ = cur->buildType();
-    } catch( SemanticError &e ) {
-      errors.append( e );
-    }
-    cur = dynamic_cast< DeclarationNode* >( cur->get_link() );
-  }
-  if( !errors.isEmpty() ) {
-    throw errors;
-  }
-}
-
-Declaration *
-DeclarationNode::build() const
-{
-
-  if( !type ) {
-    if( buildInline() ) {
-      throw SemanticError( "invalid inline specification in declaration of ", this );
-    } else {
-      return new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) );
-    }
-  } else {
-    Declaration *newDecl = type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildInline(), linkage, maybeBuild< Initializer >(initializer) );
-    return newDecl;
-  }
-  // we should never get here
-  assert( false );
-  return 0;
-}
-
-Type *
-DeclarationNode::buildType() const
-{
-
-  assert( type );
-  
-  switch( type->kind ) {
-  case TypeData::Enum:
-    return new EnumInstType( type->buildQualifiers(), type->enumeration->name );
-    
-  case TypeData::Aggregate: {
-    ReferenceToType *ret;
-    switch( type->aggregate->kind ) {
-    case DeclarationNode::Struct:
-      ret = new StructInstType( type->buildQualifiers(), type->aggregate->name );
-      break;
-
-    case DeclarationNode::Union:
-      ret = new UnionInstType( type->buildQualifiers(), type->aggregate->name );
-      break;
-
-    case DeclarationNode::Context:
-      ret = new ContextInstType( type->buildQualifiers(), type->aggregate->name );
-      break;
-
-    default:
-      assert( false );
-    }
-    buildList( type->aggregate->actuals, ret->get_parameters() );
-    return ret;
-  }
-  
-  case TypeData::Symbolic: {
-    TypeInstType *ret = new TypeInstType( type->buildQualifiers(), type->symbolic->name );
-    buildList( type->symbolic->actuals, ret->get_parameters() );
-    return ret;
-  }
-  
-  default:
-    return type->build();
-  }
-}
-
-Declaration::StorageClass 
-DeclarationNode::buildStorageClass() const
-{
-  static const Declaration::StorageClass scMap[] = {  
-    Declaration::Static,
-    Declaration::Auto,
-    Declaration::Extern,
-    Declaration::Register,
-    Declaration::NoStorageClass, // inline
-    Declaration::Fortran
-  };  
-  
-  Declaration::StorageClass ret = Declaration::NoStorageClass;
-  for( std::list< StorageClass >::const_iterator i = storageClasses.begin(); i != storageClasses.end(); ++i ) {
-    assert( unsigned( *i ) < sizeof( scMap ) / sizeof( scMap[0] ) );
-    if( *i == Inline ) continue;
-    if( ret == Declaration::NoStorageClass ) {
-      ret = scMap[ *i ];
-    } else {
-      throw SemanticError( "invalid combination of storage classes in declaration of ", this );
-    }
-  }
-  return ret;
-}
-
-bool 
-DeclarationNode::buildInline() const
-{
-  std::list< StorageClass >::const_iterator first = std::find( storageClasses.begin(), storageClasses.end(), Inline );
-  if( first == storageClasses.end() ) {
-    return false;
-  } else {
-    std::list< StorageClass >::const_iterator next = std::find( ++first, storageClasses.end(), Inline );
-    if( next == storageClasses.end() ) {
-      return true;
-    } else {
-      throw SemanticError( "duplicate inline specification in declaration of ", this );
-    }
-  }
-  // we should never get here
-  return false;
-}
Index: translator/Parser.old/ExpressionNode.cc
===================================================================
--- translator/Parser.old/ExpressionNode.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,795 +1,0 @@
-/* -*- C++ -*- */
-#include <cassert>
-#include <cctype>
-#include <algorithm>
-
-#include "ParseNode.h"
-#include "SynTree/Type.h"
-#include "SynTree/Constant.h"
-#include "SynTree/Expression.h"
-#include "SynTree/Declaration.h"
-#include "UnimplementedError.h"
-#include "parseutility.h"
-#include "utility.h"
-
-using namespace std;
-
-/// ExpressionNode::ExpressionNode() : ParseNode(), argName( 0 ) {
-/// }
-
-ExpressionNode::ExpressionNode( std::string *name_, char *filename, int lineno )
-  : ParseNode( *name_, filename, lineno ), argName( 0 )
-{
-  delete name_;
-}
-
-ExpressionNode::ExpressionNode( const ExpressionNode &other )
-  : ParseNode( other.name, other.filename, other.lineno )
-{
-  if( other.argName ) {
-    argName = other.argName->clone();
-  } else {
-    argName = 0;
-  }
-}
-
-ExpressionNode * ExpressionNode::set_asArgName( struct token &tok ) {
-  argName = new VarRefNode( tok );
-  return this;
-}
-
-ExpressionNode * ExpressionNode::set_asArgName( ExpressionNode *aDesignator ) {
-  argName = aDesignator;
-  return this;
-}
-
-void ExpressionNode::printDesignation( std::ostream &os, int indent ) const {
-  if( argName ) {
-    os << string(' ', indent) << "(designated by:  ";
-    argName->printOneLine(os, indent );
-    os << ")" << std::endl;
-  }
-}
-
-NullExprNode::NullExprNode( char *filename, int lineno )
-  : ExpressionNode( &nullstr, filename, lineno )
-{
-}
-
-NullExprNode *
-NullExprNode::clone() const
-{
-  return new NullExprNode( filename, lineno );
-}
-
-void
-NullExprNode::print(std::ostream & os, int indent) const
-{
-  printDesignation(os);
-  os << "null expression";
-}
-
-void
-NullExprNode::printOneLine(std::ostream & os, int indent) const
-{
-  printDesignation(os);
-  os << "null";
-}
-
-Expression *
-NullExprNode::build() const
-{
-  return 0;
-}
-
-CommaExprNode *ExpressionNode::add_to_list(ExpressionNode *exp){
-  return new CommaExprNode(this, exp );
-}
-
-//  enum ConstantNode::Type =  { Integer, Float, Character, String, Range }
-
-/// ConstantNode::ConstantNode() :
-///   ExpressionNode(), sign(true), longs(0), size(0)
-/// {}
-
-ConstantNode::ConstantNode( struct token &tok ) :
-  ExpressionNode( tok.str, tok.filename, tok.lineno ), sign(true), longs(0), size(0)
-{}
-
-ConstantNode::ConstantNode( Type t, struct token &tok ) :
-  ExpressionNode( tok.str, tok.filename, tok.lineno ), type(t), sign(true), longs(0), size(0)
-{
-  if( tok.str ) {
-    value = *tok.str;
-    delete tok.str;
-  } else {
-    value = "";
-  }
-
-  classify(value);
-}
-
-ConstantNode::ConstantNode( const ConstantNode &other )
-  : ExpressionNode( other ), type( other.type ), value( other.value ), sign( other.sign ), base( other.base ), longs( other.longs ), size( other.size )
-{
-}
-
-// for some reason, std::tolower doesn't work as an argument to std::transform in g++ 3.1
-inline char
-tolower_hack( char c )
-{
-  return std::tolower( c );
-}
-
-void ConstantNode::classify(std::string &str){
-  switch(type){
-    case Integer:
-    case Float:
-      {
-	std::string sfx("");
-	char c;
-	int i = str.length() - 1;
-
-	while( i >= 0 && !isxdigit(c = str.at(i--)) )
-	  sfx += c;
-
-	value = str.substr( 0, i + 2 );
-
-	// get rid of underscores
-	value.erase(remove(value.begin(), value.end(), '_'), value.end());
-
-	std::transform(sfx.begin(), sfx.end(), sfx.begin(), tolower_hack);
-
-	if( sfx.find("ll") != string::npos ){
-	  longs = 2;
-	} else if (sfx.find("l") != string::npos ){
-	  longs = 1;
-	}
-
-	assert((longs >= 0) && (longs <= 2));
-
-	if( sfx.find("u") != string::npos )
-	  sign = false;
-
-	break;
-      }
-    case Character:
-      {
-	// remove underscores from hex and oct escapes
-	if(str.substr(1,2) == "\\x")
-	  value.erase(remove(value.begin(), value.end(), '_'), value.end());
-
-	break;
-      }
-  default:
-    // shouldn't be here
-    ;
-  }
-}
-
-ConstantNode::Type ConstantNode::get_type(void) const {
-  return type;
-}
-
-ConstantNode*
-ConstantNode::append( std::string *newValue )
-{
-  if( newValue ) {
-    if (type == String){
-      std::string temp = *newValue;
-      value.resize( value.size() - 1 );
-      value += newValue->substr(1, newValue->size());
-    } else
-      value += *newValue;
-
-    delete newValue;
-  }
-  return this;
-}
-
-void ConstantNode::printOneLine(std::ostream &os, int indent ) const
-{
-  os << string(indent, ' ');
-  printDesignation(os);
-
-  switch( type ) {
-    /* integers */
-  case Integer:
-      os << value ;
-      break;
-  case Float:
-    os << value ;
-    break;
-
-  case Character:
-    os << "'" << value << "'";
-    break;
-
-  case String:
-    os << '"' << value << '"';
-    break;
-  }
-
-  os << ' ';
-}
-
-void ConstantNode::print(std::ostream &os, int indent ) const
-{
-  printOneLine( os, indent );
-  os << endl;
-}
-
-Expression *ConstantNode::build() const {
-  Type::Qualifiers q;
-  BasicType *bt;
-
-  switch(get_type()){
-  case Integer:
-    /* Cfr. standard 6.4.4.1 */
-    //bt.set_kind(BasicType::SignedInt);
-    bt = new BasicType(q, BasicType::SignedInt);
-    break;
-
-  case Float:
-    bt = new BasicType(q, BasicType::Float);
-    break;
-
-  case Character:
-    bt = new BasicType(q, BasicType::Char);
-    break;
-
-  case String:
-    // string should probably be a primitive type
-    ArrayType *at;
-    std::string value = get_value();
-    at = new ArrayType(q, new BasicType(q, BasicType::Char),
-				new ConstantExpr( Constant( new BasicType(q, BasicType::SignedInt),
-									      toString( value.size() - 1 ) ) ),  // account for '\0'
-				false, false );
-
-    return new ConstantExpr( Constant(at, value), maybeBuild< Expression >( get_argName() ) );
-  }
-
-  return new ConstantExpr(  Constant(bt, get_value()),  maybeBuild< Expression >( get_argName() ) );
-}
-
-
-/// VarRefNode::VarRefNode() : isLabel(false) {}
-
-VarRefNode::VarRefNode( struct token &tok, bool labelp ) :
-  ExpressionNode( tok.str, tok.filename, tok.lineno ), isLabel(labelp) {}
-
-VarRefNode::VarRefNode( const VarRefNode &other )
-  : ExpressionNode( other ), isLabel( other.isLabel )
-{
-}
-
-Expression *VarRefNode::build() const {
-  return new NameExpr( get_name(), maybeBuild< Expression >( get_argName() ) );
-}
-
-void VarRefNode::printOneLine(std::ostream &os, int indent ) const {
-  printDesignation(os);
-  os << get_name() << ' ';
-}
-
-void VarRefNode::print(std::ostream &os, int indent ) const {
-  printDesignation(os);
-  os << '\r' << string(indent, ' ') << "Referencing: ";
-
-  os << "Variable: " << get_name();
-
-  os << endl;
-}
-
-std::string nullstr = "";
-
-OperatorNode::OperatorNode( Type t, char *filename, int lineno )
-  : ExpressionNode( &nullstr, filename, lineno ), type(t) {}
-
-OperatorNode::OperatorNode( const OperatorNode &other )
-  : ExpressionNode( other ), type( other.type )
-{
-}
-
-OperatorNode::~OperatorNode() {}
-
-OperatorNode::Type OperatorNode::get_type(void) const{
-  return type;
-}
-
-void OperatorNode::printOneLine( std::ostream &os, int indent ) const
-{
-  printDesignation(os);
-  os << OpName[ type ] << ' ';
-}
-
-void OperatorNode::print( std::ostream &os, int indent ) const{
-  printDesignation(os);
-  os << '\r' << string(indent, ' ') << "Operator: " << OpName[type] << endl;
-
-  return;
-}
-
-std::string OperatorNode::get_typename(void) const{
-  return string(OpName[ type ]);
-}
-
-const char *OperatorNode::OpName[] =
-  { "TupleC",  "Comma", "TupleFieldSel",// "TuplePFieldSel", //n-adic
-    // triadic
-    "Cond",   "NCond",
-    // diadic
-    "SizeOf",      "AlignOf", "CompLit", "Plus",    "Minus",   "Mul",     "Div",     "Mod",      "Or",
-      "And",       "BitOr",   "BitAnd",  "Xor",     "Cast",    "LShift",  "RShift",  "LThan",   "GThan",
-      "LEThan",    "GEThan", "Eq",      "Neq",     "Assign",  "MulAssn", "DivAssn", "ModAssn", "PlusAssn",
-      "MinusAssn", "LSAssn", "RSAssn",  "AndAssn", "ERAssn",  "OrAssn",  "Index",   "FieldSel","PFieldSel",
-      "Range",
-    // monadic
-    "UnPlus", "UnMinus", "AddressOf", "PointTo", "Neg", "BitNeg", "Incr", "IncrPost", "Decr", "DecrPost", "LabelAddress"
-  };
-
-/// CompositeExprNode::CompositeExprNode(void) : ExpressionNode(), function( 0 ), arguments( 0 ) {
-/// }
-
-CompositeExprNode::CompositeExprNode( struct token &tok )
-  : ExpressionNode( tok.str, tok.filename, tok.lineno ), function( 0 ), arguments( 0 )
-{
-}
-
-CompositeExprNode::CompositeExprNode(ExpressionNode *f, ExpressionNode *args)
-  : ExpressionNode( &nullstr, f->filename, min( f->get_lineno(), args->get_lineno() ) ), function(f), arguments(args)
-{
-}
-
-CompositeExprNode::CompositeExprNode(ExpressionNode *f, ExpressionNode *arg1, ExpressionNode *arg2)
-  : ExpressionNode( &nullstr, f->filename, min( f->get_lineno(), arg1->get_lineno() ) ), function(f), arguments(arg1)
-{
-  arguments->set_link(arg2);
-}
-
-CompositeExprNode::CompositeExprNode( const CompositeExprNode &other )
-  : ExpressionNode( other ), function( maybeClone( other.function ) )
-{
-  ParseNode *cur = other.arguments;
-  while( cur ) {
-    if( arguments ) {
-      arguments->set_link( cur->clone() );
-    } else {
-      arguments = (ExpressionNode*)cur->clone();
-    }
-    cur = cur->get_link();
-  }
-}
-
-CompositeExprNode::~CompositeExprNode()
-{
-  delete function;
-  delete arguments;
-}
-
-// the names that users use to define operator functions
-static const char *opFuncName[] =
-  { "",  "", "",
-    "",   "",
-    // diadic
-    "",   "", "", "?+?",    "?-?",   "?*?",     "?/?",     "?%?",     "",       "",
-      "?|?",  "?&?",  "?^?",     "",    "?<<?",  "?>>?",  "?<?",   "?>?",    "?<=?",
-      "?>=?", "?==?",      "?!=?",     "?=?",  "?*=?", "?/=?", "?%=?", "?+=?", "?-=?",
-      "?<<=?", "?>>=?",  "?&=?", "?^=?",  "?|=?",  "?[?]",   "","","Range",
-    // monadic
-    "+?", "-?", "", "*?", "!?", "~?", "++?", "?++", "--?", "?--", "LabAddress"
-  };
-
-Expression *CompositeExprNode::build() const {
-  OperatorNode *op;
-  std::list<Expression *> args;
-
-  buildList(get_args(), args);
-
-  if (!( op = dynamic_cast<OperatorNode *>(function)) ){
-    // a function as opposed to an operator
-    return new UntypedExpr(function->build(), args, maybeBuild< Expression >( get_argName() ));
-
-  } else {
-
-    switch(op->get_type()){
-    case OperatorNode::Incr:
-    case OperatorNode::Decr:
-    case OperatorNode::IncrPost:
-    case OperatorNode::DecrPost:
-    case OperatorNode::Assign:
-    case OperatorNode::MulAssn:
-    case OperatorNode::DivAssn:
-    case OperatorNode::ModAssn:
-    case OperatorNode::PlusAssn:
-    case OperatorNode::MinusAssn:
-    case OperatorNode::LSAssn:
-    case OperatorNode::RSAssn:
-    case OperatorNode::AndAssn:
-    case OperatorNode::ERAssn:
-    case OperatorNode::OrAssn:
-      // the rewrite rules for these expressions specify that the first argument has its address taken
-      assert( !args.empty() );
-      args.front() = new AddressExpr( args.front() );
-      break;
-
-    default:
-      /* do nothing */
-      ;
-    }
-
-    switch(op->get_type()){
-
-    case OperatorNode::Incr:
-    case OperatorNode::Decr:
-    case OperatorNode::IncrPost:
-    case OperatorNode::DecrPost:
-    case OperatorNode::Assign:
-    case OperatorNode::MulAssn:
-    case OperatorNode::DivAssn:
-    case OperatorNode::ModAssn:
-    case OperatorNode::PlusAssn:
-    case OperatorNode::MinusAssn:
-    case OperatorNode::LSAssn:
-    case OperatorNode::RSAssn:
-    case OperatorNode::AndAssn:
-    case OperatorNode::ERAssn:
-    case OperatorNode::OrAssn:
-    case OperatorNode::Plus:
-    case OperatorNode::Minus:
-    case OperatorNode::Mul:
-    case OperatorNode::Div:
-    case OperatorNode::Mod:
-    case OperatorNode::BitOr:
-    case OperatorNode::BitAnd:
-    case OperatorNode::Xor:
-    case OperatorNode::LShift:
-    case OperatorNode::RShift:
-    case OperatorNode::LThan:
-    case OperatorNode::GThan:
-    case OperatorNode::LEThan:
-    case OperatorNode::GEThan:
-    case OperatorNode::Eq:
-    case OperatorNode::Neq:
-    case OperatorNode::Index:
-    case OperatorNode::Range:
-    case OperatorNode::UnPlus:
-    case OperatorNode::UnMinus:
-    case OperatorNode::PointTo:
-    case OperatorNode::Neg:
-    case OperatorNode::BitNeg:
-    case OperatorNode::LabelAddress:
-      return new UntypedExpr( new NameExpr( opFuncName[ op->get_type() ] ), args );
-
-    case OperatorNode::AddressOf:
-      assert( args.size() == 1 );
-      assert( args.front() );
-
-      return new AddressExpr( args.front() );
-
-    case OperatorNode::Cast:
-      {
-	TypeValueNode * arg = dynamic_cast<TypeValueNode *>(get_args());
-	assert( arg );
-
-        DeclarationNode *decl_node = arg->get_decl();
-        ExpressionNode *expr_node = dynamic_cast<ExpressionNode *>(arg->get_link());
-
-        Type *targetType = decl_node->buildType();
-        if( dynamic_cast< VoidType* >( targetType ) ) {
-          delete targetType;
-          return new CastExpr( expr_node->build(), maybeBuild< Expression >( get_argName() ) );
-        } else {
-          return new CastExpr(expr_node->build(),targetType, maybeBuild< Expression >( get_argName() ) );
-        }
-      }
-
-    case OperatorNode::FieldSel:
-      {
-	assert( args.size() == 2 );
-
-	NameExpr *member = dynamic_cast<NameExpr *>(args.back());
-	// TupleExpr *memberTup = dynamic_cast<TupleExpr *>(args.back());
-
-	if ( member != 0 )
-	  {
-	    UntypedMemberExpr *ret = new UntypedMemberExpr(member->get_name(), args.front());
-	    delete member;
-	    return ret;
-	  }
-	/* else if ( memberTup != 0 )
-	  {
-	    UntypedMemberExpr *ret = new UntypedMemberExpr(memberTup->get_name(), args.front());
-	    delete member;
-	    return ret;
-	    } */
-	else
-	  assert( false );
-      }
-
-    case OperatorNode::PFieldSel:
-      {
-	assert( args.size() == 2 );
-
-	NameExpr *member = dynamic_cast<NameExpr *>(args.back());  // modify for Tuples   xxx
-	assert( member != 0 );
-
-	UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
-	deref->get_args().push_back( args.front() );
-
-	UntypedMemberExpr *ret = new UntypedMemberExpr(member->get_name(), deref);
-	delete member;
-	return ret;
-      }
-
-    case OperatorNode::AlignOf:
-    case OperatorNode::SizeOf:
-      {
-/// 	bool isSizeOf = (op->get_type() == OperatorNode::SizeOf);
-
-	if( TypeValueNode * arg = dynamic_cast<TypeValueNode *>(get_args()) ) {
-          return new SizeofExpr(arg->get_decl()->buildType());
-        } else {
-	  return new SizeofExpr(args.front());
-        }
-      }
-
-    case OperatorNode::CompLit:
-      throw UnimplementedError( "C99 compound literals" );
-
-      // the short-circuited operators
-    case OperatorNode::Or:
-    case OperatorNode::And:
-      assert(args.size() == 2);
-      return new LogicalExpr( notZeroExpr( args.front() ), notZeroExpr( args.back() ), (op->get_type() == OperatorNode::And) );
-
-    case OperatorNode::Cond:
-      {
-        assert(args.size() == 3);
-        std::list< Expression* >::const_iterator i = args.begin();
-        Expression *arg1 = notZeroExpr( *i++ );
-        Expression *arg2 = *i++;
-        Expression *arg3 = *i++;
-        return new ConditionalExpr( arg1, arg2, arg3 );
-      }
-
-    case OperatorNode::NCond:
-      throw UnimplementedError( "GNU 2-argument conditional expression" );
-
-    case OperatorNode::Comma:
-      {
-        assert(args.size() == 2);
-        std::list< Expression* >::const_iterator i = args.begin();
-        Expression *ret = *i++;
-        while( i != args.end() ) {
-          ret = new CommaExpr( ret, *i++ );
-        }
-        return ret;
-      }
-
-      // Tuples
-    case OperatorNode::TupleC:
-      {
-        TupleExpr *ret = new TupleExpr();
-        std::copy( args.begin(), args.end(), back_inserter( ret->get_exprs() ) );
-        return ret;
-      }
-
-    default:
-      // shouldn't happen
-      return 0;
-    }
-  }
-}
-
-void CompositeExprNode::printOneLine(std::ostream &os, int indent) const
-{
-  printDesignation(os);
-  os << "( ";
-  function->printOneLine( os, indent );
-  for( ExpressionNode *cur = arguments; cur != 0; cur = dynamic_cast< ExpressionNode* >( cur->get_link() ) ) {
-    cur->printOneLine( os, indent );
-  }
-  os << ") ";
-}
-
-void CompositeExprNode::print(std::ostream &os, int indent) const
-{
-  printDesignation(os);
-  os << '\r' << string(indent, ' ') << "Application of: " << endl;
-  function->print( os, indent + ParseNode::indent_by );
-
-  os << '\r' << string(indent, ' ') ;
-  if( arguments ) {
-    os << "... on arguments: " << endl;
-    arguments->printList(os, indent + ParseNode::indent_by);
-  } else
-    os << "... on no arguments: " << endl;
-}
-
-void CompositeExprNode::set_function(ExpressionNode *f){
-  function = f;
-}
-
-void CompositeExprNode::set_args(ExpressionNode *args){
-  arguments = args;
-}
-
-ExpressionNode *CompositeExprNode::get_function(void) const {
-  return function;
-}
-
-ExpressionNode *CompositeExprNode::get_args(void) const {
-  return arguments;
-}
-
-void CompositeExprNode::add_arg(ExpressionNode *arg){
-  if(arguments)
-    arguments->set_link(arg);
-  else
-    set_args(arg);
-}
-
-/// CommaExprNode::CommaExprNode(): CompositeExprNode(new OperatorNode(OperatorNode::Comma)) {}
-
-CommaExprNode::CommaExprNode(ExpressionNode *exp)
-  : CompositeExprNode( new OperatorNode( OperatorNode::Comma, exp->get_filename(), exp->get_lineno() ), exp )
- {
- }
-
-CommaExprNode::CommaExprNode(ExpressionNode *exp1, ExpressionNode *exp2)
-  : CompositeExprNode(new OperatorNode(OperatorNode::Comma, exp1->get_filename(), exp1->get_lineno()), exp1, exp2)
-{
-}
-
-CommaExprNode *CommaExprNode::add_to_list(ExpressionNode *exp){
-  add_arg(exp);
-
-  return this;
-}
-
-CommaExprNode::CommaExprNode( const CommaExprNode &other )
-  : CompositeExprNode( other )
-{
-}
-
-ValofExprNode::ValofExprNode(StatementNode *s)
-  : ExpressionNode( &nullstr, s->get_filename(), s->get_lineno() ), body(s)
-{
-}
-
-ValofExprNode::ValofExprNode( const ValofExprNode &other )
-  : ExpressionNode( other ), body( maybeClone( body ) )
-{
-}
-
-ValofExprNode::~ValofExprNode() {
-  delete body;
-}
-
-void ValofExprNode::print( std::ostream &os, int indent ) const {
-  printDesignation(os);
-  os << string(indent, ' ') << "Valof Expression:" << std::endl;
-  get_body()->print(os, indent + 4);
-}
-
-void ValofExprNode::printOneLine( std::ostream &, int indent ) const
-{
-  assert( false );
-}
-
-Expression *ValofExprNode::build() const {
-  return new UntypedValofExpr ( get_body()->build(), maybeBuild< Expression >( get_argName() ) );
-}
-
-ForCtlExprNode::ForCtlExprNode(ParseNode *init_, ExpressionNode *cond, ExpressionNode *incr)
-  throw (SemanticError)
-  : ExpressionNode( &nullstr, init_->get_filename(), init_->get_lineno() ), condition(cond), change(incr)
-{
-  if(init_ == 0)
-    init = 0;
-  else {
-    DeclarationNode *decl;
-    ExpressionNode *exp;
-
-    if((decl = dynamic_cast<DeclarationNode *>(init_)) != 0)
-      init = new StatementNode(decl);
-    else if((exp = dynamic_cast<ExpressionNode *>(init_)) != 0)
-      init = new StatementNode(StatementNode::Exp, exp->get_filename(), exp->get_lineno(), exp);
-    else
-      throw SemanticError("Error in for control expression");
-  }
-}
-
-ForCtlExprNode::ForCtlExprNode( const ForCtlExprNode &other )
-  : ExpressionNode( other ), init( maybeClone( other.init ) ), condition( maybeClone( other.condition ) ), change( maybeClone( other.change ) )
-{
-}
-
-ForCtlExprNode::~ForCtlExprNode(){
-  delete init;
-  delete condition;
-  delete change;
-}
-
-Expression *ForCtlExprNode::build() const {
-  // this shouldn't be used!
-  assert( false );
-  return 0;
-}
-
-void ForCtlExprNode::print( std::ostream &os, int indent ) const{
-  os << string(indent,' ') << "For Control Expression -- : " << endl;
-
-  os << "\r" << string(indent + 2,' ') << "initialization: ";
-  if(init != 0)
-    init->print(os, indent + 4);
-
-  os << "\n\r" << string(indent + 2,' ') << "condition: ";
-  if(condition != 0)
-    condition->print(os, indent + 4);
-  os << "\n\r" << string(indent + 2,' ') << "increment: ";
-  if(change != 0)
-    change->print(os, indent + 4);
-}
-
-void
-ForCtlExprNode::printOneLine( std::ostream &, int indent ) const
-{
-  assert( false );
-}
-
-TypeValueNode::TypeValueNode(DeclarationNode *decl)
-  : ExpressionNode( &nullstr, decl->get_filename(), decl->get_lineno() ), decl( decl )
-{
-}
-
-TypeValueNode::TypeValueNode( const TypeValueNode &other )
-  : ExpressionNode( other ), decl( maybeClone( other.decl ) )
-{
-}
-
-Expression *
-TypeValueNode::build() const
-{
-  return new TypeExpr( decl->buildType() );
-}
-
-void
-TypeValueNode::print(std::ostream &os, int indent) const
-{
-  os << std::string( indent, ' ' ) << "Type:";
-  get_decl()->print(os, indent + 2);
-}
-
-void
-TypeValueNode::printOneLine(std::ostream &os, int indent) const
-{
-  os << "Type:";
-  get_decl()->print(os, indent + 2);
-}
-
-ExpressionNode *flattenCommas( ExpressionNode *list )
-{
-  if( CompositeExprNode *composite = dynamic_cast< CompositeExprNode * >( list ) )
-    {
-      OperatorNode *op;
-           if ( (op = dynamic_cast< OperatorNode * >( composite->get_function() )) && (op->get_type() == OperatorNode::Comma) )
-	     {
-	         if ( ExpressionNode *next = dynamic_cast< ExpressionNode * >( list->get_link() ) )
-		   composite->add_arg( next );
-		 return flattenCommas( composite->get_args() );
-	     }
-    }
-
-  if ( ExpressionNode *next = dynamic_cast< ExpressionNode * >( list->get_link() ) )
-    list->set_next( flattenCommas( next ) );
-
-  return list;
-}
-
-// Local Variables: //
-// mode: C++                //
-// compile-command: "gmake" //
-// End: //
Index: translator/Parser.old/InitializerNode.cc
===================================================================
--- translator/Parser.old/InitializerNode.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,107 +1,0 @@
-#include "ParseNode.h"
-#include "SynTree/Expression.h"
-#include "SynTree/Initializer.h"
-#include "utility.h"
-#include "SemanticError.h"
-// #include <cstdlib> // for strtol
-#include <cassert>
-
-InitializerNode::InitializerNode( ExpressionNode *_expr, bool aggrp, ExpressionNode *des )
-  : ParseNode( "", _expr->get_filename(), _expr->get_lineno() ), expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 )
-{
-  if( des && des->get_lineno() < lineno ) {
-    lineno = des->get_lineno();
-  }
-
-  if ( aggrp )
-    kids = dynamic_cast< InitializerNode *>( get_link() );
-
-  if ( kids != 0 )
-    set_link( 0 );
-}
-
-InitializerNode::InitializerNode( InitializerNode *init, bool aggrp, ExpressionNode *des )
-  : ParseNode( "", init->get_filename(), init->get_lineno() ), aggregate( aggrp ), designator( des ), kids( 0 )
-{
-  if( des && des->get_lineno() < lineno ) {
-    lineno = des->get_lineno();
-  }
-
-  if (init != 0)
-    set_link(init);
-
-  if ( aggrp )
-      kids = dynamic_cast< InitializerNode *>( get_link() );
-
-  if ( kids != 0 )
-    set_next( 0 );
-}
-
-InitializerNode::~InitializerNode() {
-  delete expr;
-}
-
-void InitializerNode::print( std::ostream &os, int indent ) const {
-  os << std::string(indent, ' ') << "Initializer expression" << std::endl;
-}
-
-void InitializerNode::printOneLine( std::ostream &os ) const {
-  if (!aggregate)
-    {
-
-      if ( designator != 0 )
-	{
-	  os << "designated by: (";
-	  ExpressionNode  *curdes = designator;
-	  while( curdes != 0){
-	    curdes->printOneLine(os);
-	    curdes = (ExpressionNode *)(curdes->get_link());
-	    if(curdes) os << ", ";
-	  }
-	  os << ")";
-	}
-
-      if (expr) expr->printOneLine(os);
-    }
-  else  // It's an aggregate
-    {
-      os << "[";
-      if( next_init() != 0 ) 
-	next_init()->printOneLine(os);
-
-      if (aggregate) os << "]";
-    }
-  
-  InitializerNode * moreInit;
-  if  ( get_link() != 0 && ((moreInit = dynamic_cast< InitializerNode * >( get_link() ) ) != 0) ) 
-    moreInit->printOneLine( os );
-}
-
-Initializer *InitializerNode::build() const {
-  if ( aggregate )
-    {
-      assert( next_init() != 0 );
-
-      std::list< Initializer *> initlist;
-      buildList<Initializer, InitializerNode>( next_init(), initlist );
-
-      std::list< Expression *> designlist;
-      if ( designator != 0 )
-	buildList<Expression, ExpressionNode>( designator, designlist );
-
-      return new ListInit( initlist, designlist );
-    }
-  else
-    {
-      std::list< Expression *> designators;
-
-      if ( designator != 0 ) 
-	buildList<Expression, ExpressionNode>( designator, designators );
-
-      return new SingleInit( get_expression()->build(), designators );
-    }
-
-  return 0;  // shouldn't be here
-}
-
-
Index: translator/Parser.old/LinkageSpec.cc
===================================================================
--- translator/Parser.old/LinkageSpec.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: LinkageSpec.cc,v 1.3 2003/01/29 14:55:08 rcbilson Exp $
- *
- */
-
-#include <string>
-#include <cassert>
-
-#include "LinkageSpec.h"
-#include "SemanticError.h"
-
-/* static class method */
-LinkageSpec::Type 
-LinkageSpec::fromString( const std::string &stringSpec )
-{
-  if( stringSpec == "\"Cforall\"" ) {
-    return Cforall;
-  } else if( stringSpec == "\"C\"" ) {
-    return C;
-  } else {
-    throw SemanticError( "Invalid linkage specifier " + stringSpec );
-  }
-}
-
-/* static class method */
-std::string 
-LinkageSpec::toString( LinkageSpec::Type linkage )
-{
-  switch( linkage ) {
-  case Intrinsic:
-    return "intrinsic";
-    
-  case Cforall:
-    return "Cforall";
-    
-  case C:
-    return "C";
-    
-  case AutoGen:
-    return "automatically generated";
-    
-  case Compiler:
-    return "compiler built-in";
-  }
-  assert( false );
-  return "";
-}
-
-/* static class method */
-bool 
-LinkageSpec::isDecoratable( Type t )
-{
-  switch( t ) {
-  case Intrinsic:
-  case Cforall:
-  case AutoGen:
-    return true;
-    
-  case C:
-  case Compiler:
-    return false;
-  }
-  assert( false );
-  return false;
-}
-
-/* static class method */
-bool 
-LinkageSpec::isGeneratable( Type t )
-{
-  switch( t ) {
-  case Intrinsic:
-  case Cforall:
-  case AutoGen:
-  case C:
-    return true;
-    
-  case Compiler:
-    return false;
-  }
-  assert( false );
-  return false;
-}
-
-/* static class method */
-bool 
-LinkageSpec::isOverloadable( Type t )
-{
-  return isDecoratable( t );
-}
-
-/* static class method */
-bool 
-LinkageSpec::isBuiltin( Type t )
-{
-  switch( t ) {
-  case Cforall:
-  case AutoGen:
-  case C:
-    return false;
-    
-  case Intrinsic:
-  case Compiler:
-    return true;
-  }
-  assert( false );
-  return false;
-}
-
Index: translator/Parser.old/LinkageSpec.h
===================================================================
--- translator/Parser.old/LinkageSpec.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: LinkageSpec.h,v 1.3 2003/01/29 14:55:08 rcbilson Exp $
- *
- */
-
-#ifndef LINKAGESPEC_H
-#define LINKAGESPEC_H
-
-#include <string>
-
-struct LinkageSpec
-{
-  enum Type
-  {
-    Intrinsic,		// C built-in defined in prelude
-    Cforall,		// ordinary
-    C,			// not overloadable, not mangled
-    AutoGen,		// built by translator (struct assignment)
-    Compiler		// gcc internal
-  };
-  
-  static Type fromString( const std::string& );
-  static std::string toString( Type );
-  
-  static bool isDecoratable( Type );
-  static bool isGeneratable( Type );
-  static bool isOverloadable( Type );
-  static bool isBuiltin( Type );
-};
-
-#endif /* #ifndef LINKAGESPEC_H */
Index: translator/Parser.old/ParseNode.cc
===================================================================
--- translator/Parser.old/ParseNode.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,97 +1,0 @@
-/* -*- C++ -*- */
-#include "ParseNode.h"
-using namespace std;
-
-// Builder
-int ParseNode::indent_by = 4;
-
-// ParseNode::ParseNode(void): next( 0 ) {};
-ParseNode::ParseNode( std::string _name, char *filename, int lineno )
-  : name(_name), next( 0 ), filename( filename ), lineno( lineno )
-{
-}
-
-ParseNode *ParseNode::set_name (string _name) {
-  name = _name;
-
-  return this;
-}
-
-ParseNode *ParseNode::set_name (string *_name) {
-  name = *_name; // deep copy
-  delete _name;
-
-  return this;
-}
-
-ParseNode::~ParseNode(void){
-  delete next;
-};
-
-string ParseNode::get_name(void) {
-  return name;
-}
-
-ParseNode *ParseNode::get_link(void) const {
-  return next;
-}
-
-ParseNode *ParseNode::get_last(void) {
-  ParseNode * current = this;
-
-  while(current->get_link() != 0)
-    current = current->get_link();
-
-  return current;
-}
-
-ParseNode *ParseNode::set_link(ParseNode *_next){
-  ParseNode *follow;
-
-  if(_next == 0) return this;
-
-  for(follow = this; follow->next != 0; follow = follow->next);
-  follow->next = _next;
-
-  return this;
-}
-
-const string ParseNode::get_name(void) const {
-  return name;
-}
-
-void ParseNode::print(std::ostream &os, int indent) const
-{
-}
-
-
-void ParseNode::printList(std::ostream &os, int indent) const
-{
-  print( os, indent );
-
-  if( next ) {
-    next->printList( os, indent );
-  }
-}
-
-ParseNode &ParseNode::operator,(ParseNode &p){
-  set_link(&p);
-
-  return *this;
-}
-
-ParseNode *mkList(ParseNode &pn){
-  /* it just relies on `operator,' to take care of the "arguments" and provides
-     a nice interface to an awful-looking address-of, rendering, for example
-         (StatementNode *)(&(*$5 + *$7)) into (StatementNode *)mkList(($5, $7))
-     (although "nice"  is probably not the word)
-  */
-
-  return &pn;
-}
-
-
-// Local Variables: //
-// mode: C++                //
-// compile-command: "gmake" //
-// End: //
Index: translator/Parser.old/ParseNode.h
===================================================================
--- translator/Parser.old/ParseNode.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,525 +1,0 @@
-#ifndef PARSENODE_H
-#define PARSENODE_H
-
-#include <iostream>
-#include <string>
-#include <list>
-#include <iterator>
-
-#include "lex.h"
-#include "utility.h"
-#include "SynTree/SynTree.h"
-#include "SynTree/Declaration.h"
-#include "SemanticError.h"
-#include "UniqueName.h"
-
-class ExpressionNode;
-class CompositeExprNode;
-class CommaExprNode;
-class StatementNode;
-class CompoundStmtNode;
-class DeclarationNode;
-class InitializerNode;
-
-// Builder
-class ParseNode {
-public:
-//  ParseNode(void);
-  ParseNode( std::string, char *filename, int lineno );
-  virtual ~ParseNode(void);
-
-  ParseNode *set_name (std::string) ;
-  ParseNode *set_name (std::string *) ;
-
-  std::string get_name(void);
-
-  ParseNode *get_link(void) const;
-  ParseNode *get_last(void);
-  ParseNode *set_link(ParseNode *);
-  void set_next( ParseNode *newlink ) { next = newlink; }
-
-  char *get_filename() const { return filename; }
-  int get_lineno() const { return lineno; }
-
-  virtual ParseNode *clone() const { return 0; };
-
-  const std::string get_name(void) const;
-  virtual void print( std::ostream &, int indent = 0 ) const;
-  virtual void printList( std::ostream &, int indent = 0 ) const;
-
-  ParseNode &operator,(ParseNode &);
-
-protected:
-  std::string name;
-  ParseNode *next;
-  static int indent_by;
-  char *filename;
-  int lineno;
-};
-
-ParseNode *mkList(ParseNode &);
-
-class ExpressionNode : public ParseNode {
-public:
-//  ExpressionNode();
-  ExpressionNode( std::string*, char *filename, int lineno );
-  ExpressionNode( const ExpressionNode &other );
-  virtual ~ExpressionNode() { /* can't delete asArgName because it might be referenced elsewhere */ };
-
-  virtual ExpressionNode *clone() const = 0;
-
-  virtual CommaExprNode *add_to_list(ExpressionNode *);
-
-  ExpressionNode *get_argName() const { return argName; }
-  ExpressionNode *set_asArgName( std::string *aName );
-  ExpressionNode *set_asArgName( ExpressionNode *aDesignator );
-
-  virtual void print(std::ostream &, int indent = 0) const = 0;
-  virtual void printOneLine(std::ostream &, int indent = 0) const = 0;
-
-  virtual Expression *build() const = 0;
-protected:
-  void printDesignation (std::ostream &, int indent = 0) const;
-
-private:
-  ExpressionNode *argName;
-};
-
-// NullExprNode is used in tuples as a place-holder where a tuple component is omitted
-// e.g., [ 2, , 3 ]
-class NullExprNode : public ExpressionNode
-{
-public:
-  NullExprNode( char *filename, int lineno );
-
-  virtual NullExprNode *clone() const;
-
-  virtual void print(std::ostream &, int indent = 0) const;
-  virtual void printOneLine(std::ostream &, int indent = 0) const;
-
-  virtual Expression *build() const;
-};
-
-class ConstantNode : public ExpressionNode {
-public:
-  enum Type {
-    Integer, Float, Character, String /* , Range, EnumConstant  */
-  };
-
-  ConstantNode();
-  ConstantNode( struct token & );
-  ConstantNode( Type, struct token & );
-  ConstantNode( const ConstantNode &other );
-
-  virtual ConstantNode *clone() const { return new ConstantNode( *this ); }
-
-  Type get_type(void) const ;
-  virtual void print(std::ostream &, int indent = 0) const;
-  virtual void printOneLine(std::ostream &, int indent = 0) const;
-
-  std::string get_value() const { return value; }
-  ConstantNode *append( std::string *newValue );
-
-  Expression *build() const;
-
-private:
-  void classify(std::string &);
-  Type type;
-  std::string value;
-  bool sign;
-  short base;
-  int longs, size;
-};
-
-class VarRefNode : public ExpressionNode {
-public:
-  VarRefNode();
-  VarRefNode( struct token &tok, bool isLabel = false );
-  VarRefNode( const VarRefNode &other );
-
-  virtual Expression *build() const ;
-
-  virtual VarRefNode *clone() const { return new VarRefNode( *this ); }
-
-  virtual void print(std::ostream &, int indent = 0) const;
-  virtual void printOneLine(std::ostream &, int indent = 0) const;
-private:
-  bool isLabel;
-};
-
-class TypeValueNode : public ExpressionNode
-{
-public:
-  TypeValueNode(DeclarationNode *);
-  TypeValueNode( const TypeValueNode &other );
-
-  DeclarationNode *get_decl() const { return decl; }
-
-  virtual Expression *build() const ;
-
-  virtual TypeValueNode *clone() const { return new TypeValueNode( *this ); }
-
-  virtual void print(std::ostream &, int indent = 0) const;
-  virtual void printOneLine(std::ostream &, int indent = 0) const;
-private:
-  DeclarationNode *decl;
-};
-
-class OperatorNode : public ExpressionNode {
-public:
-  enum Type { TupleC, Comma, TupleFieldSel,
-              Cond, NCond, 
-	      SizeOf, AlignOf, CompLit, Plus, Minus, Mul, Div, Mod, Or, And, 
-	        BitOr, BitAnd, Xor, Cast, LShift, RShift, LThan, GThan, LEThan, GEThan, Eq, Neq, 
-	        Assign, MulAssn, DivAssn, ModAssn, PlusAssn, MinusAssn, LSAssn, RSAssn, AndAssn, 
-	        ERAssn, OrAssn, Index, FieldSel, PFieldSel, Range,
-              UnPlus, UnMinus, AddressOf, PointTo, Neg, BitNeg, Incr, IncrPost, Decr, DecrPost, LabelAddress
-            };
-
-  OperatorNode(Type t, char *filename, int lineno);
-  OperatorNode( const OperatorNode &other );
-  virtual ~OperatorNode();
-
-  virtual OperatorNode *clone() const { return new OperatorNode( *this ); }
-
-  Type get_type(void) const;
-  std::string get_typename(void) const;
-
-  virtual void print(std::ostream &, int indent = 0) const;
-  virtual void printOneLine(std::ostream &, int indent = 0) const;
-
-  virtual Expression *build() const { return 0; }
-  
-private:
-  Type type;
-  static const char *OpName[];
-};
-
-
-class CompositeExprNode : public ExpressionNode {
-public:
-//  CompositeExprNode(void);
-  CompositeExprNode( struct token & );
-  CompositeExprNode(ExpressionNode *f, ExpressionNode *args = 0);
-  CompositeExprNode(ExpressionNode *f, ExpressionNode *arg1, ExpressionNode *arg2);
-  CompositeExprNode( const CompositeExprNode &other );
-  virtual ~CompositeExprNode();
-
-  virtual CompositeExprNode *clone() const { return new CompositeExprNode( *this ); }
-  virtual Expression *build() const;
-
-  virtual void print(std::ostream &, int indent = 0) const;
-  virtual void printOneLine(std::ostream &, int indent = 0) const;
-
-  void set_function(ExpressionNode *);
-  void set_args(ExpressionNode *);
-
-  void add_arg(ExpressionNode *);
-
-  ExpressionNode *get_function() const;
-  ExpressionNode *get_args() const;
-
-private:
-  ExpressionNode *function;
-  ExpressionNode *arguments;
-};
-
-class CommaExprNode : public CompositeExprNode {
-public:
-//  CommaExprNode();
-  CommaExprNode(ExpressionNode *);
-  CommaExprNode(ExpressionNode *, ExpressionNode *);
-  CommaExprNode( const CommaExprNode &other );
-
-  virtual CommaExprNode *add_to_list(ExpressionNode *);
-  virtual CommaExprNode *clone() const { return new CommaExprNode( *this ); }
-};
-
-class ForCtlExprNode : public ExpressionNode {
-public:
-  ForCtlExprNode(ParseNode *, ExpressionNode *, ExpressionNode *) throw (SemanticError);
-  ForCtlExprNode( const ForCtlExprNode &other );
-  ~ForCtlExprNode();
-
-  StatementNode *get_init() const { return init; }
-  ExpressionNode *get_condition() const { return condition; }
-  ExpressionNode *get_change() const { return change; }
-
-  virtual ForCtlExprNode *clone() const { return new ForCtlExprNode( *this ); }
-  virtual Expression *build() const;
-
-  virtual void print( std::ostream &, int indent = 0 ) const;
-  virtual void printOneLine( std::ostream &, int indent = 0 ) const;
-private:
-  StatementNode *init;
-  ExpressionNode *condition;
-  ExpressionNode *change;
-};
-
-class ValofExprNode : public ExpressionNode {
-public:
-//  ValofExprNode();
-  ValofExprNode( StatementNode *s = 0 );
-  ValofExprNode( const ValofExprNode &other );
-  ~ValofExprNode();
-  
-  virtual ValofExprNode *clone() const { return new ValofExprNode( *this ); }
-
-  StatementNode *get_body() const { return body; }
-  void print( std::ostream &, int indent = 0 ) const;
-  void printOneLine( std::ostream &, int indent = 0 ) const;
-  Expression *ValofExprNode::build() const;
-
-private:
-  StatementNode *body;
-};
-
-class TypeData;
-
-class DeclarationNode : public ParseNode
-{
-public:
-  enum Qualifier { Const, Restrict, Volatile, Lvalue };
-  enum StorageClass { Static, Auto, Extern, Register, Inline, Fortran };
-  enum BasicType { Char, Int, Float, Double, Void, Bool, Complex, Imaginary };
-  enum Modifier { Signed, Unsigned, Short, Long };
-  enum TyCon { Struct, Union, Context };
-  enum TypeClass { Type, Dtype, Ftype };
-
-  static const char *qualifierName[];
-  static const char *basicTypeName[];
-  static const char *modifierName[];
-  static const char *tyConName[];
-  static const char *typeClassName[];
-
-  static DeclarationNode *newFunction( struct token &name, DeclarationNode *ret, DeclarationNode *param,
-				       StatementNode *body );
-  static DeclarationNode *newFunction( char *filename, int lineno, DeclarationNode *ret, DeclarationNode *param,
-				       StatementNode *body );
-  static DeclarationNode *newQualifier( Qualifier, char *filename, int lineno );
-  static DeclarationNode *newStorageClass( StorageClass, char *filename, int lineno );
-  static DeclarationNode *newBasicType( BasicType, char *filename, int lineno );
-  static DeclarationNode *newModifier( Modifier, char *filename, int lineno );
-  static DeclarationNode *newForall( DeclarationNode*, char *filename, int lineno );
-  static DeclarationNode *newFromTypedef( struct token & );
-  static DeclarationNode *newAggregate( TyCon kind, char *filename, int lineno, DeclarationNode *formals, ExpressionNode *actuals, DeclarationNode *fields );
-  static DeclarationNode *newAggregate( TyCon kind, struct token &, DeclarationNode *formals, ExpressionNode *actuals, DeclarationNode *fields );
-  static DeclarationNode *newEnum( struct token &, DeclarationNode *constants );
-  static DeclarationNode *newEnum( char *filename, int lineno, DeclarationNode *constants );
-  static DeclarationNode *newEnumConstant( struct token &name, ExpressionNode *constant );
-  static DeclarationNode *newName( struct token &tok );
-  static DeclarationNode *newFromTypeGen( struct token &tok, ExpressionNode *params );
-  static DeclarationNode *newTypeParam( TypeClass, std::string*, char *filename, int lineno );
-  static DeclarationNode *newContext( struct token &name, DeclarationNode *params, DeclarationNode *asserts );
-  static DeclarationNode *newContextUse( struct token &name, ExpressionNode *params );
-  static DeclarationNode *newTypeDecl( struct token &name, DeclarationNode *typeParams );
-  static DeclarationNode *newPointer( DeclarationNode *qualifiers, char *filename, int lineno );
-  static DeclarationNode *newArray( ExpressionNode *size, DeclarationNode *qualifiers, bool isStatic, char *filename, int lineno );
-  static DeclarationNode *newVarArray( DeclarationNode *qualifiers, char *filename, int lineno );
-  static DeclarationNode *newBitfield( ExpressionNode *size );
-  static DeclarationNode *newTuple( DeclarationNode *members, char *filename, int lineno );
-  static DeclarationNode *newTypeof( ExpressionNode *expr, char *filename, int lineno );
-
-  DeclarationNode *addQualifiers( DeclarationNode* );
-  DeclarationNode *copyStorageClasses( DeclarationNode* );
-  DeclarationNode *addType( DeclarationNode* );
-  DeclarationNode *addTypedef();
-  DeclarationNode *addAssertions( DeclarationNode* );
-  DeclarationNode *addName( struct token & );
-  DeclarationNode *addBitfield( ExpressionNode *size );
-  DeclarationNode *addVarArgs();
-  DeclarationNode *addFunctionBody( StatementNode *body );
-  DeclarationNode *addOldDeclList( DeclarationNode *list );
-  DeclarationNode *addPointer( DeclarationNode *qualifiers );
-  DeclarationNode *addArray( DeclarationNode *array );
-  DeclarationNode *addNewPointer( DeclarationNode *pointer );
-  DeclarationNode *addNewArray( DeclarationNode *array );
-  DeclarationNode *addParamList( DeclarationNode *list );
-  DeclarationNode *addIdList( DeclarationNode *list );       // old-style functions
-  DeclarationNode *addInitializer( InitializerNode *init );
-
-  DeclarationNode *cloneType( struct token &newName );
-  DeclarationNode *cloneType( DeclarationNode *existing );
-  DeclarationNode *cloneBaseType( struct token &newName );
-  DeclarationNode *cloneBaseType( DeclarationNode *newdecl );
-
-  DeclarationNode *appendList( DeclarationNode * );
-
-  DeclarationNode *clone() const;
-  void print( std::ostream &, int indent = 0 ) const;
-  void printList( std::ostream &, int indent = 0 ) const;
-
-  Declaration *build() const;
-  Type *buildType() const;
-
-  bool get_hasEllipsis() const;
-  std::string get_name() const { return name; }
-  LinkageSpec::Type get_linkage() const { return linkage; }
-  DeclarationNode *extractAggregate() const;
-
-  DeclarationNode( char *filename, int lineno );
-  ~DeclarationNode();
-private:
-  Declaration::StorageClass buildStorageClass() const;
-  bool buildInline() const;
-
-  TypeData *type;
-  std::string name;
-  std::list< StorageClass > storageClasses;
-  ExpressionNode *bitfieldWidth;
-  InitializerNode *initializer;
-  bool hasEllipsis;
-  LinkageSpec::Type linkage;
-
-  static UniqueName anonymous;
-};
-
-class StatementNode : public ParseNode {
-public:
-  enum Type { Exp,   If,        Switch,  Case,    Default,  Choose,   Fallthru, 
-              While, Do,        For,
-              Goto,  Continue,  Break,   Return,  Throw,
-              Try,   Catch,     Asm,
-	      Decl
-            };
-
-///   StatementNode( void );
-  StatementNode( struct token &tok );
-  StatementNode( char *filename, int lineno );
-  StatementNode( Type, char *filename, int lineno, ExpressionNode *e = 0, StatementNode *s = 0 );
-  StatementNode( Type, char *filename, int lineno, std::string *target );
-  StatementNode( DeclarationNode *decl );
-
-
-  ~StatementNode(void);
-
-  static StatementNode * newCatchStmt( char *filename, int lineno, DeclarationNode *d = 0, StatementNode *s = 0, bool catchRestP = false );
-
-  void set_control(ExpressionNode *);
-  StatementNode * set_block(StatementNode *);
-
-  ExpressionNode *get_control() const ;
-  StatementNode *get_block() const;
-  StatementNode::Type get_type(void) const;
-
-  StatementNode *add_label( struct token & );
-  std::list<std::string> *get_labels() const;
-
-  void addDeclaration( DeclarationNode *newDecl ) { decl = newDecl; }
-  void setCatchRest( bool newVal ) { isCatchRest = newVal; }
-
-  std::string get_target() const;
-
-  StatementNode *add_controlexp(ExpressionNode *);
-  StatementNode *append_block(StatementNode *);
-  StatementNode *append_last_case(StatementNode *);
-
-  void print( std::ostream &, int indent = 0) const;
-
-  virtual StatementNode *clone() const;
-
-  virtual Statement *build() const;
-
-private:
-  static const char *StType[];
-  Type type;
-  ExpressionNode *control;
-  StatementNode *block;
-  std::list<std::string> *labels;
-  std::string *target; // target label for jump statements
-  DeclarationNode *decl;
-
-  bool isCatchRest;
-};
-
-class CompoundStmtNode : public StatementNode {
-public:
-//  CompoundStmtNode(void);
-  CompoundStmtNode( struct token & );
-  CompoundStmtNode( char *filename, int lineno );
-  CompoundStmtNode(StatementNode *);
-  ~CompoundStmtNode();
-
-  void add_statement(StatementNode *);
-
-  void print( std::ostream &, int indent = 0 ) const;
-
-  virtual Statement *build() const;
-
-private:
-  StatementNode *first, *last;
-};
-
-class NullStmtNode : public CompoundStmtNode {
-public:
-  NullStmtNode( char *filename, int lineno ) : CompoundStmtNode( filename, lineno ) {}
-  Statement *build() const;
-  void print(std::ostream &, int indent = 0) const;
-};
-
-class InitializerNode : public ParseNode {
-public:
-  InitializerNode( ExpressionNode *, bool aggrp = false,  ExpressionNode *des = 0 );
-  InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode *des = 0 );
-  ~InitializerNode();
-
-  ExpressionNode *get_expression() const { return expr; }
-
-  InitializerNode *set_designators( ExpressionNode *des ) { designator = des;  return this; }
-  ExpressionNode *get_designators() const { return designator; }
-
-  InitializerNode *next_init() const { return kids; }
-
-  void print( std::ostream &, int indent = 0 ) const;
-  void printOneLine( std::ostream & ) const;
-
-  virtual Initializer *build() const;
-
-private:
-  ExpressionNode *expr;
-  bool aggregate;
-  ExpressionNode *designator; // may be list
-  InitializerNode *kids;
-};
-
-
-
-template< typename SynTreeType, typename NodeType >
-void
-buildList( const NodeType *firstNode, std::list< SynTreeType* > &outputList )
-{
-  SemanticError errors;
-  std::back_insert_iterator< std::list< SynTreeType* > > out( outputList );
-  const NodeType *cur = firstNode;
-
-  while( cur ) {
-    try {
-      SynTreeType *result = dynamic_cast< SynTreeType* >( cur->build() );
-      if( result ) {
-        *out++ = result;
-      } else {
-      }
-    } catch( SemanticError &e ) {
-      errors.append( e );
-    }
-    cur = dynamic_cast< NodeType* >( cur->get_link() );
-  }
-  if( !errors.isEmpty() ) {
-    throw errors;
-  }
-}
-
-// in DeclarationNode.cc
-void buildList( const DeclarationNode *firstNode, std::list< Declaration* > &outputList );
-void buildList( const DeclarationNode *firstNode, std::list< DeclarationWithType* > &outputList );
-void buildTypeList( const DeclarationNode *firstNode, std::list< Type* > &outputList );
-
-// in ExpressionNode.cc
-ExpressionNode *flattenCommas( ExpressionNode *list );
-
-#endif /* #ifndef PARSENODE_H */
-
-// Local Variables: //
-// mode: C++ //
-// compile-command: "gmake" //
-// End: //
Index: translator/Parser.old/Parser.cc
===================================================================
--- translator/Parser.old/Parser.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Parser.cc,v 1.6 2002/11/15 20:07:18 rcbilson Exp $
- *
- */
-
-#include "Parser.h"
-#include "TypedefTable.h"
-#include "lex.h"
-#include "cfa.tab.h"
-
-/* global variables in cfa.y */
-extern int yyparse(void);
-
-extern int yydebug;
-extern LinkageSpec::Type linkage;
-
-extern TypedefTable typedefTable;
-extern DeclarationNode *theTree;
-/* end of globals */
-
-Parser *Parser::theParser = 0;
-
-Parser::Parser(): parseTree( 0 ), parseStatus( 1 ) {}
-
-Parser::~Parser()
-{
-  delete parseTree;
-}
-
-/* static class method */
-Parser &
-Parser::get_parser()
-{
-  if( theParser == 0 ) {
-    theParser = new Parser;
-  }
-  return *theParser;
-}
-
-void 
-Parser::parse( FILE *input )
-{
-  extern FILE *yyin;
-  yyin = input;
-  extern int yylineno;
-  yylineno = 1;
-  typedefTable.enterScope();
-  parseStatus = yyparse();
-  parseTree = theTree;
-}
-
-void
-Parser::set_debug( bool debug )
-{
-  yydebug = debug;
-}
-
-void 
-Parser::set_linkage( LinkageSpec::Type linkage )
-{
-  ::linkage = linkage;
-}
-
-
-void 
-Parser::freeTree()
-{
-  delete parseTree;
-  parseTree = 0;
-}
-
Index: translator/Parser.old/Parser.h
===================================================================
--- translator/Parser.old/Parser.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,46 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * A singleton class to encapsulate the bison-generated parser
- *
- * $Id: Parser.h,v 1.4 2002/09/09 16:47:14 rcbilson Exp $
- *
- */
-
-#ifndef PARSER_H
-#define PARSER_H
-
-#include <cstdio>
-
-#include "Parser/ParseNode.h"
-#include "LinkageSpec.h"
-
-class Parser
-{
-public:
-  static Parser &get_parser();
-
-  /* do the actual parse */
-  void parse( FILE *input );
-
-  /* accessors to return the result of the parse */
-  DeclarationNode *get_parseTree() const { return parseTree; }
-  int get_parseStatus() const { return parseStatus; }
-
-  /* mutators to control parse options */
-  void set_debug( bool debug );
-  void set_linkage( LinkageSpec::Type linkage );
-
-  /* free the parse tree without actually destroying the parser */
-  void freeTree();
-
-  ~Parser();
-
-private:
-  Parser();
-  static Parser *theParser;
-  DeclarationNode *parseTree;
-  int parseStatus;
-};
-
-#endif /* #ifndef PARSER_H */
Index: translator/Parser.old/StatementNode.cc
===================================================================
--- translator/Parser.old/StatementNode.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,433 +1,0 @@
-/* -*- C++ -*- */
-#include <list>
-#include <algorithm>
-
-#include "ParseNode.h"
-#include "SynTree/Statement.h"
-#include "SynTree/Expression.h"
-#include "parseutility.h"
-#include "utility.h"
-
-using namespace std;
-
-const char *StatementNode::StType[] =
-  { "Exp",   "If",       "Switch", "Case",    "Default",  "Choose",   "Fallthru", 
-    "While", "Do",       "For", 
-    "Goto",  "Continue", "Break",  "Return",  "Throw",
-    "Try",   "Catch",    "Asm",
-    "Decl"
-  };
-
-/// StatementNode::StatementNode(void) : 
-///   ParseNode(), control( 0 ), block( 0 ), labels( 0 ), target( 0 ), decl( 0 ), isCatchRest ( false ) {}
-
-StatementNode::StatementNode( struct token &tok )
-  : ParseNode( *tok->str, tok->filename, tok->lineno ), control( 0 ), block( 0 ), labels( 0 ), target( 0 ), decl( 0 ), isCatchRest ( false )
-{
-}
-
-StatementNode::StatementNode( char *filename, int lineno )
-  : ParseNode( "", filename, lineno ), control( 0 ), block( 0 ), labels( 0 ), target( 0 ), decl( 0 ), isCatchRest ( false )
-{
-}
-
-StatementNode::StatementNode( DeclarationNode *decl )
-  : ParseNode( decl->get_name(), decl->get_filename(), decl->get_lineno() ), type( Decl ), control( 0 ), block( 0 ), labels( 0 ), target( 0 ), isCatchRest ( false )
-{
-  if( decl ) {
-    if( DeclarationNode *agg = decl->extractAggregate() ) {
-      this->decl = agg;
-      StatementNode *nextStmt = new StatementNode;
-      nextStmt->type = Decl;
-      nextStmt->decl = decl;
-      next = nextStmt;
-      if( decl->get_link() ) {
-        next->set_next( new StatementNode( dynamic_cast< DeclarationNode* >( decl->get_link() ) ) );
-        decl->set_next( 0 );
-      }
-    } else {
-      if( decl->get_link() ) {
-        next = new StatementNode( dynamic_cast< DeclarationNode* >( decl->get_link() ) );
-        decl->set_next( 0 );
-      }
-      this->decl = decl;
-    }
-  }
-}
-
-StatementNode::StatementNode(Type t, char *filename, int lineno, ExpressionNode *ctrl_label, StatementNode *block_ )
-  : ParseNode( "", filename, lineno ), type(t), control(ctrl_label), block(block_), labels( 0 ), target( 0 ), decl( 0 ), isCatchRest ( false )
-{
-  if (t == Default)
-    control = 0;
-} 
-
-StatementNode::StatementNode(Type t, char *filename, int lineno, string *_target)
-  : ParseNode( "", filename, lineno ), type(t), control(0), block(0),   labels( 0 ), target(_target), decl( 0 ), isCatchRest ( false )
-{
-}
-
-StatementNode::~StatementNode(void){
-  delete control;
-  delete block;
-  delete labels;
-  delete target;
-  delete decl;
-}
-
-StatementNode * StatementNode::newCatchStmt( char *filename, int lineno, DeclarationNode *d, StatementNode *s, bool catchRestP ) {
-  StatementNode *ret = new StatementNode( StatementNode::Catch, filename, lineno, 0, s ); 
-  ret->addDeclaration( d );
-  ret->setCatchRest( catchRestP );
-
-  return ret;
-}
-
-std::string StatementNode::get_target() const{
-  if(target)
-    return *target;
-
-  return string("");
-}
-
-StatementNode *
-StatementNode::clone() const
-{
-  StatementNode *newnode = new StatementNode( type, filename, lineno, maybeClone( control ), maybeClone( block ) );
-  if( target ) {
-    newnode->target = new string( *target );
-  } else {
-    newnode->target = 0;
-  }
-  newnode->decl = maybeClone( decl );
-  return newnode;
-}
-
-void StatementNode::set_control(ExpressionNode *c){
-  control = c;
-}
-
-StatementNode * StatementNode::set_block(StatementNode *b){
-  block = b;
-
-  return this;
-}
-
-ExpressionNode *StatementNode::get_control(void) const {
-  return control;
-}
-
-StatementNode *StatementNode::get_block(void) const {
-  return block;
-}
-
-StatementNode::Type StatementNode::get_type(void) const {
-  return type;
-}
-
-StatementNode *StatementNode::add_label( struct token &l ){
-  if(l.str != 0){
-    if(labels == 0)
-      labels = new std::list<std::string>();
-
-    labels->push_front(*l.str); 
-    delete l.str;
-  }
-  lineno = min( lineno, l.lineno );
-
-  return this;
-}
-
-std::list<std::string> *StatementNode::get_labels() const
-{  return labels; }
-
-StatementNode *StatementNode::add_controlexp(ExpressionNode *e){
-
-  if(control && e)
-    control->add_to_list(e); // xxx - check this
-
-  return this;
-}
-
-StatementNode *StatementNode::append_block(StatementNode *stmt){
-  if( stmt != 0)
-    if( block == 0 )
-      block = stmt;
-    else
-      block->set_link(stmt);
-
-  return this;
-}
-
-
-StatementNode *StatementNode::append_last_case(StatementNode *stmt){
-  if( stmt != 0 ) {
-    StatementNode *next = (StatementNode *)get_link();
-    if ( next && next->get_type() == StatementNode::Case )
-      next->append_last_case ( stmt );
-    else
-      if( block == 0 )
-	block = stmt;
-      else
-	block->set_link(stmt);
-  }
-
-  return this;
-}
-
-void StatementNode::print( std::ostream &os, int indent ) const {
-
-  if(labels != 0)
-    if(!labels->empty()){
-      std::list<std::string>::const_iterator i;
-
-      os << '\r' << string(indent, ' ');
-      for( i = labels->begin(); i != labels->end(); i++ )
-	os << *i << ":";
-      os << endl;
-    }
-
-  switch( type ) {
-  case Decl:
-    decl->print( os, indent );
-    break;
-  
-  case Exp:
-    if( control ) {
-      os << string( indent, ' ' );
-      control->print( os, indent );
-      os << endl;
-    } else 
-      os << string( indent, ' ' ) << "Null Statement" << endl;
-    break;
-
-  default:
-    os << '\r' << string(indent, ' ') << StatementNode::StType[type] << endl;
-
-    if   ( type == Catch )
-      if( decl ){
-	os << '\r' << string( indent + ParseNode::indent_by, ' ' ) << "Declaration: " << endl;
-	decl->print( os, indent + 2*ParseNode::indent_by);
-      } else if ( isCatchRest ) {
-	os << '\r' << string( indent + ParseNode::indent_by, ' ' ) << "Catches the rest " << endl;
-      } else {
-	; // should never reach here
-      }
-
-    if( control ){
-      os << '\r' << string( indent + ParseNode::indent_by, ' ' ) << "Expression: " << endl;
-      control->printList( os, indent + 2*ParseNode::indent_by);
-    }
-
-    if( block ){
-      os << '\r' << string( indent + ParseNode::indent_by, ' ' ) << "Branches of execution: " << endl;
-      block->printList( os, indent + 2*ParseNode::indent_by);  
-    }
-
-    if( target ){
-      os << '\r' << string( indent + ParseNode::indent_by, ' ' ) << "Target: " << get_target() << endl;
-    }
-
-    break;
-  }
-}
-
-Statement *StatementNode::build() const {
-
-  std::list<Statement *> branches;
-  std::list<Expression *> exps;
-  std::list<Label> labs;
-
-  if(labels != 0){
-    std::back_insert_iterator< std::list<Label> > lab_it(labs);
-    copy(labels->begin(), labels->end(), lab_it);
-  }
-
-  // try {
-  buildList<Statement, StatementNode>(get_block(), branches);
-  
-  switch( type ) {
-  case Decl:
-    return new DeclStmt( labs, maybeBuild< Declaration >( decl ) );
-
-  case Exp:
-    {
-      Expression *e = maybeBuild< Expression >( get_control() );
-
-      if(e)
-        return new ExprStmt( labs, e );
-      else
-        return new NullStmt( labs );
-    }
-
-  case If:
-    {
-      Statement *thenb = 0, *elseb = 0;
-
-      assert( branches.size() >= 1 );
-
-      thenb = branches.front();  branches.pop_front();
-      if(!branches.empty())
-	{ elseb = branches.front();  branches.pop_front(); }
-
-      return new IfStmt( labs, notZeroExpr( get_control()->build() ), thenb, elseb);
-    }
-
-  case While:
-    assert(branches.size() == 1);
-    return new WhileStmt( labs, notZeroExpr( get_control()->build() ), branches.front() );
-
-  case Do:
-    assert(branches.size() == 1);
-    return new WhileStmt( labs, notZeroExpr( get_control()->build() ), branches.front(), true );
-    
-  case For:
-    {
-      assert(branches.size() == 1);
-
-      ForCtlExprNode *ctl = dynamic_cast<ForCtlExprNode *>(get_control());
-      assert(ctl != 0);
-
-      Statement *stmt = 0;
-      if(ctl->get_init() != 0)
-	stmt = ctl->get_init()->build();
-
-      Expression *cond = 0;
-      if(ctl->get_condition() != 0)
-	cond = notZeroExpr( ctl->get_condition()->build() );
-
-      Expression *incr = 0;
-      if(ctl->get_change() != 0)
-	incr = ctl->get_change()->build();
-
-      return new ForStmt( labs, stmt, cond, incr, branches.front() );
-    }
-
-  case Switch:
-    // try{
-    return new SwitchStmt( labs, get_control()->build(), branches );
-
-  case Choose:
-    return new ChooseStmt( labs, get_control()->build(), branches );
-
-  case Fallthru:
-    return new FallthruStmt( labs );
-
-  case Case: 
-    return new CaseStmt( labs, get_control()->build(), branches);
-
-  case Default:
-    return new CaseStmt( labs, 0, branches, true);
-
-  case Goto:
-    {
-      if (get_target() == "")  { // computed goto
-	assert( get_control() != 0 );
-	return new BranchStmt( labs, get_control()->build(), BranchStmt::Goto );
-      }
-
-      return new BranchStmt( labs, get_target(), BranchStmt::Goto);
-    }
-
-  case Break:
-    return new BranchStmt( labs, get_target(), BranchStmt::Break);
-
-  case Continue:
-    return new BranchStmt( labs, get_target(), BranchStmt::Continue);
-
-  case Return:
-  case Throw :
-    buildList( get_control(), exps );
-    if( exps.size() ==0 )
-      return new ReturnStmt( labs, 0, type == Throw );
-    if( exps.size() > 0 )
-      return new ReturnStmt( labs, exps.back(), type == Throw );
-
-  case Try:
-    {
-      assert( branches.size() >= 0 );
-      CompoundStmt *tryBlock = dynamic_cast<CompoundStmt *>(branches.front());
-      branches.pop_front();
-      return new TryStmt( labs, tryBlock, branches );
-    }
-
-  case Catch:
-    {
-      assert( branches.size() == 1 );
-
-      return new CatchStmt( labs, maybeBuild< Declaration >( decl ), branches.front(), isCatchRest );
-    }
-
-  default:
-    // shouldn't be here
-    return 0;
-  }
-
-  // shouldn't be here
-}
-
-/// CompoundStmtNode::CompoundStmtNode(void)
-///   : first( 0 ), last( 0 )
-/// {
-/// }
-
-CompoundStmtNode::CompoundStmtNode( struct token &tok )
-  : StatementNode( *tok.str, tok.filename, tok.lineno ), first( 0 ), last( 0 )
-{
-}
-
-CompoundStmtNode::CompoundStmtNode(StatementNode *stmt)
-  : StatementNode( "", stmt->get_filename(), stmt->get_lineno() ), first(stmt)
-{
-  if( first ) {
-    last = (StatementNode *)(stmt->get_last());
-  } else {
-    last = 0;
-  }
-}
-
-CompoundStmtNode::~CompoundStmtNode()
-{
-  delete first;
-}
-
-void CompoundStmtNode::add_statement(StatementNode *stmt) {
-  if(stmt != 0){
-    last->set_link(stmt);
-    last = (StatementNode *)(stmt->get_link());
-  }
-}
-
-void CompoundStmtNode::print(ostream &os, int indent) const {
-  if( first ) {
-    first->printList( os, indent+2 );
-  }
-}
-
-Statement *CompoundStmtNode::build() const {
-
-  std::list<Label> labs;
-  std::list<std::string> *labels = get_labels();
-
-  if(labels != 0){
-    std::back_insert_iterator< std::list<Label> > lab_it(labs);
-    copy(labels->begin(), labels->end(), lab_it);
-  }
-
-  CompoundStmt *cs = new CompoundStmt( labs );
-  buildList( first, cs->get_kids() );
-  return cs;
-}
-
-void NullStmtNode::print(ostream &os, int indent) const {
-  os << "\r" << string(indent, ' ') << "Null Statement:" << endl;
-}
-
-Statement *NullStmtNode::build() const { 
-  return new NullStmt;
-}
-
-// Local Variables: //
-// mode: C++                //
-// compile-command: "gmake -f ../Makefile" //
-// End: //
Index: translator/Parser.old/TypeData.cc
===================================================================
--- translator/Parser.old/TypeData.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,1024 +1,0 @@
-#include <cassert>
-#include <algorithm>
-#include <iterator>
-#include "utility.h"
-#include "TypeData.h"
-#include "SynTree/Type.h"
-#include "SynTree/Declaration.h"
-#include "SynTree/Expression.h"
-#include "SynTree/Statement.h"
-
-
-TypeData::TypeData( Kind k )
-  : kind( k ), base( 0 ), forall( 0 )
-{
-  switch( kind ) {
-  case Unknown:
-  case Pointer:
-  case EnumConstant:
-    // nothing else to initialize
-    break;
-
-  case Basic:
-    basic = new Basic_t;
-    break;
-
-  case Array:
-    array = new Array_t;
-    array->dimension = 0;
-    array->isVarLen = false;
-    array->isStatic = false;
-    break;
-
-  case Function:
-    function = new Function_t;
-    function->params = 0;
-    function->idList = 0;
-    function->oldDeclList = 0;
-    function->body = 0;
-    function->hasBody = false;
-    break;
-
-  case Aggregate:
-    aggregate = new Aggregate_t;
-    aggregate->params = 0;
-    aggregate->actuals = 0;
-    aggregate->members = 0;
-    break;
-
-  case AggregateInst:
-    aggInst = new AggInst_t;
-    aggInst->aggregate = 0;
-    aggInst->params = 0;
-    break;
-
-  case Enum:
-    enumeration = new Enumeration_t;
-    enumeration->constants = 0;
-    break;
-
-  case Symbolic:
-  case SymbolicInst:
-    symbolic = new Symbolic_t;
-    symbolic->params = 0;
-    symbolic->actuals = 0;
-    symbolic->assertions = 0;
-    break;
-
-  case Variable:
-    variable = new Variable_t;
-    variable->tyClass = DeclarationNode::Type;
-    variable->assertions = 0;
-    break;
-
-  case Tuple:
-    tuple = new Tuple_t;
-    tuple->members = 0;
-    break;
-  
-  case Typeof:
-    typeexpr = new Typeof_t;
-    typeexpr->expr = 0;
-    break;
-  }
-}
-
-TypeData::~TypeData()
-{
-  delete base;
-  delete forall;
-
-  switch( kind ) {
-  case Unknown:
-  case Pointer:
-  case EnumConstant:
-    // nothing to destroy
-    break;
-
-  case Basic:
-    delete basic;
-    break;
-
-  case Array:
-    delete array->dimension;
-    delete array;
-    break;
-
-  case Function:
-    delete function->params;
-    delete function->idList;
-    delete function->oldDeclList;
-    delete function->body;
-    delete function;
-    break;
-
-  case Aggregate:
-    delete aggregate->params;
-    delete aggregate->actuals;
-    delete aggregate->members;
-    delete aggregate;
-    break;
-
-  case AggregateInst:
-    delete aggInst->aggregate;
-    delete aggInst->params;
-    delete aggInst;
-    break;
-
-  case Enum:
-    delete enumeration->constants;
-    delete enumeration;
-    break;
-
-  case Symbolic:
-  case SymbolicInst:
-    delete symbolic->params;
-    delete symbolic->actuals;
-    delete symbolic->assertions;
-    delete symbolic;
-    break;
-
-  case Variable:
-    delete variable->assertions;
-    delete variable;
-    break;
-
-  case Tuple:
-    delete tuple->members;
-    delete tuple;
-    break;
-  
-  case Typeof:
-    delete typeexpr->expr;
-    delete typeexpr;
-    break;
-  }
-}
-
-TypeData *
-TypeData::clone() const
-{
-  TypeData *newtype = new TypeData( kind );
-  newtype->qualifiers = qualifiers;
-  newtype->base = maybeClone( base );
-  newtype->forall = maybeClone( forall );
-
-  switch( kind ) {
-  case Unknown:
-  case EnumConstant:
-  case Pointer:
-    // nothing else to copy
-    break;
-
-  case Basic:
-    newtype->basic->typeSpec = basic->typeSpec;
-    newtype->basic->modifiers = basic->modifiers;
-    break;
-
-  case Array:
-    newtype->array->dimension = maybeClone( array->dimension );
-    newtype->array->isVarLen = array->isVarLen;
-    newtype->array->isStatic = array->isStatic;
-    break;
-
-  case Function:
-    newtype->function->params = maybeClone( function->params );
-    newtype->function->idList = maybeClone( function->idList );
-    newtype->function->oldDeclList = maybeClone( function->oldDeclList );
-    newtype->function->body = maybeClone( function->body );
-    newtype->function->hasBody = function->hasBody;
-    break;
-
-  case Aggregate:
-    newtype->aggregate->params = maybeClone( aggregate->params );
-    newtype->aggregate->actuals = maybeClone( aggregate->actuals );
-    newtype->aggregate->members = maybeClone( aggregate->members );
-    newtype->aggregate->name = aggregate->name;
-    newtype->aggregate->kind = aggregate->kind;
-    break;
-
-  case AggregateInst:
-    newtype->aggInst->aggregate = maybeClone( aggInst->aggregate );
-    newtype->aggInst->params = maybeClone( aggInst->params );
-    break;
-
-  case Enum:
-    newtype->enumeration->name = enumeration->name;
-    newtype->enumeration->constants = maybeClone( enumeration->constants );
-    break;
-
-  case Symbolic:
-  case SymbolicInst:
-    newtype->symbolic->params = maybeClone( symbolic->params );
-    newtype->symbolic->actuals = maybeClone( symbolic->actuals );
-    newtype->symbolic->assertions = maybeClone( symbolic->assertions );
-    newtype->symbolic->isTypedef = symbolic->isTypedef;
-    newtype->symbolic->name = symbolic->name;
-    break;
-
-  case Variable:
-    newtype->variable->assertions = maybeClone( variable->assertions );
-    newtype->variable->name = variable->name;
-    newtype->variable->tyClass = variable->tyClass;
-    break;
-
-  case Tuple:
-    newtype->tuple->members = maybeClone( tuple->members );
-    break;
-    
-  case Typeof:
-    newtype->typeexpr->expr = maybeClone( typeexpr->expr );
-    break;
-  }
-  return newtype;
-}
-
-void 
-TypeData::print( std::ostream &os, int indent ) const
-{
-  using std::endl;
-  using std::string;
-
-  printEnums( qualifiers.begin(), qualifiers.end(), DeclarationNode::qualifierName, os );
-
-  if( forall ) {
-    os << "forall " << endl;
-    forall->printList( os, indent+4 );
-  }
-
-  switch( kind ) {
-  case Unknown:
-    os << "entity of unknown type ";
-    break;
-
-  case Pointer:
-    os << "pointer ";
-    if( base ) {
-      os << "to ";
-      base->print( os, indent );
-    }
-    break;
-
-  case EnumConstant:
-    os << "enumeration constant ";
-    break;
-
-  case Basic:
-    printEnums( basic->modifiers.begin(), basic->modifiers.end(), DeclarationNode::modifierName, os );
-    printEnums( basic->typeSpec.begin(), basic->typeSpec.end(), DeclarationNode::basicTypeName, os );
-    break;
-
-  case Array:
-    if( array->isStatic ) {
-      os << "static ";
-    }
-    if( array->dimension ) {
-      os << "array of ";
-      array->dimension->printOneLine( os, indent );
-    } else if ( array->isVarLen ) {
-      os << "variable-length array of ";
-    } else {
-      os << "open array of ";
-    }
-    if( base ) {
-      base->print( os, indent );
-    }
-    break;
-
-  case Function:
-    os << "function" << endl;
-    if ( function->params ) {
-      os << string( indent+2, ' ' ) << "with parameters " << endl;
-      function->params->printList( os, indent+4 );
-    } else {
-      os << string( indent+2, ' ' ) << "with no parameters " << endl;
-    }
-    if ( function->idList ) {
-      os << string( indent+2, ' ' ) << "with old-style identifier list " << endl;
-      function->idList->printList( os, indent+4 );
-    }
-    if ( function->oldDeclList ) {
-      os << string( indent+2, ' ' ) << "with old-style declaration list " << endl;
-      function->oldDeclList->printList( os, indent+4 );
-    }
-    os << string( indent+2, ' ' ) << "returning ";
-    if ( base ) {
-      base->print( os, indent+4 );
-    } else {
-      os << "nothing ";
-    }
-    os << endl;
-    if ( function->hasBody ) {
-      os << string( indent+2, ' ' ) << "with body " << endl;
-    }
-    if ( function->body ) {
-      function->body->printList( os, indent+2 );
-    }
-    break;
-
-  case Aggregate:
-    os << DeclarationNode::tyConName[ aggregate->kind ] << ' ' << aggregate->name << endl;
-    if( aggregate->params ) {
-      os << string( indent+2, ' ' ) << "with type parameters " << endl;
-      aggregate->params->printList( os, indent+4 );
-    }
-    if( aggregate->actuals ) {
-      os << string( indent+2, ' ' ) << "instantiated with actual parameters " << endl;
-      aggregate->actuals->printList( os, indent+4 );
-    }
-    if( aggregate->members ) {
-      os << string( indent+2, ' ' ) << "with members " << endl;
-      aggregate->members->printList( os, indent+4 );
-///     } else {
-///       os << string( indent+2, ' ' ) << "with no members " << endl;
-    }
-    break;
-
-  case AggregateInst:
-    if( aggInst->aggregate ) {
-      os << "instance of " ;
-      aggInst->aggregate->print( os, indent );
-    } else {
-      os << "instance of an unspecified aggregate ";
-    }
-    if( aggInst->params ) {
-      os << string( indent+2, ' ' ) << "with parameters " << endl;
-      aggInst->params->printList( os, indent+2 );
-    }
-    break;
-
-  case Enum:
-    os << "enumeration ";
-    if( enumeration->constants ) {
-      os << "with constants" << endl;
-      enumeration->constants->printList( os, indent+2 );
-    }
-    break;
-
-  case SymbolicInst:
-    os << "instance of type " << symbolic->name;
-    if( symbolic->actuals ) {
-      os << " with parameters" << endl;
-      symbolic->actuals->printList( os, indent + 2 );
-    }
-    break;
-
-  case Symbolic:
-    if( symbolic->isTypedef ) {
-      os << "typedef definition ";
-    } else {
-      os << "type definition ";
-    }
-    if( symbolic->params ) {
-      os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
-      symbolic->params->printList( os, indent + 2 );
-    }
-    if( symbolic->assertions ) {
-      os << endl << string( indent+2, ' ' ) << "with assertions" << endl;
-      symbolic->assertions->printList( os, indent + 4 );
-      os << string( indent+2, ' ' );
-    }
-    if( base ) {
-      os << "for ";
-      base->print( os, indent + 2 );
-    }
-    break;
-
-  case Variable:
-    os << DeclarationNode::typeClassName[ variable->tyClass ] << " variable ";
-    if( variable->assertions ) {
-      os << endl << string( indent+2, ' ' ) << "with assertions" << endl;
-      variable->assertions->printList( os, indent + 4 );
-      os << string( indent+2, ' ' );
-    }
-    break;
-
-  case Tuple:
-    os << "tuple ";
-    if( tuple->members ) {
-      os << "with members " << endl;
-      tuple->members->printList( os, indent + 2 );
-    }
-    break;
-    
-  case Typeof:
-    os << "type-of expression ";
-    if( typeexpr->expr ) {
-      typeexpr->expr->print( os, indent + 2 );
-    }
-    break;
-  }
-}
-
-TypeData *
-TypeData::extractAggregate( bool toplevel ) const
-{
-  TypeData *ret = 0;
-
-  switch( kind ) {
-  case Aggregate:
-    if( !toplevel && aggregate->members ) {
-      ret = clone();
-      ret->qualifiers.clear();
-    }
-    break;
-
-  case Enum:
-    if( !toplevel && enumeration->constants ) {
-      ret = clone();
-      ret->qualifiers.clear();
-    }
-    break;
-
-  case AggregateInst:
-    if( aggInst->aggregate ) {
-      ret = aggInst->aggregate->extractAggregate( false );
-    }
-    break;
-
-  default:
-    if( base ) {
-      ret = base->extractAggregate( false );
-    }
-  }
-  return ret;
-}
-
-void
-buildForall( const DeclarationNode *firstNode, std::list< TypeDecl* > &outputList )
-{
-  
-  buildList( firstNode, outputList );
-  for( std::list< TypeDecl* >::iterator i = outputList.begin(); i != outputList.end(); ++i ) {
-    if( (*i)->get_kind() == TypeDecl::Any ) {
-      FunctionType *assignType = new FunctionType( Type::Qualifiers(), false );
-      assignType->get_parameters().push_back( new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new TypeInstType( Type::Qualifiers(), (*i)->get_name() ) ), 0 ) );
-      assignType->get_parameters().push_back( new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name() ), 0 ) );
-      assignType->get_returnVals().push_back( new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::Cforall, 0, new TypeInstType( Type::Qualifiers(), (*i)->get_name() ), 0 ) );
-      (*i)->get_assertions().push_front( new FunctionDecl( "?=?", Declaration::NoStorageClass, LinkageSpec::Cforall,  assignType, 0, false ) );
-    }
-  }
-}
-
-Declaration *
-TypeData::buildDecl( std::string name, Declaration::StorageClass sc, Expression *bitfieldWidth, bool isInline, LinkageSpec::Type linkage, Initializer *init ) const
-{
-
-  if ( kind == TypeData::Function ) {
-    FunctionDecl *decl;
-    if( function->hasBody ) {
-      if( function->body ) {
-        Statement *stmt = function->body->build();
-        CompoundStmt *body = dynamic_cast< CompoundStmt* >( stmt );
-        assert( body );
-        decl = new FunctionDecl( name, sc, linkage, buildFunction(), body, isInline );
-      } else {
-	// std::list<Label> ls;
-        decl = new FunctionDecl( name, sc, linkage, buildFunction(), new CompoundStmt( std::list<Label>() ), isInline );
-      }
-    } else {
-      decl = new FunctionDecl( name, sc, linkage, buildFunction(), 0, isInline );
-    }
-    for( DeclarationNode *cur = function->idList; cur != 0; cur = dynamic_cast< DeclarationNode* >( cur->get_link() ) ) {
-      if( cur->get_name() != "" ) {
-        decl->get_oldIdents().insert( decl->get_oldIdents().end(), cur->get_name() );
-      }
-    }
-    buildList( function->oldDeclList, decl->get_oldDecls() );
-    return decl;
-  } else if ( kind == TypeData::Aggregate ) {
-    return buildAggregate();
-  } else if ( kind == TypeData::Enum ) {
-    return buildEnum();
-  } else if ( kind == TypeData::Symbolic ) {
-    return buildSymbolic( name, sc );
-  } else if ( kind == TypeData::Variable ) {
-    return buildVariable();
-  } else {
-    if( isInline ) {
-      throw SemanticError( "invalid inline specification in declaration of ", this );
-    } else {
-      return new ObjectDecl( name, sc, linkage, bitfieldWidth, build(), init );
-    }
-  }
-  return 0;
-}
-
-Type *
-TypeData::build() const
-{
-
-  switch( kind ) {
-  case Unknown:
-    // fill in implicit int
-    return new BasicType( buildQualifiers(), BasicType::SignedInt );
-
-  case Basic:
-    return buildBasicType();
-
-  case Pointer:
-    return buildPointer();
-
-  case Array:
-    return buildArray();
-
-  case Function:
-    return buildFunction();
-
-  case AggregateInst:
-    return buildAggInst();
-
-  case EnumConstant:
-    // the name gets filled in later -- by SymTab::Validate
-    return new EnumInstType( buildQualifiers(), "" );
-
-  case SymbolicInst:
-    return buildSymbolicInst();;
-
-  case Tuple:
-    return buildTuple();
-  
-  case Typeof:
-    return buildTypeof();
-
-  case Symbolic:
-  case Enum:
-  case Aggregate:
-  case Variable:
-    assert( false );
-  }
-
-  return 0;
-}
-
-Type::Qualifiers
-TypeData::buildQualifiers() const
-{
-  Type::Qualifiers q;
-  for( std::list< DeclarationNode::Qualifier >::const_iterator i = qualifiers.begin(); i != qualifiers.end(); ++i ) {
-    switch( *i ) {
-    case DeclarationNode::Const:
-      q.isConst = true;
-      break;
-
-    case DeclarationNode::Volatile:
-      q.isVolatile = true;
-      break;
-
-    case DeclarationNode::Restrict:
-      q.isRestrict = true;
-      break;
-
-    case DeclarationNode::Lvalue:
-      q.isLvalue = true;
-      break;
-    }
-  }
-  return q;
-}
-
-Type*
-TypeData::buildBasicType() const
-{
-
-  static const BasicType::Kind kindMap[] = { BasicType::Char, BasicType::SignedInt, BasicType::Float, BasicType::Double,
-                                             BasicType::Char /* void */, BasicType::Bool, BasicType::DoubleComplex,
-					     BasicType::DoubleImaginary };
-
-  bool init = false;
-  bool sawDouble = false;
-  bool sawSigned = false;
-  BasicType::Kind ret;
-
-  for( std::list< DeclarationNode::BasicType >::const_iterator i = basic->typeSpec.begin(); i != basic->typeSpec.end(); ++i ) {
-    if( !init ) {
-      init = true;
-      if( *i == DeclarationNode::Void ) {
-        if( basic->typeSpec.size() != 1 || !basic->modifiers.empty() ) {
-	  throw SemanticError( "invalid type specifier \"void\" in type ", this );
-	} else {
-	  return new VoidType( buildQualifiers() );
-	}
-      } else {
-        ret = kindMap[ *i ];
-      }
-    } else {
-      switch( *i ) {
-      case DeclarationNode::Float:
-	if( sawDouble ) {
-	  throw SemanticError( "invalid type specifier \"float\" in type ", this );
-	} else {
-	  switch( ret ) {
-	  case BasicType::DoubleComplex:
-	    ret = BasicType::FloatComplex;
-	    break;
-
-	  case BasicType::DoubleImaginary:
-	    ret = BasicType::FloatImaginary;
-	    break;
-
-	  default:
-	    throw SemanticError( "invalid type specifier \"float\" in type ", this );
-	  }
-	}
-	break;
-
-      case DeclarationNode::Double:
-	if( sawDouble ) {
-	  throw SemanticError( "duplicate type specifier \"double\" in type ", this );
-	} else {
-	  switch( ret ) {
-	  case BasicType::DoubleComplex:
-	  case BasicType::DoubleImaginary:
-	    break;
-
-	  default:
-	    throw SemanticError( "invalid type specifier \"double\" in type ", this );
-	  }
-	}
-	break;
-	
-      case DeclarationNode::Complex:
-        switch( ret ) {
-        case BasicType::Float:
-          ret = BasicType::FloatComplex;
-          break;
-          
-        case BasicType::Double:
-          ret = BasicType::DoubleComplex;
-          break;
-
-	default:
-	  throw SemanticError( "invalid type specifier \"complex\" in type ", this );
-        }
-	break;
-        
-      case DeclarationNode::Imaginary:
-        switch( ret ) {
-        case BasicType::Float:
-          ret = BasicType::FloatImaginary;
-          break;
-          
-        case BasicType::Double:
-          ret = BasicType::DoubleImaginary;
-          break;
-
-	default:
-	  throw SemanticError( "invalid type specifier \"imaginary\" in type ", this );
-        }
-	break;
-        
-      default:
-	throw SemanticError( std::string( "invalid type specifier \"" ) + DeclarationNode::basicTypeName[ *i ] + "\" in type ", this );
-      }
-    }
-    if( *i == DeclarationNode::Double ) {
-      sawDouble = true;
-    }
-  }
-
-  for( std::list< DeclarationNode::Modifier >::const_iterator i = basic->modifiers.begin(); i != basic->modifiers.end(); ++i ) {
-    switch( *i ) {
-    case DeclarationNode::Long:
-      if( !init ) {
-	init = true;
-	ret = BasicType::LongSignedInt;
-      } else {
-	switch( ret ) {
-	case BasicType::SignedInt:
-	  ret = BasicType::LongSignedInt;
-	  break;
-
-	case BasicType::UnsignedInt:
-	  ret = BasicType::LongUnsignedInt;
-	  break;
-
-	case BasicType::LongSignedInt:
-	  ret = BasicType::LongLongSignedInt;
-	  break;
-
-	case BasicType::LongUnsignedInt:
-	  ret = BasicType::LongLongUnsignedInt;
-	  break;
-
-	case BasicType::Double:
-	  ret = BasicType::LongDouble;
-	  break;
-
-	case BasicType::DoubleComplex:
-	  ret = BasicType::LongDoubleComplex;
-	  break;
-
-	case BasicType::DoubleImaginary:
-	  ret = BasicType::LongDoubleImaginary;
-	  break;
-
-	default:
-	  throw SemanticError( "invalid type modifier \"long\" in type ", this );
-	}
-      }
-      break;
-
-    case DeclarationNode::Short:
-      if( !init ) {
-	init = true;
-	ret = BasicType::ShortSignedInt;
-      } else {
-	switch( ret ) {
-	case BasicType::SignedInt:
-	  ret = BasicType::ShortSignedInt;
-	  break;
-
-	case BasicType::UnsignedInt:
-	  ret = BasicType::ShortUnsignedInt;
-	  break;
-
-	default:
-	  throw SemanticError( "invalid type modifier \"short\" in type ", this );
-	}
-      }
-      break;
-
-    case DeclarationNode::Signed:
-      if( !init ) {
-	init = true;
-	ret = BasicType::SignedInt;
-      } else if( sawSigned ) {
-	throw SemanticError( "duplicate type modifer \"signed\" in type ", this );
-      } else {
-	switch( ret ) {
-	case BasicType::SignedInt:
-	case BasicType::ShortSignedInt:
-	  break;
-
-	case BasicType::Char:
-	  ret = BasicType::SignedChar;
-	  break;
-
-	default:
-	  throw SemanticError( "invalid type modifer \"signed\" in type ", this );
-	}
-      }
-      break;
-
-    case DeclarationNode::Unsigned:
-      if( !init ) {
-	init = true;
-	ret = BasicType::UnsignedInt;
-      } else if( sawSigned ) {
-	throw SemanticError( "invalid type modifer \"unsigned\" in type ", this );
-      } else {
-	switch( ret ) {
-	case BasicType::LongSignedInt:
-	  ret = BasicType::LongUnsignedInt;
-	  break;
-
-	case BasicType::SignedInt:
-	  ret = BasicType::UnsignedInt;
-	  break;
-
-	case BasicType::ShortSignedInt:
-	  ret = BasicType::ShortUnsignedInt;
-	  break;
-
-	case BasicType::Char:
-	  ret = BasicType::UnsignedChar;
-	  break;
-
-	default:
-	  throw SemanticError( "invalid type modifer \"unsigned\" in type ", this );
-	}
-      }
-      break;
-    }
-
-    if( *i == DeclarationNode::Signed ) {
-      sawSigned = true;
-    }
-  }
-
-  BasicType *bt;
-  if( !init ) {
-    bt = new BasicType( buildQualifiers(), BasicType::SignedInt );
-  } else {
-    bt = new BasicType( buildQualifiers(), ret );
-  }
-  buildForall( forall, bt->get_forall() );
-  return bt;
-}
-
-
-PointerType * 
-TypeData::buildPointer() const
-{
-  
-  PointerType *pt;
-  if( base ) {
-    pt = new PointerType( buildQualifiers(), base->build() );
-  } else {
-    pt = new PointerType( buildQualifiers(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
-  }
-  buildForall( forall, pt->get_forall() );
-  return pt;
-}
-
-ArrayType * 
-TypeData::buildArray() const
-{
-  
-  ArrayType *at;
-  if( base ) {
-    at = new ArrayType( buildQualifiers(), base->build(), maybeBuild< Expression >( array->dimension ),
-	                  array->isVarLen, array->isStatic );
-  } else {
-    at = new ArrayType( buildQualifiers(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ),
-	                  maybeBuild< Expression >( array->dimension ), array->isVarLen, array->isStatic );
-  }
-  buildForall( forall, at->get_forall() );
-  return at;
-}
-
-FunctionType *
-TypeData::buildFunction() const
-{
-  assert( kind == Function );
-
-
-  bool hasEllipsis = function->params ? function->params->get_hasEllipsis() : true;
-  FunctionType *ft = new FunctionType( buildQualifiers(), hasEllipsis );
-  buildList( function->params, ft->get_parameters() );
-  buildForall( forall, ft->get_forall() );
-  if( base ) {
-    switch( base->kind ) {
-    case Tuple:
-      buildList( base->tuple->members, ft->get_returnVals() );
-      break;
-
-    default:
-      ft->get_returnVals().push_back( dynamic_cast< DeclarationWithType* >( base->buildDecl( "", Declaration::NoStorageClass, 0, false, LinkageSpec::Cforall ) ) );
-    }
-  } else {
-    ft->get_returnVals().push_back( new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), 0 ) );
-  }
-  return ft;
-}
-
-AggregateDecl *
-TypeData::buildAggregate() const
-{
-  assert( kind == Aggregate );
-
-
-  AggregateDecl *at;
-  switch( aggregate->kind ) {
-  case DeclarationNode::Struct:
-    at = new StructDecl( aggregate->name );
-    break;
-    
-  case DeclarationNode::Union:
-    at = new UnionDecl( aggregate->name );
-    break;
-    
-  case DeclarationNode::Context:
-    at = new ContextDecl( aggregate->name );
-    break;
-    
-  default:
-    assert( false );
-  }
-  
-  buildList( aggregate->params, at->get_parameters() );
-  buildList( aggregate->members, at->get_members() );
-
-  return at;
-}
-
-/// namespace {
-/// Type*
-/// makeType( Declaration* decl )
-/// {
-///   if( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( decl ) ) {
-///     return dwt->get_type()->clone();
-///   } else {
-///     return 0;
-///   }
-/// }
-/// }
-
-ReferenceToType *
-TypeData::buildAggInst() const
-{
-  assert( kind == AggregateInst );
-
-
-  std::string name;
-
-  ReferenceToType *ret;
-  if( aggInst->aggregate->kind == Enum ) {
-    ret = new EnumInstType( buildQualifiers(), aggInst->aggregate->enumeration->name );
-  } else {
-    assert( aggInst->aggregate->kind == Aggregate );
-    switch( aggInst->aggregate->aggregate->kind ) {
-    case DeclarationNode::Struct:
-      ret = new StructInstType( buildQualifiers(), aggInst->aggregate->aggregate->name );
-      break;
-
-    case DeclarationNode::Union:
-      ret = new UnionInstType( buildQualifiers(), aggInst->aggregate->aggregate->name );
-      break;
-
-    case DeclarationNode::Context:
-      ret = new ContextInstType( buildQualifiers(), aggInst->aggregate->aggregate->name );
-      break;
-
-    default:
-      assert( false );
-    }
-  }
-  buildList( aggInst->params, ret->get_parameters() );
-  buildForall( forall, ret->get_forall() );
-  return ret;
-}
-
-NamedTypeDecl*
-TypeData::buildSymbolic( const std::string &name, Declaration::StorageClass sc ) const
-{
-  assert( kind == Symbolic );
-
-
-  NamedTypeDecl *ret;
-  if( symbolic->isTypedef ) {
-    ret = new TypedefDecl( name, sc, maybeBuild< Type >( base ) );
-  } else {
-    ret = new TypeDecl( name, sc, maybeBuild< Type >( base ), TypeDecl::Any );
-  }
-  buildList( symbolic->params, ret->get_parameters() );
-  buildList( symbolic->assertions, ret->get_assertions() );
-  return ret;
-}
-
-TypeDecl*
-TypeData::buildVariable() const
-{
-  assert( kind == Variable );
-
-
-  static const TypeDecl::Kind kindMap[] = { TypeDecl::Any, TypeDecl::Ftype, TypeDecl::Dtype };
-
-  TypeDecl *ret = new TypeDecl( variable->name, Declaration::NoStorageClass, 0, kindMap[ variable->tyClass ] );
-  buildList( variable->assertions, ret->get_assertions() );
-    
-  return ret;
-}
-
-EnumDecl* 
-TypeData::buildEnum() const
-{
-  assert( kind == Enum );
-
-
-  EnumDecl *ret = new EnumDecl( enumeration->name );
-  buildList( enumeration->constants, ret->get_members() );
-
-  return ret;
-}
-
-TypeInstType * 
-TypeData::buildSymbolicInst() const
-{
-  assert( kind == SymbolicInst );
-
-
-  TypeInstType *ret = new TypeInstType( buildQualifiers(), symbolic->name );
-  buildList( symbolic->actuals, ret->get_parameters() );
-  buildForall( forall, ret->get_forall() );
-
-  return ret;
-}
-
-TupleType * 
-TypeData::buildTuple() const
-{
-  assert( kind == Tuple );
-
-
-  TupleType *ret = new TupleType( buildQualifiers() );
-  buildTypeList( tuple->members, ret->get_types() );
-  buildForall( forall, ret->get_forall() );
-
-  return ret;
-}
-
-TypeofType * 
-TypeData::buildTypeof() const
-{
-  assert( kind == Typeof );
-
-
-  assert( typeexpr );
-  assert( typeexpr->expr );
-  TypeofType *ret = new TypeofType( buildQualifiers(), typeexpr->expr->build() );
-
-  return ret;
-}
-
Index: translator/Parser.old/TypeData.h
===================================================================
--- translator/Parser.old/TypeData.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,119 +1,0 @@
-#ifndef TYPEDATA_H
-#define TYPEDATA_H
-
-#include <list>
-#include "ParseNode.h"
-#include "SynTree/SynTree.h"
-#include "SynTree/Type.h"
-#include "SynTree/Declaration.h"
-#include "SemanticError.h"
-#include "LinkageSpec.h"
-
-struct TypeData
-{
-  enum Kind { Unknown, Basic, Pointer, Array, Function, Aggregate, AggregateInst,
-	      Enum, EnumConstant, Symbolic, SymbolicInst, Variable, Tuple, Typeof } kind;
-
-  TypeData( Kind k = Unknown );
-  ~TypeData();
-  void print( std::ostream &, int indent = 0 ) const;
-  TypeData *clone() const;
-
-  Type *build() const;
-  FunctionType *buildFunction() const;
-
-  TypeData *base;
-  std::list< DeclarationNode::Qualifier > qualifiers;
-  DeclarationNode *forall;
-
-  struct Basic_t {
-    std::list< DeclarationNode::BasicType > typeSpec;
-    std::list< DeclarationNode::Modifier > modifiers;
-  };
-
-  struct Aggregate_t {
-    DeclarationNode::TyCon kind;
-    std::string name;
-    DeclarationNode *params;
-    ExpressionNode *actuals;	// holds actual parameters that will later be applied to AggInst
-    DeclarationNode *members;
-  };
-
-  struct AggInst_t {
-    TypeData *aggregate;
-    ExpressionNode *params;
-  };
-
-  struct Array_t {
-    ExpressionNode *dimension;
-    bool isVarLen;
-    bool isStatic;
-  };
-
-  struct Enumeration_t {
-    std::string name;
-    DeclarationNode *constants;
-  };
-
-  struct Function_t {
-    DeclarationNode *params;
-    DeclarationNode *idList; // old-style
-    DeclarationNode *oldDeclList;
-    StatementNode *body;
-    bool hasBody;
-  };
-
-  struct Symbolic_t {
-    std::string name;
-    bool isTypedef;
-    DeclarationNode *params;
-    ExpressionNode *actuals;
-    DeclarationNode *assertions;
-  };
-
-  struct Variable_t {
-    DeclarationNode::TypeClass tyClass;
-    std::string name;
-    DeclarationNode *assertions;
-  };
-
-  struct Tuple_t {
-    DeclarationNode *members;
-  };
-  
-  struct Typeof_t {
-    ExpressionNode *expr;
-  };
-
-  union {
-    Basic_t *basic;
-    Aggregate_t *aggregate;
-    AggInst_t *aggInst;
-    Array_t *array;
-    Enumeration_t *enumeration;
-    Function_t *function;
-    Symbolic_t *symbolic;
-    Variable_t *variable;
-    Tuple_t *tuple;
-    Typeof_t *typeexpr;
-  };
-
-  TypeData *extractAggregate( bool toplevel = true ) const;
-  /* helper function for DeclNodeImpl::build */
-  Declaration * buildDecl( std::string name, Declaration::StorageClass sc, Expression *bitfieldWidth, bool isInline, LinkageSpec::Type linkage, Initializer *init = 0 ) const;
-  /* helper functions for build() */
-  Type::Qualifiers buildQualifiers() const;
-  Type *buildBasicType() const;
-  PointerType * buildPointer() const;
-  ArrayType * buildArray() const;
-  AggregateDecl * buildAggregate() const;
-  ReferenceToType * buildAggInst() const;
-  NamedTypeDecl * buildSymbolic( const std::string &name, Declaration::StorageClass sc ) const;
-  TypeDecl* buildVariable() const;
-  EnumDecl* buildEnum() const;
-  TypeInstType * buildSymbolicInst() const;
-  TupleType * buildTuple() const;
-  TypeofType * buildTypeof() const;
-};
-
-#endif /* #ifndef TYPEDATA_H */
Index: translator/Parser.old/TypedefTable.cc
===================================================================
--- translator/Parser.old/TypedefTable.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,189 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: TypedefTable.cc,v 1.6 2003/05/19 19:19:23 rcbilson Exp $
- *
- */
-
-#include <map>
-#include <list>
-#include "TypedefTable.h"
-#include <iostream>
-using namespace std;
-
-#if 0
-#  define debugPrint(x) cerr << x
-#else
-#  define debugPrint(x)
-#endif
-
-TypedefTable::TypedefTable()
-    : currentScope(0)
-{
-}
-
-bool
-TypedefTable::isKind(string identifier, kind_t kind) const
-{
-    tableType::const_iterator id_pos = table.find(identifier);
-    if (id_pos == table.end()) {
-	return true;
-    } else {
-	return (*((*id_pos).second.begin())).kind == kind;
-    }
-}
-
-bool
-TypedefTable::isIdentifier(string identifier) const
-{
-    return isKind(identifier, ID);
-}
-
-bool
-TypedefTable::isTypedef(string identifier) const
-{
-    return isKind(identifier, TD);
-}
-
-bool
-TypedefTable::isTypegen(string identifier) const
-{
-    return isKind(identifier, TG);
-}
-
-void
-TypedefTable::addToScope(const std::string &identifier, kind_t kind, int scope)
-{
-  if( currentContext != "" && scope == contextScope ) {
-    DeferredEntry entry = { identifier, kind };
-    contexts[currentContext].push_back( entry );
-  } else {
-    debugPrint( "Adding " << identifier << " as type " << kind << " scope " << scope << " from scope " << currentScope << endl );
-    Entry newEntry = { scope, kind };
-    tableType::iterator curPos = table.find(identifier);
-    if (curPos == table.end()) {
-      list<Entry> newList;
-      newList.push_front(newEntry);
-      table[identifier] = newList;
-    } else {
-      list<Entry>::iterator listPos = (*curPos).second.begin();
-      while( listPos != (*curPos).second.end() && listPos->scope > scope ) {
-        listPos++;
-      }
-      (*curPos).second.insert(listPos, newEntry);
-    }
-  }
-}
-
-void
-TypedefTable::addToCurrentScope(const std::string &identifier, kind_t kind)
-{
-  addToScope( identifier, kind, currentScope );
-}
-
-void
-TypedefTable::addToCurrentScope(kind_t kind)
-{
-  addToCurrentScope( nextIdentifiers.top(), kind );
-}
-
-void
-TypedefTable::addToEnclosingScope(const std::string &identifier, kind_t kind)
-{
-  assert( currentScope >= 1 );
-  addToScope( identifier, kind, currentScope - 1 );
-}
-
-void
-TypedefTable::addToEnclosingScope(kind_t kind)
-{
-  addToEnclosingScope( nextIdentifiers.top(), kind );
-}
-
-void
-TypedefTable::addToEnclosingScope2(const std::string &identifier, kind_t kind)
-{
-  assert( currentScope >= 2 );
-  addToScope( identifier, kind, currentScope - 2 );
-}
-
-void
-TypedefTable::addToEnclosingScope2(kind_t kind)
-{
-  addToEnclosingScope2( nextIdentifiers.top(), kind );
-}
-
-void
-TypedefTable::setNextIdentifier( const std::string &identifier )
-{
-  nextIdentifiers.top() = identifier;
-}
-
-void
-TypedefTable::openContext( std::string contextName )
-{
-  map< string, deferListType >::iterator i = contexts.find( contextName );
-  if( i != contexts.end() ) {
-    deferListType &entries = i->second;
-    for (deferListType::iterator i = entries.begin(); i != entries.end(); i++) {
-      addToEnclosingScope( i->identifier, i->kind );
-    }
-  }
-}
-
-void
-TypedefTable::enterScope(void)
-{
-    currentScope += 1;
-    deferListStack.push( deferListType() );
-    nextIdentifiers.push( "" );
-    debugPrint( "Entering scope " << currentScope << ", nextIdentifiers size is " << nextIdentifiers.size() << endl );
-}
-
-void
-TypedefTable::leaveScope(void)
-{
-    debugPrint( "Leaving scope " << currentScope << endl );
-    for (tableType::iterator i = table.begin(); i != table.end(); i++) {
-	list<Entry> &declList = (*i).second;
-	while (!declList.empty() && declList.front().scope == currentScope) {
-	    declList.pop_front();
-	}
-	if( declList.empty() ) {
-	  table.erase( i );
-	}
-    }
-    currentScope -= 1;
-    for (deferListType::iterator i = deferListStack.top().begin(); i != deferListStack.top().end(); i++) {
-      addToCurrentScope( i->identifier, i->kind );
-    }
-    deferListStack.pop();
-    debugPrint( "nextIdentifiers size is " << nextIdentifiers.size() << " top is " << nextIdentifiers.top() << endl );
-    nextIdentifiers.pop();
-}
-
-void
-TypedefTable::enterContext( std::string contextName )
-{
-  currentContext = contextName;
-  contextScope = currentScope;
-}
-
-void
-TypedefTable::leaveContext(void)
-{
-  currentContext = "";
-}
-
-void
-TypedefTable::print(void) const
-{
-    for (tableType::const_iterator i = table.begin(); i != table.end(); i++) {
-	debugPrint( (*i).first << ": " );
-	list<Entry> declList = (*i).second;
-	for (list<Entry>::const_iterator j = declList.begin(); j != declList.end(); j++) {
-	    debugPrint( "(" << (*j).scope << " " << (*j).kind << ") " );
-	}
-	debugPrint( endl );
-    }
-}
Index: translator/Parser.old/TypedefTable.h
===================================================================
--- translator/Parser.old/TypedefTable.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: TypedefTable.h,v 1.5 2003/05/11 15:24:05 rcbilson Exp $
- *
- */
-
-#ifndef TYPEDEFTABLE_H
-#define TYPEDEFTABLE_H
-
-#include <map>
-#include <list>
-#include <string>
-#include <stack>
-
-class TypedefTable
-{
-  public:
-    enum kind_t { ID, TD, TG };
-  private:
-    struct Entry
-    {
-	int scope;
-	kind_t kind;
-    };
-    
-    struct DeferredEntry
-    {
-      std::string identifier;
-      kind_t kind;
-    };
-
-    typedef std::map<std::string, std::list<Entry> > tableType;
-    tableType table;
-
-    int currentScope;
-    std::string currentContext;
-    int contextScope;
-    
-    typedef std::list< DeferredEntry > deferListType;
-    std::stack< deferListType > deferListStack;
-    std::map< std::string, deferListType > contexts;
-    
-    std::stack< std::string > nextIdentifiers;
-
-    bool isKind(std::string identifier, kind_t kind) const;
-    void addToScope(const std::string &identifier, kind_t kind, int scope);
-  public:
-    TypedefTable();
-
-    bool isIdentifier(std::string identifier) const;
-    bool isTypedef(std::string identifier) const;
-    bool isTypegen(std::string identifier) const;
-    
-    // "addToCurrentScope" adds the identifier/type pair to the current scope This does less
-    // than you think it does, since each declaration is within its own scope.  Mostly useful for
-    // type parameters.
-    void addToCurrentScope(const std::string &identifier, kind_t kind);
-    void addToCurrentScope(kind_t kind);   // use nextIdentifiers.top()
-
-    // "addToEnclosingScope" adds the identifier/type pair to the scope that encloses the current
-    // one.  This is the right way to handle type and typedef names
-    void addToEnclosingScope(const std::string &identifier, kind_t kind);
-    void addToEnclosingScope(kind_t kind); // use nextIdentifiers.top()
-    
-    // "addToEnclosingScope2" adds the identifier/type pair to the scope that encloses the scope
-    // enclosing the the current one.  This is the right way to handle assertion names
-    void addToEnclosingScope2(const std::string &identifier, kind_t kind);
-    void addToEnclosingScope2(kind_t kind); // use nextIdentifiers.top()
-    
-    // set the next identifier to be used by an "add" operation without an identifier parameter
-    // within the current scope
-    void setNextIdentifier( const std::string &identifier );
-    
-    // dump the definitions from a pre-defined context into the current scope
-    void openContext( std::string contextName );
-    
-    void enterScope(void);
-    void leaveScope(void);
-    void enterContext( std::string contextName );
-    void leaveContext(void);
-
-    void print(void) const;
-};
-
-#endif /* ifndef TYPEDEFTABLE_H */
Index: translator/Parser.old/cfa.y
===================================================================
--- translator/Parser.old/cfa.y	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,2699 +1,0 @@
-/*                               -*- Mode: C -*-
- *
- * CForall Grammar Version 1.0, Copyright (C) Peter A. Buhr 2001 -- Permission is granted to copy this
- *	grammar and to use it within software systems.  THIS GRAMMAR IS PROVIDED "AS IS" AND WITHOUT
- *	ANY EXPRESS OR IMPLIED WARRANTIES.
- *
- * cfa.y --
- *
- * Author           : Peter A. Buhr
- * Created On       : Sat Sep  1 20:22:55 2001
- * Last Modified By : Peter A. Buhr
- * Last Modified On : Tue Dec 17 08:47:30 2002
- * Update Count     : 795
- */
-
-/* This grammar is based on the ANSI99 C grammar, specifically parts of EXPRESSION and STATEMENTS, and on the
-   C grammar by James A. Roskind, specifically parts of DECLARATIONS and EXTERNAL DEFINITIONS.  While parts
-   have been copied, important changes have been made in all sections; these changes are sufficient to
-   constitute a new grammar.  In particular, this grammar attempts to be more syntactically precise, i.e., it
-   parses less incorrect language syntax that must be subsequently rejected by semantic checks.  Nevertheless,
-   there are still several semantic checks required and many are noted in the grammar. Finally, the grammar
-   is extended with GCC and CFA language extensions. */
-
-/* Acknowledgments to Richard Bilson, Glen Ditchfield, and Rodolfo Gabriel Esteves who all helped when I got
-   stuck with the grammar. */
-
-/* The root language for this grammar is ANSI99 C. All of ANSI99 is parsed, except for:
-
-   1. designation with '=' (use ':' instead)
-
-   Most of the syntactic extensions from ANSI90 to ANSI99 C are marked with the comment "ANSI99". This grammar
-   also has two levels of extensions. The first extensions cover most of the GCC C extensions, except for:
-
-   1. nested functions
-   2. generalized lvalues
-   3. designation with and without '=' (use ':' instead)
-   4. attributes not allowed in parenthesis of declarator
-
-   All of the syntactic extensions for GCC C are marked with the comment "GCC". The second extensions are for
-   Cforall (CFA), which fixes several of C's outstanding problems and extends C with many modern language
-   concepts. All of the syntactic extensions for CFA C are marked with the comment "CFA". As noted above,
-   there is one unreconcileable parsing problem between ANSI99 and CFA with respect to designators; this is
-   discussed in detail before the "designation" grammar rule. */
-
-%{
-#define YYDEBUG_LEXER_TEXT (yylval)			/* lexer loads this up each time */
-#define YYDEBUG 1					/* get the pretty debugging code to compile*/
-
-
-#include <cstdio>
-#include <stack>
-#include "TypedefTable.h"
-#include "lex.h"
-#include "ParseNode.h"
-#include "LinkageSpec.h"
-
-DeclarationNode *theTree = 0;				/* the resulting parse tree */
-LinkageSpec::Type linkage = LinkageSpec::Cforall;
-std::stack< LinkageSpec::Type > linkageStack;
-TypedefTable typedefTable;
-%}
-
-/************************* TERMINAL TOKENS ********************************/
-
-/* keywords */
-%token TYPEDEF
-%token AUTO EXTERN REGISTER STATIC
-%token INLINE						/* ANSI99 */
-%token FORTRAN						/* ANSI99, extension ISO/IEC 9899:1999 Section J.5.9(1) */
-%token CONST VOLATILE
-%token RESTRICT						/* ANSI99 */
-%token FORALL LVALUE					/* CFA */
-%token VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED
-%token BOOL COMPLEX IMAGINARY				/* ANSI99 */
-%token TYPEOF LABEL					/* GCC */
-%token ENUM STRUCT UNION
-%token TYPE FTYPE DTYPE CONTEXT				/* CFA */
-%token SIZEOF
-%token ALIGNOF ATTRIBUTE EXTENSION			/* GCC */
-%token IF ELSE SWITCH CASE DEFAULT DO WHILE FOR BREAK CONTINUE GOTO RETURN
-%token CHOOSE FALLTHRU TRY CATCH THROW			/* CFA */
-%token ASM						/* ANSI99, extension ISO/IEC 9899:1999 Section J.5.10(1) */
-
-/* names and constants: lexer differentiates between identifier and typedef names */
-%token<tok> IDENTIFIER		TYPEDEFname		TYPEGENname
-%token<tok> INTEGERconstant	FLOATINGconstant	CHARACTERconstant       STRINGliteral
-%token<tok> ZERO		ONE			/* CFA */
-
-/* multi-character operators */
-%token ARROW			/* ->				*/
-%token ICR DECR			/* ++	--			*/
-%token LS RS			/* <<	>>			*/
-%token LE GE EQ NE		/* <=	>=	==	!=	*/
-%token ANDAND OROR		/* &&	||			*/
-%token ELLIPSIS			/* ...				*/
-
-%token MULTassign	DIVassign	MODassign	/* *=	/=	%=	*/
-%token PLUSassign	MINUSassign			/* +=	-=		*/
-%token LSassign		RSassign			/* <<=	>>=		*/
-%token ANDassign	ERassign	ORassign	/* &=	^=	|=	*/
-
-/* Types declaration */
-%union
-{
-  struct token tok;
-  ParseNode *pn;
-  ExpressionNode *en;
-  DeclarationNode *decl;
-  DeclarationNode::TyCon aggKey;
-  DeclarationNode::TypeClass tclass;
-  StatementNode *sn;
-  ConstantNode *constant;
-  InitializerNode *in;
-}
-
-%type<tok> zero_one  identifier  identifier_or_typedef_name
-%type<constant> string_literal_list
-
-/* expressions */
-%type<constant> constant
-%type<en> tuple			tuple_expression_list
-%type<en> unary_operator                assignment_operator
-%type<en> primary_expression		attribute_expression		postfix_expression	unary_expression
-%type<en> cast_expression		multiplicative_expression	additive_expression	shift_expression
-%type<en> relational_expression		equality_expression		AND_expression		exclusive_OR_expression
-%type<en> inclusive_OR_expression	logical_AND_expression		logical_OR_expression	conditional_expression
-%type<en> constant_expression		assignment_expression		assignment_expression_opt
-%type<en> comma_expression	comma_expression_opt
-%type<en> argument_expression_list	argument_expression		for_control_expression	assignment_opt
-%type<en> subrange
-
-/* statements */
-%type<sn> labeled_statement	compound_statement      expression_statement	selection_statement
-%type<sn> iteration_statement	jump_statement		exception_statement	asm_statement
-%type<sn> fall_through_opt fall_through
-%type<sn> statement		statement_list
-%type<sn> block_item_list	block_item
-%type<sn> case_clause
-%type<en> case_value	case_value_list
-%type<sn> case_label	case_label_list
-%type<sn> switch_clause_list_opt switch_clause_list choose_clause_list_opt choose_clause_list
-%type<pn> handler_list	handlers
-
-/* declarations */
-%type<decl> abstract_array abstract_declarator abstract_function abstract_parameter_array
-%type<decl> abstract_parameter_declaration abstract_parameter_declarator abstract_parameter_function
-%type<decl> abstract_parameter_ptr abstract_ptr
-
-%type<aggKey> aggregate_key
-%type<decl>  aggregate_name
-
-%type<decl> array_dimension array_parameter_1st_dimension array_parameter_dimension multi_array_dimension
-
-%type<decl> assertion assertion_list_opt
-
-%type<en>   bit_subrange_size_opt bit_subrange_size
-
-%type<decl> basic_declaration_specifier basic_type_name basic_type_specifier
-
-%type<decl> context_declaration context_declaration_list context_declaring_list context_specifier
-
-%type<decl> declaration declaration_list declaration_list_opt declaration_qualifier_list
-%type<decl> declaration_specifier declarator declaring_list
-
-%type<decl> elaborated_type_name
-
-%type<decl> enumerator_list enum_name
-%type<en> enumerator_value_opt
-
-%type<decl> exception_declaration external_definition external_definition_list external_definition_list_opt
-
-%type<decl> field_declaration field_declaration_list field_declarator field_declaring_list
-%type<en> field field_list
-
-%type<decl> function_array function_declarator function_definition function_no_ptr function_ptr
-
-%type<decl> identifier_parameter_array identifier_parameter_declarator identifier_parameter_function
-%type<decl> identifier_parameter_ptr identifier_list
-
-%type<decl> new_abstract_array new_abstract_declarator_no_tuple new_abstract_declarator_tuple
-%type<decl> new_abstract_function new_abstract_parameter_declaration new_abstract_parameter_list
-%type<decl> new_abstract_ptr new_abstract_tuple
-
-%type<decl> new_array_parameter_1st_dimension
-
-%type<decl> new_context_declaring_list new_declaration new_field_declaring_list
-%type<decl> new_function_declaration new_function_return new_function_specifier
-
-%type<decl> new_identifier_parameter_array new_identifier_parameter_declarator_no_tuple
-%type<decl> new_identifier_parameter_declarator_tuple new_identifier_parameter_ptr
-
-%type<decl> new_parameter_declaration new_parameter_list new_parameter_type_list new_parameter_type_list_opt
-
-%type<decl> new_typedef_declaration new_variable_declaration new_variable_specifier
-
-%type<decl> old_declaration old_declaration_list old_declaration_list_opt old_function_array
-%type<decl> old_function_declarator old_function_no_ptr old_function_ptr
-
-%type<decl> parameter_declaration parameter_list parameter_type_list
-%type<decl> parameter_type_list_opt
-
-%type<decl> paren_identifier paren_typedef
-
-%type<decl> storage_class storage_class_name storage_class_list
-
-%type<decl> sue_declaration_specifier sue_type_specifier
-
-%type<tclass> type_class
-%type<decl> type_declarator type_declarator_name type_declaring_list
-
-%type<decl> typedef typedef_array typedef_declaration typedef_declaration_specifier typedef_expression
-%type<decl> typedef_function typedef_parameter_array typedef_parameter_function typedef_parameter_ptr
-%type<decl> typedef_parameter_redeclarator typedef_ptr typedef_redeclarator typedef_type_specifier
-%type<decl> typegen_declaration_specifier typegen_type_specifier
-
-%type<decl> type_name type_name_no_function
-%type<decl> type_parameter type_parameter_list
-
-%type<en> type_name_list
-
-%type<decl> type_qualifier type_qualifier_name type_qualifier_list type_qualifier_list_opt type_specifier
-
-%type<decl> variable_abstract_array variable_abstract_declarator variable_abstract_function
-%type<decl> variable_abstract_ptr variable_array variable_declarator variable_function variable_ptr
-
-/* initializers */
-%type<in>  initializer initializer_list initializer_opt
-
-/* designators */
-%type<en>  designator designator_list designation
-
-
-/* Handle single shift/reduce conflict for dangling else by shifting the ELSE token. For example, this string
-   is ambiguous:
-   .---------.			matches IF '(' comma_expression ')' statement
-   if ( C ) S1 else S2
-   `-----------------'	matches IF '(' comma_expression ')' statement ELSE statement */
-
-%nonassoc THEN	/* rule precedence for IF '(' comma_expression ')' statement */
-%nonassoc ELSE	/* token precedence for start of else clause in IF statement */
-
-%start translation_unit					/* parse-tree root */
-
-%%
-/************************* Namespace Management ********************************/
-
-/* The grammar in the ANSI C standard is not strictly context-free, since it relies upon the distinct terminal
-   symbols "identifier" and "TYPEDEFname" that are lexically identical.  While it is possible to write a
-   purely context-free grammar, such a grammar would obscure the relationship between syntactic and semantic
-   constructs.  Hence, this grammar uses the ANSI style.
-
-   Cforall compounds this problem by introducing type names local to the scope of a declaration (for instance,
-   those introduced through "forall" qualifiers), and by introducing "type generators" -- parametrized types.
-   This latter type name creates a third class of identifiers that must be distinguished by the scanner.
-
-   Since the scanner cannot distinguish among the different classes of identifiers without some context
-   information, it accesses a data structure (the TypedefTable) to allow classification of an identifier that
-   it has just read.  Semantic actions during the parser update this data structure when the class of
-   identifiers change.
-
-   Because the Cforall language is block-scoped, there is the possibility that an identifier can change its
-   class in a local scope; it must revert to its original class at the end of the block.  Since type names can
-   be local to a particular declaration, each declaration is itself a scope.  This requires distinguishing
-   between type names that are local to the current declaration scope and those that persist past the end of
-   the declaration (i.e., names defined in "typedef" or "type" declarations).
-
-   The non-terminals "push" and "pop" derive the empty string; their only use is to denote the opening and
-   closing of scopes.  Every push must have a matching pop, although it is regrettable the matching pairs do
-   not always occur within the same rule.  These non-terminals may appear in more contexts than strictly
-   necessary from a semantic point of view.  Unfortunately, these extra rules are necessary to prevent parsing
-   conflicts -- the parser may not have enough context and look-ahead information to decide whether a new
-   scope is necessary, so the effect of these extra rules is to open a new scope unconditionally.  As the
-   grammar evolves, it may be neccesary to add or move around "push" and "pop" nonterminals to resolve
-   conflicts of this sort.  */
-
-push:
-		{
-		    typedefTable.enterScope();
-		}
-	;
-
-pop:
-		{
-		    typedefTable.leaveScope();
-		}
-	;
-
-/************************* CONSTANTS ********************************/
-
-constant:
-		/* ENUMERATIONconstant is not included here; it is treated as a variable with type
-		   "enumeration constant". */
-	INTEGERconstant		{ $$ = new ConstantNode(ConstantNode::Integer,   $1); }
-	| FLOATINGconstant	{ $$ = new ConstantNode(ConstantNode::Float,     $1); }
-	| CHARACTERconstant	{ $$ = new ConstantNode(ConstantNode::Character, $1); }
-	;
-
-identifier:
-	IDENTIFIER
-	| zero_one					/* CFA */
-	;
-
-zero_one:						/* CFA */
-	ZERO
-	| ONE
-	;
-
-string_literal_list:					/* juxtaposed strings are concatenated */
-	STRINGliteral				{ $$ = new ConstantNode(ConstantNode::String, $1); }
-	| string_literal_list STRINGliteral	{ $$ = $1->append( $2.str ); }
-	;
-
-/************************* EXPRESSIONS ********************************/
-
-primary_expression:
-	identifier					/* typedef name cannot be used as a variable name */
-		{ $$ = new VarRefNode($1); }
-	| constant
-		{ $$ = $1; }
-	| string_literal_list
-		{ $$ = $1; }
-	| '(' comma_expression ')'
-		{ $$ = $2; }
-	| '(' compound_statement ')'			/* GCC, lambda expression */
-		{ $$ = new ValofExprNode($2); }
-	;
-
-attribute_expression:					/* CFA, attribute */
-	primary_expression
-	| attribute_expression '!' identifier_or_typedef_name
-	| attribute_expression '!' type_qualifier
-	| attribute_expression '!' storage_class
-	| '<' type_name_no_function '>' '!' identifier_or_typedef_name	{ $$ = 0; }
-	| '<' type_name_no_function '>' '!' type_qualifier		{ $$ = 0; }
-	| '<' type_name_no_function '>' '!' storage_class		{ $$ = 0; }
-	;
-
-postfix_expression:
-	attribute_expression
-	| postfix_expression '[' push assignment_expression pop ']'
-		 /* CFA, comma_expression disallowed in the context because it results in a commom user error:
-		    subscripting a matrix with x[i,j] instead of x[i][j]. While this change is not backwards
-		    compatible, there seems to be little advantage to this feature and many disadvantages. It
-		    is possible to write x[(i,j)] in CFA, which is equivalent to the old x[i,j]. */
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Index, $2.filename, $2.lineno), $1, $4); }
-	| postfix_expression '(' argument_expression_list ')'
-		{ $$ = new CompositeExprNode($1, $3); }
-	| postfix_expression '.' identifier_or_typedef_name
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::FieldSel, $2.filename, $2.lineno), $1,
-					     new VarRefNode($3)); }
-	| postfix_expression '.' '[' push field_list pop ']' /* CFA, tuple field selector */
-	| postfix_expression ARROW identifier_or_typedef_name
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::PFieldSel, $2.filename, $2.lineno), $1,
-					     new VarRefNode($3)); }
-	| postfix_expression ARROW '[' push field_list pop ']' /* CFA, tuple field selector */
-	| postfix_expression ICR
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::IncrPost, $2.filename, $2.lineno), $1); }
-	| postfix_expression DECR
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::DecrPost, $2.filename, $2.lineno), $1); }
-		/* GCC has priority: cast_expression */
-	| '(' type_name_no_function ')' '{' initializer_list comma_opt '}' /* ANSI99 */
-		{ $$ = 0; }
-	;
-
-argument_expression_list:
-	argument_expression
-	| argument_expression_list ',' argument_expression
-						{ $$ = (ExpressionNode *)($1->set_link($3)); }
-	;
-
-argument_expression:
-	/* empty */					/* use default argument */
-		{ $$ = 0; }
-	| assignment_expression
-	| identifier_or_typedef_name ':' assignment_expression
-                                                { $$ = $3->set_asArgName($1.str); }
-		/* Only a list of identifier_or_typedef_names is allowed in this context. However, there is
-		   insufficient look ahead to distinguish between this list of parameter names and a tuple, so
-		   the tuple form must be used with an appropriate semantic check. */
-	| '[' push assignment_expression pop ']' ':' assignment_expression
-						{ $$ = $7->set_asArgName($3.str); }
-	| '[' push assignment_expression ',' tuple_expression_list pop ']' ':' assignment_expression
-						{ $$ = $9->set_asArgName(new CompositeExprNode( new OperatorNode( OperatorNode::TupleC, $1.filename, $1.lineno ), (ExpressionNode *)$3->set_link( flattenCommas( $5 )))); }
-	;
-
-field_list:						/* CFA, tuple field selector */
-	field
-	| field_list ',' field                  { $$ = (ExpressionNode *)$1->set_link( $3 ); }
-	;
-
-field:							/* CFA, tuple field selector */
-	identifier_or_typedef_name
-						{ $$ = new VarRefNode( $1 ); }
-	| identifier_or_typedef_name '.' field
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::FieldSel, $2.filename, $2.lineno), new VarRefNode( $1 ), $3); }
-	| identifier_or_typedef_name '.' '[' push field_list pop ']'
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::FieldSel, $2.filename, $2.lineno), new VarRefNode( $1 ), $5); }
-	| identifier_or_typedef_name ARROW field
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::PFieldSel, $2.filename, $2.lineno), new VarRefNode( $1 ), $3); }
-	| identifier_or_typedef_name ARROW '[' push field_list pop ']'
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::PFieldSel, $2.filename, $2.lineno), new VarRefNode( $1 ), $5); }
-	;
-
-unary_expression:
-	postfix_expression
-	| ICR unary_expression
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Incr, $1.filename, $1.lineno), $2); }
-	| DECR unary_expression
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Decr, $1.filename, $1.lineno), $2); }
-	| EXTENSION cast_expression			/* GCC */
-		{ $$ = $2; }
-	| unary_operator cast_expression
-		{ $$ = new CompositeExprNode($1, $2); }
-	| '!' cast_expression
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Neg, $1.filename, $1.lineno), $2); }
-	| '*' cast_expression				/* CFA */
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::PointTo, $1.filename, $1.lineno), $2); }
-		/* '*' is is separated from unary_operator because of shift/reduce conflict in:
-			{ * X; } // dereference X
-			{ * int X; } // CFA declaration of pointer to int
-		   '&' must be moved here if C++ reference variables are supported. */
-	| SIZEOF unary_expression
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::SizeOf, $1.filename, $1.lineno), $2); }
-	| SIZEOF '(' type_name_no_function ')'
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::SizeOf, $1.filename, $1.lineno), new TypeValueNode($3)); }
-	| ALIGNOF unary_expression			/* GCC, variable alignment */
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::AlignOf, $1.filename, $1.lineno), $2); }
-	| ALIGNOF '(' type_name_no_function ')'		/* GCC, type alignment */
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::AlignOf, $1.filename, $1.lineno), new TypeValueNode($3)); }
-	| ANDAND identifier_or_typedef_name		/* GCC, address of label */
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::LabelAddress, $1.filename, $1.lineno),
-					     new VarRefNode($2, true)); }
-	;
-
-unary_operator:
-	'&'                               { $$ = new OperatorNode(OperatorNode::AddressOf, $1.filename, $1.lineno); }
-	| '+'                             { $$ = new OperatorNode(OperatorNode::UnPlus, $1.filename, $1.lineno); }
-	| '-'                             { $$ = new OperatorNode(OperatorNode::UnMinus, $1.filename, $1.lineno); }
-	| '~'                             { $$ = new OperatorNode(OperatorNode::BitNeg, $1.filename, $1.lineno); }
-	;
-
-cast_expression:
-	unary_expression
-	| '(' type_name_no_function ')' cast_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Cast, $1.filename, $1.lineno),
-								       new TypeValueNode($2), $4); }
-	| '(' type_name_no_function ')' tuple
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Cast, $1.filename, $1.lineno),
-								       new TypeValueNode($2), $4); }
-	;
-
-multiplicative_expression:
-	cast_expression
-	| multiplicative_expression '*' cast_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Mul, $2.filename, $2.lineno),$1,$3); }
-	| multiplicative_expression '/' cast_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Div, $2.filename, $2.lineno),$1,$3); }
-	| multiplicative_expression '%' cast_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Mod, $2.filename, $2.lineno),$1,$3); }
-	;
-
-additive_expression:
-	multiplicative_expression
-	| additive_expression '+' multiplicative_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Plus, $2.filename, $2.lineno),$1,$3); }
-	| additive_expression '-' multiplicative_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Minus, $2.filename, $2.lineno),$1,$3); }
-	;
-
-shift_expression:
-	additive_expression
-	| shift_expression LS additive_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::LShift, $2.filename, $2.lineno),$1,$3); }
-	| shift_expression RS additive_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::RShift, $2.filename, $2.lineno),$1,$3); }
-	;
-
-relational_expression:
-	shift_expression
-	| relational_expression '<' shift_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::LThan, $2.filename, $2.lineno),$1,$3); }
-	| relational_expression '>' shift_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::GThan, $2.filename, $2.lineno),$1,$3); }
-	| relational_expression LE shift_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::LEThan, $2.filename, $2.lineno),$1,$3); }
-	| relational_expression GE shift_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::GEThan, $2.filename, $2.lineno),$1,$3); }
-	;
-
-equality_expression:
-	relational_expression
-	| equality_expression EQ relational_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Eq, $2.filename, $2.lineno), $1, $3); }
-	| equality_expression NE relational_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Neq, $2.filename, $2.lineno), $1, $3); }
-	;
-
-AND_expression:
-	equality_expression
-	| AND_expression '&' equality_expression
-						{ $$ =new CompositeExprNode(new OperatorNode(OperatorNode::BitAnd, $2.filename, $2.lineno), $1, $3); }
-	;
-
-exclusive_OR_expression:
-	AND_expression
-	| exclusive_OR_expression '^' AND_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Xor, $2.filename, $2.lineno), $1, $3); }
-	;
-
-inclusive_OR_expression:
-	exclusive_OR_expression
-	| inclusive_OR_expression '|' exclusive_OR_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::BitOr, $2.filename, $2.lineno), $1, $3); }
-	;
-
-logical_AND_expression:
-	inclusive_OR_expression
-	| logical_AND_expression ANDAND inclusive_OR_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::And, $2.filename, $2.lineno), $1, $3); }
-	;
-
-logical_OR_expression:
-	logical_AND_expression
-	| logical_OR_expression OROR logical_AND_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Or, $2.filename, $2.lineno), $1, $3); }
-	;
-
-conditional_expression:
-	logical_OR_expression
-	| logical_OR_expression '?' comma_expression ':' conditional_expression
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Cond, $2.filename, $2.lineno),
-								       (ExpressionNode *)mkList((*$1,*$3,*$5))); }
-	| logical_OR_expression '?' /* empty */ ':' conditional_expression /* GCC, omitted first operand */
-						{ $$=new CompositeExprNode(new OperatorNode(OperatorNode::NCond, $2.filename, $2.lineno),$1,$4); }
-	| logical_OR_expression '?' comma_expression ':' tuple /* CFA, tuple expression */
-						{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Cond, $2.filename, $2.lineno),
-								       (ExpressionNode *)mkList(( *$1, *$3, *$5 ))); }
-	;
-
-constant_expression:
-	conditional_expression
-	;
-
-assignment_expression:
-		/* CFA, assignment is separated from assignment_operator to ensure no assignment operations
-		   for tuples */
-	conditional_expression
-	| unary_expression '=' assignment_expression
-						{ $$ =new CompositeExprNode(new OperatorNode(OperatorNode::Assign, $2.filename, $2.lineno), $1, $3); }
-	| unary_expression assignment_operator assignment_expression
-						{ $$ =new CompositeExprNode($2, $1, $3); }
-	| tuple assignment_opt				/* CFA, tuple expression */
-		{
-		  if( $2 == 0 ) {
-		    $$ = $1;
-		  } else {
-		    $$ = new CompositeExprNode( new OperatorNode( OperatorNode::Assign, $2.filename, $2.lineno ), $1, $2 );
-		  }
-		}
-	;
-
-assignment_expression_opt:
-	/* empty */
-		{ $$ = new NullExprNode; }
-	| assignment_expression
-	;
-
-tuple:							/* CFA, tuple */
-		/* CFA, one assignment_expression is factored out of comma_expression to eliminate a
-		   shift/reduce conflict with comma_expression in new_identifier_parameter_array and
-		   new_abstract_array */
-	'[' push pop ']'
-		{ $$ = new CompositeExprNode( new OperatorNode( OperatorNode::TupleC, $1.filename, $1.lineno ) ); }
-	| '[' push assignment_expression pop ']'
-		{ $$ = new CompositeExprNode( new OperatorNode( OperatorNode::TupleC, $1.filename, $1.lineno ), $3 ); }
-	| '[' push ',' tuple_expression_list pop ']'
-		{ $$ = new CompositeExprNode( new OperatorNode( OperatorNode::TupleC, $1.filename, $1.lineno ), (ExpressionNode *)(new NullExprNode)->set_link( $4 ) ); }
-	| '[' push assignment_expression ',' tuple_expression_list pop ']'
-		{ $$ = new CompositeExprNode( new OperatorNode( OperatorNode::TupleC, $1.filename, $1.lineno ), (ExpressionNode *)$3->set_link( flattenCommas( $5 ) ) ); }
-	;
-
-tuple_expression_list:
-	assignment_expression_opt
-	| tuple_expression_list ',' assignment_expression_opt
-		{ $$ = (ExpressionNode *)$1->set_link( $3 ); }
-	;
-
-assignment_operator:
-	MULTassign					{ $$ = new OperatorNode(OperatorNode::MulAssn, $1.filename, $1.lineno);   }
-	| DIVassign					{ $$ = new OperatorNode(OperatorNode::DivAssn, $1.filename, $1.lineno);   }
-	| MODassign					{ $$ = new OperatorNode(OperatorNode::ModAssn, $1.filename, $1.lineno);   }
-	| PLUSassign					{ $$ = new OperatorNode(OperatorNode::PlusAssn, $1.filename, $1.lineno);  }
-	| MINUSassign					{ $$ = new OperatorNode(OperatorNode::MinusAssn, $1.filename, $1.lineno); }
-	| LSassign					{ $$ = new OperatorNode(OperatorNode::LSAssn, $1.filename, $1.lineno);    }
-	| RSassign					{ $$ = new OperatorNode(OperatorNode::RSAssn, $1.filename, $1.lineno);    }
-	| ANDassign					{ $$ = new OperatorNode(OperatorNode::AndAssn, $1.filename, $1.lineno);   }
-	| ERassign					{ $$ = new OperatorNode(OperatorNode::ERAssn, $1.filename, $1.lineno);    }
-	| ORassign					{ $$ = new OperatorNode(OperatorNode::OrAssn, $1.filename, $1.lineno);    }
-	;
-
-comma_expression:
-	assignment_expression
-	| comma_expression ',' assignment_expression	/* { $$ = (ExpressionNode *)$1->add_to_list($3); } */
-			       { $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Comma, $2.filename, $2.lineno),$1,$3); }
-	;
-
-comma_expression_opt:
-	/* empty */                                     { $$ = 0; }
-	| comma_expression
-	;
-
-/*************************** STATEMENTS *******************************/
-
-statement:
-	labeled_statement
-	| compound_statement
-	| expression_statement                          { $$ = $1; }
-	| selection_statement
-	| iteration_statement
-	| jump_statement
-	| exception_statement
-	| asm_statement
-	;
-
-labeled_statement:
-	identifier_or_typedef_name ':' attribute_list_opt statement
-		{ $$ = $4->add_label($1);}
-	;
-
-compound_statement:
-	'{' '}'
-		{ $$ = new CompoundStmtNode( (StatementNode *)0 ) }
-	| '{'
-		/* Two scopes are necessary because the block itself has a scope, but every declaration within
-		   the block also requires its own scope */
-	  push push
-	  label_declaration_opt				/* GCC, local labels */
-	  block_item_list pop '}'			/* ANSI99, intermix declarations and statements */
-		{ $$ = new CompoundStmtNode( $5 ); }
-	;
-
-block_item_list:					/* ANSI99 */
-	block_item
-	| block_item_list push block_item
-		{ if($1 != 0) { $1->set_link($3); $$ = $1; } }
-	;
-
-block_item:
-	declaration					/* CFA, new & old style declarations */
-		{ $$ = new StatementNode( $1 ); }
-	| EXTENSION declaration				/* GCC */
-		{ $$ = new StatementNode( $2 ); }
-	| statement pop
-	;
-
-statement_list:
-	statement
-	| statement_list statement
-		{ if($1 != 0) { $1->set_link($2); $$ = $1; } }
-	;
-
-expression_statement:
-	comma_expression_opt ';'
-		{ $$ = new StatementNode(StatementNode::Exp, $1, 0); }
-	;
-
-selection_statement:
-	IF '(' comma_expression ')' statement		%prec THEN
-		/* explicitly deal with the shift/reduce conflict on if/else */
-		{ $$ = new StatementNode(StatementNode::If, $1.filename, $1.lineno, $3, $5); }
-	| IF '(' comma_expression ')' statement ELSE statement
-		{ $$ = new StatementNode(StatementNode::If, $1.filename, $1.lineno, $3, (StatementNode *)mkList((*$5, *$7)) ); }
-	| SWITCH '(' comma_expression ')' case_clause	/* CFA */
-		{ $$ = new StatementNode(StatementNode::Switch, $1.filename, $1.lineno, $3, $5); }
-	| SWITCH '(' comma_expression ')' '{' push declaration_list_opt switch_clause_list_opt '}' /* CFA */
-		{ $$ = new StatementNode(StatementNode::Switch, $1.filename, $1.lineno, $3, $8); /* xxx */ }
-		/* The semantics of the declaration list is changed to include any associated initialization,
-		   which is performed *before* the transfer to the appropriate case clause.  Statements after
-		   the initial declaration list can never be executed, and therefore, are removed from the
-		   grammar even though C allows it. */
-	| CHOOSE '(' comma_expression ')' case_clause	/* CFA */
-		{ $$ = new StatementNode(StatementNode::Choose, $1.filename, $1.lineno, $3, $5); }
-	| CHOOSE '(' comma_expression ')' '{' push declaration_list_opt choose_clause_list_opt '}' /* CFA */
-		{ $$ = new StatementNode(StatementNode::Choose, $1.filename, $1.lineno, $3, $8); }
-	;
-
-/* CASE and DEFAULT clauses are only allowed in the SWITCH statement, precluding Duff's device. In addition, a
-   case clause allows a list of values and subranges. */
-
-case_value:						/* CFA */
-	constant_expression			{ $$ = $1; }
-	| constant_expression ELLIPSIS constant_expression /* GCC, subrange */
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Range),$1,$3); }
-	| subrange					/* CFA, subrange */
-	;
-
-case_value_list:					/* CFA */
-	case_value
-	| case_value_list ',' case_value	{  $$ = (ExpressionNode *)($1->set_link($3)); }
-	;
-
-case_label:						/* CFA */
-	CASE case_value_list ':'		{  $$ = new StatementNode(StatementNode::Case, $1.filename, $1.lineno, $2, 0); }
-	| DEFAULT ':'			        {  $$ = new StatementNode(StatementNode::Default, $1.filename, $1.lineno);     }
-		/* A semantic check is required to ensure only one default clause per switch/choose
-		   statement. */
-	;
-
-case_label_list:					/* CFA */
-	case_label
-	| case_label_list case_label            { $$ = (StatementNode *)($1->set_link($2)); }
-	;
-
-case_clause:						/* CFA */
-	case_label_list statement		{  $$ = $1->append_last_case($2); }
-	;
-
-switch_clause_list_opt:					/* CFA */
-	/* empty */				{ $$ = 0; }
-	| switch_clause_list
-	;
-
-switch_clause_list:					/* CFA */
-	case_label_list statement_list
-						{ $$ = $1->append_last_case($2); }
-	| switch_clause_list case_label_list statement_list
-						{ $$ = (StatementNode *)($1->set_link($2->append_last_case($3))); }
-	;
-
-choose_clause_list_opt:					/* CFA */
-	/* empty */				{ $$ = 0; }
-	| choose_clause_list
-	;
-
-choose_clause_list:					/* CFA */
-	case_label_list fall_through
-		  { $$ = $1->append_last_case($2); }
-	| case_label_list statement_list fall_through_opt
-		  { $$ = $1->append_last_case((StatementNode *)mkList((*$2,*$3))); }
-	| choose_clause_list case_label_list fall_through
-		  { $$ = (StatementNode *)($1->set_link($2->append_last_case($3))); }
-	| choose_clause_list case_label_list statement_list fall_through_opt
-		  { $$ = (StatementNode *)($1->set_link($2->append_last_case((StatementNode *)mkList((*$3,*$4))))); }
-	;
-
-fall_through_opt:					/* CFA */
-	/* empty */				{ $$ = 0; }
-	| fall_through
-	;
-
-fall_through:						/* CFA */
-	FALLTHRU				{ $$ = new StatementNode(StatementNode::Fallthru, $1.filename, $1.lineno, 0, 0); }
-	| FALLTHRU ';'			        { $$ = new StatementNode(StatementNode::Fallthru, $1.filename, $1.lineno, 0, 0); }
-	;
-
-iteration_statement:
-	WHILE '(' comma_expression ')' statement
-						{ $$ = new StatementNode(StatementNode::While, $1.filename, $1.lineno, $3, $5); }
-	| DO statement WHILE '(' comma_expression ')' ';'
-						{ $$ = new StatementNode(StatementNode::Do, $1.filename, $1.lineno, $5, $2); }
-	| FOR '(' push for_control_expression ')' statement
-						{ $$ = new StatementNode(StatementNode::For, $1.filename, $1.lineno, $4, $6); }
-	;
-
-for_control_expression:
-	comma_expression_opt pop ';' comma_expression_opt ';' comma_expression_opt
-						{ $$ = new ForCtlExprNode($1, $4, $6); }
-	| declaration comma_expression_opt ';' comma_expression_opt /* ANSI99 */
-		/* Like C++, the loop index can be declared local to the loop. */
-						{ $$ = new ForCtlExprNode($1, $2, $4); }
-	;
-
-jump_statement:
-	GOTO identifier_or_typedef_name ';'
-						{ $$ = new StatementNode(StatementNode::Goto, $1.filename, $1.lineno, $2); }
-	| GOTO '*' comma_expression ';'		/* GCC, computed goto */
-		/* The syntax for the GCC computed goto violates normal expression precedence, e.g.,
-		   goto *i+3; => goto *(i+3); whereas normal operator precedence yields goto (*i)+3; */
-						{ $$ = new StatementNode(StatementNode::Goto, $1.filename, $1.lineno, $3); }
-	| CONTINUE ';'
-		/* A semantic check is required to ensure this statement appears only in the body of an
-		   iteration statement. */
-						{ $$ = new StatementNode(StatementNode::Continue, $1.filename, $1.lineno, 0, 0); }
-	| CONTINUE identifier_or_typedef_name ';'	/* CFA, multi-level continue */
-		/* A semantic check is required to ensure this statement appears only in the body of an
-		   iteration statement, and the target of the transfer appears only at the start of an
-		   iteration statement. */
-						{ $$ = new StatementNode(StatementNode::Continue, $1.filename, $1.lineno, $2); }
-	| BREAK ';'
-		/* A semantic check is required to ensure this statement appears only in the body of an
-		   iteration statement. */
-						{ $$ = new StatementNode(StatementNode::Break, $1.filename, $1.lineno, 0, 0); }
-	| BREAK identifier_or_typedef_name ';'		/* CFA, multi-level exit */
-		/* A semantic check is required to ensure this statement appears only in the body of an
-		   iteration statement, and the target of the transfer appears only at the start of an
-		   iteration statement. */
-						{ $$ = new StatementNode(StatementNode::Break, $1.filename, $1.lineno, $2 ); }
-	| RETURN comma_expression_opt ';'
-						{ $$ = new StatementNode(StatementNode::Return, $1.filename, $1.lineno, $2, 0); }
-	| THROW assignment_expression ';'
-						{ $$ = new StatementNode(StatementNode::Throw, $1.filename, $1.lineno, $2, 0); }
-	| THROW ';'
-                                                { $$ = new StatementNode(StatementNode::Throw, $1.filename, $1.lineno, 0, 0); }
-	;
-
-exception_statement:
-	TRY compound_statement handler_list
-			     { $$ = new StatementNode(StatementNode::Try, $1.filename, $1.lineno, 0,(StatementNode *)(mkList((*$2,*$3)))); }
-	;
-
-handler_list:
-		/* There must be at least one catch clause */
-	handlers
-	| CATCH '(' ELLIPSIS ')' compound_statement
-						{ $$ = StatementNode::newCatchStmt( $1.filename, $1.lineno, 0, $5, true ); }
-	| handlers CATCH '(' ELLIPSIS ')' compound_statement
-		/* ISO/IEC 9899:1999 Section 15.3(6) If present, a "..." handler shall be the last handler for
-		   its try block. */
-						{ $$ = $1->set_link( StatementNode::newCatchStmt( $2.filename, $2.lineno, 0, $6, true ) ); }
-	;
-
-handlers:
-	CATCH '(' push push exception_declaration pop ')' compound_statement pop
-						{ $$ = StatementNode::newCatchStmt($1.filename, $1.lineno, $5, $8); }
-	| handlers CATCH '(' push push exception_declaration pop ')' compound_statement pop
-						{ $$ = $1->set_link( StatementNode::newCatchStmt($2.filename, $2.lineno, $6, $9) );   }
-	;
-
-exception_declaration:
-		/* A semantic check is required to ensure type_specifier does not create a new type, e.g.:
-
-			catch ( struct { int i; } x ) ...
-
-		   This new type cannot catch any thrown type because of name equivalence among types. */
-	type_specifier
-	| type_specifier declarator
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    $$ = $2->addType( $1 );
-		}
-	| type_specifier variable_abstract_declarator
-		{   $$ = $2->addType( $1 ); }
-	| new_abstract_declarator_tuple identifier_or_typedef_name /* CFA */
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    $$ = $1->addName( $2 );
-		}
-	| new_abstract_declarator_tuple			/* CFA */
-	;
-
-asm_statement:
-	ASM type_qualifier_list_opt '(' constant_expression ')' ';'
-						{ $$ = new StatementNode(StatementNode::Asm, $1.filename, $1.lineno, 0, 0); }
-	| ASM type_qualifier_list_opt '(' constant_expression ':' asm_operands_opt ')' ';' /* remaining GCC */
-						{ $$ = new StatementNode(StatementNode::Asm, $1.filename, $1.lineno, 0, 0); }
-	| ASM type_qualifier_list_opt '(' constant_expression ':' asm_operands_opt ':' asm_operands_opt ')' ';'
-						{ $$ = new StatementNode(StatementNode::Asm, $1.filename, $1.lineno, 0, 0); }
-	| ASM type_qualifier_list_opt '(' constant_expression ':' asm_operands_opt ':' asm_operands_opt ':'
-			asm_clobbers_list ')' ';'
-						{ $$ = new StatementNode(StatementNode::Asm, $1.filename, $1.lineno, 0, 0); }
-	;
-
-asm_operands_opt:					/* GCC */
-	/* empty */
-	| asm_operands_list
-	;
-
-asm_operands_list:					/* GCC */
-	asm_operand
-	| asm_operands_list ',' asm_operand
-	;
-
-asm_operand:						/* GCC */
-	STRINGliteral '(' constant_expression ')'	{}
-	;
-
-asm_clobbers_list:					/* GCC */
-	STRINGliteral				{}
-	| asm_clobbers_list ',' STRINGliteral
-	;
-
-/******************************* DECLARATIONS *********************************/
-
-declaration_list_opt:					/* used at beginning of switch statement */
-	pop
-		{ $$ = 0; }
-	| declaration_list
-	;
-
-declaration_list:
-	declaration
-	| declaration_list push declaration
-		{ $$ = $1->appendList( $3 ); }
-	;
-
-old_declaration_list_opt:				/* used to declare parameter types in K&R style functions */
-	pop
-		{ $$ = 0; }
-	| old_declaration_list
-	;
-
-old_declaration_list:
-	old_declaration
-	| old_declaration_list push old_declaration
-		{ $$ = $1->appendList( $3 ); }
-	;
-
-label_declaration_opt:					/* GCC, local label */
-	/* empty */
-	| label_declaration_list
-	;
-
-label_declaration_list:					/* GCC, local label */
-	LABEL label_list ';'
-	| label_declaration_list LABEL label_list ';'
-	;
-
-label_list:						/* GCC, local label */
-	identifier_or_typedef_name		{}
-	| label_list ',' identifier_or_typedef_name {}
-	;
-
-declaration:						/* CFA, new & old style declarations */
-	new_declaration
-	| old_declaration
-	;
-
-/* C declaration syntax is notoriously confusing and error prone. Cforall provides its own type, variable and
-   function declarations. CFA declarations use the same declaration tokens as in C; however, CFA places
-   declaration modifiers to the left of the base type, while C declarations place modifiers to the right of
-   the base type. CFA declaration modifiers are interpreted from left to right and the entire type
-   specification is distributed across all variables in the declaration list (as in Pascal).  ANSI C and the
-   new CFA declarations may appear together in the same program block, but cannot be mixed within a specific
-   declaration.
-
-	    CFA	    	    C
-	[10] int x;	int x[10];	// array of 10 integers
-	[10] * char y;	char *y[10];	// array of 10 pointers to char
-   */
-
-new_declaration:					/* CFA */
-	new_variable_declaration pop ';'
-	| new_typedef_declaration pop ';'
-	| new_function_declaration pop ';'
-	| type_declaring_list pop ';'
-	| context_specifier pop ';'
-	;
-
-new_variable_declaration:				/* CFA */
-	new_variable_specifier initializer_opt
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::ID);
-			$$ = $1;
-		}
-	| declaration_qualifier_list new_variable_specifier initializer_opt
-		/* declaration_qualifier_list also includes type_qualifier_list, so a semantic check is
-		   necessary to preclude them as a type_qualifier cannot appear in that context. */
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::ID);
-			$$ = $2->addQualifiers( $1 );
-		}
-	| new_variable_declaration pop ',' push identifier_or_typedef_name initializer_opt
-		{
-			typedefTable.addToEnclosingScope( *$5.str, TypedefTable::ID);
-			$$ = $1->appendList( $1->cloneType( $5 ) );
-		}
-	;
-
-new_variable_specifier:					/* CFA */
-		/* A semantic check is required to ensure asm_name only appears on declarations with implicit
-		   or explicit static storage-class */
-	new_abstract_declarator_no_tuple identifier_or_typedef_name asm_name_opt
-		{
-			typedefTable.setNextIdentifier( *$2.str );
-			$$ = $1->addName( $2 );
-		}
-	| new_abstract_tuple identifier_or_typedef_name asm_name_opt
-		{
-			typedefTable.setNextIdentifier( *$2.str );
-			$$ = $1->addName( $2 );
-		}
-	| type_qualifier_list new_abstract_tuple identifier_or_typedef_name asm_name_opt
-		{
-			typedefTable.setNextIdentifier( *$3.str );
-			$$ = $2->addQualifiers( $1 )->addName( $3 );
-		}
-	;
-
-new_function_declaration:				/* CFA */
-	new_function_specifier
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::ID);
-			$$ = $1;
-		}
-	| declaration_qualifier_list new_function_specifier
-		/* declaration_qualifier_list also includes type_qualifier_list, so a semantic check is
-		   necessary to preclude them as a type_qualifier cannot appear in this context. */
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::ID);
-			$$ = $2->addQualifiers( $1 );
-		}
-	| new_function_declaration pop ',' push identifier_or_typedef_name
-		{
-			typedefTable.addToEnclosingScope( *$5.str, TypedefTable::ID);
-			$$ = $1->appendList( $1->cloneType( $5 ) );
-		}
-	;
-
-new_function_specifier:					/* CFA */
-	'[' push pop ']' identifier '(' push new_parameter_type_list_opt pop ')'
-		{
-			typedefTable.setNextIdentifier( *($5.str) );
-			$$ = DeclarationNode::newFunction( $5, DeclarationNode::newTuple( 0, $1.filename, $1.lineno ), $8, 0 );
-		}
-	| '[' push pop ']' TYPEDEFname '(' push new_parameter_type_list_opt pop ')'
-		{
-			typedefTable.setNextIdentifier( *($5.str) );
-			$$ = DeclarationNode::newFunction( $5, DeclarationNode::newTuple( 0, $1.filename, $1.lineno ), $8, 0 );
-		}
-		/* identifier_or_typedef_name must be broken apart because of the sequence:
-
-		   '[' ']' identifier_or_typedef_name '(' new_parameter_type_list_opt ')'
-		   '[' ']' type_specifier
-
-		   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_typedef_name. */
-	| new_abstract_tuple identifier_or_typedef_name '(' push new_parameter_type_list_opt pop ')'
-		/* To obtain LR(1), this rule must be factored out from function return type (see
-		   new_abstract_declarator). */
-		{
-			$$ = DeclarationNode::newFunction( $2, $1, $5, 0 );
-		}
-	| new_function_return identifier_or_typedef_name '(' push new_parameter_type_list_opt pop ')'
-		{
-			$$ = DeclarationNode::newFunction( $2, $1, $5, 0 );
-		}
-	;
-
-new_function_return:					/* CFA */
-	'[' push new_parameter_list pop ']'
-		{ $$ = DeclarationNode::newTuple( $3, $1.filename, $1.lineno ); }
-	| '[' push new_parameter_list pop ',' push new_abstract_parameter_list pop ']'
-		/* To obtain LR(1), the last new_abstract_parameter_list is added into this flattened rule to
-		   lookahead to the ']'. */
-		{ $$ = DeclarationNode::newTuple( $3->appendList( $7 ), $1.filename, $1.lineno ); }
-	;
-
-new_typedef_declaration:				/* CFA */
-	TYPEDEF new_variable_specifier
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::TD);
-			$$ = $2->addTypedef();
-		}
-	| TYPEDEF new_function_specifier
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::TD);
-			$$ = $2->addTypedef();
-		}
-	| new_typedef_declaration pop ',' push identifier_or_typedef_name
-		{
-			typedefTable.addToEnclosingScope( *$5.str, TypedefTable::TD);
-			$$ = $1->appendList( $1->cloneType( $5 ) );
-		}
-	;
-
-/* Traditionally typedef is part of storage-class specifier for syntactic convenience only. Here, it is
-   factored out as a separate form of declaration, which syntactically precludes storage-class specifiers and
-   initialization. */
-
-typedef_declaration:
-	TYPEDEF type_specifier declarator
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::TD);
-			$$ = $3->addType( $2 )->addTypedef();
-		}
-	| typedef_declaration pop ',' push declarator
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::TD);
-			$$ = $1->appendList( $1->cloneBaseType( $5 )->addTypedef() );
-		}
-	| type_qualifier_list TYPEDEF type_specifier declarator /* remaining OBSOLESCENT (see 2) */
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::TD);
-			$$ = $4->addType( $3 )->addQualifiers( $1 )->addTypedef();
-		}
-	| type_specifier TYPEDEF declarator
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::TD);
-			$$ = $3->addType( $1 )->addTypedef();
-		}
-	| type_specifier TYPEDEF type_qualifier_list declarator
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::TD);
-			$$ = $4->addQualifiers($1)->addTypedef()->addType($1);
-		}
-	;
-
-typedef_expression:					/* GCC, naming expression type */
-	TYPEDEF identifier '=' assignment_expression
-		{
-			typedefTable.addToEnclosingScope(*($2.str), TypedefTable::TD);
-			$$ = DeclarationNode::newName( $2 ); // XXX
-		}
-	| typedef_expression pop ',' push identifier '=' assignment_expression
-		{
-			typedefTable.addToEnclosingScope(*($5.str), TypedefTable::TD);
-			$$ = DeclarationNode::newName( $5 ); // XXX
-		}
-	;
-
-old_declaration:
-	declaring_list pop ';'
-	| typedef_declaration pop ';'
-	| typedef_expression pop ';'			/* GCC, naming expression type */
-	| sue_declaration_specifier pop ';'
-	;
-
-declaring_list:
-		/* A semantic check is required to ensure asm_name only appears on declarations with implicit
-		   or explicit static storage-class */
-	declaration_specifier declarator asm_name_opt initializer_opt
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::ID);
-			$$ = ($2->addType( $1 ))->addInitializer($4);
-		}
-	| declaring_list ',' attribute_list_opt declarator asm_name_opt initializer_opt
-		{
-			typedefTable.addToEnclosingScope( TypedefTable::ID);
-			$$ = $1->appendList( $1->cloneBaseType( $4->addInitializer($6) ) );
-		}
-	;
-
-declaration_specifier:					/* type specifier + storage class */
-	basic_declaration_specifier
-	| sue_declaration_specifier
-	| typedef_declaration_specifier
-	| typegen_declaration_specifier
-	;
-
-type_specifier:						/* declaration specifier - storage class */
-	basic_type_specifier
-	| sue_type_specifier
-	| typedef_type_specifier
-	| typegen_type_specifier
-	;
-
-type_qualifier_list_opt:				/* GCC, used in asm_statement */
-	/* empty */
-		{ $$ = 0; }
-	| type_qualifier_list
-	;
-
-type_qualifier_list:
-		/* A semantic check is necessary to ensure a type qualifier is appropriate for the kind of
-		   declaration.
-
-		   ISO/IEC 9899:1999 Section 6.7.3(4) : If the same qualifier appears more than once in the
-		   same specifier-qualifier-list, either directly or via one or more typedefs, the behavior is
-		   the same as if it appeared only once. */
-	type_qualifier
-	| type_qualifier_list type_qualifier
-		{ $$ = $1->addQualifiers( $2 ); }
-	;
-
-type_qualifier:
-	type_qualifier_name
-	| attribute
-		{ $$ = DeclarationNode::newQualifier( DeclarationNode::Const, $1.filename, $1.lineno ); }
-	;
-
-type_qualifier_name:
-	CONST
-		{ $$ = DeclarationNode::newQualifier( DeclarationNode::Const, $1.filename, $1.lineno ); }
-	| RESTRICT
-		{ $$ = DeclarationNode::newQualifier( DeclarationNode::Restrict, $1.filename, $1.lineno ); }
-	| VOLATILE
-		{ $$ = DeclarationNode::newQualifier( DeclarationNode::Volatile, $1.filename, $1.lineno ); }
-	| LVALUE					/* CFA */
-		{ $$ = DeclarationNode::newQualifier( DeclarationNode::Lvalue, $1.filename, $1.lineno ); }
-	| FORALL '(' 
-		{
-			typedefTable.enterScope();
-		}
-	  type_parameter_list ')'		/* CFA */
-		{
-			typedefTable.leaveScope();
-			$$ = DeclarationNode::newForall( $4, $1.filename, $1.lineno );
-		}
-	;
-
-declaration_qualifier_list:
-	storage_class_list
-	| type_qualifier_list storage_class_list	/* remaining OBSOLESCENT (see 2) */
-		{ $$ = $1->addQualifiers( $2 ); }
-	| declaration_qualifier_list type_qualifier_list storage_class_list
-		{ $$ = $1->addQualifiers( $2 )->addQualifiers( $3 ); }
-	;
-
-storage_class_list:
-		/* A semantic check is necessary to ensure a storage class is appropriate for the kind of
-		   declaration and that only one of each is specified, except for inline, which can appear
-		   with the others.
-
-		   ISO/IEC 9899:1999 Section 6.7.1(2) : At most, one storage-class specifier may be given in
-		   the declaration specifiers in a declaration. */
-	storage_class
-	| storage_class_list storage_class
-		{ $$ = $1->addQualifiers( $2 ); }
-	;
-
-storage_class:
-	storage_class_name
-	;
-
-storage_class_name:
-	AUTO
-		{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Auto, $1.filename, $1.lineno ); }
-	| EXTERN
-		{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Extern, $1.filename, $1.lineno ); }
-	| REGISTER
-		{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Register, $1.filename, $1.lineno ); }
-	| STATIC
-		{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Static, $1.filename, $1.lineno ); }
-	| INLINE					/* ANSI99 */
-		/* INLINE is essentially a storage class specifier for functions, and hence, belongs here. */
-		{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Inline, $1.filename, $1.lineno ); }
-	| FORTRAN					/* ANSI99 */
-		{ $$ = DeclarationNode::newStorageClass( DeclarationNode::Fortran, $1.filename, $1.lineno ); }
-	;
-
-basic_type_name:
-	CHAR
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Char, $1.filename, $1.lineno ); }
-	| DOUBLE
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Double, $1.filename, $1.lineno ); }
-	| FLOAT
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Float, $1.filename, $1.lineno ); }
-	| INT
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Int, $1.filename, $1.lineno ); }
-	| LONG
-		{ $$ = DeclarationNode::newModifier( DeclarationNode::Long, $1.filename, $1.lineno ); }
-	| SHORT
-		{ $$ = DeclarationNode::newModifier( DeclarationNode::Short, $1.filename, $1.lineno ); }
-	| SIGNED
-		{ $$ = DeclarationNode::newModifier( DeclarationNode::Signed, $1.filename, $1.lineno ); }
-	| UNSIGNED
-		{ $$ = DeclarationNode::newModifier( DeclarationNode::Unsigned, $1.filename, $1.lineno ); }
-	| VOID
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Void, $1.filename, $1.lineno ); }
-	| BOOL						/* ANSI99 */
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Bool, $1.filename, $1.lineno ); }
-	| COMPLEX					/* ANSI99 */
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Complex, $1.filename, $1.lineno ); }
-	| IMAGINARY					/* ANSI99 */
-		{ $$ = DeclarationNode::newBasicType( DeclarationNode::Imaginary, $1.filename, $1.lineno ); }
-	| TYPEOF '(' type_name ')'			/* GCC: typeof(x) y; */
-		{ $$ = $3; }
-	| TYPEOF '(' comma_expression ')'		/* GCC: typeof(a+b) y; */
-		{ $$ = DeclarationNode::newTypeof( $3, $1.filename, $1.lineno ); }
-	| '<' identifier '>'				/* CFA: <x> y; */
-		{ $$ = DeclarationNode::newName( $2 ); /* XXX */ }
-	| '<' '(' comma_expression ')' '>'		/* CFA: <(a+b)> y */
-		{ $$ = DeclarationNode::newName( $3 ); /* XXX */ }
-	;
-
-basic_declaration_specifier:
-		/* A semantic check is necessary for conflicting storage classes. */
-	basic_type_specifier
-	| declaration_qualifier_list basic_type_specifier
-		{ $$ = $2->addQualifiers( $1 ); }
-	| basic_declaration_specifier storage_class	/* remaining OBSOLESCENT (see 2) */
-		{ $$ = $1->addQualifiers( $2 ); }
-	| basic_declaration_specifier storage_class type_qualifier_list
-		{ $$ = $1->addQualifiers( $2 )->addQualifiers( $3 ); }
-	| basic_declaration_specifier storage_class basic_type_specifier
-		{ $$ = $3->addQualifiers( $2 )->addType( $1 ); }
-	;
-
-basic_type_specifier:
-		/* A semantic check is necessary for conflicting type qualifiers. */
-	basic_type_name
-	| type_qualifier_list basic_type_name
-		{ $$ = $2->addQualifiers( $1 ); }
-	| basic_type_specifier type_qualifier
-		{ $$ = $1->addQualifiers( $2 ); }
-	| basic_type_specifier basic_type_name
-		{ $$ = $1->addType( $2 ); }
-	;
-
-sue_declaration_specifier:
-	sue_type_specifier
-	| declaration_qualifier_list sue_type_specifier
-		{ $$ = $2->addQualifiers( $1 ); }
-	| sue_declaration_specifier storage_class	/* remaining OBSOLESCENT (see 2) */
-		{ $$ = $1->addQualifiers( $2 ); }
-	| sue_declaration_specifier storage_class type_qualifier_list
-		{ $$ = $1->addQualifiers( $2 )->addQualifiers( $3 ); }
-	;
-
-sue_type_specifier:
-	elaborated_type_name				/* struct, union, enum */
-	| type_qualifier_list elaborated_type_name
-		{ $$ = $2->addQualifiers( $1 ); }
-	| sue_type_specifier type_qualifier
-		{ $$ = $1->addQualifiers( $2 ); }
-	;
-
-typedef_declaration_specifier:
-	typedef_type_specifier
-	| declaration_qualifier_list typedef_type_specifier
-		{ $$ = $2->addQualifiers( $1 ); }
-	| typedef_declaration_specifier storage_class	/* remaining OBSOLESCENT (see 2) */
-		{ $$ = $1->addQualifiers( $2 ); }
-	| typedef_declaration_specifier storage_class type_qualifier_list
-		{ $$ = $1->addQualifiers( $2 )->addQualifiers( $3 ); }
-	;
-
-typedef_type_specifier:					/* typedef types */
-	TYPEDEFname
-		{ $$ = DeclarationNode::newFromTypedef( $1 ); }
-	| type_qualifier_list TYPEDEFname
-		{ $$ = DeclarationNode::newFromTypedef( $2 )->addQualifiers( $1 ); }
-	| typedef_type_specifier type_qualifier
-		{ $$ = $1->addQualifiers( $2 ); }
-	;
-
-elaborated_type_name:
-	aggregate_name
-	| enum_name
-	;
-
-aggregate_name:
-	aggregate_key '{' field_declaration_list '}'
-		{ $$ = DeclarationNode::newAggregate( $1, $2.filename, $2.lineno, 0, 0, $3 ); }
-	| aggregate_key identifier_or_typedef_name
-		{ $$ = DeclarationNode::newAggregate( $1, $2, 0, 0, 0 ); }
-	| aggregate_key identifier_or_typedef_name '{' field_declaration_list '}'
-		{ $$ = DeclarationNode::newAggregate( $1, $2, 0, 0, $4 ); }
-	| aggregate_key '(' push type_parameter_list pop ')' '{' field_declaration_list '}' /* CFA */
-		{ $$ = DeclarationNode::newAggregate( $1, $2.filename, $2.lineno, $4, 0, $8 ); }
-	| aggregate_key '(' push type_parameter_list pop ')' identifier_or_typedef_name /* CFA */
-		{ $$ = DeclarationNode::newAggregate( $1, $7, $4, 0, 0 ); }
-	| aggregate_key '(' push type_parameter_list pop ')' identifier_or_typedef_name '{' field_declaration_list '}' /* CFA */
-		{ $$ = DeclarationNode::newAggregate( $1, $7, $4, 0, $9 ); }
-	| aggregate_key '(' push type_parameter_list pop ')' '(' type_name_list ')' '{' field_declaration_list '}' /* CFA */
-		{ $$ = DeclarationNode::newAggregate( $1, $2.filename, $2.lineno, $4, $8, $11 ); }
-	| aggregate_key '(' push type_name_list pop ')' identifier_or_typedef_name /* CFA */
-		/* push and pop are only to prevent S/R conflicts */
-		{ $$ = DeclarationNode::newAggregate( $1, $7, 0, $4, 0 ); }
-	| aggregate_key '(' push type_parameter_list pop ')' '(' type_name_list ')' identifier_or_typedef_name '{' field_declaration_list '}' /* CFA */
-		{ $$ = DeclarationNode::newAggregate( $1, $10, $4, $8, $12 ); }
-	;
-
-aggregate_key:
-	STRUCT attribute_list_opt
-		{ $$ = DeclarationNode::Struct; }
-	| UNION attribute_list_opt
-		{ $$ = DeclarationNode::Union; }
-	;
-
-field_declaration_list:
-	field_declaration
-		{ $$ = $1; }
-	| field_declaration_list field_declaration
-		{ $$ = $1->appendList( $2 ); }
-	;
-
-field_declaration:
-	new_field_declaring_list ';'			/* CFA, new style field declaration */
-	| EXTENSION new_field_declaring_list ';'	/* GCC */
-		{ $$ = $2; }
-	| field_declaring_list ';'
-	| EXTENSION field_declaring_list ';'		/* GCC */
-		{ $$ = $2; }
-	;
-
-new_field_declaring_list:				/* CFA, new style field declaration */
-	new_abstract_declarator_tuple			/* CFA, no field name */
-	| new_abstract_declarator_tuple identifier_or_typedef_name
-		{ $$ = $1->addName( $2 ); }
-	| new_field_declaring_list ',' identifier_or_typedef_name
-		{ $$ = $1->appendList( $1->cloneType( $3 ) ); }
-	| new_field_declaring_list ','			/* CFA, no field name */
-		{ $$ = $1->appendList( $1->cloneType( 0 ) ); }
-	;
-
-field_declaring_list:
-	type_specifier field_declarator
-		{ $$ = $2->addType( $1 ); }
-	| field_declaring_list ',' attribute_list_opt field_declarator
-		{ $$ = $1->appendList( $1->cloneBaseType( $4 ) ); }
-	;
-
-field_declarator:
-	/* empty */					/* CFA, no field name */
-		{ $$ = 0; /* XXX */ }
-	| bit_subrange_size				/* no field name */
-		{ $$ = DeclarationNode::newBitfield( $1 ); }
-	| variable_declarator bit_subrange_size_opt
-		/* A semantic check is required to ensure bit_subrange only appears on base type int. */
-		{ $$ = $1->addBitfield( $2 ); }
-	| typedef_redeclarator bit_subrange_size_opt
-		/* A semantic check is required to ensure bit_subrange only appears on base type int. */
-		{ $$ = $1->addBitfield( $2 ); }
-	| variable_abstract_declarator			/* CFA, no field name */
-	;
-
-bit_subrange_size_opt:
-	/* empty */
-		{ $$ = 0; }
-	| bit_subrange_size
-		{ $$ = $1; }
-	;
-
-bit_subrange_size:
-	':' constant_expression
-		{ $$ = $2; }
-	;
-
-enum_key:
-	ENUM attribute_list_opt
-	;
-
-enum_name:
-	enum_key '{' enumerator_list comma_opt '}'
-		{ $$ = DeclarationNode::newEnum( $2.filename, $2.lineno, $3 ); }
-	| enum_key identifier_or_typedef_name '{' enumerator_list comma_opt '}'
-		{ $$ = DeclarationNode::newEnum( $2, $4 ); }
-	| enum_key identifier_or_typedef_name
-		{ $$ = DeclarationNode::newEnum( $2, 0 ); }
-	;
-
-enumerator_list:
-	identifier_or_typedef_name enumerator_value_opt
-		{ $$ = DeclarationNode::newEnumConstant( $1, $2 ); }
-	| enumerator_list ',' identifier_or_typedef_name enumerator_value_opt
-		{ $$ = $1->appendList( DeclarationNode::newEnumConstant( $3, $4 ) ); }
-	;
-
-enumerator_value_opt:
-	/* empty */
-		{ $$ = 0; }
-	| '=' constant_expression
-		{ $$ = $2; }
-	;
-
-/* Minimum of one parameter after which ellipsis is allowed only at the end. */
-
-new_parameter_type_list_opt:				/* CFA */
-	/* empty */
-		{ $$ = 0; }
-	| new_parameter_type_list
-	;
-
-new_parameter_type_list:				/* CFA, abstract + real */
-	new_abstract_parameter_list
-	| new_parameter_list
-	| new_parameter_list pop ',' push new_abstract_parameter_list
-		{ $$ = $1->appendList( $5 ); }
-	| new_abstract_parameter_list pop ',' push ELLIPSIS
-		{ $$ = $1->addVarArgs(); }
-	| new_parameter_list pop ',' push ELLIPSIS
-		{ $$ = $1->addVarArgs(); }
-	;
-
-new_parameter_list:					/* CFA */
-		/* To obtain LR(1) between new_parameter_list and new_abstract_tuple, the last
-		   new_abstract_parameter_list is factored out from new_parameter_list, flattening the rules
-		   to get lookahead to the ']'. */
-	new_parameter_declaration
-	| new_abstract_parameter_list pop ',' push new_parameter_declaration
-		{ $$ = $1->appendList( $5 ); }
-	| new_parameter_list pop ',' push new_parameter_declaration
-		{ $$ = $1->appendList( $5 ); }
-	| new_parameter_list pop ',' push new_abstract_parameter_list pop ',' push new_parameter_declaration
-		{ $$ = $1->appendList( $5 )->appendList( $9 ); }
-	;
-
-new_abstract_parameter_list:				/* CFA, new & old style abstract */
-	new_abstract_parameter_declaration
-	| new_abstract_parameter_list pop ',' push new_abstract_parameter_declaration
-		{ $$ = $1->appendList( $5 ); }
-	;
-
-parameter_type_list_opt:
-	/* empty */
-		{ $$ = 0; }
-	| parameter_type_list
-	;
-
-parameter_type_list:
-	parameter_list
-	| parameter_list pop ',' push ELLIPSIS
-		{ $$ = $1->addVarArgs(); }
-	;
-
-parameter_list:						/* abstract + real */
-	abstract_parameter_declaration
-	| parameter_declaration
-	| parameter_list pop ',' push abstract_parameter_declaration
-		{ $$ = $1->appendList( $5 ); }
-	| parameter_list pop ',' push parameter_declaration
-		{ $$ = $1->appendList( $5 ); }
-	;
-
-/* Provides optional identifier names (abstract_declarator/variable_declarator), no initialization, different
-   semantics for typedef name by using typedef_parameter_redeclarator instead of typedef_redeclarator, and
-   function prototypes. */
-
-new_parameter_declaration:				/* CFA, new & old style parameter declaration */
-	parameter_declaration
-	| new_identifier_parameter_declarator_no_tuple identifier_or_typedef_name assignment_opt
-		{ $$ = $1->addName( $2 ); }
-	| new_abstract_tuple identifier_or_typedef_name assignment_opt
-		/* To obtain LR(1), these rules must be duplicated here (see new_abstract_declarator). */
-		{ $$ = $1->addName( $2 ); }
-	| type_qualifier_list new_abstract_tuple identifier_or_typedef_name assignment_opt
-		{ $$ = $2->addName( $3 )->addQualifiers( $1 ); }
-	| new_function_specifier
-	;
-
-new_abstract_parameter_declaration:			/* CFA, new & old style parameter declaration */
-	abstract_parameter_declaration
-	| new_identifier_parameter_declarator_no_tuple
-	| new_abstract_tuple
-		/* To obtain LR(1), these rules must be duplicated here (see new_abstract_declarator). */
-	| type_qualifier_list new_abstract_tuple
-		{ $$ = $2->addQualifiers( $1 ); }
-	| new_abstract_function
-	;
-
-parameter_declaration:
-	declaration_specifier identifier_parameter_declarator assignment_opt
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID);
-		    $$ = $2->addType( $1 );
-		}
-	| declaration_specifier typedef_parameter_redeclarator assignment_opt
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID);
-		    $$ = $2->addType( $1 );
-		}
-	;
-
-abstract_parameter_declaration:
-	declaration_specifier
-	| declaration_specifier abstract_parameter_declarator
-		{ $$ = $2->addType( $1 ); }
-	;
-
-/* ISO/IEC 9899:1999 Section 6.9.1(6) : "An identifier declared as a typedef name shall not be redeclared as a
-   parameter." Because the scope of the K&R-style parameter-list sees the typedef first, the following is
-   based only on identifiers.  The ANSI-style parameter-list can redefine a typedef name. */
-
-identifier_list:					/* K&R-style parameter list => no types */
-	identifier
-		{ $$ = DeclarationNode::newName( $1 ); }
-	| identifier_list ',' identifier
-		{ $$ = $1->appendList( DeclarationNode::newName( $3 ) ); }
-	;
-
-identifier_or_typedef_name:
-	identifier
-	| TYPEDEFname
-	| TYPEGENname
-	;
-
-type_name_no_function:					/* sizeof, alignof, cast (constructor) */
-	new_abstract_declarator_tuple			/* CFA */
-	| type_specifier
-	| type_specifier variable_abstract_declarator
-		{ $$ = $2->addType( $1 ); }
-	;
-
-type_name:						/* typeof, assertion */
-	new_abstract_declarator_tuple			/* CFA */
-	| new_abstract_function				/* CFA */
-	| type_specifier
-	| type_specifier abstract_declarator
-		{ $$ = $2->addType( $1 ); }
-	;
-
-initializer_opt:
-	/* empty */                             { $$ = 0; }
-	| '=' initializer                       { $$ = $2; }
-	;
-
-initializer:
-	assignment_expression			{ $$ = new InitializerNode($1); }
-	| '{' initializer_list comma_opt '}'    { $$ = new InitializerNode($2, true); }
-	;
-
-initializer_list:
-	initializer
-	| designation initializer                            { $$ = $2->set_designators( $1 ); }
-	| initializer_list ',' initializer                   { $$ = (InitializerNode *)( $1->set_link($3) ); }
-	| initializer_list ',' designation initializer
-					   { $$ = (InitializerNode *)( $1->set_link( $4->set_designators($3) ) ); }
-	;
-
-/* There is an unreconcileable parsing problem between ANSI99 and CFA with respect to designators. The problem
-   is use of '=' to separator the designator from the initializer value, as in:
-
-	int x[10] = { [1] = 3 };
-
-   The string "[1] = 3" can be parsed as a designator assignment or a tuple assignment.  To disambiguate this
-   case, CFA changes the syntax from "=" to ":" as the separator between the designator and initializer. GCC
-   does uses ":" for field selection. The optional use of the "=" in GCC, or in this case ":", cannot be
-   supported either due to shift/reduce conflicts */
-
-designation:
-	designator_list ':'				/* ANSI99, CFA uses ":" instead of "=" */
-	| identifier_or_typedef_name ':'		/* GCC, field name */
-						       { $$ = new VarRefNode( $1 ); }
-	;
-
-designator_list:					/* ANSI99 */
-	designator
-	| designator_list designator                   { $$ = (ExpressionNode *)($1->set_link( $2 )); }
-	;
-
-designator:
-	'.' identifier_or_typedef_name			/* ANSI99, field name */
-						       { $$ = new VarRefNode( $2 ); }
-	| '[' push assignment_expression pop ']'	/* ANSI99, single array element */
-		/* assignment_expression used instead of constant_expression because of shift/reduce conflicts
-		   with tuple. */
-						       { $$ = $3; }
-	| '[' push subrange pop ']'			/* CFA, multiple array elements */
-						       { $$ = $3; }
-	| '[' push constant_expression ELLIPSIS constant_expression pop ']' /* GCC, multiple array elements */
-						       { $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Range, $1.filename, $1.lineno), $3, $5); }
-	| '.' '[' push field_list pop ']'		/* CFA, tuple field selector */
-						       { $$ = $4; }
-	;
-
-/* The CFA type system is based on parametric polymorphism, the ability to declare functions with type
-   parameters, rather than an object-oriented type system. This required four groups of extensions:
-
-   Overloading: function, data, and operator identifiers may be overloaded.
-
-   Type declarations: "type" is used to generate new types for declaring objects. Similarly, "dtype" is used
-       for object and incomplete types, and "ftype" is used for function types. Type declarations with
-       initializers provide definitions of new types. Type declarations with storage class "extern" provide
-       opaque types.
-
-   Polymorphic functions: A forall clause declares a type parameter. The corresponding argument is inferred at
-       the call site. A polymorphic function is not a template; it is a function, with an address and a type.
-
-   Specifications and Assertions: Specifications are collections of declarations parameterized by one or more
-       types. They serve many of the purposes of abstract classes, and specification hierarchies resemble
-       subclass hierarchies. Unlike classes, they can define relationships between types.  Assertions declare
-       that a type or types provide the operations declared by a specification.  Assertions are normally used
-       to declare requirements on type arguments of polymorphic functions.  */
-
-typegen_declaration_specifier:				/* CFA */
-	typegen_type_specifier
-	| declaration_qualifier_list typegen_type_specifier
-		{ $$ = $2->addQualifiers( $1 ); }
-	| typegen_declaration_specifier storage_class	/* remaining OBSOLESCENT (see 2) */
-		{ $$ = $1->addQualifiers( $2 ); }
-	| typegen_declaration_specifier storage_class type_qualifier_list
-		{ $$ = $1->addQualifiers( $2 )->addQualifiers( $3 ); }
-	;
-
-typegen_type_specifier:					/* CFA */
-	TYPEGENname '(' type_name_list ')'
-		{ $$ = DeclarationNode::newFromTypeGen( $1, $3 ); }
-	| type_qualifier_list TYPEGENname '(' type_name_list ')'
-		{ $$ = DeclarationNode::newFromTypeGen( $2, $4 )->addQualifiers( $1 ); }
-	| typegen_type_specifier type_qualifier
-		{ $$ = $1->addQualifiers( $2 ); }
-	;
-
-type_parameter_list:					/* CFA */
-	type_parameter assignment_opt
-	| type_parameter_list ',' type_parameter assignment_opt
-		{ $$ = $1->appendList( $3 ); }
-	;
-
-type_parameter:						/* CFA */
-	type_class identifier_or_typedef_name
-		{ typedefTable.addToEnclosingScope(*($2.str), TypedefTable::TD); }
-	  assertion_list_opt
-		{ $$ = DeclarationNode::newTypeParam( $1, $2.str )->addAssertions( $4 ); }
-	| type_specifier identifier_parameter_declarator
-	;
-
-type_class:						/* CFA */
-	TYPE
-		{ $$ = DeclarationNode::Type; }
-	| DTYPE
-		{ $$ = DeclarationNode::Ftype; }
-	| FTYPE
-		{ $$ = DeclarationNode::Dtype; }
-	;
-
-assertion_list_opt:					/* CFA */
-	/* empty */
-		{ $$ = 0; }
-	| assertion_list_opt assertion
-		{ $$ = $1 == 0 ? $2 : $1->appendList( $2 ); }
-	;
-
-assertion:						/* CFA */
-	'|' identifier_or_typedef_name '(' type_name_list ')'
-		{
-		    typedefTable.openContext( *($2.str) );
-		    $$ = DeclarationNode::newContextUse( $2, $4 );
-		}
-	| '|' '{' push context_declaration_list '}'
-		{ $$ = $4; }
-	| '|' '(' push type_parameter_list pop ')' '{' push context_declaration_list '}' '(' type_name_list ')'
-		{ $$ = 0; }
-	;
-
-type_name_list:						/* CFA */
-	type_name
-		{ $$ = new TypeValueNode( $1 ); }
-	| assignment_expression
-	| type_name_list ',' type_name
-		{ $$ = (ExpressionNode *)($1->set_link(new TypeValueNode( $3 ))); }
-	| type_name_list ',' assignment_expression
-		{ $$ = (ExpressionNode *)($1->set_link($3)); }
-	;
-
-type_declaring_list:					/* CFA */
-	TYPE type_declarator
-		{ $$ = $2; }
-	| storage_class_list TYPE type_declarator
-		{ $$ = $3->addQualifiers( $1 ); }
-	| type_declaring_list ',' type_declarator
-		{ $$ = $1->appendList( $3->copyStorageClasses( $1 ) ); }
-	;
-
-type_declarator:					/* CFA */
-	type_declarator_name assertion_list_opt
-		{ $$ = $1->addAssertions( $2 ); }
-	| type_declarator_name assertion_list_opt '=' type_name
-		{ $$ = $1->addAssertions( $2 )->addType( $4 ); }
-	;
-
-type_declarator_name:					/* CFA */
-	identifier_or_typedef_name
-		{
-		    typedefTable.addToEnclosingScope(*($1.str), TypedefTable::TD);
-		    $$ = DeclarationNode::newTypeDecl( $1, 0 );
-		}
-	| identifier_or_typedef_name '(' push type_parameter_list pop ')'
-		{
-		    typedefTable.addToEnclosingScope(*($1.str), TypedefTable::TG);
-		    $$ = DeclarationNode::newTypeDecl( $1, $4 );
-		}
-	;
-
-context_specifier:					/* CFA */
-	CONTEXT identifier_or_typedef_name '(' push type_parameter_list pop ')' '{' '}'
-		{
-		    typedefTable.addToEnclosingScope(*($2.str), TypedefTable::ID);
-		    $$ = DeclarationNode::newContext( $2, $5, 0 );
-		}
-	| CONTEXT identifier_or_typedef_name '(' push type_parameter_list pop ')' '{'
-		{
-		    typedefTable.enterContext( *($2.str) );
-		    typedefTable.enterScope();
-		}
-	  context_declaration_list '}'
-		{
-		    typedefTable.leaveContext();
-		    typedefTable.addToEnclosingScope(*($2.str), TypedefTable::ID);
-		    $$ = DeclarationNode::newContext( $2, $5, $10 );
-		}
-	;
-
-context_declaration_list:				/* CFA */
-	context_declaration
-	| context_declaration_list push context_declaration
-		{ $$ = $1->appendList( $3 ); }
-	;
-
-context_declaration:					/* CFA */
-	new_context_declaring_list pop ';'
-	| context_declaring_list pop ';'
-	;
-
-new_context_declaring_list:				/* CFA */
-	new_variable_specifier
-		{
-		    typedefTable.addToEnclosingScope2( TypedefTable::ID );
-		    $$ = $1;
-		}
-	| new_function_specifier
-		{
-		    typedefTable.addToEnclosingScope2( TypedefTable::ID );
-		    $$ = $1;
-		}
-	| new_context_declaring_list pop ',' push identifier_or_typedef_name
-		{
-		    typedefTable.addToEnclosingScope2( *($5.str), TypedefTable::ID );
-		    $$ = $1->appendList( $1->cloneType( $5 ) );
-		}
-	;
-
-context_declaring_list:					/* CFA */
-	type_specifier declarator
-		{
-		    typedefTable.addToEnclosingScope2( TypedefTable::ID);
-		    $$ = $2->addType( $1 );
-		}
-	| context_declaring_list pop ',' push declarator
-		{
-		    typedefTable.addToEnclosingScope2( TypedefTable::ID);
-		    $$ = $1->appendList( $1->cloneBaseType( $5 ) );
-		}
-	;
-
-/***************************** EXTERNAL DEFINITIONS *****************************/
-
-translation_unit:
-	/* empty */					/* empty input file */
-		{}
-	| external_definition_list
-		{
-		  if( theTree ) {
-		    theTree->appendList( $1 );
-		  } else {
-		    theTree = $1;
-		  }
-		}
-	;
-
-external_definition_list:
-	external_definition
-	| external_definition_list push external_definition
-		{
-		  if( $1 ) {
-		    $$ = $1->appendList( $3 );
-		  } else {
-		    $$ = $3;
-		  }
-		}
-	;
-
-external_definition_list_opt:
-	/* empty */
-		{
-		  $$ = 0;
-		}
-	| external_definition_list
-	;
-
-external_definition:
-	declaration
-	| function_definition
-	| asm_statement					/* GCC, global assembler statement */
-		{}
-	| EXTERN STRINGliteral
-		{
-		  linkageStack.push( linkage );
-		  linkage = LinkageSpec::fromString( *$2.str );
-		}
-	  '{' external_definition_list_opt '}'		/* C++-style linkage specifier */
-		{
-		  linkage = linkageStack.top();
-		  linkageStack.pop();
-		  $$ = $5;
-		}
-	| EXTENSION external_definition
-		{ $$ = $2; }
-	;
-
-function_definition:
-	new_function_specifier compound_statement	/* CFA */
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $1->addFunctionBody( $2 );
-		}
-	| declaration_qualifier_list new_function_specifier compound_statement /* CFA */
-		/* declaration_qualifier_list also includes type_qualifier_list, so a semantic check is
-		   necessary to preclude them as a type_qualifier cannot appear in this context. */
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $2->addFunctionBody( $3 )->addQualifiers( $1 );
-		}
-
-	| declaration_specifier function_declarator compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $2->addFunctionBody( $3 )->addType( $1 );
-		}
-
-		/* These rules are a concession to the "implicit int" type_specifier because there is a
-		   significant amount of code with functions missing a type-specifier on the return type.
-		   Parsing is possible because function_definition does not appear in the context of an
-		   expression (nested functions would preclude this concession). A function prototype
-		   declaration must still have a type_specifier. OBSOLESCENT (see 1) */
-	| function_declarator compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $1->addFunctionBody( $2 );
-		}
-	| type_qualifier_list function_declarator compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $2->addFunctionBody( $3 )->addQualifiers( $1 );
-		}
-	| declaration_qualifier_list function_declarator compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $2->addFunctionBody( $3 )->addQualifiers( $1 );
-		}
-	| declaration_qualifier_list type_qualifier_list function_declarator compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $3->addFunctionBody( $4 )->addQualifiers( $2 )->addQualifiers( $1 );
-		}
-
-		/* Old-style K&R function definition, OBSOLESCENT (see 4) */
-	| declaration_specifier old_function_declarator push old_declaration_list_opt compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $2->addOldDeclList( $4 )->addFunctionBody( $5 )->addType( $1 );
-		}
-	| old_function_declarator push old_declaration_list_opt compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $1->addOldDeclList( $3 )->addFunctionBody( $4 );
-		}
-	| type_qualifier_list old_function_declarator push old_declaration_list_opt compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $2->addOldDeclList( $4 )->addFunctionBody( $5 )->addQualifiers( $1 );
-		}
-
-		/* Old-style K&R function definition with "implicit int" type_specifier, OBSOLESCENT (see 4) */
-	| declaration_qualifier_list old_function_declarator push old_declaration_list_opt compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $2->addOldDeclList( $4 )->addFunctionBody( $5 )->addQualifiers( $1 );
-		}
-	| declaration_qualifier_list type_qualifier_list old_function_declarator push old_declaration_list_opt
-			compound_statement
-		{
-		    typedefTable.addToEnclosingScope( TypedefTable::ID );
-		    typedefTable.leaveScope();
-		    $$ = $3->addOldDeclList( $5 )->addFunctionBody( $6 )->addQualifiers( $2 )->addQualifiers( $1 );
-		}
-	;
-
-declarator:
-	variable_declarator
-	| function_declarator
-	| typedef_redeclarator
-	;
-
-subrange:
-	constant_expression '~' constant_expression	/* CFA, integer subrange */
-		{ $$ = new CompositeExprNode(new OperatorNode(OperatorNode::Range, $2.filename, $2.lineno), $1, $3); }
-	;
-
-asm_name_opt:						/* GCC */
-	/* empty */
-	| ASM '(' string_literal_list ')' attribute_list_opt
-	;
-
-attribute_list_opt:					/* GCC */
-	/* empty */
-	| attribute_list
-	;
-
-attribute_list:						/* GCC */
-	attribute
-	| attribute_list attribute
-	;
-
-attribute:						/* GCC */
-	ATTRIBUTE '(' '(' attribute_parameter_list ')' ')'
-	;
-
-attribute_parameter_list:				/* GCC */
-	attrib
-	| attribute_parameter_list ',' attrib
-	;
-
-attrib:							/* GCC */
-	/* empty */
-	| any_word
-	| any_word '(' comma_expression_opt ')'
-	;
-
-any_word:						/* GCC */
-	identifier_or_typedef_name {}
-	| storage_class_name {}
-	| basic_type_name {}
-	| type_qualifier {}
-	;
-
-/* ============================================================================
-   The following sections are a series of grammar patterns used to parse declarators. Multiple patterns are
-   necessary because the type of an identifier in wrapped around the identifier in the same form as its usage
-   in an expression, as in:
-
-	int (*f())[10] { ... };
-	... (*f())[3] += 1;	// definition mimics usage
-
-   Because these patterns are highly recursive, changes at a lower level in the recursion require copying some
-   or all of the pattern. Each of these patterns has some subtle variation to ensure correct syntax in a
-   particular context.
-   ============================================================================ */
-
-/* ----------------------------------------------------------------------------
-   The set of valid declarators before a compound statement for defining a function is less than the set of
-   declarators to define a variable or function prototype, e.g.:
-
-	valid declaration	invalid definition
-	-----------------	------------------
-	int f;			int f {}
-	int *f;			int *f {}
-	int f[10];		int f[10] {}
-	int (*f)(int);		int (*f)(int) {}
-
-   To preclude this syntactic anomaly requires separating the grammar rules for variable and function
-   declarators, hence variable_declarator and function_declarator.
-   ---------------------------------------------------------------------------- */
-
-/* This pattern parses a declaration of a variable that is not redefining a typedef name. The pattern
-   precludes declaring an array of functions versus a pointer to an array of functions. */
-
-variable_declarator:
-	paren_identifier attribute_list_opt
-	| variable_ptr
-	| variable_array attribute_list_opt
-	| variable_function attribute_list_opt
-	;
-
-paren_identifier:
-	identifier
-		{
-		    typedefTable.setNextIdentifier( *($1.str) );
-		    $$ = DeclarationNode::newName( $1 );
-		}
-	| '(' paren_identifier ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-variable_ptr:
-	'*' variable_declarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1.filename, $1.lineno ) ); }
-	| '*' type_qualifier_list variable_declarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1.filename, $1.lineno ) ); }
-	| '(' variable_ptr ')'
-		{ $$ = $2 }
-	;
-
-variable_array:
-	paren_identifier array_dimension
-		{ $$ = $1->addArray( $2 ); }
-	| '(' variable_ptr ')' array_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' variable_array ')' multi_array_dimension	/* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' variable_array ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-variable_function:
-	'(' variable_ptr ')' '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $2->addParamList( $6 ); }
-	| '(' variable_function ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-/* This pattern parses a function declarator that is not redefining a typedef name. Because functions cannot
-   be nested, there is no context where a function definition can redefine a typedef name. To allow nested
-   functions requires further separation of variable and function declarators in typedef_redeclarator.  The
-   pattern precludes returning arrays and functions versus pointers to arrays and functions. */
-
-function_declarator:
-	function_no_ptr attribute_list_opt
-	| function_ptr
-	| function_array attribute_list_opt
-	;
-
-function_no_ptr:
-	paren_identifier '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $1->addParamList( $4 ); }
-	| '(' function_ptr ')' '(' push parameter_type_list_opt pop ')'
-		{ $$ = $2->addParamList( $6 ); }
-	| '(' function_no_ptr ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-function_ptr:
-	'*' function_declarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1.filename, $1.lineno ) ); }
-	| '*' type_qualifier_list function_declarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1.filename, $1.lineno ) ); }
-	| '(' function_ptr ')'
-		{ $$ = $2; }
-	;
-
-function_array:
-	'(' function_ptr ')' array_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' function_array ')' multi_array_dimension	/* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' function_array ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-/* This pattern parses an old-style K&R function declarator (OBSOLESCENT, see 4) that is not redefining a
-   typedef name (see function_declarator for additional comments). The pattern precludes returning arrays and
-   functions versus pointers to arrays and functions. */
-
-old_function_declarator:
-	old_function_no_ptr
-	| old_function_ptr
-	| old_function_array
-	;
-
-old_function_no_ptr:
-	paren_identifier '(' identifier_list ')'	/* function_declarator handles empty parameter */
-		{ $$ = $1->addIdList( $3 ); }
-	| '(' old_function_ptr ')' '(' identifier_list ')'
-		{ $$ = $2->addIdList( $5 ); }
-	| '(' old_function_no_ptr ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-old_function_ptr:
-	'*' old_function_declarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1.filename, $1.lineno ) ); }
-	| '*' type_qualifier_list old_function_declarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1.filename, $1.lineno ) ); }
-	| '(' old_function_ptr ')'
-		{ $$ = $2; }
-	;
-
-old_function_array:
-	'(' old_function_ptr ')' array_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' old_function_array ')' multi_array_dimension /* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' old_function_array ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-/* This pattern parses a declaration for a variable or function prototype that redefines a typedef name, e.g.:
-
-	typedef int foo;
-	{
-	   int foo; // redefine typedef name in new scope
-	}
-
-   The pattern precludes declaring an array of functions versus a pointer to an array of functions, and
-   returning arrays and functions versus pointers to arrays and functions. */
-
-typedef_redeclarator:
-	paren_typedef attribute_list_opt
-	| typedef_ptr
-	| typedef_array attribute_list_opt
-	| typedef_function attribute_list_opt
-	;
-
-paren_typedef:
-	TYPEDEFname
-		{
-		typedefTable.setNextIdentifier( *($1.str) );
-		$$ = DeclarationNode::newName( $1 );
-		}
-	| '(' paren_typedef ')'
-		{ $$ = $2; }
-	;
-
-typedef_ptr:
-	'*' typedef_redeclarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1.filename, $1.lineno ) ); }
-	| '*' type_qualifier_list typedef_redeclarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1.filename, $1.lineno ) ); }
-	| '(' typedef_ptr ')'
-		{ $$ = $2; }
-	;
-
-typedef_array:
-	paren_typedef array_dimension
-		{ $$ = $1->addArray( $2 ); }
-	| '(' typedef_ptr ')' array_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' typedef_array ')' multi_array_dimension	/* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' typedef_array ')'				/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-typedef_function:
-	paren_typedef '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $1->addParamList( $4 ); }
-	| '(' typedef_ptr ')' '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $2->addParamList( $6 ); }
-	| '(' typedef_function ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-/* This pattern parses a declaration for a parameter variable or function prototype that is not redefining a
-   typedef name and allows the ANSI99 array options, which can only appear in a parameter list.  The pattern
-   precludes declaring an array of functions versus a pointer to an array of functions, and returning arrays
-   and functions versus pointers to arrays and functions. */
-
-identifier_parameter_declarator:
-	paren_identifier attribute_list_opt
-	| identifier_parameter_ptr
-	| identifier_parameter_array attribute_list_opt
-	| identifier_parameter_function attribute_list_opt
-	;
-
-identifier_parameter_ptr:
-	'*' identifier_parameter_declarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1.filename, $1.lineno ) ); }
-	| '*' type_qualifier_list identifier_parameter_declarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1.filename, $1.lineno ) ); }
-	| '(' identifier_parameter_ptr ')'
-		{ $$ = $2; }
-	;
-
-identifier_parameter_array:
-	paren_identifier array_parameter_dimension
-		{ $$ = $1->addArray( $2 ); }
-	| '(' identifier_parameter_ptr ')' array_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' identifier_parameter_array ')' multi_array_dimension /* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' identifier_parameter_array ')'		/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-identifier_parameter_function:
-	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; }
-	;
-
-/* This pattern parses a declaration for a parameter variable or function prototype that is redefining a
-   typedef name, e.g.:
-
-	typedef int foo;
-	int f( int foo ); // redefine typedef name in new scope
-
-   and allows the ANSI99 array options, which can only appear in a parameter list.  In addition, the pattern
-   handles the special meaning of parenthesis around a typedef name:
-
-	ISO/IEC 9899:1999 Section 6.7.5.3(11) : "In a parameter declaration, a single typedef name in
-	parentheses is taken to be an abstract declarator that specifies a function with a single parameter,
-	not as redundant parentheses around the identifier."
-
-   which precludes the following cases:
-
-	typedef float T;
-	int f( int ( T [5] ) );			// see abstract_parameter_declarator
-	int g( int ( T ( int ) ) );		// see abstract_parameter_declarator
-	int f( int f1( T a[5] ) );		// see identifier_parameter_declarator
-	int g( int g1( T g2( int p ) ) );	// see identifier_parameter_declarator
-
-   In essence, a '(' immediately to the left of typedef name, T, is interpreted as starting a parameter type
-   list, and not as redundant parentheses around a redeclaration of T. Finally, the pattern also precludes
-   declaring an array of functions versus a pointer to an array of functions, and returning arrays and
-   functions versus pointers to arrays and functions. */
-
-typedef_parameter_redeclarator:
-	typedef attribute_list_opt
-	| typedef_parameter_ptr
-	| typedef_parameter_array attribute_list_opt
-	| typedef_parameter_function attribute_list_opt
-	;
-
-typedef:
-	TYPEDEFname
-		{
-		    typedefTable.setNextIdentifier( *($1.str) );
-		    $$ = DeclarationNode::newName( $1 );
-		}
-	;
-
-typedef_parameter_ptr:
-	'*' typedef_parameter_redeclarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1.filename, $1.lineno ) ); }
-	| '*' type_qualifier_list typedef_parameter_redeclarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1.filename, $1.lineno ) ); }
-	| '(' typedef_parameter_ptr ')'
-		{ $$ = $2; }
-	;
-
-typedef_parameter_array:
-	typedef array_parameter_dimension
-		{ $$ = $1->addArray( $2 ); }
-	| '(' typedef_parameter_ptr ')' array_parameter_dimension
-		{ $$ = $2->addArray( $4 ); }
-	;
-
-typedef_parameter_function:
-	typedef '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $1->addParamList( $4 ); }
-	| '(' typedef_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $2->addParamList( $6 ); }
-	;
-
-/* This pattern parses a declaration of an abstract variable or function prototype, i.e., there is no
-   identifier to which the type applies, e.g.:
-
-	sizeof( int );
-	sizeof( int [10] );
-
-   The pattern precludes declaring an array of functions versus a pointer to an array of functions, and
-   returning arrays and functions versus pointers to arrays and functions. */
-
-abstract_declarator:
-	abstract_ptr
-	| abstract_array attribute_list_opt
-	| abstract_function attribute_list_opt
-	;
-
-abstract_ptr:
-	'*'
-		{ $$ = DeclarationNode::newPointer( 0, $1.filename, $1.lineno ); }
-	| '*' type_qualifier_list
-		{ $$ = DeclarationNode::newPointer( $2, $1.filename, $1.lineno ); }
-	| '*' abstract_declarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0, $1.filename, $1.lineno ) ); }
-	| '*' type_qualifier_list abstract_declarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2, $1.filename, $1.lineno ) ); }
-	| '(' abstract_ptr ')'
-		{ $$ = $2; }
-	;
-
-abstract_array:
-	array_dimension
-	| '(' abstract_ptr ')' array_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' abstract_array ')' multi_array_dimension	/* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' abstract_array ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-abstract_function:
-	'(' push parameter_type_list_opt pop ')'	/* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = DeclarationNode::newFunction( 0, 0, $3, 0 ); }
-	| '(' abstract_ptr ')' '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $2->addParamList( $6 ); }
-	| '(' abstract_function ')'			/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-array_dimension:
-		/* Only the first dimension can be empty. */
-	'[' push pop ']'
-		{ $$ = DeclarationNode::newArray( 0, 0, false ); }
-	| '[' push pop ']' multi_array_dimension
-		{ $$ = DeclarationNode::newArray( 0, 0, false )->addArray( $5 ); }
-	| multi_array_dimension
-	;
-
-multi_array_dimension:
-	'[' push assignment_expression pop ']'
-		{ $$ = DeclarationNode::newArray( $3, 0, false ); }
-	| '[' push '*' pop ']'				/* ANSI99 */
-		{ $$ = DeclarationNode::newVarArray( 0 ); }
-	| multi_array_dimension '[' push assignment_expression pop ']'
-		{ $$ = $1->addArray( DeclarationNode::newArray( $4, 0, false ) ); }
-	| multi_array_dimension '[' push '*' pop ']'	/* ANSI99 */
-		{ $$ = $1->addArray( DeclarationNode::newVarArray( 0 ) ); }
-	;
-
-/* This pattern parses a declaration of a parameter abstract variable or function prototype, i.e., there is no
-   identifier to which the type applies, e.g.:
-
-	int f( int );		// abstract variable parameter; no parameter name specified
-	int f( int (int) );	// abstract function-prototype parameter; no parameter name specified
-
-   The pattern precludes declaring an array of functions versus a pointer to an array of functions, and
-   returning arrays and functions versus pointers to arrays and functions. */
-
-abstract_parameter_declarator:
-	abstract_parameter_ptr
-	| abstract_parameter_array attribute_list_opt
-	| abstract_parameter_function attribute_list_opt
-	;
-
-abstract_parameter_ptr:
-	'*'
-		{ $$ = DeclarationNode::newPointer( 0 ); }
-	| '*' type_qualifier_list
-		{ $$ = DeclarationNode::newPointer( $2 ); }
-	| '*' abstract_parameter_declarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
-	| '*' type_qualifier_list abstract_parameter_declarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
-	| '(' abstract_parameter_ptr ')'
-		{ $$ = $2; }
-	;
-
-abstract_parameter_array:
-	array_parameter_dimension
-	| '(' abstract_parameter_ptr ')' array_parameter_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' abstract_parameter_array ')' multi_array_dimension /* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' abstract_parameter_array ')'		/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-abstract_parameter_function:
-	'(' push parameter_type_list_opt pop ')'	/* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = DeclarationNode::newFunction( 0, 0, $3, 0 ); }
-	| '(' abstract_parameter_ptr ')' '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $2->addParamList( $6 ); }
-	| '(' abstract_parameter_function ')'		/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-array_parameter_dimension:
-		/* Only the first dimension can be empty or have qualifiers. */
-	array_parameter_1st_dimension
-	| array_parameter_1st_dimension multi_array_dimension
-		{ $$ = $1->addArray( $2 ); }
-	| multi_array_dimension
-	;
-
-/* The declaration of an array parameter has additional syntax over arrays in normal variable declarations:
-
-	ISO/IEC 9899:1999 Section 6.7.5.2(1) : "The optional type qualifiers and the keyword static shall
-	appear only in a declaration of a function parameter with an array type, and then only in the
-	outermost array type derivation."
-   */
-
-array_parameter_1st_dimension:
-	'[' push pop ']'
-		{ $$ = DeclarationNode::newArray( 0, 0, false ); }
-	| '[' push type_qualifier_list '*' pop ']'	/* remaining ANSI99 */
-		{ $$ = DeclarationNode::newVarArray( $3 ); }
-	| '[' push type_qualifier_list assignment_expression pop ']'
-		{ $$ = DeclarationNode::newArray( $4, $3, false ); }
-	| '[' push STATIC assignment_expression pop ']'
-		{ $$ = DeclarationNode::newArray( $4, 0, true ); }
-	| '[' push STATIC type_qualifier_list assignment_expression pop ']'
-		{ $$ = DeclarationNode::newArray( $5, $4, true ); }
-	;
-
-/* This pattern parses a declaration of an abstract variable, i.e., there is no identifier to which the type
-   applies, e.g.:
-
-	sizeof( int ); // abstract variable; no identifier name specified
-
-   The pattern precludes declaring an array of functions versus a pointer to an array of functions, and
-   returning arrays and functions versus pointers to arrays and functions. */
-
-variable_abstract_declarator:
-	variable_abstract_ptr
-	| variable_abstract_array attribute_list_opt
-	| variable_abstract_function attribute_list_opt
-	;
-
-variable_abstract_ptr:
-	'*'
-		{ $$ = DeclarationNode::newPointer( 0 ); }
-	| '*' type_qualifier_list
-		{ $$ = DeclarationNode::newPointer( $2 ); }
-	| '*' variable_abstract_declarator
-		{ $$ = $2->addPointer( DeclarationNode::newPointer( 0 ) ); }
-	| '*' type_qualifier_list variable_abstract_declarator
-		{ $$ = $3->addPointer( DeclarationNode::newPointer( $2 ) ); }
-	| '(' variable_abstract_ptr ')'
-		{ $$ = $2; }
-	;
-
-variable_abstract_array:
-	array_dimension
-	| '(' variable_abstract_ptr ')' array_dimension
-		{ $$ = $2->addArray( $4 ); }
-	| '(' variable_abstract_array ')' multi_array_dimension /* redundant parenthesis */
-		{ $$ = $2->addArray( $4 ); }
-	| '(' variable_abstract_array ')'		/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-variable_abstract_function:
-	'(' variable_abstract_ptr ')' '(' push parameter_type_list_opt pop ')' /* empty parameter list OBSOLESCENT (see 3) */
-		{ $$ = $2->addParamList( $6 ); }
-	| '(' variable_abstract_function ')'		/* redundant parenthesis */
-		{ $$ = $2; }
-	;
-
-/* This pattern parses a new-style declaration for a parameter variable or function prototype that is either
-   an identifier or typedef name and allows the ANSI99 array options, which can only appear in a parameter
-   list. */
-
-new_identifier_parameter_declarator_tuple:		/* CFA */
-	new_identifier_parameter_declarator_no_tuple
-	| new_abstract_tuple
-	| type_qualifier_list new_abstract_tuple
-		{ $$ = $2->addQualifiers( $1 ); }
-	;
-
-new_identifier_parameter_declarator_no_tuple:		/* CFA */
-	new_identifier_parameter_ptr
-	| new_identifier_parameter_array
-	;
-
-new_identifier_parameter_ptr:				/* CFA */
-	'*' type_specifier
-		{ $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
-	| type_qualifier_list '*' type_specifier
-		{ $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
-	| '*' new_abstract_function
-		{ $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
-	| type_qualifier_list '*' new_abstract_function
-		{ $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
-	| '*' new_identifier_parameter_declarator_tuple
-		{ $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
-	| type_qualifier_list '*' new_identifier_parameter_declarator_tuple
-		{ $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
-	;
-
-new_identifier_parameter_array:				/* CFA */
-		/* Only the first dimension can be empty or have qualifiers. Empty dimension must be factored
-		   out due to shift/reduce conflict with new-style empty (void) function return type. */
-	'[' push pop ']' type_specifier
-		{ $$ = $5->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
-	| new_array_parameter_1st_dimension type_specifier
-		{ $$ = $2->addNewArray( $1 ); }
-	| '[' push pop ']' multi_array_dimension type_specifier
-		{ $$ = $6->addNewArray( $5 )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
-	| new_array_parameter_1st_dimension multi_array_dimension type_specifier
-		{ $$ = $3->addNewArray( $2 )->addNewArray( $1 ); }
-	| multi_array_dimension type_specifier
-		{ $$ = $2->addNewArray( $1 ); }
-	| '[' push pop ']' new_identifier_parameter_ptr
-		{ $$ = $5->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
-	| new_array_parameter_1st_dimension new_identifier_parameter_ptr
-		{ $$ = $2->addNewArray( $1 ); }
-	| '[' push pop ']' multi_array_dimension new_identifier_parameter_ptr
-		{ $$ = $6->addNewArray( $5 )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
-	| new_array_parameter_1st_dimension multi_array_dimension new_identifier_parameter_ptr
-		{ $$ = $3->addNewArray( $2 )->addNewArray( $1 ); }
-	| multi_array_dimension new_identifier_parameter_ptr
-		{ $$ = $2->addNewArray( $1 ); }
-	;
-
-new_array_parameter_1st_dimension:
-	'[' push type_qualifier_list '*' pop ']'	/* remaining ANSI99 */
-		{ $$ = 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( $4, $3, true ); }
-	| '[' push declaration_qualifier_list type_qualifier_list assignment_expression pop ']'
-		{ $$ = DeclarationNode::newArray( $5, $4->addQualifiers( $3 ), true ); }
-	;
-
-/* This pattern parses a new-style declaration of an abstract variable or function prototype, i.e., there is
-   no identifier to which the type applies, e.g.:
-
-	[int] f( int );		// abstract variable parameter; no parameter name specified
-	[int] f( [int] (int) );	// abstract function-prototype parameter; no parameter name specified
-
-   These rules need LR(3):
-
-	new_abstract_tuple identifier_or_typedef_name
-	'[' new_parameter_list ']' identifier_or_typedef_name '(' new_parameter_type_list_opt ')'
-
-   since a function return type can be syntactically identical to a tuple type:
-
-	[int, int] t;
-	[int, int] f( int );
-
-   Therefore, it is necessary to look at the token after identifier_or_typedef_name to know when to reduce
-   new_abstract_tuple. To make this LR(1), several rules have to be flattened (lengthened) to allow
-   the necessary lookahead. To accomplish this, new_abstract_declarator has an entry point without tuple, and
-   tuple declarations are duplicated when appearing with new_function_specifier. */
-
-new_abstract_declarator_tuple:				/* CFA */
-	new_abstract_tuple
-	| type_qualifier_list new_abstract_tuple
-		{ $$ = $2->addQualifiers( $1 ); }
-	| new_abstract_declarator_no_tuple
-	;
-
-new_abstract_declarator_no_tuple:			/* CFA */
-	new_abstract_ptr
-	| new_abstract_array
-	;
-
-new_abstract_ptr:					/* CFA */
-	'*' type_specifier
-		{ $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
-	| type_qualifier_list '*' type_specifier
-		{ $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
-	| '*' new_abstract_function
-		{ $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
-	| type_qualifier_list '*' new_abstract_function
-		{ $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
-	| '*' new_abstract_declarator_tuple
-		{ $$ = $2->addNewPointer( DeclarationNode::newPointer( 0 ) ); }
-	| type_qualifier_list '*' new_abstract_declarator_tuple
-		{ $$ = $3->addNewPointer( DeclarationNode::newPointer( $1 ) ); }
-	;
-
-new_abstract_array:					/* CFA */
-		/* Only the first dimension can be empty. Empty dimension must be factored out due to
-		   shift/reduce conflict with empty (void) function return type. */
-	'[' push pop ']' type_specifier
-		{ $$ = $5->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
-	| '[' push pop ']' multi_array_dimension type_specifier
-		{ $$ = $6->addNewArray( $5 )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
-	| multi_array_dimension type_specifier
-		{ $$ = $2->addNewArray( $1 ); }
-	| '[' push pop ']' new_abstract_ptr
-		{ $$ = $5->addNewArray( DeclarationNode::newArray( 0, 0, false ) ) }
-	| '[' push pop ']' multi_array_dimension new_abstract_ptr
-		{ $$ = $6->addNewArray( $5 )->addNewArray( DeclarationNode::newArray( 0, 0, false ) ); }
-	| multi_array_dimension new_abstract_ptr
-		{ $$ = $2->addNewArray( $1 ); }
-	;
-
-new_abstract_tuple:					/* CFA */
-	'[' push new_abstract_parameter_list pop ']'
-		{ $$ = DeclarationNode::newTuple( $3 ); }
-	;
-
-new_abstract_function:					/* CFA */
-	'[' push pop ']' '(' new_parameter_type_list_opt ')'
-		{ $$ = DeclarationNode::newFunction( 0, DeclarationNode::newTuple( 0 ), $6, 0 ); }
-	| new_abstract_tuple '(' push new_parameter_type_list_opt pop ')'
-		{ $$ = DeclarationNode::newFunction( 0, $1, $4, 0 ); }
-	| new_function_return '(' push new_parameter_type_list_opt pop ')'
-		{ $$ = DeclarationNode::newFunction( 0, $1, $4, 0 ); }
-	;
-
-/* 1) ISO/IEC 9899:1999 Section 6.7.2(2) : "At least one type specifier shall be given in the declaration
-      specifiers in each declaration, and in the specifier-qualifier list in each structure declaration and
-      type name."
-
-   2) ISO/IEC 9899:1999 Section 6.11.5(1) : "The placement of a storage-class specifier other than at the
-      beginning of the declaration specifiers in a declaration is an obsolescent feature."
-
-   3) ISO/IEC 9899:1999 Section 6.11.6(1) : "The use of function declarators with empty parentheses (not
-      prototype-format parameter type declarators) is an obsolescent feature."
-
-   4) ISO/IEC 9899:1999 Section 6.11.7(1) : "The use of function definitions with separate parameter
-      identifier and declaration lists (not prototype-format parameter type and identifier declarators) is
-      an obsolescent feature."  */
-
-/************************* MISCELLANEOUS ********************************/
-
-comma_opt:						/* redundant comma */
-	/* empty */
-	| ','
-	;
-
-assignment_opt:
-	/* empty */
-		{ $$ = 0; }
-	| '=' assignment_expression
-		{ $$ = $2; }
-	;
-
-%%
-/* ----end of grammar----*/
-
-void yyerror(char *string) {
-    using std::cout;
-    using std::endl;
-    if( yyfilename ) {
-      cout << yyfilename << ":" << endl;
-    }
-    cout << yylineno << ": syntax error reading token " << *(yylval.str) << endl;
-}
-
-/* Local Variables: */
-/* fill-column: 110 */
-/* compile-command: "gmake" */
-/* End: */
Index: translator/Parser.old/lex.h
===================================================================
--- translator/Parser.old/lex.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: lex.h,v 1.1 2002/02/06 16:17:30 rcbilson Exp $
- *
- * Prototypes that enable Roskind's c5.y to compile with g++
- * Richard Bilson       5 Jan 2001
- *
- */
-
-#ifndef PARSER_LEX_H
-#define PARSER_LEX_H
-
-int yylex();
-void yyerror(char *);
-extern int yylineno;
-extern char *yyfilename;
-extern "C" {
-#include <malloc.h>
-}
-
-struct token
-{
-  std::string *str;
-  char *filename;
-  int lineno;
-};
-
-/* External declarations for information sharing between lexer and scanner */
-#include "TypedefTable.h"
-extern TypedefTable typedefTable;
-
-#endif // ifndef PARSER_LEX_H
Index: translator/Parser.old/lex.l
===================================================================
--- translator/Parser.old/lex.l	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,363 +1,0 @@
-/*                               -*- Mode: C -*- 
- * 
- * CForall Lexer Version 1.0, Copyright (C) Peter A. Buhr 2001 -- Permission is granted to copy this
- *	grammar and to use it within software systems.  THIS GRAMMAR IS PROVIDED "AS IS" AND WITHOUT
- *	ANY EXPRESS OR IMPLIED WARRANTIES.
- * 
- * lex.l -- 
- * 
- * Author           : Peter A. Buhr
- * Created On       : Sat Sep 22 08:58:10 2001
- * Last Modified By : Peter A. Buhr
- * Last Modified On : Thu Jan 23 16:17:09 2003
- * Update Count     : 191
- */
-
-%option yylineno
-
-%{
-/* This lexer assumes the program has been preprocessed by cpp. Hence, all user level preprocessor
-   directive have been performed and removed from the source. The only exceptions are preprocessor
-   directives passed to the compiler (e.g., line-number directives) and C/C++ style comments, which
-   are ignored. */
-
-/*************** Includes and Defines *****************************/
-
-#include <string>
-
-#include "ParseNode.h"
-#include "cfa.tab.h" /* YACC generated definitions based on C++ grammar */
-#include "lex.h"
-
-char *yyfilename;
-
-#define WHITE_RETURN(x)		/* do nothing */
-#define NEWLINE_RETURN()	WHITE_RETURN('\n')
-#define RETURN_VAL(x)		yylval.tok.str = new std::string(yytext); yylval.tok.file = yyfilename; yylval.tok.line = yylineno; return(x)
-
-#define KEYWORD_RETURN(x)	RETURN_VAL(x)		/* keyword */
-#define IDENTIFIER_RETURN()	RETURN_VAL((typedefTable.isIdentifier(yytext) ? IDENTIFIER : typedefTable.isTypedef(yytext) ? TYPEDEFname : TYPEGENname))
-
-#define ASCIIOP_RETURN()	RETURN_VAL((int)yytext[0]) /* single character operator */
-#define NAMEDOP_RETURN(x)	RETURN_VAL(x)		/* multichar operator, with a name */
-
-#define NUMERIC_RETURN(x)	rm_underscore(); RETURN_VAL(x) /* numeric constant */
-
-void rm_underscore() {					/* remove underscores in constant or escape sequence */
-    int j = 0;
-    for ( int i = 0; i < yyleng; i += 1 ) {
-	if ( yytext[i] != '_' ) {
-	    yytext[j] = yytext[i];
-	    j += 1;
-	} // if
-    } // for
-    yyleng = j;
-    yytext[yyleng] = '\0';
-}
-
-%}
-
-octal [0-7]
-nonzero [1-9]
-decimal [0-9]
-hex [0-9a-fA-F]
-
-	/* identifier, GCC: $ in identifier */
-universal_char "\\"((u{hex_quad})|(U{hex_quad}{2}))
-identifier ([a-zA-Z_$]|{universal_char})([0-9a-zA-Z_$]|{universal_char})*
-
-	/*  numeric constants, CFA: '_' in constant */
-hex_quad {hex}{4}
-integer_suffix "_"?(([uU][lL]?)|([uU]("ll"|"LL")?)|([lL][uU]?)|("ll"|"LL")[uU]?)
-
-octal_digits ({octal})|({octal}({octal}|"_")*{octal})
-octal_prefix "0""_"?
-octal_constant (("0")|({octal_prefix}{octal_digits})){integer_suffix}?
-
-nonzero_digits ({nonzero})|({nonzero}({decimal}|"_")*{decimal})
-decimal_constant {nonzero_digits}{integer_suffix}?
-
-hex_digits ({hex})|({hex}({hex}|"_")*{hex})
-hex_prefix "0"[xX]"_"?
-hex_constant {hex_prefix}{hex_digits}{integer_suffix}?
-
-decimal_digits ({decimal})|({decimal}({decimal}|"_")*{decimal})
-fractional_constant ({decimal_digits}?"."{decimal_digits})|({decimal_digits}".")
-exponent "_"?[eE]"_"?[+-]?{decimal_digits}
-floating_suffix "_"?[flFL]
-floating_constant (({fractional_constant}{exponent}?)|({decimal_digits}{exponent})){floating_suffix}?
-
-binary_exponent "_"?[pP]"_"?[+-]?{decimal_digits}
-hex_fractional_constant ({hex_digits}?"."{hex_digits})|({hex_digits}".")
-hex_floating_constant {hex_prefix}(({hex_fractional_constant}{binary_exponent})|({hex_digits}{binary_exponent})){floating_suffix}?
-
-	/* character escape sequence, GCC: \e => esc character */
-simple_escape "\\"[abefnrtv'"?\\]
-octal_escape "\\"{octal}{1,3}
-hex_escape "\\""x"{hex}+
-escape_seq {simple_escape}|{octal_escape}|{hex_escape}|{universal_char}
-
-	/* display/white-space characters */
-h_tab [\011]
-form_feed [\014]
-v_tab [\013]
-c_return [\015]
-h_white [ ]|{h_tab}
-
-	/* operators */
-op_unary_only "~"|"!"
-op_unary_binary "+"|"-"|"*"
-op_unary_pre_post "++"|"--"
-op_unary {op_unary_only}|{op_unary_binary}|{op_unary_pre_post}
-
-op_binary_only "/"|"%"|"^"|"&"|"|"|"<"|">"|"="|"=="|"!="|"<<"|">>"|"<="|">="|"+="|"-="|"*="|"/="|"%="|"&="|"|="|"^="|"<<="|">>="
-op_binary_over {op_unary_binary}|{op_binary_only}
-op_binary_not_over "?"|"->"|"&&"|"||"
-operator {op_unary_pre_post}|{op_binary_over}|{op_binary_not_over}
-
-%x COMMENT
-
-%%
-	/* line directives */
-^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["][^\n]*"\n" {
-	char *end_num;
-	char *begin_string, *end_string;
-	char *filename;
-	long lineno, length;
-	lineno = strtol( yytext + 1, &end_num, 0 );
-	begin_string = strchr( end_num, '"' );
-	if( begin_string ) {
-	  end_string = strchr( begin_string + 1, '"' );
-	  if( end_string ) {
-	    length = end_string - begin_string - 1;
-	    filename = new char[ length + 1 ];
-	    memcpy( filename, begin_string + 1, length );
-	    filename[ length ] = '\0';
-	    //std::cout << "file " << filename << " line " << lineno << std::endl;
-	    yylineno = lineno;
-	    yyfilename = filename;
-	  }
-	}
-}
-
-	/* ignore preprocessor directives (for now) */
-^{h_white}*"#"[^\n]*"\n" ;
-
-	/* ignore C style comments */
-"/*"			{BEGIN COMMENT;}
-<COMMENT>.|\n		;
-<COMMENT>"*/"		{BEGIN 0;}
-
-	/* ignore C++ style comments */
-"//"[^\n]*"\n"		;
-
-	/* ignore whitespace */
-{h_white}+		{WHITE_RETURN(' ');}
-({v_tab}|{c_return}|{form_feed})+ {WHITE_RETURN(' ');}
-({h_white}|{v_tab}|{c_return}|{form_feed})*"\n" {NEWLINE_RETURN();}
-
-	/* keywords */
-__alignof		{KEYWORD_RETURN(ALIGNOF);}	/* GCC */
-__alignof__		{KEYWORD_RETURN(ALIGNOF);}	/* GCC */
-asm			{KEYWORD_RETURN(ASM);}
-__asm			{KEYWORD_RETURN(ASM);}		/* GCC */
-__asm__			{KEYWORD_RETURN(ASM);}		/* GCC */
-__attribute		{KEYWORD_RETURN(ATTRIBUTE);}	/* GCC */
-__attribute__		{KEYWORD_RETURN(ATTRIBUTE);}	/* GCC */
-auto			{KEYWORD_RETURN(AUTO);}
-_Bool			{KEYWORD_RETURN(BOOL);}		/* ANSI99 */
-break			{KEYWORD_RETURN(BREAK);}
-case			{KEYWORD_RETURN(CASE);}
-catch			{KEYWORD_RETURN(CATCH);}	/* CFA */
-char			{KEYWORD_RETURN(CHAR);}
-choose			{KEYWORD_RETURN(CHOOSE);}
-_Complex		{KEYWORD_RETURN(COMPLEX);}	/* ANSI99 */
-__complex		{KEYWORD_RETURN(COMPLEX);}	/* GCC */
-__complex__		{KEYWORD_RETURN(COMPLEX);}	/* GCC */
-const			{KEYWORD_RETURN(CONST);}
-__const			{KEYWORD_RETURN(CONST);}	/* GCC */
-__const__		{KEYWORD_RETURN(CONST);}	/* GCC */
-context			{KEYWORD_RETURN(CONTEXT);}
-continue		{KEYWORD_RETURN(CONTINUE);}
-default			{KEYWORD_RETURN(DEFAULT);}
-do			{KEYWORD_RETURN(DO);}
-double			{KEYWORD_RETURN(DOUBLE);}
-dtype			{KEYWORD_RETURN(DTYPE);}
-else			{KEYWORD_RETURN(ELSE);}
-enum			{KEYWORD_RETURN(ENUM);}
-__extension__		{KEYWORD_RETURN(EXTENSION);}	/* GCC */
-extern			{KEYWORD_RETURN(EXTERN);}
-fallthru		{KEYWORD_RETURN(FALLTHRU);}
-float			{KEYWORD_RETURN(FLOAT);}
-for			{KEYWORD_RETURN(FOR);}
-forall			{KEYWORD_RETURN(FORALL);}
-fortran			{KEYWORD_RETURN(FORTRAN);}
-ftype			{KEYWORD_RETURN(FTYPE);}
-goto			{KEYWORD_RETURN(GOTO);}
-if			{KEYWORD_RETURN(IF);}
-_Imaginary		{KEYWORD_RETURN(IMAGINARY);}	/* ANSI99 */
-__imag			{KEYWORD_RETURN(IMAGINARY);}	/* GCC */
-__imag__		{KEYWORD_RETURN(IMAGINARY);}	/* GCC */
-inline			{KEYWORD_RETURN(INLINE);}	/* ANSI99 */
-__inline		{KEYWORD_RETURN(INLINE);}	/* GCC */
-__inline__		{KEYWORD_RETURN(INLINE);}	/* GCC */
-int			{KEYWORD_RETURN(INT);}
-__label__		{KEYWORD_RETURN(LABEL);}	/* GCC */
-long			{KEYWORD_RETURN(LONG);}
-lvalue			{KEYWORD_RETURN(LVALUE);}
-register		{KEYWORD_RETURN(REGISTER);}
-restrict		{KEYWORD_RETURN(RESTRICT);}	/* ANSI99 */
-__restrict		{KEYWORD_RETURN(RESTRICT);}	/* GCC */
-__restrict__		{KEYWORD_RETURN(RESTRICT);}	/* GCC */
-return			{KEYWORD_RETURN(RETURN);}
-short			{KEYWORD_RETURN(SHORT);}
-signed			{KEYWORD_RETURN(SIGNED);}
-__signed		{KEYWORD_RETURN(SIGNED);}	/* GCC */
-__signed__		{KEYWORD_RETURN(SIGNED);}	/* GCC */
-sizeof			{KEYWORD_RETURN(SIZEOF);}
-static			{KEYWORD_RETURN(STATIC);}
-struct			{KEYWORD_RETURN(STRUCT);}
-switch			{KEYWORD_RETURN(SWITCH);}
-throw			{KEYWORD_RETURN(THROW);}	/* CFA */
-try			{KEYWORD_RETURN(TRY);}		/* CFA */
-type			{KEYWORD_RETURN(TYPE);}
-typedef			{KEYWORD_RETURN(TYPEDEF);}
-typeof			{KEYWORD_RETURN(TYPEOF);}	/* GCC */
-__typeof		{KEYWORD_RETURN(TYPEOF);}	/* GCC */
-__typeof__		{KEYWORD_RETURN(TYPEOF);}	/* GCC */
-union			{KEYWORD_RETURN(UNION);}
-unsigned		{KEYWORD_RETURN(UNSIGNED);}
-void			{KEYWORD_RETURN(VOID);}
-volatile		{KEYWORD_RETURN(VOLATILE);}
-__volatile		{KEYWORD_RETURN(VOLATILE);}	/* GCC */
-__volatile__		{KEYWORD_RETURN(VOLATILE);}	/* GCC */
-while			{KEYWORD_RETURN(WHILE);}
-
-	/* identifier */
-{identifier}		{IDENTIFIER_RETURN();}
-
-	/* numeric constants */
-"0"			{NUMERIC_RETURN(ZERO);}		/* CFA */
-"1"			{NUMERIC_RETURN(ONE);}		/* CFA */
-{decimal_constant}	{NUMERIC_RETURN(INTEGERconstant);}
-{octal_constant}	{NUMERIC_RETURN(INTEGERconstant);}
-{hex_constant}		{NUMERIC_RETURN(INTEGERconstant);}
-{floating_constant}	{NUMERIC_RETURN(FLOATINGconstant);}
-{hex_floating_constant}	{NUMERIC_RETURN(FLOATINGconstant);}
-
-	/* character constant, allows empty value */
-"L"?[']([^'\\\n]|{escape_seq})*['] {RETURN_VAL(CHARACTERconstant);}
-
-	/* string constant */
-"L"?["]([^"\\\n]|{escape_seq})*["] {RETURN_VAL(STRINGliteral);}
-
-	/* punctuation */
-"["			{ASCIIOP_RETURN();}
-"]"			{ASCIIOP_RETURN();}
-"("			{ASCIIOP_RETURN();}
-")"			{ASCIIOP_RETURN();}
-"{"			{ASCIIOP_RETURN();}
-"}"			{ASCIIOP_RETURN();}
-","			{ASCIIOP_RETURN();}		/* also operator */
-":"			{ASCIIOP_RETURN();}
-";"			{ASCIIOP_RETURN();}
-"."			{ASCIIOP_RETURN();}		/* also operator */
-"..."			{NAMEDOP_RETURN(ELLIPSIS);}
-
-	/* alternative ANSI99 brackets, "<:" & "<:<:" handled by preprocessor */
-"<:"			{RETURN_VAL('[');}
-":>"			{RETURN_VAL(']');}
-"<%"			{RETURN_VAL('{');}
-"%>"			{RETURN_VAL('}');}
-
-	/* operators */
-"!"			{ASCIIOP_RETURN();}
-"+"			{ASCIIOP_RETURN();}
-"-"			{ASCIIOP_RETURN();}
-"*"			{ASCIIOP_RETURN();}
-"/"			{ASCIIOP_RETURN();}
-"%"			{ASCIIOP_RETURN();}
-"^"			{ASCIIOP_RETURN();}
-"~"			{ASCIIOP_RETURN();}
-"&"			{ASCIIOP_RETURN();}
-"|"			{ASCIIOP_RETURN();}
-"<"			{ASCIIOP_RETURN();}
-">"			{ASCIIOP_RETURN();}
-"="			{ASCIIOP_RETURN();}
-"?"			{ASCIIOP_RETURN();}
-
-"++"			{NAMEDOP_RETURN(ICR);}
-"--"			{NAMEDOP_RETURN(DECR);}
-"=="			{NAMEDOP_RETURN(EQ);}
-"!="			{NAMEDOP_RETURN(NE);}
-"<<"			{NAMEDOP_RETURN(LS);}
-">>"			{NAMEDOP_RETURN(RS);}
-"<="			{NAMEDOP_RETURN(LE);}
-">="			{NAMEDOP_RETURN(GE);}
-"&&"			{NAMEDOP_RETURN(ANDAND);}
-"||"			{NAMEDOP_RETURN(OROR);}
-"->"			{NAMEDOP_RETURN(ARROW);}
-"+="			{NAMEDOP_RETURN(PLUSassign);}
-"-="			{NAMEDOP_RETURN(MINUSassign);}
-"*="			{NAMEDOP_RETURN(MULTassign);}
-"/="			{NAMEDOP_RETURN(DIVassign);}
-"%="			{NAMEDOP_RETURN(MODassign);}
-"&="			{NAMEDOP_RETURN(ANDassign);}
-"|="			{NAMEDOP_RETURN(ORassign);}
-"^="			{NAMEDOP_RETURN(ERassign);}
-"<<="			{NAMEDOP_RETURN(LSassign);}
-">>="			{NAMEDOP_RETURN(RSassign);}
-
-	/* CFA, operator identifier */
-{op_unary}"?"		{IDENTIFIER_RETURN();}		/* unary */
-"?"({op_unary_pre_post}|"()"|"[?]") {IDENTIFIER_RETURN();}
-"?"{op_binary_over}"?"	{IDENTIFIER_RETURN();}		/* binary */
-	/*
-	  This rule handles ambiguous cases with operator identifiers, e.g., "int *?*?()", where the
-	  string "*?*?"  can be lexed as "*"/"?*?" or "*?"/"*?". Since it is common practise to put
-	  a unary operator juxtaposed to an identifier, e.g., "*i", users will be annoyed if they
-	  cannot do this with respect to operator identifiers. Even with this special hack, there
-	  are 5 general cases that cannot be handled. The first case is for the function-call
-	  identifier "?()":
-
-	  int * ?()();	// declaration: space required after '*'
-	  * ?()();	// expression: space required after '*'
-
-	  Without the space, the string "*?()" is ambiguous without N character look ahead; it
-	  requires scanning ahead to determine if there is a '(', which is the start of an
-	  argument/parameter list.
-
-	  The 4 remaining cases occur in expressions:
-
-	  i++?i:0;		// space required before '?'
-	  i--?i:0;		// space required before '?'
-	  i?++i:0;		// space required after '?'
-	  i?--i:0;		// space required after '?'
-
-	  In the first two cases, the string "i++?" is ambiguous, where this string can be lexed as
-	  "i"/"++?" or "i++"/"?"; it requires scanning ahead to determine if there is a '(', which
-	  is the start of an argument list.  In the second two cases, the string "?++x" is
-	  ambiguous, where this string can be lexed as "?++"/"x" or "?"/"++x"; it requires scanning
-	  ahead to determine if there is a '(', which is the start of an argument list.
-	*/
-{op_unary}"?"(({op_unary_pre_post}|"[?]")|({op_binary_over}"?")) {
-			    // 1 or 2 character unary operator ?
-			    int i = yytext[1] == '?' ? 1 : 2;
-			    yyless( i );		/* put back characters up to first '?' */
-			    if ( i > 1 ) {
-				NAMEDOP_RETURN( yytext[0] == '+' ? ICR : DECR );
-			    } else {
-				ASCIIOP_RETURN();
-			    } // if
-			}
-
-	/* unknown characters */
-.			{printf("unknown character(s):\"%s\" on line %d\n", yytext, yylineno);}
-
-%%
-
-
-/* Local Variables: */
-/* fill-column: 100 */
-/* compile-command: "gmake" */
-/* End: */
Index: translator/Parser.old/lex.yy.cc
===================================================================
--- translator/Parser.old/lex.yy.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,3070 +1,0 @@
-#line 2 "Parser/lex.yy.cc"
-/* A lexical scanner generated by flex */
-
-/* Scanner skeleton version:
- * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-#include <unistd.h>
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else	/* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif	/* __STDC__ */
-#endif	/* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index.  If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition.  This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state.  The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator).  This
- * avoids problems with code like:
- *
- * 	if ( condition_holds )
- *		yyless( 5 );
- *	else
- *		do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		*yy_cp = yy_hold_char; \
-		YY_RESTORE_YY_MORE_OFFSET \
-		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
-		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
-		} \
-	while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
-
-	int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
-	/* When an EOF's been seen but there's still some text to process
-	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
-	 * shouldn't try reading from the input source any more.  We might
-	 * still have a bunch of tokens to match, though, because of
-	 * possible backing-up.
-	 *
-	 * When we actually see the EOF, we change the status to "new"
-	 * (via yyrestart()), so that the user can continue scanning by
-	 * just pointing yyin at a new input file.
-	 */
-#define YY_BUFFER_EOF_PENDING 2
-	};
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars;		/* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1;		/* whether we need to initialize */
-static int yy_start = 0;	/* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin.  A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_is_interactive = is_interactive; \
-	}
-
-#define yy_set_bol(at_bol) \
-	{ \
-	if ( ! yy_current_buffer ) \
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
-	yy_current_buffer->yy_at_bol = at_bol; \
-	}
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-
-#define YY_USES_REJECT
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern int yylineno;
-int yylineno = 1;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
-	yytext_ptr = yy_bp; \
-	yyleng = (int) (yy_cp - yy_bp); \
-	yy_hold_char = *yy_cp; \
-	*yy_cp = '\0'; \
-	yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 150
-#define YY_END_OF_BUFFER 151
-static yyconst short int yy_acclist[636] =
-    {   0,
-      151,  149,  150,    7,  149,  150,    9,  150,    8,  149,
-      150,  110,  149,  150,  149,  150,   85,  149,  150,  115,
-      149,  150,  118,  149,  150,  149,  150,   97,  149,  150,
-       98,  149,  150,  113,  149,  150,  111,  149,  150,  101,
-      149,  150,  112,  149,  150,  104,  149,  150,  114,  149,
-      150,   86,   89,  149,  150,   87,   88,  149,  150,   88,
-      149,  150,  102,  149,  150,  103,  149,  150,  120,  149,
-      150,  122,  149,  150,  121,  149,  150,  123,  149,  150,
-       85,  149,  150,   95,  149,  150,  149,  150,   96,  149,
-      150,  116,  149,  150,   85,  149,  150,   85,  149,  150,
-
-       85,  149,  150,   85,  149,  150,   85,  149,  150,   85,
-      149,  150,   85,  149,  150,   85,  149,  150,   85,  149,
-      150,   85,  149,  150,   85,  149,  150,   85,  149,  150,
-       85,  149,  150,   85,  149,  150,   85,  149,  150,   85,
-      149,  150,   99,  149,  150,  119,  149,  150,  100,  149,
-      150,  117,  149,  150,    7,  149,  150,  149,  150,    4,
-      150,    4,  150,    7,    9,    8,  127,  145,   94,   85,
-      139,  109,  132,  140,   93,  137,  124,  135,  125,  136,
-      134,   91,    3,  138,   91,   89,   89,   89,   89,   88,
-       88,   88,   88,  107,  108,  106,  128,  130,  126,  131,
-
-      129,  142,   85,   85,   85,   85,   85,   85,   85,   85,
-       85,   85,   85,   33,   85,   85,   85,   85,   85,   85,
-       85,   85,   85,   85,   47,   85,   85,   85,   85,   85,
-       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
-      141,  133,    7,    2,    5,  105,   91,   91,    6,   89,
-       91,   89,   89,   89,   89,   90,   88,   88,   88,   88,
-      143,  144,  147,  146,   85,   85,   85,   85,   85,   85,
-       85,   85,   85,   85,   85,   85,   12,   85,   85,   85,
-       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
-       85,   85,   85,   42,   85,   85,   85,   85,   54,   85,
-
-       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
-       85,   85,   72,   85,   85,   85,   85,   85,   85,   85,
-      148,   91,   91,   89,   89,   90,   90,   90,   90,   88,
-       88,   85,   85,   85,   85,   85,   85,   85,   85,   85,
-       85,   85,   85,   85,   85,   85,   17,   85,   85,   20,
-       85,   85,   22,   85,   85,   85,   85,   85,   85,   85,
-       36,   85,   37,   85,   85,   85,   85,   85,   85,   85,
-       46,   85,   85,   56,   85,   85,   85,   85,   85,   85,
-       85,   85,   85,   85,   85,   85,   73,   85,   85,   85,
-       80,   85,   85,   85,   91,   90,   90,   92,   90,   90,
-
-       18,   85,   85,   85,   85,   13,   85,   85,   85,   85,
-       85,   85,   85,   85,   85,   85,   85,   85,   19,   85,
-       21,   85,   85,   27,   85,   85,   85,   85,   85,   35,
-       85,   85,   85,   41,   85,   85,   85,   45,   85,   85,
-       85,   85,   85,   85,   63,   85,   85,   85,   85,   85,
-       85,   71,   85,   85,   85,   78,   85,   85,   85,   84,
-       85,   92,   90,   92,   92,   90,   85,   85,   85,   85,
-       85,   85,   85,   85,   85,   49,   85,   85,   85,   85,
-       85,   85,   85,   23,   85,   85,   85,   85,   34,   85,
-       39,   85,   85,   43,   85,   85,   51,   85,   57,   85,
-
-       85,   85,   62,   85,   64,   85,   67,   85,   68,   85,
-       69,   85,   70,   85,   85,   75,   85,   85,   85,    1,
-        2,   92,   85,   85,   85,   14,   85,   85,   85,   28,
-       85,   85,   85,   85,   85,   85,   85,   85,   85,   30,
-       85,   85,   32,   85,   85,   44,   85,   85,   85,   74,
-       85,   85,   85,   24,   85,   85,   85,   85,   85,   85,
-       85,   50,   85,   52,   85,   85,   85,   65,   85,   76,
-       85,   85,   31,   85,   40,   85,   58,   85,   59,   85,
-       79,   85,   81,   85,   85,   10,   85,   85,   25,   85,
-       29,   85,   85,   85,   55,   85,   85,   85,   85,   85,
-
-       48,   85,   85,   85,   85,   85,   53,   85,   60,   85,
-       66,   85,   77,   85,   82,   85,   11,   85,   15,   85,
-       26,   85,   85,   85,   85,   85,   85,   61,   85,   83,
-       85,   16,   85,   38,   85
-    } ;
-
-static yyconst short int yy_accept[619] =
-    {   0,
-        1,    1,    1,    1,    1,    2,    4,    7,    9,   12,
-       15,   17,   20,   23,   26,   28,   31,   34,   37,   40,
-       43,   46,   49,   52,   56,   60,   63,   66,   69,   72,
-       75,   78,   81,   84,   87,   89,   92,   95,   98,  101,
-      104,  107,  110,  113,  116,  119,  122,  125,  128,  131,
-      134,  137,  140,  143,  146,  149,  152,  155,  158,  160,
-      162,  164,  165,  166,  166,  167,  168,  169,  169,  170,
-      170,  171,  171,  172,  173,  174,  175,  175,  176,  176,
-      177,  178,  179,  180,  181,  182,  182,  183,  184,  184,
-      185,  186,  187,  187,  187,  188,  189,  189,  189,  190,
-
-      191,  192,  193,  193,  194,  195,  196,  197,  198,  199,
-      200,  201,  202,  202,  202,  202,  202,  202,  202,  202,
-      202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
-      202,  203,  204,  205,  206,  207,  208,  209,  210,  211,
-      212,  213,  214,  216,  217,  218,  219,  220,  221,  222,
-      223,  224,  225,  227,  228,  229,  230,  231,  232,  233,
-      234,  235,  236,  237,  238,  239,  240,  241,  242,  243,
-      244,  244,  244,  244,  245,  245,  246,  246,  246,  246,
-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,
-      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,
-
-      247,  248,  248,  249,  249,  249,  250,  250,  251,  251,
-      251,  251,  252,  252,  253,  254,  255,  256,  256,  257,
-      257,  257,  258,  259,  260,  261,  261,  262,  263,  263,
-      264,  265,  265,  265,  265,  265,  265,  266,  267,  268,
-      269,  270,  271,  272,  273,  274,  275,  276,  277,  279,
-      280,  281,  282,  283,  284,  285,  286,  287,  288,  289,
-      290,  291,  292,  293,  294,  296,  297,  298,  299,  301,
-      302,  303,  304,  305,  306,  307,  308,  309,  310,  311,
-      312,  313,  315,  316,  317,  318,  319,  320,  321,  321,
-      321,  321,  322,  322,  322,  322,  322,  322,  322,  322,
-
-      322,  322,  322,  322,  322,  322,  322,  323,  323,  323,
-      323,  324,  324,  325,  326,  326,  326,  327,  328,  328,
-      329,  329,  330,  331,  332,  332,  332,  333,  334,  335,
-      336,  337,  338,  339,  340,  341,  342,  343,  344,  345,
-      346,  347,  349,  350,  352,  353,  355,  356,  357,  358,
-      359,  360,  361,  363,  365,  366,  367,  368,  369,  370,
-      371,  373,  374,  376,  377,  378,  379,  380,  381,  382,
-      383,  384,  385,  386,  387,  389,  390,  391,  393,  394,
-      395,  395,  395,  395,  395,  395,  395,  395,  395,  395,
-      395,  395,  396,  396,  396,  396,  396,  396,  396,  397,
-
-      398,  398,  399,  399,  400,  401,  401,  401,  401,  403,
-      404,  405,  406,  408,  409,  410,  411,  412,  413,  414,
-      415,  416,  417,  418,  419,  421,  423,  424,  426,  427,
-      428,  429,  430,  432,  433,  434,  436,  437,  438,  440,
-      441,  442,  443,  444,  445,  447,  448,  449,  450,  451,
-      452,  454,  455,  456,  458,  459,  460,  462,  462,  462,
-      462,  462,  462,  462,  462,  462,  462,  463,  463,  463,
-      464,  465,  466,  466,  467,  467,  468,  469,  470,  471,
-      472,  473,  474,  475,  476,  478,  479,  480,  481,  482,
-      483,  484,  486,  487,  488,  489,  491,  493,  494,  496,
-
-      497,  499,  501,  502,  503,  505,  507,  509,  511,  513,
-      515,  516,  518,  519,  520,  520,  522,  522,  522,  522,
-      522,  522,  523,  523,  523,  523,  524,  525,  526,  528,
-      529,  530,  532,  533,  534,  535,  536,  537,  538,  539,
-      540,  542,  543,  545,  546,  548,  549,  550,  552,  553,
-      554,  554,  554,  554,  554,  554,  556,  557,  558,  559,
-      560,  561,  562,  564,  566,  567,  568,  570,  572,  573,
-      575,  577,  579,  581,  583,  585,  585,  585,  585,  585,
-      586,  588,  589,  591,  593,  594,  595,  597,  598,  599,
-      600,  601,  601,  601,  601,  603,  604,  605,  606,  607,
-
-      609,  611,  613,  615,  617,  619,  621,  623,  624,  625,
-      626,  627,  628,  630,  632,  634,  636,  636
-    } ;
-
-static yyconst int yy_ec[256] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
-        4,    5,    6,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    7,    8,    9,   10,   11,   12,   13,   14,   15,
-       16,   17,   18,   19,   20,   21,   22,   23,   24,   25,
-       25,   25,   25,   25,   25,   26,   26,   27,   28,   29,
-       30,   31,   32,    1,   33,   34,   35,   33,   36,   37,
-       11,   11,   38,   11,   11,   39,   11,   11,   11,   40,
-       11,   11,   11,   11,   41,   11,   11,   42,   11,   11,
-       43,   44,   45,   46,   47,    1,   48,   49,   50,   51,
-
-       52,   53,   54,   55,   56,   11,   57,   58,   59,   60,
-       61,   62,   11,   63,   64,   65,   66,   67,   68,   69,
-       70,   71,   72,   73,   74,   75,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1
-    } ;
-
-static yyconst int yy_meta[76] =
-    {   0,
-        1,    1,    2,    1,    1,    1,    1,    1,    3,    1,
-        4,    1,    1,    3,    1,    1,    1,    1,    1,    1,
-        5,    1,    6,    6,    6,    7,    1,    1,    1,    1,
-        1,    3,    7,    7,    7,    7,    7,    4,    8,    9,
-       10,    4,    1,   11,    1,    1,   12,    6,    6,    7,
-        7,    6,    6,    4,    4,    4,    4,    8,    4,   11,
-        4,    9,   11,    4,   11,   10,   11,    4,   11,    4,
-        4,    1,    1,    1,    1
-    } ;
-
-static yyconst short int yy_base[678] =
-    {   0,
-        0,   74, 1651, 1650, 1666, 1669,   83, 1669,   89,   47,
-       69, 1621,   52,   67,   84, 1669, 1669,   69,   82, 1669,
-       85,   83,  101,  111,  160,    0, 1633, 1669,  112, 1633,
-       72,  219,  111, 1669,   78, 1669, 1632,  126,   82,   66,
-      101,  107,  131,  144,   77,  134,  149,   78,  189,  127,
-       67,   96,   99, 1669,  103, 1669, 1629,  218,  244, 1669,
-     1638,  269, 1669,  275,  281, 1669,  285,  170, 1669,  271,
-     1615,  163, 1669, 1669, 1669, 1669,  151, 1669,  276, 1669,
-     1626, 1669, 1625, 1669, 1669, 1635,  296, 1669, 1652, 1669,
-      327,  336,  346,  366,  172,  159,  209,  371,  194,    0,
-
-      225,  201,  378,  268, 1669, 1669, 1669, 1624, 1669, 1669,
-     1669, 1623, 1622,  176,  223, 1635,  231,  293,  309,  274,
-      379,  278,  325, 1618,  306,  314,  280,  333,    0,    0,
-     1669,  269,  355,  199,  376,  329,  356,  122,  383,  394,
-      159,  274,  321,  387,  371,  401,  389,  318,  402,  405,
-      406,  407, 1605,  408,  362,  412,  415,  409,  417,  414,
-      430,  420,  421,  431,  434,  438,  441, 1669, 1669,  497,
-      503, 1645,  509, 1669,  515, 1669, 1617,  457,  483,  489,
-      512,  516,  493,  520,  513,  523, 1614,  526,  527,  538,
-        0,    0,    0,    0,    0,  546,    0,    0,    0, 1669,
-
-      541,  561, 1669,  577, 1642, 1669,  559,    0,  595,  602,
-      549,  620,  640,  443, 1669, 1605, 1585,    0,  629,  562,
-      656,  454, 1669, 1603, 1583,  660, 1669, 1669, 1608, 1669,
-     1669,  559,  574, 1594,    0,    0,  470,  548,  589,  644,
-      507,  553,  596,  604,  571,  595,  627,  628, 1594,  631,
-      646,  649,  331,  633,  654,  655,  656,  561,  661,  662,
-      666,  669,  668,  674,  680,  667,  672,  618, 1593,  673,
-      686,  687,  688,  690,  691,  448,  694,  692,  693,  695,
-      697, 1592,  696,  703,  705,  711,  719,  707,  766,  763,
-     1603, 1669,  720,  744, 1589,  761,    0,    0,  797,    0,
-
-        0,  757,    0,    0,  837,  764,  771,  789,  812,  829,
-      854,  871, 1669, 1669,  764,  852,  881,  759,  880,  744,
-      756,  798, 1669, 1669,    0,    0,  734,  755,  813,  735,
-      783,  775,  784,  865,  821,  824,  867,  869,  871,  822,
-      873, 1589,  875, 1588,  879, 1587,  882,  891,  892,  893,
-      894,  831, 1586, 1585,  897,  896,  898,  906,  905,  901,
-     1584,  907, 1583,  910,  911,  914,  918,  913,  921,  922,
-      926,  930,  935,  925,  940,  927,  942, 1582,  944,  945,
-      989,  963,    0,    0,    0,    0,    0,  976,    0,    0,
-        0,  979,  988,  998,  968, 1024,  989,  955,  953, 1669,
-
-     1029, 1033, 1042, 1586, 1566, 1042,    0,    0, 1579, 1017,
-      984,  956,  987, 1025, 1030, 1020, 1033,  989, 1034, 1035,
-     1029, 1049, 1051, 1053, 1578, 1577, 1054, 1576, 1052, 1055,
-     1058, 1061, 1575, 1063, 1067, 1574, 1066, 1070, 1573, 1068,
-     1073, 1075, 1082, 1083, 1572,  955,  588, 1084, 1085, 1086,
-     1571, 1087, 1089, 1570, 1088, 1091, 1569, 1609,    0,    0,
-        0,    0,    0,    0, 1128, 1132, 1137, 1146, 1097, 1669,
-     1154, 1669, 1163, 1669,    0, 1498, 1121, 1123, 1137, 1102,
-     1138, 1141, 1148, 1154, 1159, 1160, 1161, 1152, 1165, 1164,
-     1167, 1497, 1174, 1178, 1180, 1495, 1463, 1179, 1433, 1183,
-
-     1432, 1431, 1182, 1185, 1430, 1412, 1411, 1410, 1408, 1407,
-     1092, 1403, 1184, 1189, 1443, 1669,    0, 1221,    0,    0,
-     1217, 1225, 1229, 1233,    0, 1194, 1193, 1216, 1401, 1225,
-     1223, 1226, 1227, 1237, 1241, 1242, 1244, 1246, 1248, 1250,
-     1399, 1251, 1398, 1252, 1374, 1235, 1255, 1365, 1258, 1260,
-        0,    0,    0, 1290,    0, 1353, 1261, 1264, 1263, 1266,
-     1275, 1267, 1338, 1281, 1283, 1196, 1287, 1289, 1282, 1337,
-     1317, 1124, 1032,  995,  994,    0,    0,    0,    0, 1277,
-     1294, 1288, 1295,  814, 1299, 1301,  772, 1300, 1302, 1307,
-     1306,    0,    0,    0,  749, 1308, 1312, 1315, 1313,  698,
-
-     1319,  532,  493, 1323,  437, 1324,  324, 1325, 1330, 1331,
-     1332, 1336,  246,  198,  171,  123, 1669, 1383, 1395, 1404,
-     1416, 1428, 1438, 1447, 1458, 1466, 1473, 1475, 1477, 1479,
-     1481, 1483, 1485, 1487, 1489, 1491, 1493, 1496, 1503, 1505,
-     1512, 1519, 1521, 1523, 1525, 1527, 1529, 1531, 1538, 1540,
-     1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1563, 1570,
-     1572, 1574, 1576, 1578, 1580, 1582, 1584, 1586, 1588, 1590,
-     1592, 1594, 1596, 1598, 1600, 1602, 1604
-    } ;
-
-static yyconst short int yy_def[678] =
-    {   0,
-      617,    1,  618,  618,  617,  617,  617,  617,  617,  617,
-      619,  620,  617,  617,  621,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,   25,  617,  617,  617,  617,
-      617,  617,  620,  617,  617,  617,  617,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  617,  617,  617,  617,  617,  622,  617,
-      617,  617,  617,  617,  617,  617,  617,  619,  617,  623,
-      620,  617,  617,  617,  617,  617,  621,  617,  624,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  625,  617,
-      617,   24,  617,  617,  617,  617,  626,  617,  617,   25,
-
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  619,  621,  627,  628,
-      617,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  617,  617,  617,
-      622,  622,  622,  617,  622,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  619,
-      629,  630,  631,  632,  633,  621,  634,  635,  636,  617,
-
-      617,  617,  617,  617,  625,  617,  617,   92,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  637,  638,  626,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  639,  640,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  622,  641,
-      617,  617,  617,  617,  617,  619,  642,  643,  619,  644,
-
-      645,  621,  646,  647,  621,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  648,  637,  638,  617,  617,  617,
-      317,  617,  617,  617,  649,  650,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      641,  619,  651,  652,  299,  653,  654,  621,  655,  656,
-      305,  617,  617,  617,  648,  617,  648,  617,  617,  617,
-
-      617,  617,  617,  617,  617,  317,  657,  658,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  659,  660,  661,
-      662,  663,  664,  665,  617,  617,  617,  617,  648,  617,
-      617,  617,  617,  617,  666,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  659,  617,  667,  619,  668,  669,
-      621,  617,  617,  617,  670,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      671,  672,  673,  617,  674,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  675,  676,  677,  658,  620,
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  661,  663,  665,  620,  620,  620,  620,  620,  620,
-
-      620,  620,  620,  620,  620,  620,  620,  620,  620,  620,
-      620,  620,  620,  620,  620,  620,    0,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617
-    } ;
-
-static yyconst short int yy_nxt[1745] =
-    {   0,
-        6,    7,    8,    9,    9,    9,    7,   10,   11,    6,
-       12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
-       22,   23,   24,   25,   26,   26,   27,   28,   29,   30,
-       31,   32,   12,   12,   12,   12,   12,   12,   33,   12,
-       12,   12,   34,   35,   36,   37,   38,   39,   40,   41,
-       42,   43,   44,   45,   12,   46,   12,   47,   12,   12,
-       12,   12,   48,   49,   50,   51,   52,   53,   12,   12,
-       12,   54,   55,   56,   57,   58,   66,   69,   67,   75,
-       58,   73,   74,   59,   62,   63,   64,   64,   64,   62,
-       64,   63,   65,   65,   65,   64,   76,   78,   80,   81,
-
-       67,  111,  112,   86,   83,   87,   87,   87,   87,   72,
-       72,   82,   70,   67,   84,   85,   67,   88,  129,  127,
-       72,   72,   89,  106,  128,   72,  165,   79,  138,  157,
-       90,   91,  168,   92,   92,   92,   93,  152,  107,   72,
-      108,  109,   72,  130,   72,  136,   94,  137,  139,   95,
-       72,   96,   97,  167,   72,  140,  166,   98,  142,  132,
-      133,  141,   94,  134,   78,   72,   72,  143,   99,   72,
-       72,  144,  135,  251,   72,  169,   96,   72,   69,   97,
-       91,  162,  100,  100,  100,  100,  153,   72,  145,  163,
-      146,  148,   72,  154,   79,   94,  164,  216,  101,  147,
-
-      102,  149,   72,  194,  150,  229,  103,  230,  151,  155,
-      214,   94,  215,   70,   72,  156,  217,  104,  256,  170,
-       63,   64,   64,   64,  170,  102,  113,  171,  195,  218,
-      114,  115,   72,  116,  215,  117,  118,  215,  119,  224,
-      120,   72,   72,  158,  159,  173,  174,  121,  122,  123,
-      173,  214,  229,  160,  230,  220,  161,  239,  225,  215,
-      229,  124,  230,  222,  125,  223,  175,  175,  175,  175,
-       62,   63,   64,   64,   64,   62,   64,   63,   64,   64,
-       64,   64,   64,   63,   65,   65,   65,   64,   69,   72,
-      223,  126,  177,  190,  190,  190,  178,  179,  196,  196,
-
-      196,  180,  181,  229,  182,  230,  183,  229,  223,  230,
-      231,  191,   72,  184,  185,  186,  197,   72,  201,  201,
-      201,  201,  229,   70,  230,  222,  257,  187,  231,  237,
-      188,  202,  203,  223,  203,  229,  192,  230,  229,  193,
-      230,  198,  204,  229,  199,  230,   78,  202,  203,   87,
-       87,   87,   87,  203,  229,  233,  230,  189,  208,  208,
-      208,   72,  202,  203,   72,  203,   91,   72,   93,   93,
-       93,   93,   72,  207,   72,  263,   79,  617,  202,  203,
-      345,   94,  209,  211,  203,  211,  258,  249,  212,  212,
-      212,  212,  210,   92,   92,   92,   93,   94,   72,   72,
-
-      100,  100,  100,  100,  617,   72,   94,  232,  229,   95,
-      230,   96,  213,   94,   72,  238,  101,  221,  102,   72,
-      250,  270,   94,  240,  226,  241,   72,  242,   99,   94,
-       72,  243,   72,  244,  260,  104,   96,   72,  245,  246,
-      247,  254,  248,  102,   72,   72,  252,  253,   72,   72,
-       72,   72,   72,  262,  255,   72,  259,   72,   72,  271,
-       72,  278,  264,   72,   72,  268,  261,  265,  272,  275,
-      276,  267,  269,   72,   72,  266,  279,   72,  273,  274,
-       72,   72,  281,  313,   72,  280,  291,  277,  292,  284,
-      282,   72,  283,  286,  323,  287,  288,  285,  170,   63,
-
-       64,   64,   64,  170,  173,  174,  171,  369,  313,  173,
-      173,  174,  291,   72,  292,  173,  289,  174,  291,  323,
-      292,  289,  291,  290,  292,  175,  175,  175,  175,  292,
-      327,  175,  175,  175,  175,  292,   72,  175,  175,  175,
-      175,  291,  291,  292,  292,  291,   69,  292,  293,  291,
-       72,  292,  291,  294,  292,  291,  291,  292,  292,   78,
-      296,  296,  296,  201,  201,  201,  201,  333,  302,  302,
-      302,  212,  212,  212,  212,   72,  202,  203,  306,  203,
-      306,   70,  218,  307,  307,  307,  307,  204,  229,   79,
-      230,   72,  202,  203,  202,  203,   72,  203,  203,  201,
-
-      201,  201,  201,  229,   72,  230,  328,  308,  617,  351,
-      202,  203,  202,  203,   72,  203,  203,  208,  208,  208,
-       93,  334,  338,  309,   93,   93,   93,   93,  202,  203,
-       94,   72,   72,   95,  203,   96,  329,   94,   72,   72,
-      507,  310,  311,  311,  311,  311,   94,   72,  221,  316,
-      339,  337,   99,   94,  335,  336,  203,  211,  203,  211,
-       96,   72,  212,  212,  212,  212,  312,  318,  319,  320,
-       72,   72,  203,  362,   72,  321,   72,  203,   93,   93,
-       93,   93,  100,  100,  100,  100,  322,   72,  341,   72,
-      319,  342,   72,  343,  320,  346,  340,   72,   72,   72,
-
-      344,  330,  221,  350,   72,   72,  226,  331,  332,   72,
-       72,   72,   72,  353,  347,   72,   72,   72,  348,  349,
-      355,  357,  352,   72,  354,  356,  363,  358,  360,   72,
-       72,   72,  361,   72,   72,   72,   72,   72,   72,   72,
-       72,   72,  365,  364,  359,  370,   72,  375,   72,  291,
-       72,  292,  366,  368,   72,  367,  371,  374,  372,  373,
-      377,  378,   72,  376,  380,  174,  379,  289,  174,   69,
-       78,  172,  289,  291,  290,  292,  617,   72,   72,  388,
-      388,  388,  404,  382,  382,  382,  307,  307,  307,  307,
-      412,  409,   72,  392,  392,  392,  392,  399,   72,  400,
-
-       79,  405,  406,  396,   70,   69,  306,  203,  306,  203,
-      397,  307,  307,  307,  307,   72,  410,  393,   72,  385,
-      385,  385,  385,  203,  400,  396,   72,   72,  203,  385,
-      385,  385,  385,  385,  201,  201,  201,  201,  400,  414,
-       70,  413,  415,  416,  385,  385,  385,  385,  385,  385,
-       78,  208,  208,  208,   93,  399,   72,   72,  309,  391,
-      391,  391,  391,  400,   72,   72,  411,   72,  418,  391,
-      391,  391,  391,  391,   72,  310,  311,  311,  311,  311,
-       79,  419,  433,  423,  391,  391,  391,  391,  391,  391,
-      203,  396,  203,  311,  311,  311,  311,  401,  398,  401,
-
-      312,  316,  402,  402,  402,  402,  203,  203,   72,  203,
-       72,  203,   72,  396,   72,  420,   72,  394,   72,  318,
-      319,  320,   72,  203,  422,   72,  403,  321,  203,  417,
-      424,  425,  421,  426,   72,   72,   72,   72,  322,   72,
-       72,   72,  319,  429,   72,  427,  320,  430,   72,   72,
-       72,  432,  439,   72,   72,  428,   72,   72,  431,  434,
-      435,   72,  436,  437,   72,   72,  440,  438,   72,   72,
-       72,   69,  446,   72,  442,  441,  443,  445,   72,  449,
-      444,  448,  447,   72,  450,   72,  454,   72,   72,   78,
-      452,  174,  451,  470,  396,  455,  457,  458,   72,   72,
-
-      453,  392,  392,  392,  392,  506,   70,  396,  456,  479,
-      392,  392,  392,  392,  397,  203,  396,  203,  470,   79,
-      311,  311,  311,  311,  203,  393,  203,   72,  396,  396,
-       72,  203,   72,  480,  465,  469,  203,   72,   72,  478,
-      203,  466,  485,  466,  394,  203,  467,  467,  467,  467,
-      396,  402,  402,  402,  402,  471,  471,  471,  471,  401,
-       72,  401,  617,   72,  402,  402,  402,  402,   72,  472,
-      468,  472,   72,   72,  477,   72,   72,   72,   72,  473,
-      617,  617,  617,  483,  484,  472,  487,  481,  406,  486,
-      472,  482,   72,  488,   72,   72,   72,   72,   72,  617,
-
-      491,   72,  490,  617,   72,  492,   72,  617,  489,   72,
-       72,   72,  496,   72,  494,  495,   72,  500,   72,  501,
-      493,  498,  497,  499,  502,   72,   72,   72,   72,   72,
-       72,   72,   72,  508,   72,   72,  617,  504,  511,  503,
-      510,  512,  505,  469,  548,   72,  514,  513,  529,  509,
-      392,  392,  392,  392,  467,  467,  467,  467,  617,  522,
-      522,  522,  522,  466,   72,  466,   72,   72,  467,  467,
-      467,  467,  526,  472,  465,  472,  471,  471,  471,  471,
-       72,   72,  527,  523,   72,  471,  471,  471,  471,  472,
-      472,   72,  472,  530,  472,   72,  528,   72,  531,  472,
-
-      473,  472,   72,   72,   72,  534,  472,   72,   72,  524,
-       72,  472,  532,  533,  537,  472,  538,   72,  536,  535,
-      472,   72,   72,   72,  539,   72,   72,   72,   72,   69,
-       78,  540,   72,  546,  547,  549,   72,   72,  541,   72,
-      557,  544,  545,  542,  543,  588,  550,  522,  522,  522,
-      522,  522,  522,  522,  522,  471,  471,  471,  471,   72,
-       79,  472,  556,  472,   70,  472,   72,  472,   72,   72,
-       72,  523,  561,  559,  560,  554,  558,  472,   72,  524,
-       72,  472,  472,  563,   72,   72,  472,   72,  565,   72,
-      562,   72,  564,   72,   72,   72,  567,  572,   72,  566,
-
-      568,   72,  570,   72,   72,  569,   72,   72,  574,   72,
-       72,  575,  522,  522,  522,  522,  581,  571,   72,  573,
-       72,  584,  585,  580,   72,   72,   72,  586,  582,  587,
-       72,   72,   72,  589,  583,  590,  554,   72,   72,  591,
-      596,  598,   72,   72,   72,   72,  595,  600,  602,   72,
-       72,   72,  597,  603,  605,   72,   72,  604,   72,  599,
-       72,  607,   72,  606,  601,  609,   72,   72,   72,  610,
-      611,  612,  608,   72,   72,   72,  613,  614,  615,   72,
-       72,   72,  616,   60,   60,   60,   60,   60,   60,   60,
-       60,   60,   60,   60,   60,   68,   72,   68,   68,   68,
-
-       68,   68,   68,   68,   68,   68,   68,   71,   72,   71,
-       71,   71,   71,   71,   71,   71,   77,   72,   77,   77,
-       77,   77,   77,   77,   77,   77,   77,   77,  172,  172,
-      172,  172,  172,  172,  172,  172,  172,  172,  172,  172,
-       68,   72,   72,   68,   72,  516,   72,   68,   68,   77,
-       72,   72,   77,   72,   72,   72,   77,   77,  205,  205,
-      205,  205,  205,  205,  205,  205,  205,  205,  205,  205,
-      219,  219,  219,   72,   72,   72,   72,  219,  235,  235,
-      236,  236,  297,  297,  298,  298,  299,  299,  300,  300,
-      301,  301,  303,  303,  304,  304,  305,  305,  315,  315,
-
-      317,  317,  317,  317,  317,  317,   72,  317,  325,  325,
-      326,  326,  381,  381,  381,  381,  381,  381,  381,  381,
-      381,  381,  381,  381,  383,  383,  384,  384,  386,  386,
-      387,  387,  389,  389,  390,  390,  395,  395,   72,  395,
-       72,   72,  395,  407,  407,  408,  408,  459,  459,  460,
-      460,  461,  461,  462,  462,  463,  463,  464,  464,  475,
-      475,  476,  476,  515,  515,  515,  515,  515,  515,  515,
-      515,  515,  515,  515,  515,  517,  517,  518,  518,  519,
-      519,   71,   71,  520,  520,  521,  521,  525,  525,  551,
-      551,  552,  552,  553,  553,  555,  555,  576,  576,  577,
-
-      577,  578,  578,  579,  579,  592,  592,  593,  593,  594,
-      594,  516,   72,   72,   72,   72,   72,   72,   72,   72,
-       72,   72,   72,  474,  474,   72,   72,   72,   72,   72,
-       72,   72,   72,  292,  292,   72,   72,   72,  231,  230,
-      324,  324,  314,  314,  206,  295,  291,  174,   72,  234,
-      231,  229,  228,  227,  206,  200,   67,   67,   72,  176,
-       67,  131,  110,  105,   72,  617,   61,   61,    5,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617
-    } ;
-
-static yyconst short int yy_chk[1745] =
-    {   0,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    2,   10,   11,   10,   14,
-        2,   13,   13,    2,    7,    7,    7,    7,    7,    7,
-        9,    9,    9,    9,    9,    9,   14,   15,   18,   19,
-
-       18,   31,   31,   22,   21,   22,   22,   22,   22,   40,
-       51,   19,   11,   19,   21,   21,   21,   23,   35,   33,
-       45,   48,   23,   29,   33,   39,   51,   15,   40,   48,
-       23,   24,   55,   24,   24,   24,   24,   45,   29,   52,
-       29,   29,   53,   35,   41,   39,   24,   39,   41,   24,
-       42,   24,   24,   53,   33,   41,   52,   24,   42,   38,
-       38,   41,   24,   38,   77,  138,  616,   42,   24,   38,
-       50,   42,   38,  138,   43,   55,   24,   46,   68,   24,
-       25,   50,   25,   25,   25,   25,   46,   44,   43,   50,
-       43,   44,   47,   46,   77,   25,   50,   96,   25,   43,
-
-       25,   44,  141,   72,   44,  114,   25,  114,   44,   47,
-       95,   25,   95,   68,  615,   47,   96,   25,  141,   58,
-       58,   58,   58,   58,   58,   25,   32,   58,   72,   97,
-       32,   32,   49,   32,   99,   32,   32,   95,   32,  102,
-       32,  614,  134,   49,   49,   59,   59,   32,   32,   32,
-       59,   99,  115,   49,  115,   97,   49,  134,  102,   99,
-      117,   32,  117,  101,   32,  101,   59,   59,   59,   59,
-       62,   62,   62,   62,   62,   62,   64,   64,   64,   64,
-       64,   64,   65,   65,   65,   65,   65,   65,  127,  613,
-      101,   32,   67,   70,   70,   70,   67,   67,   79,   79,
-
-       79,   67,   67,  120,   67,  120,   67,  122,  104,  122,
-      118,   70,  132,   67,   67,   67,   79,  142,   87,   87,
-       87,   87,  118,  127,  118,  104,  142,   67,  119,  132,
-       67,   87,   87,  104,   87,  125,   70,  125,  119,   70,
-      119,   79,   87,  126,   79,  126,  128,   87,   87,   91,
-       91,   91,   91,   87,  123,  123,  123,   67,   92,   92,
-       92,  148,   91,   91,  143,   91,   93,  607,   93,   93,
-       93,   93,  136,   91,  253,  148,  128,   92,   91,   91,
-      253,   93,   92,   94,   91,   94,  143,  136,   94,   94,
-       94,   94,   93,   98,   98,   98,   98,   93,  133,  137,
-
-      103,  103,  103,  103,   92,  155,   98,  121,  121,   98,
-      121,   98,   94,  103,  145,  133,  103,   98,  103,  135,
-      137,  155,   98,  135,  103,  135,  139,  135,   98,  103,
-      144,  135,  147,  135,  145,  103,   98,  140,  135,  135,
-      135,  140,  135,  103,  146,  149,  139,  139,  150,  151,
-      152,  154,  158,  147,  140,  156,  144,  160,  157,  156,
-      159,  160,  149,  162,  163,  154,  146,  150,  157,  158,
-      159,  152,  154,  161,  164,  151,  160,  165,  157,  157,
-      605,  166,  162,  214,  167,  161,  178,  159,  178,  165,
-      163,  276,  164,  166,  222,  166,  167,  165,  170,  170,
-
-      170,  170,  170,  170,  171,  171,  170,  276,  214,  171,
-      173,  173,  179,  237,  179,  173,  175,  175,  180,  222,
-      180,  175,  183,  175,  183,  171,  171,  171,  171,  181,
-      237,  173,  173,  173,  173,  182,  603,  175,  175,  175,
-      175,  181,  185,  181,  185,  182,  190,  182,  184,  184,
-      241,  184,  186,  186,  186,  188,  189,  188,  189,  196,
-      190,  190,  190,  201,  201,  201,  201,  241,  196,  196,
-      196,  211,  211,  211,  211,  602,  201,  201,  202,  201,
-      202,  190,  220,  202,  202,  202,  202,  201,  232,  196,
-      232,  238,  201,  201,  207,  207,  242,  207,  201,  204,
-
-      204,  204,  204,  233,  258,  233,  238,  202,  220,  258,
-      207,  207,  204,  204,  245,  204,  207,  209,  209,  209,
-      209,  242,  245,  204,  210,  210,  210,  210,  204,  204,
-      209,  447,  239,  209,  204,  209,  239,  210,  246,  243,
-      447,  209,  212,  212,  212,  212,  209,  244,  210,  219,
-      246,  244,  209,  210,  243,  243,  212,  213,  212,  213,
-      209,  268,  213,  213,  213,  213,  212,  219,  219,  219,
-      247,  248,  212,  268,  250,  219,  254,  212,  221,  221,
-      221,  221,  226,  226,  226,  226,  219,  240,  248,  251,
-      219,  250,  252,  251,  219,  254,  247,  255,  256,  257,
-
-      252,  240,  221,  257,  259,  260,  226,  240,  240,  261,
-      266,  263,  262,  260,  255,  267,  270,  264,  256,  256,
-      262,  264,  259,  265,  261,  263,  270,  265,  266,  271,
-      272,  273,  267,  274,  275,  278,  279,  277,  280,  283,
-      281,  600,  272,  271,  265,  277,  284,  283,  285,  293,
-      288,  293,  273,  275,  286,  274,  278,  281,  279,  280,
-      285,  286,  287,  284,  288,  290,  287,  289,  289,  296,
-      302,  290,  289,  294,  289,  294,  321,  327,  330,  302,
-      302,  302,  320,  296,  296,  296,  306,  306,  306,  306,
-      330,  327,  595,  307,  307,  307,  307,  318,  328,  318,
-
-      302,  320,  321,  315,  296,  299,  308,  307,  308,  307,
-      315,  308,  308,  308,  308,  587,  328,  307,  332,  299,
-      299,  299,  299,  307,  318,  315,  331,  333,  307,  299,
-      299,  299,  299,  299,  309,  309,  309,  309,  322,  332,
-      299,  331,  333,  333,  299,  299,  299,  299,  299,  299,
-      305,  310,  310,  310,  310,  322,  329,  584,  309,  305,
-      305,  305,  305,  322,  335,  340,  329,  336,  335,  305,
-      305,  305,  305,  305,  352,  310,  311,  311,  311,  311,
-      305,  336,  352,  340,  305,  305,  305,  305,  305,  305,
-      311,  316,  311,  312,  312,  312,  312,  319,  316,  319,
-
-      311,  317,  319,  319,  319,  319,  311,  312,  334,  312,
-      337,  311,  338,  316,  339,  337,  341,  312,  343,  317,
-      317,  317,  345,  312,  339,  347,  319,  317,  312,  334,
-      341,  343,  338,  345,  348,  349,  350,  351,  317,  356,
-      355,  357,  317,  349,  360,  347,  317,  349,  359,  358,
-      362,  351,  360,  364,  365,  348,  368,  366,  350,  355,
-      356,  367,  357,  358,  369,  370,  362,  359,  374,  371,
-      376,  382,  369,  372,  365,  364,  366,  368,  373,  372,
-      367,  371,  370,  375,  373,  377,  376,  379,  380,  388,
-      375,  381,  374,  399,  398,  377,  380,  381,  446,  412,
-
-      375,  392,  392,  392,  392,  446,  382,  395,  379,  412,
-      393,  393,  393,  393,  395,  392,  398,  392,  399,  388,
-      394,  394,  394,  394,  393,  392,  393,  411,  397,  395,
-      413,  392,  418,  413,  393,  397,  392,  575,  574,  411,
-      393,  396,  418,  396,  394,  393,  396,  396,  396,  396,
-      397,  401,  401,  401,  401,  402,  402,  402,  402,  403,
-      410,  403,  406,  416,  403,  403,  403,  403,  414,  402,
-      396,  402,  421,  415,  410,  573,  417,  419,  420,  402,
-      406,  406,  406,  416,  417,  402,  420,  414,  406,  419,
-      402,  415,  422,  421,  423,  429,  424,  427,  430,  406,
-
-      424,  431,  423,  406,  432,  427,  434,  406,  422,  437,
-      435,  440,  432,  438,  430,  431,  441,  438,  442,  440,
-      429,  435,  434,  437,  441,  443,  444,  448,  449,  450,
-      452,  455,  453,  448,  456,  511,  469,  443,  452,  442,
-      450,  453,  444,  469,  511,  480,  456,  455,  480,  449,
-      465,  465,  465,  465,  466,  466,  466,  466,  469,  467,
-      467,  467,  467,  468,  477,  468,  478,  572,  468,  468,
-      468,  468,  477,  467,  465,  467,  471,  471,  471,  471,
-      479,  481,  478,  467,  482,  473,  473,  473,  473,  467,
-      471,  483,  471,  481,  467,  488,  479,  484,  482,  473,
-
-      471,  473,  485,  486,  487,  485,  471,  490,  489,  473,
-      491,  471,  483,  484,  488,  473,  489,  493,  487,  486,
-      473,  494,  498,  495,  490,  503,  500,  513,  504,  518,
-      521,  491,  514,  503,  504,  513,  527,  526,  493,  566,
-      527,  498,  500,  494,  495,  566,  514,  522,  522,  522,
-      522,  523,  523,  523,  523,  524,  524,  524,  524,  528,
-      521,  522,  526,  522,  518,  523,  531,  523,  530,  532,
-      533,  522,  532,  530,  531,  523,  528,  522,  546,  524,
-      534,  523,  522,  534,  535,  536,  523,  537,  536,  538,
-      533,  539,  535,  540,  542,  544,  538,  546,  547,  537,
-
-      539,  549,  542,  550,  557,  540,  559,  558,  549,  560,
-      562,  550,  554,  554,  554,  554,  558,  544,  561,  547,
-      580,  561,  562,  557,  564,  569,  565,  564,  559,  565,
-      567,  582,  568,  567,  560,  568,  554,  581,  583,  569,
-      581,  583,  585,  588,  586,  589,  580,  586,  589,  591,
-      590,  596,  582,  590,  596,  597,  599,  591,  598,  585,
-      571,  598,  601,  597,  588,  601,  604,  606,  608,  604,
-      606,  608,  599,  609,  610,  611,  609,  610,  611,  612,
-      570,  563,  612,  618,  618,  618,  618,  618,  618,  618,
-      618,  618,  618,  618,  618,  619,  556,  619,  619,  619,
-
-      619,  619,  619,  619,  619,  619,  619,  620,  548,  620,
-      620,  620,  620,  620,  620,  620,  621,  545,  621,  621,
-      621,  621,  621,  621,  621,  621,  621,  621,  622,  622,
-      622,  622,  622,  622,  622,  622,  622,  622,  622,  622,
-      623,  543,  541,  623,  529,  515,  512,  623,  623,  624,
-      510,  509,  624,  508,  507,  506,  624,  624,  625,  625,
-      625,  625,  625,  625,  625,  625,  625,  625,  625,  625,
-      626,  626,  626,  505,  502,  501,  499,  626,  627,  627,
-      628,  628,  629,  629,  630,  630,  631,  631,  632,  632,
-      633,  633,  634,  634,  635,  635,  636,  636,  637,  637,
-
-      638,  638,  638,  638,  638,  638,  497,  638,  639,  639,
-      640,  640,  641,  641,  641,  641,  641,  641,  641,  641,
-      641,  641,  641,  641,  642,  642,  643,  643,  644,  644,
-      645,  645,  646,  646,  647,  647,  648,  648,  496,  648,
-      492,  476,  648,  649,  649,  650,  650,  651,  651,  652,
-      652,  653,  653,  654,  654,  655,  655,  656,  656,  657,
-      657,  658,  658,  659,  659,  659,  659,  659,  659,  659,
-      659,  659,  659,  659,  659,  660,  660,  661,  661,  662,
-      662,  663,  663,  664,  664,  665,  665,  666,  666,  667,
-      667,  668,  668,  669,  669,  670,  670,  671,  671,  672,
-
-      672,  673,  673,  674,  674,  675,  675,  676,  676,  677,
-      677,  458,  457,  454,  451,  445,  439,  436,  433,  428,
-      426,  425,  409,  405,  404,  378,  363,  361,  354,  353,
-      346,  344,  342,  295,  291,  282,  269,  249,  234,  229,
-      225,  224,  217,  216,  205,  187,  177,  172,  153,  124,
-      116,  113,  112,  108,   89,   86,   83,   81,   71,   61,
-       57,   37,   30,   27,   12,    5,    4,    3,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617,  617,  617,  617,  617,  617,  617,
-      617,  617,  617,  617
-    } ;
-
-static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
-static char *yy_full_match;
-static int yy_lp;
-#define REJECT \
-{ \
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
-yy_cp = yy_full_match; /* restore poss. backed-over text */ \
-++yy_lp; \
-goto find_rule; \
-}
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "Parser/lex.l"
-#define INITIAL 0
-/*                               -*- Mode: C -*- 
- * 
- * CForall Lexer Version 1.0, Copyright (C) Peter A. Buhr 2001 -- Permission is granted to copy this
- *	grammar and to use it within software systems.  THIS GRAMMAR IS PROVIDED "AS IS" AND WITHOUT
- *	ANY EXPRESS OR IMPLIED WARRANTIES.
- * 
- * lex.l -- 
- * 
- * Author           : Peter A. Buhr
- * Created On       : Sat Sep 22 08:58:10 2001
- * Last Modified By : Peter A. Buhr
- * Last Modified On : Thu Jan 23 16:17:09 2003
- * Update Count     : 191
- */
-#line 19 "Parser/lex.l"
-/* This lexer assumes the program has been preprocessed by cpp. Hence, all user level preprocessor
-   directive have been performed and removed from the source. The only exceptions are preprocessor
-   directives passed to the compiler (e.g., line-number directives) and C/C++ style comments, which
-   are ignored. */
-
-/*************** Includes and Defines *****************************/
-
-#include <string>
-
-#include "ParseNode.h"
-#include "cfa.tab.h" /* YACC generated definitions based on C++ grammar */
-#include "lex.h"
-
-char *yyfilename;
-
-#define WHITE_RETURN(x)		/* do nothing */
-#define NEWLINE_RETURN()	WHITE_RETURN('\n')
-#define RETURN_VAL(x)		yylval.tok.str = new std::string(yytext); yylval.tok.file = yyfilename; yylval.tok.line = yylineno; return(x)
-
-#define KEYWORD_RETURN(x)	RETURN_VAL(x)		/* keyword */
-#define IDENTIFIER_RETURN()	RETURN_VAL((typedefTable.isIdentifier(yytext) ? IDENTIFIER : typedefTable.isTypedef(yytext) ? TYPEDEFname : TYPEGENname))
-
-#define ASCIIOP_RETURN()	RETURN_VAL((int)yytext[0]) /* single character operator */
-#define NAMEDOP_RETURN(x)	RETURN_VAL(x)		/* multichar operator, with a name */
-
-#define NUMERIC_RETURN(x)	rm_underscore(); RETURN_VAL(x) /* numeric constant */
-
-void rm_underscore() {					/* remove underscores in constant or escape sequence */
-    int j = 0;
-    for ( int i = 0; i < yyleng; i += 1 ) {
-	if ( yytext[i] != '_' ) {
-	    yytext[j] = yytext[i];
-	    j += 1;
-	} // if
-    } // for
-    yyleng = j;
-    yytext[yyleng] = '\0';
-}
-
-/* identifier, GCC: $ in identifier */
-/*  numeric constants, CFA: '_' in constant */
-/* character escape sequence, GCC: \e => esc character */
-/* display/white-space characters */
-/* operators */
-#define COMMENT 1
-
-#line 1108 "Parser/lex.yy.cc"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines.  This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
-	if ( yy_current_buffer->yy_is_interactive ) \
-		{ \
-		int c = '*', n; \
-		for ( n = 0; n < max_size && \
-			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
-			buf[n] = (char) c; \
-		if ( c == '\n' ) \
-			buf[n++] = (char) c; \
-		if ( c == EOF && ferror( yyin ) ) \
-			YY_FATAL_ERROR( "input in flex scanner failed" ); \
-		result = n; \
-		} \
-	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
-		  && ferror( yyin ) ) \
-		YY_FATAL_ERROR( "input in flex scanner failed" );
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
-	if ( yyleng > 0 ) \
-		yy_current_buffer->yy_at_bol = \
-				(yytext[yyleng - 1] == '\n'); \
-	YY_USER_ACTION
-
-YY_DECL
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
-
-#line 120 "Parser/lex.l"
-
-	/* line directives */
-#line 1265 "Parser/lex.yy.cc"
-
-	if ( yy_init )
-		{
-		yy_init = 0;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! yy_start )
-			yy_start = 1;	/* first start state */
-
-		if ( ! yyin )
-			yyin = stdin;
-
-		if ( ! yyout )
-			yyout = stdout;
-
-		if ( ! yy_current_buffer )
-			yy_current_buffer =
-				yy_create_buffer( yyin, YY_BUF_SIZE );
-
-		yy_load_buffer_state();
-		}
-
-	while ( 1 )		/* loops until end-of-file is reached */
-		{
-		yy_cp = yy_c_buf_p;
-
-		/* Support of yytext. */
-		*yy_cp = yy_hold_char;
-
-		/* yy_bp points to the position in yy_ch_buf of the start of
-		 * the current run.
-		 */
-		yy_bp = yy_cp;
-
-		yy_current_state = yy_start;
-		yy_current_state += YY_AT_BOL();
-		yy_state_ptr = yy_state_buf;
-		*yy_state_ptr++ = yy_current_state;
-yy_match:
-		do
-			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
-			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-				{
-				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 618 )
-					yy_c = yy_meta[(unsigned int) yy_c];
-				}
-			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-			*yy_state_ptr++ = yy_current_state;
-			++yy_cp;
-			}
-		while ( yy_base[yy_current_state] != 1669 );
-
-yy_find_action:
-		yy_current_state = *--yy_state_ptr;
-		yy_lp = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
-		for ( ; ; ) /* until we find what rule we matched */
-			{
-			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
-				{
-				yy_act = yy_acclist[yy_lp];
-					{
-					yy_full_match = yy_cp;
-					break;
-					}
-				}
-			--yy_cp;
-			yy_current_state = *--yy_state_ptr;
-			yy_lp = yy_accept[yy_current_state];
-			}
-
-		YY_DO_BEFORE_ACTION;
-
-		if ( yy_act != YY_END_OF_BUFFER )
-			{
-			int yyl;
-			for ( yyl = 0; yyl < yyleng; ++yyl )
-				if ( yytext[yyl] == '\n' )
-					++yylineno;
-			}
-
-do_action:	/* This label is used only to access EOF actions. */
-
-
-		switch ( yy_act )
-	{ /* beginning of action switch */
-case 1:
-YY_RULE_SETUP
-#line 122 "Parser/lex.l"
-{
-	char *end_num;
-	char *begin_string, *end_string;
-	char *filename;
-	long lineno, length;
-	lineno = strtol( yytext + 1, &end_num, 0 );
-	begin_string = strchr( end_num, '"' );
-	if( begin_string ) {
-	  end_string = strchr( begin_string + 1, '"' );
-	  if( end_string ) {
-	    length = end_string - begin_string - 1;
-	    filename = new char[ length + 1 ];
-	    memcpy( filename, begin_string + 1, length );
-	    filename[ length ] = '\0';
-	    //std::cout << "file " << filename << " line " << lineno << std::endl;
-	    yylineno = lineno;
-	    yyfilename = filename;
-	  }
-	}
-}
-	YY_BREAK
-/* ignore preprocessor directives (for now) */
-case 2:
-YY_RULE_SETUP
-#line 144 "Parser/lex.l"
-;
-	YY_BREAK
-/* ignore C style comments */
-case 3:
-YY_RULE_SETUP
-#line 147 "Parser/lex.l"
-{BEGIN COMMENT;}
-	YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 148 "Parser/lex.l"
-;
-	YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 149 "Parser/lex.l"
-{BEGIN 0;}
-	YY_BREAK
-/* ignore C++ style comments */
-case 6:
-YY_RULE_SETUP
-#line 152 "Parser/lex.l"
-;
-	YY_BREAK
-/* ignore whitespace */
-case 7:
-YY_RULE_SETUP
-#line 155 "Parser/lex.l"
-{WHITE_RETURN(' ');}
-	YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 156 "Parser/lex.l"
-{WHITE_RETURN(' ');}
-	YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 157 "Parser/lex.l"
-{NEWLINE_RETURN();}
-	YY_BREAK
-/* keywords */
-case 10:
-YY_RULE_SETUP
-#line 160 "Parser/lex.l"
-{KEYWORD_RETURN(ALIGNOF);}	/* GCC */
-	YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 161 "Parser/lex.l"
-{KEYWORD_RETURN(ALIGNOF);}	/* GCC */
-	YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 162 "Parser/lex.l"
-{KEYWORD_RETURN(ASM);}
-	YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 163 "Parser/lex.l"
-{KEYWORD_RETURN(ASM);}		/* GCC */
-	YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 164 "Parser/lex.l"
-{KEYWORD_RETURN(ASM);}		/* GCC */
-	YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 165 "Parser/lex.l"
-{KEYWORD_RETURN(ATTRIBUTE);}	/* GCC */
-	YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 166 "Parser/lex.l"
-{KEYWORD_RETURN(ATTRIBUTE);}	/* GCC */
-	YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 167 "Parser/lex.l"
-{KEYWORD_RETURN(AUTO);}
-	YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 168 "Parser/lex.l"
-{KEYWORD_RETURN(BOOL);}		/* ANSI99 */
-	YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 169 "Parser/lex.l"
-{KEYWORD_RETURN(BREAK);}
-	YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 170 "Parser/lex.l"
-{KEYWORD_RETURN(CASE);}
-	YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 171 "Parser/lex.l"
-{KEYWORD_RETURN(CATCH);}	/* CFA */
-	YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 172 "Parser/lex.l"
-{KEYWORD_RETURN(CHAR);}
-	YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 173 "Parser/lex.l"
-{KEYWORD_RETURN(CHOOSE);}
-	YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 174 "Parser/lex.l"
-{KEYWORD_RETURN(COMPLEX);}	/* ANSI99 */
-	YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 175 "Parser/lex.l"
-{KEYWORD_RETURN(COMPLEX);}	/* GCC */
-	YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 176 "Parser/lex.l"
-{KEYWORD_RETURN(COMPLEX);}	/* GCC */
-	YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 177 "Parser/lex.l"
-{KEYWORD_RETURN(CONST);}
-	YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 178 "Parser/lex.l"
-{KEYWORD_RETURN(CONST);}	/* GCC */
-	YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 179 "Parser/lex.l"
-{KEYWORD_RETURN(CONST);}	/* GCC */
-	YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 180 "Parser/lex.l"
-{KEYWORD_RETURN(CONTEXT);}
-	YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 181 "Parser/lex.l"
-{KEYWORD_RETURN(CONTINUE);}
-	YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 182 "Parser/lex.l"
-{KEYWORD_RETURN(DEFAULT);}
-	YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 183 "Parser/lex.l"
-{KEYWORD_RETURN(DO);}
-	YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 184 "Parser/lex.l"
-{KEYWORD_RETURN(DOUBLE);}
-	YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 185 "Parser/lex.l"
-{KEYWORD_RETURN(DTYPE);}
-	YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 186 "Parser/lex.l"
-{KEYWORD_RETURN(ELSE);}
-	YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 187 "Parser/lex.l"
-{KEYWORD_RETURN(ENUM);}
-	YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 188 "Parser/lex.l"
-{KEYWORD_RETURN(EXTENSION);}	/* GCC */
-	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 189 "Parser/lex.l"
-{KEYWORD_RETURN(EXTERN);}
-	YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 190 "Parser/lex.l"
-{KEYWORD_RETURN(FALLTHRU);}
-	YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 191 "Parser/lex.l"
-{KEYWORD_RETURN(FLOAT);}
-	YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 192 "Parser/lex.l"
-{KEYWORD_RETURN(FOR);}
-	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 193 "Parser/lex.l"
-{KEYWORD_RETURN(FORALL);}
-	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 194 "Parser/lex.l"
-{KEYWORD_RETURN(FORTRAN);}
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 195 "Parser/lex.l"
-{KEYWORD_RETURN(FTYPE);}
-	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 196 "Parser/lex.l"
-{KEYWORD_RETURN(GOTO);}
-	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 197 "Parser/lex.l"
-{KEYWORD_RETURN(IF);}
-	YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 198 "Parser/lex.l"
-{KEYWORD_RETURN(IMAGINARY);}	/* ANSI99 */
-	YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 199 "Parser/lex.l"
-{KEYWORD_RETURN(IMAGINARY);}	/* GCC */
-	YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 200 "Parser/lex.l"
-{KEYWORD_RETURN(IMAGINARY);}	/* GCC */
-	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 201 "Parser/lex.l"
-{KEYWORD_RETURN(INLINE);}	/* ANSI99 */
-	YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 202 "Parser/lex.l"
-{KEYWORD_RETURN(INLINE);}	/* GCC */
-	YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 203 "Parser/lex.l"
-{KEYWORD_RETURN(INLINE);}	/* GCC */
-	YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 204 "Parser/lex.l"
-{KEYWORD_RETURN(INT);}
-	YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 205 "Parser/lex.l"
-{KEYWORD_RETURN(LABEL);}	/* GCC */
-	YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 206 "Parser/lex.l"
-{KEYWORD_RETURN(LONG);}
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 207 "Parser/lex.l"
-{KEYWORD_RETURN(LVALUE);}
-	YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 208 "Parser/lex.l"
-{KEYWORD_RETURN(REGISTER);}
-	YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 209 "Parser/lex.l"
-{KEYWORD_RETURN(RESTRICT);}	/* ANSI99 */
-	YY_BREAK
-case 60:
-YY_RULE_SETUP
-#line 210 "Parser/lex.l"
-{KEYWORD_RETURN(RESTRICT);}	/* GCC */
-	YY_BREAK
-case 61:
-YY_RULE_SETUP
-#line 211 "Parser/lex.l"
-{KEYWORD_RETURN(RESTRICT);}	/* GCC */
-	YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 212 "Parser/lex.l"
-{KEYWORD_RETURN(RETURN);}
-	YY_BREAK
-case 63:
-YY_RULE_SETUP
-#line 213 "Parser/lex.l"
-{KEYWORD_RETURN(SHORT);}
-	YY_BREAK
-case 64:
-YY_RULE_SETUP
-#line 214 "Parser/lex.l"
-{KEYWORD_RETURN(SIGNED);}
-	YY_BREAK
-case 65:
-YY_RULE_SETUP
-#line 215 "Parser/lex.l"
-{KEYWORD_RETURN(SIGNED);}	/* GCC */
-	YY_BREAK
-case 66:
-YY_RULE_SETUP
-#line 216 "Parser/lex.l"
-{KEYWORD_RETURN(SIGNED);}	/* GCC */
-	YY_BREAK
-case 67:
-YY_RULE_SETUP
-#line 217 "Parser/lex.l"
-{KEYWORD_RETURN(SIZEOF);}
-	YY_BREAK
-case 68:
-YY_RULE_SETUP
-#line 218 "Parser/lex.l"
-{KEYWORD_RETURN(STATIC);}
-	YY_BREAK
-case 69:
-YY_RULE_SETUP
-#line 219 "Parser/lex.l"
-{KEYWORD_RETURN(STRUCT);}
-	YY_BREAK
-case 70:
-YY_RULE_SETUP
-#line 220 "Parser/lex.l"
-{KEYWORD_RETURN(SWITCH);}
-	YY_BREAK
-case 71:
-YY_RULE_SETUP
-#line 221 "Parser/lex.l"
-{KEYWORD_RETURN(THROW);}	/* CFA */
-	YY_BREAK
-case 72:
-YY_RULE_SETUP
-#line 222 "Parser/lex.l"
-{KEYWORD_RETURN(TRY);}		/* CFA */
-	YY_BREAK
-case 73:
-YY_RULE_SETUP
-#line 223 "Parser/lex.l"
-{KEYWORD_RETURN(TYPE);}
-	YY_BREAK
-case 74:
-YY_RULE_SETUP
-#line 224 "Parser/lex.l"
-{KEYWORD_RETURN(TYPEDEF);}
-	YY_BREAK
-case 75:
-YY_RULE_SETUP
-#line 225 "Parser/lex.l"
-{KEYWORD_RETURN(TYPEOF);}	/* GCC */
-	YY_BREAK
-case 76:
-YY_RULE_SETUP
-#line 226 "Parser/lex.l"
-{KEYWORD_RETURN(TYPEOF);}	/* GCC */
-	YY_BREAK
-case 77:
-YY_RULE_SETUP
-#line 227 "Parser/lex.l"
-{KEYWORD_RETURN(TYPEOF);}	/* GCC */
-	YY_BREAK
-case 78:
-YY_RULE_SETUP
-#line 228 "Parser/lex.l"
-{KEYWORD_RETURN(UNION);}
-	YY_BREAK
-case 79:
-YY_RULE_SETUP
-#line 229 "Parser/lex.l"
-{KEYWORD_RETURN(UNSIGNED);}
-	YY_BREAK
-case 80:
-YY_RULE_SETUP
-#line 230 "Parser/lex.l"
-{KEYWORD_RETURN(VOID);}
-	YY_BREAK
-case 81:
-YY_RULE_SETUP
-#line 231 "Parser/lex.l"
-{KEYWORD_RETURN(VOLATILE);}
-	YY_BREAK
-case 82:
-YY_RULE_SETUP
-#line 232 "Parser/lex.l"
-{KEYWORD_RETURN(VOLATILE);}	/* GCC */
-	YY_BREAK
-case 83:
-YY_RULE_SETUP
-#line 233 "Parser/lex.l"
-{KEYWORD_RETURN(VOLATILE);}	/* GCC */
-	YY_BREAK
-case 84:
-YY_RULE_SETUP
-#line 234 "Parser/lex.l"
-{KEYWORD_RETURN(WHILE);}
-	YY_BREAK
-/* identifier */
-case 85:
-YY_RULE_SETUP
-#line 237 "Parser/lex.l"
-{IDENTIFIER_RETURN();}
-	YY_BREAK
-/* numeric constants */
-case 86:
-YY_RULE_SETUP
-#line 240 "Parser/lex.l"
-{NUMERIC_RETURN(ZERO);}		/* CFA */
-	YY_BREAK
-case 87:
-YY_RULE_SETUP
-#line 241 "Parser/lex.l"
-{NUMERIC_RETURN(ONE);}		/* CFA */
-	YY_BREAK
-case 88:
-YY_RULE_SETUP
-#line 242 "Parser/lex.l"
-{NUMERIC_RETURN(INTEGERconstant);}
-	YY_BREAK
-case 89:
-YY_RULE_SETUP
-#line 243 "Parser/lex.l"
-{NUMERIC_RETURN(INTEGERconstant);}
-	YY_BREAK
-case 90:
-YY_RULE_SETUP
-#line 244 "Parser/lex.l"
-{NUMERIC_RETURN(INTEGERconstant);}
-	YY_BREAK
-case 91:
-YY_RULE_SETUP
-#line 245 "Parser/lex.l"
-{NUMERIC_RETURN(FLOATINGconstant);}
-	YY_BREAK
-case 92:
-YY_RULE_SETUP
-#line 246 "Parser/lex.l"
-{NUMERIC_RETURN(FLOATINGconstant);}
-	YY_BREAK
-/* character constant, allows empty value */
-case 93:
-YY_RULE_SETUP
-#line 249 "Parser/lex.l"
-{RETURN_VAL(CHARACTERconstant);}
-	YY_BREAK
-/* string constant */
-case 94:
-YY_RULE_SETUP
-#line 252 "Parser/lex.l"
-{RETURN_VAL(STRINGliteral);}
-	YY_BREAK
-/* punctuation */
-case 95:
-YY_RULE_SETUP
-#line 255 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 96:
-YY_RULE_SETUP
-#line 256 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 97:
-YY_RULE_SETUP
-#line 257 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 98:
-YY_RULE_SETUP
-#line 258 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 99:
-YY_RULE_SETUP
-#line 259 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 100:
-YY_RULE_SETUP
-#line 260 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 101:
-YY_RULE_SETUP
-#line 261 "Parser/lex.l"
-{ASCIIOP_RETURN();}		/* also operator */
-	YY_BREAK
-case 102:
-YY_RULE_SETUP
-#line 262 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 103:
-YY_RULE_SETUP
-#line 263 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 104:
-YY_RULE_SETUP
-#line 264 "Parser/lex.l"
-{ASCIIOP_RETURN();}		/* also operator */
-	YY_BREAK
-case 105:
-YY_RULE_SETUP
-#line 265 "Parser/lex.l"
-{NAMEDOP_RETURN(ELLIPSIS);}
-	YY_BREAK
-/* alternative ANSI99 brackets, "<:" & "<:<:" handled by preprocessor */
-case 106:
-YY_RULE_SETUP
-#line 268 "Parser/lex.l"
-{RETURN_VAL('[');}
-	YY_BREAK
-case 107:
-YY_RULE_SETUP
-#line 269 "Parser/lex.l"
-{RETURN_VAL(']');}
-	YY_BREAK
-case 108:
-YY_RULE_SETUP
-#line 270 "Parser/lex.l"
-{RETURN_VAL('{');}
-	YY_BREAK
-case 109:
-YY_RULE_SETUP
-#line 271 "Parser/lex.l"
-{RETURN_VAL('}');}
-	YY_BREAK
-/* operators */
-case 110:
-YY_RULE_SETUP
-#line 274 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 111:
-YY_RULE_SETUP
-#line 275 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 112:
-YY_RULE_SETUP
-#line 276 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 113:
-YY_RULE_SETUP
-#line 277 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 114:
-YY_RULE_SETUP
-#line 278 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 115:
-YY_RULE_SETUP
-#line 279 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 116:
-YY_RULE_SETUP
-#line 280 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 117:
-YY_RULE_SETUP
-#line 281 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 118:
-YY_RULE_SETUP
-#line 282 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 119:
-YY_RULE_SETUP
-#line 283 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 120:
-YY_RULE_SETUP
-#line 284 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 121:
-YY_RULE_SETUP
-#line 285 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 122:
-YY_RULE_SETUP
-#line 286 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 123:
-YY_RULE_SETUP
-#line 287 "Parser/lex.l"
-{ASCIIOP_RETURN();}
-	YY_BREAK
-case 124:
-YY_RULE_SETUP
-#line 289 "Parser/lex.l"
-{NAMEDOP_RETURN(ICR);}
-	YY_BREAK
-case 125:
-YY_RULE_SETUP
-#line 290 "Parser/lex.l"
-{NAMEDOP_RETURN(DECR);}
-	YY_BREAK
-case 126:
-YY_RULE_SETUP
-#line 291 "Parser/lex.l"
-{NAMEDOP_RETURN(EQ);}
-	YY_BREAK
-case 127:
-YY_RULE_SETUP
-#line 292 "Parser/lex.l"
-{NAMEDOP_RETURN(NE);}
-	YY_BREAK
-case 128:
-YY_RULE_SETUP
-#line 293 "Parser/lex.l"
-{NAMEDOP_RETURN(LS);}
-	YY_BREAK
-case 129:
-YY_RULE_SETUP
-#line 294 "Parser/lex.l"
-{NAMEDOP_RETURN(RS);}
-	YY_BREAK
-case 130:
-YY_RULE_SETUP
-#line 295 "Parser/lex.l"
-{NAMEDOP_RETURN(LE);}
-	YY_BREAK
-case 131:
-YY_RULE_SETUP
-#line 296 "Parser/lex.l"
-{NAMEDOP_RETURN(GE);}
-	YY_BREAK
-case 132:
-YY_RULE_SETUP
-#line 297 "Parser/lex.l"
-{NAMEDOP_RETURN(ANDAND);}
-	YY_BREAK
-case 133:
-YY_RULE_SETUP
-#line 298 "Parser/lex.l"
-{NAMEDOP_RETURN(OROR);}
-	YY_BREAK
-case 134:
-YY_RULE_SETUP
-#line 299 "Parser/lex.l"
-{NAMEDOP_RETURN(ARROW);}
-	YY_BREAK
-case 135:
-YY_RULE_SETUP
-#line 300 "Parser/lex.l"
-{NAMEDOP_RETURN(PLUSassign);}
-	YY_BREAK
-case 136:
-YY_RULE_SETUP
-#line 301 "Parser/lex.l"
-{NAMEDOP_RETURN(MINUSassign);}
-	YY_BREAK
-case 137:
-YY_RULE_SETUP
-#line 302 "Parser/lex.l"
-{NAMEDOP_RETURN(MULTassign);}
-	YY_BREAK
-case 138:
-YY_RULE_SETUP
-#line 303 "Parser/lex.l"
-{NAMEDOP_RETURN(DIVassign);}
-	YY_BREAK
-case 139:
-YY_RULE_SETUP
-#line 304 "Parser/lex.l"
-{NAMEDOP_RETURN(MODassign);}
-	YY_BREAK
-case 140:
-YY_RULE_SETUP
-#line 305 "Parser/lex.l"
-{NAMEDOP_RETURN(ANDassign);}
-	YY_BREAK
-case 141:
-YY_RULE_SETUP
-#line 306 "Parser/lex.l"
-{NAMEDOP_RETURN(ORassign);}
-	YY_BREAK
-case 142:
-YY_RULE_SETUP
-#line 307 "Parser/lex.l"
-{NAMEDOP_RETURN(ERassign);}
-	YY_BREAK
-case 143:
-YY_RULE_SETUP
-#line 308 "Parser/lex.l"
-{NAMEDOP_RETURN(LSassign);}
-	YY_BREAK
-case 144:
-YY_RULE_SETUP
-#line 309 "Parser/lex.l"
-{NAMEDOP_RETURN(RSassign);}
-	YY_BREAK
-/* CFA, operator identifier */
-case 145:
-YY_RULE_SETUP
-#line 312 "Parser/lex.l"
-{IDENTIFIER_RETURN();}		/* unary */
-	YY_BREAK
-case 146:
-YY_RULE_SETUP
-#line 313 "Parser/lex.l"
-{IDENTIFIER_RETURN();}
-	YY_BREAK
-case 147:
-YY_RULE_SETUP
-#line 314 "Parser/lex.l"
-{IDENTIFIER_RETURN();}		/* binary */
-	YY_BREAK
-/*
-	  This rule handles ambiguous cases with operator identifiers, e.g., "int *?*?()", where the
-	  string "*?*?"  can be lexed as "*"/"?*?" or "*?"/"*?". Since it is common practise to put
-	  a unary operator juxtaposed to an identifier, e.g., "*i", users will be annoyed if they
-	  cannot do this with respect to operator identifiers. Even with this special hack, there
-	  are 5 general cases that cannot be handled. The first case is for the function-call
-	  identifier "?()":
-
-	  int * ?()();	// declaration: space required after '*'
-	  * ?()();	// expression: space required after '*'
-
-	  Without the space, the string "*?()" is ambiguous without N character look ahead; it
-	  requires scanning ahead to determine if there is a '(', which is the start of an
-	  argument/parameter list.
-
-	  The 4 remaining cases occur in expressions:
-
-	  i++?i:0;		// space required before '?'
-	  i--?i:0;		// space required before '?'
-	  i?++i:0;		// space required after '?'
-	  i?--i:0;		// space required after '?'
-
-	  In the first two cases, the string "i++?" is ambiguous, where this string can be lexed as
-	  "i"/"++?" or "i++"/"?"; it requires scanning ahead to determine if there is a '(', which
-	  is the start of an argument list.  In the second two cases, the string "?++x" is
-	  ambiguous, where this string can be lexed as "?++"/"x" or "?"/"++x"; it requires scanning
-	  ahead to determine if there is a '(', which is the start of an argument list.
-	*/
-case 148:
-YY_RULE_SETUP
-#line 343 "Parser/lex.l"
-{
-			    // 1 or 2 character unary operator ?
-			    int i = yytext[1] == '?' ? 1 : 2;
-			    yyless( i );		/* put back characters up to first '?' */
-			    if ( i > 1 ) {
-				NAMEDOP_RETURN( yytext[0] == '+' ? ICR : DECR );
-			    } else {
-				ASCIIOP_RETURN();
-			    } // if
-			}
-	YY_BREAK
-/* unknown characters */
-case 149:
-YY_RULE_SETUP
-#line 355 "Parser/lex.l"
-{printf("unknown character(s):\"%s\" on line %d\n", yytext, yylineno);}
-	YY_BREAK
-case 150:
-YY_RULE_SETUP
-#line 357 "Parser/lex.l"
-ECHO;
-	YY_BREAK
-#line 2177 "Parser/lex.yy.cc"
-			case YY_STATE_EOF(INITIAL):
-			case YY_STATE_EOF(COMMENT):
-				yyterminate();
-
-	case YY_END_OF_BUFFER:
-		{
-		/* Amount of text matched not including the EOB char. */
-		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
-		/* Undo the effects of YY_DO_BEFORE_ACTION. */
-		*yy_cp = yy_hold_char;
-		YY_RESTORE_YY_MORE_OFFSET
-
-		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
-			{
-			/* We're scanning a new file or input source.  It's
-			 * possible that this happened because the user
-			 * just pointed yyin at a new source and called
-			 * yylex().  If so, then we have to assure
-			 * consistency between yy_current_buffer and our
-			 * globals.  Here is the right place to do so, because
-			 * this is the first action (other than possibly a
-			 * back-up) that will match for the new input source.
-			 */
-			yy_n_chars = yy_current_buffer->yy_n_chars;
-			yy_current_buffer->yy_input_file = yyin;
-			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
-			}
-
-		/* Note that here we test for yy_c_buf_p "<=" to the position
-		 * of the first EOB in the buffer, since yy_c_buf_p will
-		 * already have been incremented past the NUL character
-		 * (since all states make transitions on EOB to the
-		 * end-of-buffer state).  Contrast this with the test
-		 * in input().
-		 */
-		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			{ /* This was really a NUL. */
-			yy_state_type yy_next_state;
-
-			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
-			yy_current_state = yy_get_previous_state();
-
-			/* Okay, we're now positioned to make the NUL
-			 * transition.  We couldn't have
-			 * yy_get_previous_state() go ahead and do it
-			 * for us because it doesn't know how to deal
-			 * with the possibility of jamming (and we don't
-			 * want to build jamming into it because then it
-			 * will run more slowly).
-			 */
-
-			yy_next_state = yy_try_NUL_trans( yy_current_state );
-
-			yy_bp = yytext_ptr + YY_MORE_ADJ;
-
-			if ( yy_next_state )
-				{
-				/* Consume the NUL. */
-				yy_cp = ++yy_c_buf_p;
-				yy_current_state = yy_next_state;
-				goto yy_match;
-				}
-
-			else
-				{
-				yy_cp = yy_c_buf_p;
-				goto yy_find_action;
-				}
-			}
-
-		else switch ( yy_get_next_buffer() )
-			{
-			case EOB_ACT_END_OF_FILE:
-				{
-				yy_did_buffer_switch_on_eof = 0;
-
-				if ( yywrap() )
-					{
-					/* Note: because we've taken care in
-					 * yy_get_next_buffer() to have set up
-					 * yytext, we can now set up
-					 * yy_c_buf_p so that if some total
-					 * hoser (like flex itself) wants to
-					 * call the scanner after we return the
-					 * YY_NULL, it'll still work - another
-					 * YY_NULL will get returned.
-					 */
-					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
-					yy_act = YY_STATE_EOF(YY_START);
-					goto do_action;
-					}
-
-				else
-					{
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-					}
-				break;
-				}
-
-			case EOB_ACT_CONTINUE_SCAN:
-				yy_c_buf_p =
-					yytext_ptr + yy_amount_of_matched_text;
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_match;
-
-			case EOB_ACT_LAST_MATCH:
-				yy_c_buf_p =
-				&yy_current_buffer->yy_ch_buf[yy_n_chars];
-
-				yy_current_state = yy_get_previous_state();
-
-				yy_cp = yy_c_buf_p;
-				yy_bp = yytext_ptr + YY_MORE_ADJ;
-				goto yy_find_action;
-			}
-		break;
-		}
-
-	default:
-		YY_FATAL_ERROR(
-			"fatal flex scanner internal error--no action found" );
-	} /* end of action switch */
-		} /* end of scanning one token */
-	} /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- *	EOB_ACT_LAST_MATCH -
- *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- *	EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
-	{
-	register char *dest = yy_current_buffer->yy_ch_buf;
-	register char *source = yytext_ptr;
-	register int number_to_move, i;
-	int ret_val;
-
-	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
-		YY_FATAL_ERROR(
-		"fatal flex scanner internal error--end of buffer missed" );
-
-	if ( yy_current_buffer->yy_fill_buffer == 0 )
-		{ /* Don't try to fill the buffer, so this is an EOF. */
-		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
-			{
-			/* We matched a single character, the EOB, so
-			 * treat this as a final EOF.
-			 */
-			return EOB_ACT_END_OF_FILE;
-			}
-
-		else
-			{
-			/* We matched some text prior to the EOB, first
-			 * process it.
-			 */
-			return EOB_ACT_LAST_MATCH;
-			}
-		}
-
-	/* Try to read more data. */
-
-	/* First move last chars to start of buffer. */
-	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
-	for ( i = 0; i < number_to_move; ++i )
-		*(dest++) = *(source++);
-
-	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
-		/* don't do the read, it's not guaranteed to return an EOF,
-		 * just force an EOF
-		 */
-		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
-	else
-		{
-		int num_to_read =
-			yy_current_buffer->yy_buf_size - number_to_move - 1;
-
-		while ( num_to_read <= 0 )
-			{ /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
-			YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
-			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = yy_current_buffer;
-
-			int yy_c_buf_p_offset =
-				(int) (yy_c_buf_p - b->yy_ch_buf);
-
-			if ( b->yy_is_our_buffer )
-				{
-				int new_size = b->yy_buf_size * 2;
-
-				if ( new_size <= 0 )
-					b->yy_buf_size += b->yy_buf_size / 8;
-				else
-					b->yy_buf_size *= 2;
-
-				b->yy_ch_buf = (char *)
-					/* Include room in for 2 EOB chars. */
-					yy_flex_realloc( (void *) b->yy_ch_buf,
-							 b->yy_buf_size + 2 );
-				}
-			else
-				/* Can't grow it, we don't own it. */
-				b->yy_ch_buf = 0;
-
-			if ( ! b->yy_ch_buf )
-				YY_FATAL_ERROR(
-				"fatal error - scanner input buffer overflow" );
-
-			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
-			num_to_read = yy_current_buffer->yy_buf_size -
-						number_to_move - 1;
-#endif
-			}
-
-		if ( num_to_read > YY_READ_BUF_SIZE )
-			num_to_read = YY_READ_BUF_SIZE;
-
-		/* Read in more data. */
-		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
-			yy_n_chars, num_to_read );
-
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	if ( yy_n_chars == 0 )
-		{
-		if ( number_to_move == YY_MORE_ADJ )
-			{
-			ret_val = EOB_ACT_END_OF_FILE;
-			yyrestart( yyin );
-			}
-
-		else
-			{
-			ret_val = EOB_ACT_LAST_MATCH;
-			yy_current_buffer->yy_buffer_status =
-				YY_BUFFER_EOF_PENDING;
-			}
-		}
-
-	else
-		ret_val = EOB_ACT_CONTINUE_SCAN;
-
-	yy_n_chars += number_to_move;
-	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
-	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
-	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
-	return ret_val;
-	}
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
-	{
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
-
-	yy_current_state = yy_start;
-	yy_current_state += YY_AT_BOL();
-	yy_state_ptr = yy_state_buf;
-	*yy_state_ptr++ = yy_current_state;
-
-	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
-		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
-		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-			{
-			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 618 )
-				yy_c = yy_meta[(unsigned int) yy_c];
-			}
-		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-		*yy_state_ptr++ = yy_current_state;
-		}
-
-	return yy_current_state;
-	}
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- *	next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
-	{
-	register int yy_is_jam;
-
-	register YY_CHAR yy_c = 1;
-	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
-		{
-		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 618 )
-			yy_c = yy_meta[(unsigned int) yy_c];
-		}
-	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 617);
-	if ( ! yy_is_jam )
-		*yy_state_ptr++ = yy_current_state;
-
-	return yy_is_jam ? 0 : yy_current_state;
-	}
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
-	{
-	register char *yy_cp = yy_c_buf_p;
-
-	/* undo effects of setting up yytext */
-	*yy_cp = yy_hold_char;
-
-	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-		{ /* need to shift things up to make room */
-		/* +2 for EOB chars. */
-		register int number_to_move = yy_n_chars + 2;
-		register char *dest = &yy_current_buffer->yy_ch_buf[
-					yy_current_buffer->yy_buf_size + 2];
-		register char *source =
-				&yy_current_buffer->yy_ch_buf[number_to_move];
-
-		while ( source > yy_current_buffer->yy_ch_buf )
-			*--dest = *--source;
-
-		yy_cp += (int) (dest - source);
-		yy_bp += (int) (dest - source);
-		yy_current_buffer->yy_n_chars =
-			yy_n_chars = yy_current_buffer->yy_buf_size;
-
-		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
-			YY_FATAL_ERROR( "flex scanner push-back overflow" );
-		}
-
-	*--yy_cp = (char) c;
-
-	if ( c == '\n' )
-		--yylineno;
-
-	yytext_ptr = yy_bp;
-	yy_hold_char = *yy_cp;
-	yy_c_buf_p = yy_cp;
-	}
-#endif	/* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
-	{
-	int c;
-
-	*yy_c_buf_p = yy_hold_char;
-
-	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
-		{
-		/* yy_c_buf_p now points to the character we want to return.
-		 * If this occurs *before* the EOB characters, then it's a
-		 * valid NUL; if not, then we've hit the end of the buffer.
-		 */
-		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
-			/* This was really a NUL. */
-			*yy_c_buf_p = '\0';
-
-		else
-			{ /* need more input */
-			int offset = yy_c_buf_p - yytext_ptr;
-			++yy_c_buf_p;
-
-			switch ( yy_get_next_buffer() )
-				{
-				case EOB_ACT_LAST_MATCH:
-					/* This happens because yy_g_n_b()
-					 * sees that we've accumulated a
-					 * token and flags that we need to
-					 * try matching the token before
-					 * proceeding.  But for input(),
-					 * there's no matching to consider.
-					 * So convert the EOB_ACT_LAST_MATCH
-					 * to EOB_ACT_END_OF_FILE.
-					 */
-
-					/* Reset buffer status. */
-					yyrestart( yyin );
-
-					/* fall through */
-
-				case EOB_ACT_END_OF_FILE:
-					{
-					if ( yywrap() )
-						return EOF;
-
-					if ( ! yy_did_buffer_switch_on_eof )
-						YY_NEW_FILE;
-#ifdef __cplusplus
-					return yyinput();
-#else
-					return input();
-#endif
-					}
-
-				case EOB_ACT_CONTINUE_SCAN:
-					yy_c_buf_p = yytext_ptr + offset;
-					break;
-				}
-			}
-		}
-
-	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
-	*yy_c_buf_p = '\0';	/* preserve yytext */
-	yy_hold_char = *++yy_c_buf_p;
-
-	yy_current_buffer->yy_at_bol = (c == '\n');
-	if ( yy_current_buffer->yy_at_bol )
-		++yylineno;
-
-	return c;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
-	{
-	if ( ! yy_current_buffer )
-		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
-	yy_init_buffer( yy_current_buffer, input_file );
-	yy_load_buffer_state();
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
-	{
-	if ( yy_current_buffer == new_buffer )
-		return;
-
-	if ( yy_current_buffer )
-		{
-		/* Flush out information for old buffer. */
-		*yy_c_buf_p = yy_hold_char;
-		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
-		yy_current_buffer->yy_n_chars = yy_n_chars;
-		}
-
-	yy_current_buffer = new_buffer;
-	yy_load_buffer_state();
-
-	/* We don't actually know whether we did this switch during
-	 * EOF (yywrap()) processing, but the only time this flag
-	 * is looked at is after yywrap() is called, so it's safe
-	 * to go ahead and always set it.
-	 */
-	yy_did_buffer_switch_on_eof = 1;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
-	{
-	yy_n_chars = yy_current_buffer->yy_n_chars;
-	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
-	yyin = yy_current_buffer->yy_input_file;
-	yy_hold_char = *yy_c_buf_p;
-	}
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_buf_size = size;
-
-	/* yy_ch_buf has to be 2 characters longer than the size given because
-	 * we need to put in 2 end-of-buffer characters.
-	 */
-	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
-	if ( ! b->yy_ch_buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
-	b->yy_is_our_buffer = 1;
-
-	yy_init_buffer( b, file );
-
-	return b;
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-	{
-	if ( ! b )
-		return;
-
-	if ( b == yy_current_buffer )
-		yy_current_buffer = (YY_BUFFER_STATE) 0;
-
-	if ( b->yy_is_our_buffer )
-		yy_flex_free( (void *) b->yy_ch_buf );
-
-	yy_flex_free( (void *) b );
-	}
-
-
-#ifndef YY_ALWAYS_INTERACTIVE
-#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
-#endif
-#endif
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
-	{
-	yy_flush_buffer( b );
-
-	b->yy_input_file = file;
-	b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
-	b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
-	b->yy_is_interactive = 0;
-#else
-	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
-	}
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
-	{
-	if ( ! b )
-		return;
-
-	b->yy_n_chars = 0;
-
-	/* We always need two end-of-buffer characters.  The first causes
-	 * a transition to the end-of-buffer state.  The second causes
-	 * a jam in that state.
-	 */
-	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
-	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
-	b->yy_buf_pos = &b->yy_ch_buf[0];
-
-	b->yy_at_bol = 1;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	if ( b == yy_current_buffer )
-		yy_load_buffer_state();
-	}
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
-	{
-	YY_BUFFER_STATE b;
-
-	if ( size < 2 ||
-	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
-	     base[size-1] != YY_END_OF_BUFFER_CHAR )
-		/* They forgot to leave room for the EOB's. */
-		return 0;
-
-	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
-	if ( ! b )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
-	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
-	b->yy_buf_pos = b->yy_ch_buf = base;
-	b->yy_is_our_buffer = 0;
-	b->yy_input_file = 0;
-	b->yy_n_chars = b->yy_buf_size;
-	b->yy_is_interactive = 0;
-	b->yy_at_bol = 1;
-	b->yy_fill_buffer = 0;
-	b->yy_buffer_status = YY_BUFFER_NEW;
-
-	yy_switch_to_buffer( b );
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
-	{
-	int len;
-	for ( len = 0; yy_str[len]; ++len )
-		;
-
-	return yy_scan_bytes( yy_str, len );
-	}
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
-	{
-	YY_BUFFER_STATE b;
-	char *buf;
-	yy_size_t n;
-	int i;
-
-	/* Get memory for full buffer, including space for trailing EOB's. */
-	n = len + 2;
-	buf = (char *) yy_flex_alloc( n );
-	if ( ! buf )
-		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
-	for ( i = 0; i < len; ++i )
-		buf[i] = bytes[i];
-
-	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
-	b = yy_scan_buffer( buf, n );
-	if ( ! b )
-		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
-	/* It's okay to grow etc. this buffer, and we should throw it
-	 * away when we're done.
-	 */
-	b->yy_is_our_buffer = 1;
-
-	return b;
-	}
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
-	{
-	if ( yy_start_stack_ptr >= yy_start_stack_depth )
-		{
-		yy_size_t new_size;
-
-		yy_start_stack_depth += YY_START_STACK_INCR;
-		new_size = yy_start_stack_depth * sizeof( int );
-
-		if ( ! yy_start_stack )
-			yy_start_stack = (int *) yy_flex_alloc( new_size );
-
-		else
-			yy_start_stack = (int *) yy_flex_realloc(
-					(void *) yy_start_stack, new_size );
-
-		if ( ! yy_start_stack )
-			YY_FATAL_ERROR(
-			"out of memory expanding start-condition stack" );
-		}
-
-	yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
-	BEGIN(new_state);
-	}
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
-	{
-	if ( --yy_start_stack_ptr < 0 )
-		YY_FATAL_ERROR( "start-condition stack underflow" );
-
-	BEGIN(yy_start_stack[yy_start_stack_ptr]);
-	}
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
-	{
-	return yy_start_stack[yy_start_stack_ptr - 1];
-	}
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
-	{
-	(void) fprintf( stderr, "%s\n", msg );
-	exit( YY_EXIT_FAILURE );
-	}
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
-	do \
-		{ \
-		/* Undo effects of setting up yytext. */ \
-		yytext[yyleng] = yy_hold_char; \
-		yy_c_buf_p = yytext + n; \
-		yy_hold_char = *yy_c_buf_p; \
-		*yy_c_buf_p = '\0'; \
-		yyleng = n; \
-		} \
-	while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
-	{
-	register int i;
-	for ( i = 0; i < n; ++i )
-		s1[i] = s2[i];
-	}
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
-	{
-	register int n;
-	for ( n = 0; s[n]; ++n )
-		;
-
-	return n;
-	}
-#endif
-
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
-	{
-	return (void *) malloc( size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
-	{
-	/* The cast to (char *) in the following accommodates both
-	 * implementations that use char* generic pointers, and those
-	 * that use void* generic pointers.  It works with the latter
-	 * because both ANSI C and C++ allow castless assignment from
-	 * any pointer type to void*, and deal with argument conversions
-	 * as though doing an assignment.
-	 */
-	return (void *) realloc( (char *) ptr, size );
-	}
-
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
-	{
-	free( ptr );
-	}
-
-#if YY_MAIN
-int main()
-	{
-	yylex();
-	return 0;
-	}
-#endif
-#line 357 "Parser/lex.l"
-
-
-
-/* Local Variables: */
-/* fill-column: 100 */
-/* compile-command: "gmake" */
-/* End: */
Index: translator/Parser.old/module.mk
===================================================================
--- translator/Parser.old/module.mk	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,42 +1,0 @@
-###
-### This file is part of the Cforall project
-###
-### $Id: module.mk,v 1.8 2002/09/09 16:47:14 rcbilson Exp $
-###
-
-YACC=bison
-YFLAGS=-d --debug -v
-LEX=flex
-LFLAGS=
-
-SRC += Parser/cfa.y \
-       Parser/lex.l \
-       Parser/TypedefTable.cc \
-       Parser/ParseNode.cc \
-       Parser/DeclarationNode.cc \
-       Parser/ExpressionNode.cc \
-       Parser/StatementNode.cc \
-       Parser/InitializerNode.cc \
-       Parser/TypeData.cc \
-       Parser/LinkageSpec.cc \
-       Parser/parseutility.cc \
-       Parser/Parser.cc
-
-EXTRA_OUTPUT += Parser/cfa.tab.cc \
-                Parser/cfa.tab.h \
-		Parser/lex.yy.cc \
-		Parser/cfa.output
-
-LIBS += -lfl
-
-Parser/cfa.tab.cc: Parser/cfa.y
-	$(YACC) $(YFLAGS) $< 
-	-mv Parser/cfa.tab.c Parser/cfa.tab.cc
-
-Parser/cfa.tab.h: Parser/cfa.tab.cc
-
-Parser/lex.yy.cc: Parser/lex.l Parser/cfa.tab.h Parser/TypedefTable.h
-	$(LEX) $(LFLAGS) -o$@ $< 
-
-Parser/lex.yy.o: Parser/lex.yy.cc Parser/ParseNode.h
-	$(CXX) $(CXXFLAGS) -Wno-unused -c -o $@ $<
Index: translator/Parser.old/parseutility.cc
===================================================================
--- translator/Parser.old/parseutility.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,20 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: parseutility.cc,v 1.1 2002/09/02 20:30:42 rcbilson Exp $
- *
- */
-
-#include "parseutility.h"
-#include "SynTree/Type.h"
-#include "SynTree/Expression.h"
-
-
-Expression *
-notZeroExpr( Expression *orig )
-{
-      UntypedExpr *comparison = new UntypedExpr( new NameExpr( "?!=?" ) );
-      comparison->get_args().push_back( orig );
-      comparison->get_args().push_back( new NameExpr( "0" ) );
-      return new CastExpr( comparison, new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
-}
Index: translator/Parser.old/parseutility.h
===================================================================
--- translator/Parser.old/parseutility.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ 	(revision )
@@ -1,15 +1,0 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: parseutility.h,v 1.1 2002/09/02 20:30:42 rcbilson Exp $
- *
- */
-
-#ifndef PARSER_PARSEUTILITY_H
-#define PARSER_PARSEUTILITY_H
-
-#include "SynTree/SynTree.h"
-
-Expression *notZeroExpr( Expression *orig );
-
-#endif /* #ifndef PARSER_PARSEUTILITY_H */
Index: translator/Parser/DeclarationNode.cc
===================================================================
--- translator/Parser/DeclarationNode.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/Parser/DeclarationNode.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -103,5 +103,5 @@
 }
 
-DeclarationNode *DeclarationNode::newFunction( std::string* name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle ) {
+DeclarationNode *DeclarationNode::newFunction( std::string *name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle ) {
     DeclarationNode *newnode = new DeclarationNode;
     newnode->name = assign_strptr( name );
Index: translator/Parser/InitializerNode.cc
===================================================================
--- translator/Parser/InitializerNode.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/Parser/InitializerNode.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -7,4 +7,6 @@
 #include <cassert>
 
+#include <iostream>
+using namespace std;
 
 InitializerNode::InitializerNode( ExpressionNode *_expr, bool aggrp, ExpressionNode *des )
@@ -72,6 +74,8 @@
 
 	std::list< Expression *> designlist;
-	if ( designator != 0 )
+
+	if ( designator != 0 ) {
 	    buildList<Expression, ExpressionNode>( designator, designlist );
+	} // if
 
 	return new ListInit( initlist, designlist );
Index: translator/ResolvExpr/AdjustExprType.cc
===================================================================
--- translator/ResolvExpr/AdjustExprType.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/AdjustExprType.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: AdjustExprType.cc,v 1.3 2005/08/29 20:14:15 rcbilson Exp $
- *
- */
-
 #include "typeops.h"
 #include "SynTree/Type.h"
@@ -12,125 +5,94 @@
 
 namespace ResolvExpr {
+    class AdjustExprType : public Mutator {
+	typedef Mutator Parent;
+      public:
+	AdjustExprType( const TypeEnvironment &env, const SymTab::Indexer &indexer );
+      private:
+	virtual Type* mutate(VoidType *voidType);
+	virtual Type* mutate(BasicType *basicType);
+	virtual Type* mutate(PointerType *pointerType);
+	virtual Type* mutate(ArrayType *arrayType);
+	virtual Type* mutate(FunctionType *functionType);
+	virtual Type* mutate(StructInstType *aggregateUseType);
+	virtual Type* mutate(UnionInstType *aggregateUseType);
+	virtual Type* mutate(EnumInstType *aggregateUseType);
+	virtual Type* mutate(ContextInstType *aggregateUseType);
+	virtual Type* mutate(TypeInstType *aggregateUseType);
+	virtual Type* mutate(TupleType *tupleType);
+  
+	const TypeEnvironment &env;
+	const SymTab::Indexer &indexer;
+    };
 
-class AdjustExprType : public Mutator
-{
-  typedef Mutator Parent;
+    void adjustExprType( Type *&type, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
+	AdjustExprType adjuster( env, indexer );
+	Type *newType = type->acceptMutator( adjuster );
+	type = newType;
+    }
 
-public:
-  AdjustExprType( const TypeEnvironment &env, const SymTab::Indexer &indexer );
+    AdjustExprType::AdjustExprType( const TypeEnvironment &env, const SymTab::Indexer &indexer )
+	: env( env ), indexer( indexer ) {
+    }
 
-private:
-  virtual Type* mutate(VoidType *voidType);
-  virtual Type* mutate(BasicType *basicType);
-  virtual Type* mutate(PointerType *pointerType);
-  virtual Type* mutate(ArrayType *arrayType);
-  virtual Type* mutate(FunctionType *functionType);
-  virtual Type* mutate(StructInstType *aggregateUseType);
-  virtual Type* mutate(UnionInstType *aggregateUseType);
-  virtual Type* mutate(EnumInstType *aggregateUseType);
-  virtual Type* mutate(ContextInstType *aggregateUseType);
-  virtual Type* mutate(TypeInstType *aggregateUseType);
-  virtual Type* mutate(TupleType *tupleType);
-  
-  const TypeEnvironment &env;
-  const SymTab::Indexer &indexer;
-};
+    Type *AdjustExprType::mutate(VoidType *voidType) {
+	return voidType;
+    }
 
-void
-adjustExprType( Type *&type, const TypeEnvironment &env, const SymTab::Indexer &indexer )
-{
-  AdjustExprType adjuster( env, indexer );
-  Type *newType = type->acceptMutator( adjuster );
-  type = newType;
-}
+    Type *AdjustExprType::mutate(BasicType *basicType) {
+	return basicType;
+    }
 
-AdjustExprType::AdjustExprType( const TypeEnvironment &env, const SymTab::Indexer &indexer )
-  : env( env ), indexer( indexer )
-{
-}
+    Type *AdjustExprType::mutate(PointerType *pointerType) {
+	return pointerType;
+    }
 
-Type* 
-AdjustExprType::mutate(VoidType *voidType)
-{
-  return voidType;
-}
+    Type *AdjustExprType::mutate(ArrayType *arrayType) {
+	PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->get_base()->clone() );
+	delete arrayType;
+	return pointerType;
+    }
 
-Type* 
-AdjustExprType::mutate(BasicType *basicType)
-{
-  return basicType;
-}
+    Type *AdjustExprType::mutate(FunctionType *functionType) {
+	PointerType *pointerType = new PointerType( Type::Qualifiers(), functionType );
+	return pointerType;
+    }
 
-Type* 
-AdjustExprType::mutate(PointerType *pointerType)
-{
-  return pointerType;
-}
+    Type *AdjustExprType::mutate(StructInstType *aggregateUseType) {
+	return aggregateUseType;
+    }
 
-Type* 
-AdjustExprType::mutate(ArrayType *arrayType)
-{
-  PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->get_base()->clone() );
-  delete arrayType;
-  return pointerType;
-}
+    Type *AdjustExprType::mutate(UnionInstType *aggregateUseType) {
+	return aggregateUseType;
+    }
 
-Type* 
-AdjustExprType::mutate(FunctionType *functionType)
-{
-  PointerType *pointerType = new PointerType( Type::Qualifiers(), functionType );
-  return pointerType;
-}
+    Type *AdjustExprType::mutate(EnumInstType *aggregateUseType) {
+	return aggregateUseType;
+    }
 
-Type* 
-AdjustExprType::mutate(StructInstType *aggregateUseType)
-{
-  return aggregateUseType;
-}
+    Type *AdjustExprType::mutate(ContextInstType *aggregateUseType) {
+	return aggregateUseType;
+    }
 
-Type* 
-AdjustExprType::mutate(UnionInstType *aggregateUseType)
-{
-  return aggregateUseType;
-}
+    Type *AdjustExprType::mutate(TypeInstType *typeInst) {
+	EqvClass eqvClass;
+	if ( env.lookup( typeInst->get_name(), eqvClass ) ) {
+	    if ( eqvClass.kind == TypeDecl::Ftype ) {
+		PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst );
+		return pointerType;
+	    }
+	} else if ( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) {
+	    if ( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) {
+		if ( tyDecl->get_kind() == TypeDecl::Ftype ) {
+		    PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst );
+		    return pointerType;
+		}
+	    }
+	}
+	return typeInst;
+    }
 
-Type* 
-AdjustExprType::mutate(EnumInstType *aggregateUseType)
-{
-  return aggregateUseType;
-}
-
-Type* 
-AdjustExprType::mutate(ContextInstType *aggregateUseType)
-{
-  return aggregateUseType;
-}
-
-Type* 
-AdjustExprType::mutate(TypeInstType *typeInst)
-{
-  EqvClass eqvClass;
-  if( env.lookup( typeInst->get_name(), eqvClass ) ) {
-    if( eqvClass.kind == TypeDecl::Ftype ) {
-      PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst );
-      return pointerType;
+    Type *AdjustExprType::mutate(TupleType *tupleType) {
+	return tupleType;
     }
-  } else if( NamedTypeDecl *ntDecl = indexer.lookupType( typeInst->get_name() ) ) {
-    if( TypeDecl *tyDecl = dynamic_cast< TypeDecl* >( ntDecl ) ) {
-      if( tyDecl->get_kind() == TypeDecl::Ftype ) {
-        PointerType *pointerType = new PointerType( Type::Qualifiers(), typeInst );
-        return pointerType;
-      }
-    }
-  }
-  return typeInst;
-}
-
-Type* 
-AdjustExprType::mutate(TupleType *tupleType)
-{
-  return tupleType;
-}
-
-
 } // namespace ResolvExpr
Index: translator/ResolvExpr/Alternative.cc
===================================================================
--- translator/ResolvExpr/Alternative.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/Alternative.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Alternative.cc,v 1.6 2005/08/29 20:14:15 rcbilson Exp $
- *
- */
-
 #include "Alternative.h"
 #include "SynTree/Type.h"
@@ -12,64 +5,46 @@
 
 namespace ResolvExpr {
+    Alternative::Alternative() : expr( 0 ) {}
 
-Alternative::Alternative()
-  : expr( 0 )
-{
-}
+    Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost )
+	: cost( cost ), cvtCost( Cost::zero ), expr( expr ), env( env ) {}
 
-Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost )
-  : cost( cost ), cvtCost( Cost::zero ), expr( expr ), env( env )
-{
-}
+    Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost, const Cost &cvtCost )
+	: cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env ) {}
 
-Alternative::Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost, const Cost &cvtCost )
-  : cost( cost ), cvtCost( cvtCost ), expr( expr ), env( env )
-{
-}
+    Alternative::Alternative( const Alternative &other ) {
+	initialize( other, *this );
+    }
 
-Alternative::Alternative( const Alternative &other )
-{
-  initialize( other, *this );
-}
+    Alternative &Alternative::operator=( const Alternative &other ) {
+	if ( &other == this ) return *this;
+	initialize( other, *this );
+	return *this;
+    }
 
-Alternative &
-Alternative::operator=( const Alternative &other )
-{
-  if( &other == this ) return *this;
-  initialize( other, *this );
-  return *this;
-}
+    void Alternative::initialize( const Alternative &src, Alternative &dest ) {
+	dest.cost = src.cost;
+	dest.cvtCost = src.cvtCost;
+	dest.expr = maybeClone( src.expr );
+	dest.env = src.env;
+    }
 
-void 
-Alternative::initialize( const Alternative &src, Alternative &dest )
-{
-  dest.cost = src.cost;
-  dest.cvtCost = src.cvtCost;
-  dest.expr = maybeClone( src.expr );
-  dest.env = src.env;
-}
+    Alternative::~Alternative() {
+	delete expr;
+    }
 
-Alternative::~Alternative()
-{
-  delete expr;
-}
-
-void 
-Alternative::print( std::ostream &os, int indent ) const
-{
-  os << std::string( indent, ' ' ) << "Cost " << cost << ": ";
-  if( expr ) {
-    expr->print( os, indent );
-    os << "(types:" << std::endl;
-    printAll( expr->get_results(), os, indent + 4 );
-    os << ")" << std::endl;
-  } else {
-    os << "Null expression!" << std::endl;
-  }
-  os << std::string( indent, ' ' ) << "Environment: ";
-  env.print( os, indent+2 );
-  os << std::endl;
-}
-
-
+    void Alternative::print( std::ostream &os, int indent ) const {
+	os << std::string( indent, ' ' ) << "Cost " << cost << ": ";
+	if ( expr ) {
+	    expr->print( os, indent );
+	    os << "(types:" << std::endl;
+	    printAll( expr->get_results(), os, indent + 4 );
+	    os << ")" << std::endl;
+	} else {
+	    os << "Null expression!" << std::endl;
+	}
+	os << std::string( indent, ' ' ) << "Environment: ";
+	env.print( os, indent+2 );
+	os << std::endl;
+    }
 } // namespace ResolvExpr
Index: translator/ResolvExpr/Alternative.h
===================================================================
--- translator/ResolvExpr/Alternative.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/Alternative.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Alternative.h,v 1.9 2005/08/29 20:14:15 rcbilson Exp $
- *
- */
-
 #ifndef RESOLVEXPR_ALTERNATIVE_H
 #define RESOLVEXPR_ALTERNATIVE_H
@@ -15,29 +8,25 @@
 
 namespace ResolvExpr {
+    struct Alternative;
+    typedef std::list< Alternative > AltList;
 
-struct Alternative;
-typedef std::list< Alternative > AltList;
-
-struct Alternative
-{
-  Alternative();
-  Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost );
-  Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost, const Cost &cvtCost );
-  Alternative( const Alternative &other );
-  Alternative &operator=( const Alternative &other );
-  ~Alternative();
+    struct Alternative {
+	Alternative();
+	Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost );
+	Alternative( Expression *expr, const TypeEnvironment &env, const Cost& cost, const Cost &cvtCost );
+	Alternative( const Alternative &other );
+	Alternative &operator=( const Alternative &other );
+	~Alternative();
   
-  void initialize( const Alternative &src, Alternative &dest );
+	void initialize( const Alternative &src, Alternative &dest );
   
-  void print( std::ostream &os, int indent = 0 ) const;
+	void print( std::ostream &os, int indent = 0 ) const;
   
-  Cost cost;
-  Cost cvtCost;
-  Expression *expr;
-  TypeEnvironment env;
-};
-
-
+	Cost cost;
+	Cost cvtCost;
+	Expression *expr;
+	TypeEnvironment env;
+    };
 } // namespace ResolvExpr
 
-#endif /* #ifndef RESOLVEXPR_ALTERNATIVE_H */
+#endif // RESOLVEXPR_ALTERNATIVE_H
Index: translator/ResolvExpr/AlternativeFinder.cc
===================================================================
--- translator/ResolvExpr/AlternativeFinder.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/AlternativeFinder.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: AlternativeFinder.cc,v 1.36 2005/08/29 20:14:15 rcbilson Exp $
- *
- */
-
 #include <list>
 #include <iterator>
@@ -32,897 +25,874 @@
 #include "utility.h"
 
-
+extern bool resolveVerbose;
+#define PRINT( text ) if ( resolveVerbose ) { text } 
 //#define DEBUG_COST
 
 namespace ResolvExpr {
-
-Expression *
-resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer, TypeEnvironment &env )
-{
-  CastExpr *castToVoid = new CastExpr( expr );
-
-  AlternativeFinder finder( indexer, env );
-  finder.findWithAdjustment( castToVoid );
-
-  // it's a property of the language that a cast expression has either 1 or 0 interpretations;
-  // if it has 0 interpretations, an exception has already been thrown.
-  assert( finder.get_alternatives().size() == 1 );
-  CastExpr *newExpr = dynamic_cast< CastExpr* >( finder.get_alternatives().front().expr );
-  assert( newExpr );
-  env = finder.get_alternatives().front().env;
-  return newExpr->get_arg()->clone();
-}
-
-namespace {
-
-  void
-  printAlts( const AltList &list, std::ostream &os, int indent = 0 )
-  {
-    for( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) {
-      i->print( os, indent );
-      os << std::endl;
-    }
-  }
-
-  void
-  makeExprList( const AltList &in, std::list< Expression* > &out )
-  {
-    for( AltList::const_iterator i = in.begin(); i != in.end(); ++i ) {
-      out.push_back( i->expr->clone() );
-    }
-  }
-
-  Cost
-  sumCost( const AltList &in )
-  {
-    Cost total;
-    for( AltList::const_iterator i = in.begin(); i != in.end(); ++i ) {
-      total += i->cost;
-    }
-    return total;
-  }
-
-  struct PruneStruct
-  {
-    bool isAmbiguous;
-    AltList::iterator candidate;
-    PruneStruct() {}
-    PruneStruct( AltList::iterator candidate ): isAmbiguous( false ), candidate( candidate ) {}
-  };
-
-  template< typename InputIterator, typename OutputIterator >
-  void
-  pruneAlternatives( InputIterator begin, InputIterator end, OutputIterator out, const SymTab::Indexer &indexer )
-  {
-    // select the alternatives that have the minimum conversion cost for a particular set of result types
-    std::map< std::string, PruneStruct > selected;
-    for( AltList::iterator candidate = begin; candidate != end; ++candidate ) {
-      PruneStruct current( candidate );
-      std::string mangleName;
-      for( std::list< Type* >::const_iterator retType = candidate->expr->get_results().begin(); retType != candidate->expr->get_results().end(); ++retType ) {
-        Type *newType = (*retType)->clone();
-        candidate->env.apply( newType );
-        mangleName += SymTab::Mangler::mangle( newType );
-        delete newType;
-      }
-      std::map< std::string, PruneStruct >::iterator mapPlace = selected.find( mangleName );
-      if( mapPlace != selected.end() ) {
-        if( candidate->cost < mapPlace->second.candidate->cost ) {
-///           std::cout << "cost " << candidate->cost << " beats " << target->second.cost << std::endl;
-          selected[ mangleName ] = current;
-        } else if( candidate->cost == mapPlace->second.candidate->cost ) {
-///           std::cout << "marking ambiguous" << std::endl;
-          mapPlace->second.isAmbiguous = true;
-        }
-      } else {
-        selected[ mangleName ] = current;
-      }
-    }
-
-///     std::cout << "there are " << selected.size() << " alternatives before elimination" << std::endl;
-
-    // accept the alternatives that were unambiguous
-    for( std::map< std::string, PruneStruct >::iterator target = selected.begin(); target != selected.end(); ++target) {
-      if( !target->second.isAmbiguous ) {
-        Alternative &alt = *target->second.candidate;
-        for( std::list< Type* >::iterator result = alt.expr->get_results().begin(); result != alt.expr->get_results().end(); ++result ) {
-          alt.env.applyFree( *result );
-        }
-        *out++ = alt;
-      }
-    }
-
-  }
-
-  template< typename InputIterator, typename OutputIterator >
-  void
-  findMinCost( InputIterator begin, InputIterator end, OutputIterator out )
-  {
-    AltList alternatives;
-
-    // select the alternatives that have the minimum parameter cost
-    Cost minCost = Cost::infinity;
-    for( AltList::iterator i = begin; i != end; ++i ) {
-      if( i->cost < minCost ) {
-        minCost = i->cost;
-        i->cost = i->cvtCost;
-        alternatives.clear();
-        alternatives.push_back( *i );
-      } else if( i->cost == minCost ) {
-        i->cost = i->cvtCost;
-        alternatives.push_back( *i );
-      }
-    }
-    std::copy( alternatives.begin(), alternatives.end(), out );
-  }
-
-  template< typename InputIterator >
-  void
-  simpleCombineEnvironments( InputIterator begin, InputIterator end, TypeEnvironment &result )
-  {
-    while( begin != end ) {
-      result.simpleCombine( (*begin++).env );
-    }
-  }
-
-  void
-  renameTypes( Expression *expr )
-  {
-    for( std::list< Type* >::iterator i = expr->get_results().begin(); i != expr->get_results().end(); ++i ) {
-      (*i)->accept( global_renamer );
-    }
-  }
-}
-
-template< typename InputIterator, typename OutputIterator >
-void
-AlternativeFinder::findSubExprs( InputIterator begin, InputIterator end, OutputIterator out )
-{
-  while( begin != end ) {
-    AlternativeFinder finder( indexer, env );
-    finder.findWithAdjustment( *begin );
-    // XXX  either this
-    //Designators::fixDesignations( finder, (*begin++)->get_argName() );
-    // or XXX this
-    begin++;
-///     std::cout << "findSubExprs" << std::endl;
-///     printAlts( finder.alternatives, std::cout );
-    *out++ = finder;
-  }
-}
-
-AlternativeFinder::AlternativeFinder( const SymTab::Indexer &indexer, const TypeEnvironment &env )
-  : indexer( indexer ), env( env )
-{
-}
-
-void
-AlternativeFinder::find( Expression *expr, bool adjust )
-{
-  expr->accept( *this );
-  if( alternatives.empty() ) {
-    throw SemanticError( "No reasonable alternatives for expression ", expr );
-  }
-  for( AltList::iterator i = alternatives.begin(); i != alternatives.end(); ++i ) {
-    if( adjust ) {
-      adjustExprTypeList( i->expr->get_results().begin(), i->expr->get_results().end(), i->env, indexer );
-    }
-  }
-///   std::cout << "alternatives before prune:" << std::endl;
-///   printAlts( alternatives, std::cout );
-  AltList::iterator oldBegin = alternatives.begin();
-  pruneAlternatives( alternatives.begin(), alternatives.end(), front_inserter( alternatives ), indexer );
-  if( alternatives.begin() == oldBegin ) {
-    std::ostrstream stream;
-    stream << "Can't choose between alternatives for expression ";
-    expr->print( stream );
-    stream << "Alternatives are:";
-    AltList winners;
-    findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
-    printAlts( winners, stream, 8 );
-    throw SemanticError( std::string( stream.str(), stream.pcount() ) );
-  }
-  alternatives.erase( oldBegin, alternatives.end() );
-///   std::cout << "there are " << alternatives.size() << " alternatives after elimination" << std::endl;
-}
-
-void
-AlternativeFinder::findWithAdjustment( Expression *expr )
-{
-  find( expr, true );
-}
-
-template< typename StructOrUnionType >
-void
-AlternativeFinder::addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Cost &newCost, const std::string &name )
-{
-  std::list< Declaration* > members;
-  aggInst->lookup( name, members );
-  for( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
-    if( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) {
-      alternatives.push_back( Alternative( new MemberExpr( dwt->clone(), expr->clone() ), env, newCost ) );
-      renameTypes( alternatives.back().expr );
-    } else {
-      assert( false );
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(ApplicationExpr *applicationExpr)
-{
-  alternatives.push_back( Alternative( applicationExpr->clone(), env, Cost::zero ) );
-}
-
-Cost
-computeConversionCost( Alternative &alt, const SymTab::Indexer &indexer )
-{
-  ApplicationExpr *appExpr = dynamic_cast< ApplicationExpr* >( alt.expr );
-  assert( appExpr );
-  PointerType *pointer = dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() );
-  assert( pointer );
-  FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() );
-  assert( function );
-
-  Cost convCost( 0, 0, 0 );
-  std::list< DeclarationWithType* >& formals = function->get_parameters();
-  std::list< DeclarationWithType* >::iterator formal = formals.begin();
-  std::list< Expression* >& actuals = appExpr->get_args();
-  for( std::list< Expression* >::iterator actualExpr = actuals.begin(); actualExpr != actuals.end(); ++actualExpr ) {
-///     std::cout << "actual expression:" << std::endl;
-///     (*actualExpr)->print( std::cout, 8 );
-///     std::cout << "--- results are" << std::endl;
-///     printAll( (*actualExpr)->get_results(), std::cout, 8 );
-    std::list< DeclarationWithType* >::iterator startFormal = formal;
-    Cost actualCost;
-    for( std::list< Type* >::iterator actual = (*actualExpr)->get_results().begin(); actual != (*actualExpr)->get_results().end(); ++actual ) {
-      if( formal == formals.end() ) {
-        if( function->get_isVarArgs() ) {
-          convCost += Cost( 1, 0, 0 );
-          break;
-        } else {
-          return Cost::infinity;
-        }
-      }
-///       std::cout << std::endl << "converting ";
-///       (*actual)->print( std::cout, 8 );
-///       std::cout << std::endl << " to ";
-///       (*formal)->get_type()->print( std::cout, 8 );
-      Cost newCost = conversionCost( *actual, (*formal)->get_type(), indexer, alt.env );
-///       std::cout << std::endl << "cost is" << newCost << std::endl;
-
-      if( newCost == Cost::infinity ) {
-        return newCost;
-      }
-      convCost += newCost;
-      actualCost += newCost;
-
-      convCost += Cost( 0, polyCost( (*formal)->get_type(), alt.env, indexer ) + polyCost( *actual, alt.env, indexer), 0 );
-
-      formal++;
-    }
-    if( actualCost != Cost( 0, 0, 0 ) ) {
-      std::list< DeclarationWithType* >::iterator startFormalPlusOne = startFormal;
-      startFormalPlusOne++;
-      if( formal == startFormalPlusOne ) {
-        // not a tuple type
-        Type *newType = (*startFormal)->get_type()->clone();
-        alt.env.apply( newType );
-        *actualExpr = new CastExpr( *actualExpr, newType );
-      } else {
-        TupleType *newType = new TupleType( Type::Qualifiers() );
-        for( std::list< DeclarationWithType* >::iterator i = startFormal; i != formal; ++i ) {
-          newType->get_types().push_back( (*i)->get_type()->clone() );
-        }
-        alt.env.apply( newType );
-        *actualExpr = new CastExpr( *actualExpr, newType );
-      }
-    }
-
-  }
-  if( formal != formals.end() ) {
-    return Cost::infinity;
-  }
-
-  for( InferredParams::const_iterator assert = appExpr->get_inferParams().begin(); assert != appExpr->get_inferParams().end(); ++assert ) {
-///     std::cout << std::endl << "converting ";
-///     assert->second.actualType->print( std::cout, 8 );
-///     std::cout << std::endl << " to ";
-///     assert->second.formalType->print( std::cout, 8 );
-    Cost newCost = conversionCost( assert->second.actualType, assert->second.formalType, indexer, alt.env );
-///     std::cout << std::endl << "cost of conversion is " << newCost << std::endl;
-    if( newCost == Cost::infinity ) {
-      return newCost;
-    }
-    convCost += newCost;
-
-    convCost += Cost( 0, polyCost( assert->second.formalType, alt.env, indexer ) + polyCost( assert->second.actualType, alt.env, indexer), 0 );
-  }
-
-  return convCost;
-}
-
-void
-makeUnifiableVars( Type *type, OpenVarSet &unifiableVars, AssertionSet &needAssertions )
-{
-  for( std::list< TypeDecl* >::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
-    unifiableVars[ (*tyvar)->get_name() ] = (*tyvar)->get_kind();
-    for( std::list< DeclarationWithType* >::iterator assert = (*tyvar)->get_assertions().begin(); assert != (*tyvar)->get_assertions().end(); ++assert ) {
-      needAssertions[ *assert ] = true;
-    }
+    Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer, TypeEnvironment &env ) {
+	CastExpr *castToVoid = new CastExpr( expr );
+
+	AlternativeFinder finder( indexer, env );
+	finder.findWithAdjustment( castToVoid );
+
+	// it's a property of the language that a cast expression has either 1 or 0 interpretations; if it has 0
+	// interpretations, an exception has already been thrown.
+	assert( finder.get_alternatives().size() == 1 );
+	CastExpr *newExpr = dynamic_cast< CastExpr* >( finder.get_alternatives().front().expr );
+	assert( newExpr );
+	env = finder.get_alternatives().front().env;
+	return newExpr->get_arg()->clone();
+    }
+
+    namespace {
+	void printAlts( const AltList &list, std::ostream &os, int indent = 0 ) {
+	    for ( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) {
+		i->print( os, indent );
+		os << std::endl;
+	    }
+	}
+
+	void makeExprList( const AltList &in, std::list< Expression* > &out ) {
+	    for ( AltList::const_iterator i = in.begin(); i != in.end(); ++i ) {
+		out.push_back( i->expr->clone() );
+	    }
+	}
+
+	Cost sumCost( const AltList &in ) {
+	    Cost total;
+	    for ( AltList::const_iterator i = in.begin(); i != in.end(); ++i ) {
+		total += i->cost;
+	    }
+	    return total;
+	}
+
+	struct PruneStruct {
+	    bool isAmbiguous;
+	    AltList::iterator candidate;
+	    PruneStruct() {}
+	    PruneStruct( AltList::iterator candidate ): isAmbiguous( false ), candidate( candidate ) {}
+	};
+
+	template< typename InputIterator, typename OutputIterator >
+	void pruneAlternatives( InputIterator begin, InputIterator end, OutputIterator out, const SymTab::Indexer &indexer ) {
+	    // select the alternatives that have the minimum conversion cost for a particular set of result types
+	    std::map< std::string, PruneStruct > selected;
+	    for ( AltList::iterator candidate = begin; candidate != end; ++candidate ) {
+		PruneStruct current( candidate );
+		std::string mangleName;
+		for ( std::list< Type* >::const_iterator retType = candidate->expr->get_results().begin(); retType != candidate->expr->get_results().end(); ++retType ) {
+		    Type *newType = (*retType)->clone();
+		    candidate->env.apply( newType );
+		    mangleName += SymTab::Mangler::mangle( newType );
+		    delete newType;
+		}
+		std::map< std::string, PruneStruct >::iterator mapPlace = selected.find( mangleName );
+		if ( mapPlace != selected.end() ) {
+		    if ( candidate->cost < mapPlace->second.candidate->cost ) {
+			PRINT(
+			    std::cout << "cost " << candidate->cost << " beats " << mapPlace->second.candidate->cost << std::endl;
+			    )
+			selected[ mangleName ] = current;
+		    } else if ( candidate->cost == mapPlace->second.candidate->cost ) {
+			PRINT(
+			    std::cout << "marking ambiguous" << std::endl;
+			    )
+			mapPlace->second.isAmbiguous = true;
+		    }
+		} else {
+		    selected[ mangleName ] = current;
+		}
+	    }
+
+	    PRINT(
+		std::cout << "there are " << selected.size() << " alternatives before elimination" << std::endl;
+		)
+
+	    // accept the alternatives that were unambiguous
+	    for ( std::map< std::string, PruneStruct >::iterator target = selected.begin(); target != selected.end(); ++target ) {
+		if ( !target->second.isAmbiguous ) {
+		    Alternative &alt = *target->second.candidate;
+		    for ( std::list< Type* >::iterator result = alt.expr->get_results().begin(); result != alt.expr->get_results().end(); ++result ) {
+			alt.env.applyFree( *result );
+		    }
+		    *out++ = alt;
+		}
+	    }
+
+	}
+
+	template< typename InputIterator, typename OutputIterator >
+	void findMinCost( InputIterator begin, InputIterator end, OutputIterator out ) {
+	    AltList alternatives;
+
+	    // select the alternatives that have the minimum parameter cost
+	    Cost minCost = Cost::infinity;
+	    for ( AltList::iterator i = begin; i != end; ++i ) {
+		if ( i->cost < minCost ) {
+		    minCost = i->cost;
+		    i->cost = i->cvtCost;
+		    alternatives.clear();
+		    alternatives.push_back( *i );
+		} else if ( i->cost == minCost ) {
+		    i->cost = i->cvtCost;
+		    alternatives.push_back( *i );
+		}
+	    }
+	    std::copy( alternatives.begin(), alternatives.end(), out );
+	}
+
+	template< typename InputIterator >
+	void simpleCombineEnvironments( InputIterator begin, InputIterator end, TypeEnvironment &result ) {
+	    while ( begin != end ) {
+		result.simpleCombine( (*begin++).env );
+	    }
+	}
+
+	void renameTypes( Expression *expr ) {
+	    for ( std::list< Type* >::iterator i = expr->get_results().begin(); i != expr->get_results().end(); ++i ) {
+		(*i)->accept( global_renamer );
+	    }
+	}
+    }
+
+    template< typename InputIterator, typename OutputIterator >
+    void AlternativeFinder::findSubExprs( InputIterator begin, InputIterator end, OutputIterator out ) {
+	while ( begin != end ) {
+	    AlternativeFinder finder( indexer, env );
+	    finder.findWithAdjustment( *begin );
+	    // XXX  either this
+	    //Designators::fixDesignations( finder, (*begin++)->get_argName() );
+	    // or XXX this
+	    begin++;
+	    PRINT(
+		std::cout << "findSubExprs" << std::endl;
+		printAlts( finder.alternatives, std::cout );
+		)
+	    *out++ = finder;
+	}
+    }
+
+    AlternativeFinder::AlternativeFinder( const SymTab::Indexer &indexer, const TypeEnvironment &env )
+	: indexer( indexer ), env( env ) {
+    }
+
+    void AlternativeFinder::find( Expression *expr, bool adjust ) {
+	expr->accept( *this );
+	if ( alternatives.empty() ) {
+	    throw SemanticError( "No reasonable alternatives for expression ", expr );
+	}
+	for ( AltList::iterator i = alternatives.begin(); i != alternatives.end(); ++i ) {
+	    if ( adjust ) {
+		adjustExprTypeList( i->expr->get_results().begin(), i->expr->get_results().end(), i->env, indexer );
+	    }
+	}
+	PRINT(
+	    std::cout << "alternatives before prune:" << std::endl;
+	    printAlts( alternatives, std::cout );
+	    )
+	AltList::iterator oldBegin = alternatives.begin();
+	pruneAlternatives( alternatives.begin(), alternatives.end(), front_inserter( alternatives ), indexer );
+	if ( alternatives.begin() == oldBegin ) {
+	    std::ostrstream stream;
+	    stream << "Can't choose between alternatives for expression ";
+	    expr->print( stream );
+	    stream << "Alternatives are:";
+	    AltList winners;
+	    findMinCost( alternatives.begin(), alternatives.end(), back_inserter( winners ) );
+	    printAlts( winners, stream, 8 );
+	    throw SemanticError( std::string( stream.str(), stream.pcount() ) );
+	}
+	alternatives.erase( oldBegin, alternatives.end() );
+	PRINT(
+	    std::cout << "there are " << alternatives.size() << " alternatives after elimination" << std::endl;
+	    )
+    }
+
+    void AlternativeFinder::findWithAdjustment( Expression *expr ) {
+	find( expr, true );
+    }
+
+    template< typename StructOrUnionType >
+    void AlternativeFinder::addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Cost &newCost, const std::string &name ) {
+	std::list< Declaration* > members;
+	aggInst->lookup( name, members );
+	for ( std::list< Declaration* >::const_iterator i = members.begin(); i != members.end(); ++i ) {
+	    if ( DeclarationWithType *dwt = dynamic_cast< DeclarationWithType* >( *i ) ) {
+		alternatives.push_back( Alternative( new MemberExpr( dwt->clone(), expr->clone() ), env, newCost ) );
+		renameTypes( alternatives.back().expr );
+	    } else {
+		assert( false );
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( ApplicationExpr *applicationExpr ) {
+	alternatives.push_back( Alternative( applicationExpr->clone(), env, Cost::zero ) );
+    }
+
+    Cost computeConversionCost( Alternative &alt, const SymTab::Indexer &indexer ) {
+	ApplicationExpr *appExpr = dynamic_cast< ApplicationExpr* >( alt.expr );
+	assert( appExpr );
+	PointerType *pointer = dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() );
+	assert( pointer );
+	FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() );
+	assert( function );
+
+	Cost convCost( 0, 0, 0 );
+	std::list< DeclarationWithType* >& formals = function->get_parameters();
+	std::list< DeclarationWithType* >::iterator formal = formals.begin();
+	std::list< Expression* >& actuals = appExpr->get_args();
+	for ( std::list< Expression* >::iterator actualExpr = actuals.begin(); actualExpr != actuals.end(); ++actualExpr ) {
+	    PRINT(
+		std::cout << "actual expression:" << std::endl;
+		(*actualExpr)->print( std::cout, 8 );
+		std::cout << "--- results are" << std::endl;
+		printAll( (*actualExpr)->get_results(), std::cout, 8 );
+		)
+	    std::list< DeclarationWithType* >::iterator startFormal = formal;
+	    Cost actualCost;
+	    for ( std::list< Type* >::iterator actual = (*actualExpr)->get_results().begin(); actual != (*actualExpr)->get_results().end(); ++actual ) {
+		if ( formal == formals.end() ) {
+		    if ( function->get_isVarArgs() ) {
+			convCost += Cost( 1, 0, 0 );
+			break;
+		    } else {
+			return Cost::infinity;
+		    }
+		}
+		PRINT(
+		    std::cout << std::endl << "converting ";
+		    (*actual)->print( std::cout, 8 );
+		    std::cout << std::endl << " to ";
+		    (*formal)->get_type()->print( std::cout, 8 );
+		    )
+		Cost newCost = conversionCost( *actual, (*formal)->get_type(), indexer, alt.env );
+		PRINT(
+		    std::cout << std::endl << "cost is" << newCost << std::endl;
+		    )
+
+		if ( newCost == Cost::infinity ) {
+		    return newCost;
+		}
+		convCost += newCost;
+		actualCost += newCost;
+
+		convCost += Cost( 0, polyCost( (*formal)->get_type(), alt.env, indexer ) + polyCost( *actual, alt.env, indexer ), 0 );
+
+		formal++;
+	    }
+	    if ( actualCost != Cost( 0, 0, 0 ) ) {
+		std::list< DeclarationWithType* >::iterator startFormalPlusOne = startFormal;
+		startFormalPlusOne++;
+		if ( formal == startFormalPlusOne ) {
+		    // not a tuple type
+		    Type *newType = (*startFormal)->get_type()->clone();
+		    alt.env.apply( newType );
+		    *actualExpr = new CastExpr( *actualExpr, newType );
+		} else {
+		    TupleType *newType = new TupleType( Type::Qualifiers() );
+		    for ( std::list< DeclarationWithType* >::iterator i = startFormal; i != formal; ++i ) {
+			newType->get_types().push_back( (*i)->get_type()->clone() );
+		    }
+		    alt.env.apply( newType );
+		    *actualExpr = new CastExpr( *actualExpr, newType );
+		}
+	    }
+
+	}
+	if ( formal != formals.end() ) {
+	    return Cost::infinity;
+	}
+
+	for ( InferredParams::const_iterator assert = appExpr->get_inferParams().begin(); assert != appExpr->get_inferParams().end(); ++assert ) {
+	    PRINT(
+		std::cout << std::endl << "converting ";
+		assert->second.actualType->print( std::cout, 8 );
+		std::cout << std::endl << " to ";
+		assert->second.formalType->print( std::cout, 8 );
+		)
+	    Cost newCost = conversionCost( assert->second.actualType, assert->second.formalType, indexer, alt.env );
+	    PRINT(
+		std::cout << std::endl << "cost of conversion is " << newCost << std::endl;
+		)
+	    if ( newCost == Cost::infinity ) {
+		return newCost;
+	    }
+	    convCost += newCost;
+
+	    convCost += Cost( 0, polyCost( assert->second.formalType, alt.env, indexer ) + polyCost( assert->second.actualType, alt.env, indexer ), 0 );
+	}
+
+	return convCost;
+    }
+
+    void makeUnifiableVars( Type *type, OpenVarSet &unifiableVars, AssertionSet &needAssertions ) {
+	for ( std::list< TypeDecl* >::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
+	    unifiableVars[ (*tyvar)->get_name() ] = (*tyvar)->get_kind();
+	    for ( std::list< DeclarationWithType* >::iterator assert = (*tyvar)->get_assertions().begin(); assert != (*tyvar)->get_assertions().end(); ++assert ) {
+		needAssertions[ *assert ] = true;
+	    }
 ///     needAssertions.insert( needAssertions.end(), (*tyvar)->get_assertions().begin(), (*tyvar)->get_assertions().end() );
-  }
-}
-
-bool
-AlternativeFinder::instantiateFunction( std::list< DeclarationWithType* >& formals, /*const*/ AltList &actuals, bool isVarArgs, OpenVarSet& openVars, TypeEnvironment &resultEnv, AssertionSet &resultNeed, AssertionSet &resultHave )
-{
-  std::list< TypeEnvironment > toBeDone;
-  simpleCombineEnvironments( actuals.begin(), actuals.end(), resultEnv );
-  // make sure we don't widen any existing bindings
-  for( TypeEnvironment::iterator i = resultEnv.begin(); i != resultEnv.end(); ++i ) {
-    i->allowWidening  = false;
-  }
-  resultEnv.extractOpenVars( openVars );
-
-  /*
-  Tuples::NameMatcher matcher( formals );
-  try {
-    matcher.match( actuals );
-  } catch ( Tuples::NoMatch &e ) {
-    std::cerr << "Alternative doesn't match: " << e.message << std::endl;
-  }
-  */
-  std::list< DeclarationWithType* >::iterator formal = formals.begin();
-  for( AltList::const_iterator actualExpr = actuals.begin(); actualExpr != actuals.end(); ++actualExpr ) {
-    for( std::list< Type* >::iterator actual = actualExpr->expr->get_results().begin(); actual != actualExpr->expr->get_results().end(); ++actual ) {
-      if( formal == formals.end() ) {
-        return isVarArgs;
-      }
-///       std::cerr << "formal type is ";
-///       (*formal)->get_type()->print( std::cerr );
-///       std::cerr << std::endl << "actual type is ";
-///       (*actual)->print( std::cerr );
-///       std::cerr << std::endl;
-      if( !unify( (*formal)->get_type(), *actual, resultEnv, resultNeed, resultHave, openVars, indexer ) ) {
-        return false;
-      }
-      formal++;
-    }
-  }
-  // Handling of default values
-  while( formal != formals.end() ) {
-    if( ObjectDecl *od = dynamic_cast<ObjectDecl *>( *formal ) )
-      if( SingleInit *si = dynamic_cast<SingleInit *>( od->get_init() ))
-	// so far, only constant expressions are accepted as default values
-	if ( ConstantExpr *cnstexpr = dynamic_cast<ConstantExpr *>(si->get_value()) )
-	  if ( Constant *cnst = dynamic_cast<Constant *>( cnstexpr->get_constant() ) )
-	    if( unify( (*formal)->get_type(), cnst->get_type(), resultEnv, resultNeed, resultHave, openVars, indexer ) ) {
-	      // XXX Don't know if this is right
-	      actuals.push_back( Alternative( cnstexpr->clone(), env, Cost::zero ) );
-	      formal++;
-	      if (formal == formals.end()) break;
-	    }
-    return false;
-  }
-  return true;
-}
-
-static const int recursionLimit = 10;
-
-void
-addToIndexer( AssertionSet &assertSet, SymTab::Indexer &indexer )
-{
-  for( AssertionSet::iterator i = assertSet.begin(); i != assertSet.end(); ++i ) {
-    if( i->second == true ) {
-      i->first->accept( indexer );
-    }
-  }
-}
-
-template< typename ForwardIterator, typename OutputIterator >
-void
-inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, int level, const SymTab::Indexer &indexer, OutputIterator out )
-{
-  if( begin == end ) {
-    if( newNeed.empty() ) {
-      *out++ = newAlt;
-      return;
-    } else if( level >= recursionLimit ) {
-      throw SemanticError( "Too many recursive assertions" );
-    } else {
-      AssertionSet newerNeed;
-///       std::cerr << "recursing with new set:" << std::endl;
-///       printAssertionSet( newNeed, std::cerr, 8 );
-      inferRecursive( newNeed.begin(), newNeed.end(), newAlt, openVars, decls, newerNeed, level+1, indexer, out );
-      return;
-    }
-  }
-
-  ForwardIterator cur = begin++;
-  if( !cur->second ) {
-    inferRecursive( begin, end, newAlt, openVars, decls, newNeed, level, indexer, out );
-  }
-  DeclarationWithType *curDecl = cur->first;
-///   std::cerr << "inferRecursive: assertion is ";
-///   curDecl->print( std::cerr );
-///   std::cerr << std::endl;
-  std::list< DeclarationWithType* > candidates;
-  decls.lookupId( curDecl->get_name(), candidates );
-///   if( candidates.empty() ) { std::cout << "no candidates!" << std::endl; }
-  for( std::list< DeclarationWithType* >::const_iterator candidate = candidates.begin(); candidate != candidates.end(); ++candidate ) {
-///     std::cout << "inferRecursive: candidate is ";
-///     (*candidate)->print( std::cout );
-///     std::cout << std::endl;
-    AssertionSet newHave, newerNeed( newNeed );
-    TypeEnvironment newEnv( newAlt.env );
-    OpenVarSet newOpenVars( openVars );
-    Type *adjType = (*candidate)->get_type()->clone();
-    adjustExprType( adjType, newEnv, indexer );
-    adjType->accept( global_renamer );
-///     std::cerr << "unifying ";
-///     curDecl->get_type()->print( std::cerr );
-///     std::cerr << " with ";
-///     adjType->print( std::cerr );
-///     std::cerr << std::endl;
-    if( unify( curDecl->get_type(), adjType, newEnv, newerNeed, newHave, newOpenVars, indexer ) ) {
-///       std::cerr << "success!" << std::endl;
-      SymTab::Indexer newDecls( decls );
-      addToIndexer( newHave, newDecls );
-      Alternative newerAlt( newAlt );
-      newerAlt.env = newEnv;
-      assert( (*candidate)->get_uniqueId() );
-      Expression *varExpr = new VariableExpr( static_cast< DeclarationWithType* >( Declaration::declFromId( (*candidate)->get_uniqueId() ) ) );
-      deleteAll( varExpr->get_results() );
-      varExpr->get_results().clear();
-      varExpr->get_results().push_front( adjType->clone() );
-///       std::cout << "satisfying assertion " << curDecl->get_uniqueId() << " ";
-///       curDecl->print( std::cout );
-///       std::cout << " with declaration " << (*candidate)->get_uniqueId() << " ";
-///       (*candidate)->print( std::cout );
-///       std::cout << std::endl;
-      ApplicationExpr *appExpr = static_cast< ApplicationExpr* >( newerAlt.expr );
-      // XXX: this is a memory leak, but adjType can't be deleted because it might contain assertions
-      appExpr->get_inferParams()[ curDecl->get_uniqueId() ] = ParamEntry( (*candidate)->get_uniqueId(), adjType->clone(), curDecl->get_type()->clone(), varExpr );
-      inferRecursive( begin, end, newerAlt, newOpenVars, newDecls, newerNeed, level, indexer, out );
-    } else {
-      delete adjType;
-    }
-  }
-}
-
-template< typename OutputIterator >
-void
-AlternativeFinder::inferParameters( const AssertionSet &need, AssertionSet &have, const Alternative &newAlt, OpenVarSet &openVars, OutputIterator out )
-{
-///   std::cout << "inferParameters: assertions needed are" << std::endl;
-///   printAll( need, std::cout, 8 );
-  SymTab::Indexer decls( indexer );
-///   std::cout << "============= original indexer" << std::endl;
-///   indexer.print( std::cout );
-///   std::cout << "============= new indexer" << std::endl;
-///   decls.print( std::cout );
-  addToIndexer( have, decls );
-  AssertionSet newNeed;
-  inferRecursive( need.begin(), need.end(), newAlt, openVars, decls, newNeed, 0, indexer, out );
-///   std::cout << "declaration 14 is ";
-///   Declaration::declFromId
-///    *out++ = newAlt;
-}
-
-template< typename OutputIterator >
-void
-AlternativeFinder::makeFunctionAlternatives( const Alternative &func, FunctionType *funcType, AltList &actualAlt, OutputIterator out )
-{
-  OpenVarSet openVars;
-  AssertionSet resultNeed, resultHave;
-  TypeEnvironment resultEnv;
-  makeUnifiableVars( funcType, openVars, resultNeed );
-  if( instantiateFunction( funcType->get_parameters(), actualAlt, funcType->get_isVarArgs(), openVars, resultEnv, resultNeed, resultHave ) ) {
-    ApplicationExpr *appExpr = new ApplicationExpr( func.expr->clone() );
-    Alternative newAlt( appExpr, resultEnv, sumCost( actualAlt ) );
-    makeExprList( actualAlt, appExpr->get_args() );
-///     std::cout << "need assertions:" << std::endl;
-///     printAssertionSet( resultNeed, std::cout, 8 );
-    inferParameters( resultNeed, resultHave, newAlt, openVars, out );
-  }
-}
-
-void
-AlternativeFinder::visit(UntypedExpr *untypedExpr)
-{
-  bool doneInit = false;
-  AlternativeFinder funcOpFinder( indexer, env );
-
-  AlternativeFinder funcFinder( indexer, env );
-  {
-    NameExpr *fname;
-    if ( (fname = dynamic_cast<NameExpr *>(untypedExpr->get_function()))
-	 && ( fname->get_name() == std::string("LabAddress")) ) {
-	alternatives.push_back( Alternative(untypedExpr, env, Cost()) );
-	return;
-      }
-  }
-
-  funcFinder.findWithAdjustment( untypedExpr->get_function() );
-  std::list< AlternativeFinder > argAlternatives;
-  findSubExprs( untypedExpr->begin_args(), untypedExpr->end_args(), back_inserter( argAlternatives ) );
-
-  std::list< AltList > possibilities;
-  combos( argAlternatives.begin(), argAlternatives.end(), back_inserter( possibilities ) );
-
-  Tuples::TupleAssignSpotter tassign(this);
-  if ( tassign.isTupleAssignment(untypedExpr, possibilities) ) {
-    // take care of possible tuple assignments, or discard expression
-    return;
-  } // else ...
-
-  AltList candidates;
-
-  for( AltList::const_iterator func = funcFinder.alternatives.begin(); func != funcFinder.alternatives.end(); ++func ) {
-///     std::cout << "working on alternative: " << std::endl;
-///     func->print( std::cout, 8 );
-    // check if the type is pointer to function
-    PointerType *pointer;
-    if( func->expr->get_results().size() == 1 && ( pointer = dynamic_cast< PointerType* >( func->expr->get_results().front() ) ) ) {
-      if( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
-        for( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
-	  // XXX
-          //Designators::check_alternative( function, *actualAlt );
-          makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );
-        }
-      } else if( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( pointer->get_base() ) ) {
-        EqvClass eqvClass;
-        if( func->env.lookup( typeInst->get_name(), eqvClass ) && eqvClass.type ) {
-          if( FunctionType *function = dynamic_cast< FunctionType* >( eqvClass.type ) ) {
-            for( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
-              makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );
-            }
-          }
-        }
-      }
-    } else {
-      // seek a function operator that's compatible
-      if( !doneInit ) {
-        doneInit = true;
-        NameExpr *opExpr = new NameExpr( "?()" );
-        try {
-          funcOpFinder.findWithAdjustment( opExpr );
-        } catch( SemanticError &e ) {
-          // it's ok if there aren't any defined function ops
-        }
-///         std::cout << "known function ops:" << std::endl;
-///         printAlts( funcOpFinder.alternatives, std::cout, 8 );
-      }
-
-      for( AltList::const_iterator funcOp = funcOpFinder.alternatives.begin(); funcOp != funcOpFinder.alternatives.end(); ++funcOp ) {
-        // check if the type is pointer to function
-        PointerType *pointer;
-        if( funcOp->expr->get_results().size() == 1
-        	&& ( pointer = dynamic_cast< PointerType* >( funcOp->expr->get_results().front() ) ) ) {
-          if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
-            for( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
-              AltList currentAlt;
-              currentAlt.push_back( *func );
-              currentAlt.insert( currentAlt.end(), actualAlt->begin(), actualAlt->end() );
-              makeFunctionAlternatives( *funcOp, function, currentAlt, std::back_inserter( candidates ) );
-            }
-          }
-        }
-      }
-    }
-  }
-
-  for( AltList::iterator withFunc = candidates.begin(); withFunc != candidates.end(); ++withFunc ) {
-    Cost cvtCost = computeConversionCost( *withFunc, indexer );
-
-#ifdef DEBUG_COST
-    ApplicationExpr *appExpr = dynamic_cast< ApplicationExpr* >( withFunc->expr );
-    assert( appExpr );
-    PointerType *pointer = dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() );
-    assert( pointer );
-    FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() );
-    assert( function );
-    std::cout << "Case +++++++++++++" << std::endl;
-    std::cout << "formals are:" << std::endl;
-    printAll( function->get_parameters(), std::cout, 8 );
-    std::cout << "actuals are:" << std::endl;
-    printAll( appExpr->get_args(), std::cout, 8 );
-    std::cout << "bindings are:" << std::endl;
-    withFunc->env.print( std::cout, 8 );
-    std::cout << "cost of conversion is:" << cvtCost << std::endl;
-#endif
-
-    if( cvtCost != Cost::infinity ) {
-      withFunc->cvtCost = cvtCost;
-      alternatives.push_back( *withFunc );
-    }
-  }
-  candidates.clear();
-  candidates.splice( candidates.end(), alternatives );
-
-  findMinCost( candidates.begin(), candidates.end(), std::back_inserter( alternatives ) );
-}
-
-bool
-isLvalue( Expression *expr ) {
-  for( std::list< Type* >::const_iterator i = expr->get_results().begin(); i != expr->get_results().end(); ++i ) {
-    if( !(*i)->get_isLvalue() ) return false;
-  }
-  return true;
-}
-
-void
-AlternativeFinder::visit(AddressExpr *addressExpr)
-{
-  AlternativeFinder finder( indexer, env );
-  finder.find( addressExpr->get_arg() );
-  for( std::list< Alternative >::iterator i = finder.alternatives.begin(); i != finder.alternatives.end(); ++i ) {
-    if( isLvalue( i->expr ) ) {
-      alternatives.push_back( Alternative( new AddressExpr( i->expr->clone() ), i->env, i->cost ) );
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(CastExpr *castExpr)
-{
-  for( std::list< Type* >::iterator i = castExpr->get_results().begin(); i != castExpr->get_results().end(); ++i ) {
-    SymTab::validateType( *i, &indexer );
-    adjustExprType( *i, env, indexer );
-  }
-
-  AlternativeFinder finder( indexer, env );
-  finder.findWithAdjustment( castExpr->get_arg() );
-
-  AltList candidates;
-  for( std::list< Alternative >::iterator i = finder.alternatives.begin(); i != finder.alternatives.end(); ++i ) {
-    AssertionSet needAssertions, haveAssertions;
-    OpenVarSet openVars;
-
-    // It's possible that a cast can throw away some values in a multiply-valued expression.
-    // (An example is a cast-to-void, which casts from one value to zero.)
-    // Figure out the prefix of the subexpression results that are cast directly.
-    // The candidate is invalid if it has fewer results than there are types to cast to.
-    int discardedValues = (*i).expr->get_results().size() - castExpr->get_results().size();
-    if( discardedValues < 0 ) continue;
-    std::list< Type* >::iterator candidate_end = (*i).expr->get_results().begin();
-    std::advance( candidate_end, castExpr->get_results().size() );
-    if( !unifyList( (*i).expr->get_results().begin(), candidate_end,
-    	castExpr->get_results().begin(), castExpr->get_results().end(), i->env, needAssertions, haveAssertions, openVars, indexer ) ) continue;
-    Cost thisCost = castCostList( (*i).expr->get_results().begin(), candidate_end,
-    	castExpr->get_results().begin(), castExpr->get_results().end(), indexer, i->env );
-    if( thisCost != Cost::infinity ) {
-      // count one safe conversion for each value that is thrown away
-      thisCost += Cost( 0, 0, discardedValues );
-      CastExpr *newExpr = castExpr->clone();
-      newExpr->set_arg( i->expr->clone() );
-      candidates.push_back( Alternative( newExpr, i->env, i->cost, thisCost ) );
-    }
-  }
-
-  // findMinCost selects the alternatives with the lowest "cost" members, but has the side effect
-  // of copying the cvtCost member to the cost member (since the old cost is now irrelevant).
-  // Thus, calling findMinCost twice selects first based on argument cost, then on conversion cost.
-  AltList minArgCost;
-  findMinCost( candidates.begin(), candidates.end(), std::back_inserter( minArgCost ) );
-  findMinCost( minArgCost.begin(), minArgCost.end(), std::back_inserter( alternatives ) );
-}
-
-void
-AlternativeFinder::visit(UntypedMemberExpr *memberExpr)
-{
-  AlternativeFinder funcFinder( indexer, env );
-  funcFinder.findWithAdjustment( memberExpr->get_aggregate() );
-
-  for( AltList::const_iterator agg = funcFinder.alternatives.begin(); agg != funcFinder.alternatives.end(); ++agg ) {
-    if( agg->expr->get_results().size() == 1 ) {
-      if( StructInstType *structInst = dynamic_cast< StructInstType* >( agg->expr->get_results().front() ) ) {
-        addAggMembers( structInst, agg->expr, agg->cost, memberExpr->get_member() );
-      } else if( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( agg->expr->get_results().front() ) ) {
-        addAggMembers( unionInst, agg->expr, agg->cost, memberExpr->get_member() );
-      }
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(MemberExpr *memberExpr)
-{
-  alternatives.push_back( Alternative( memberExpr->clone(), env, Cost::zero ) );
-}
-
-void
-AlternativeFinder::visit(NameExpr *nameExpr)
-{
-  std::list< DeclarationWithType* > declList;
-  indexer.lookupId( nameExpr->get_name(), declList );
-///     std::cerr << "nameExpr is " << nameExpr->get_name() << std::endl;
-  for( std::list< DeclarationWithType* >::iterator i = declList.begin(); i != declList.end(); ++i ) {
-    VariableExpr newExpr( *i, nameExpr->get_argName() );
-    alternatives.push_back( Alternative( newExpr.clone(), env, Cost() ) );
-///     std::cerr << "decl is ";
-///     (*i)->print( std::cerr );
-///     std::cerr << std::endl;
-///     std::cerr << "newExpr is ";
-///     newExpr.print( std::cerr );
-///     std::cerr << std::endl;
-    renameTypes( alternatives.back().expr );
-    if( StructInstType *structInst = dynamic_cast< StructInstType* >( (*i)->get_type() ) ) {
-      addAggMembers( structInst, &newExpr, Cost( 0, 0, 1 ), "" );
-    } else if( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( (*i)->get_type() ) ) {
-      addAggMembers( unionInst, &newExpr, Cost( 0, 0, 1 ), "" );
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(VariableExpr *variableExpr)
-{
-  alternatives.push_back( Alternative( variableExpr->clone(), env, Cost::zero ) );
-}
-
-void
-AlternativeFinder::visit(ConstantExpr *constantExpr)
-{
-  alternatives.push_back( Alternative( constantExpr->clone(), env, Cost::zero ) );
-}
-
-void
-AlternativeFinder::visit(SizeofExpr *sizeofExpr)
-{
-  if( sizeofExpr->get_isType() ) {
-    alternatives.push_back( Alternative( sizeofExpr->clone(), env, Cost::zero ) );
-  } else {
-    AlternativeFinder finder( indexer, env );
-    finder.find( sizeofExpr->get_expr() );
-    if( finder.alternatives.size() != 1 ) {
-      throw SemanticError( "Ambiguous expression in sizeof operand: ", sizeofExpr->get_expr() );
-    }
-    Alternative &choice = finder.alternatives.front();
-    alternatives.push_back( Alternative( new SizeofExpr( choice.expr->clone() ), choice.env, Cost::zero ) );
-  }
-}
-
-void
-AlternativeFinder::resolveAttr( DeclarationWithType *funcDecl, FunctionType *function, Type *argType, const TypeEnvironment &env )
-{
-  // assume no polymorphism
-  // assume no implicit conversions
-  assert( function->get_parameters().size() == 1 );
-///   std::cout << "resolvAttr: funcDecl is ";
-///   funcDecl->print( std::cout );
-///   std::cout << " argType is ";
-///   argType->print( std::cout );
-///   std::cout << std::endl;
-  if( typesCompatibleIgnoreQualifiers( argType, function->get_parameters().front()->get_type(), indexer, env ) ) {
-    alternatives.push_back( Alternative( new AttrExpr( new VariableExpr( funcDecl ), argType->clone() ), env, Cost::zero ) );
-    for( std::list< DeclarationWithType* >::iterator i = function->get_returnVals().begin(); i != function->get_returnVals().end(); ++i ) {
-      alternatives.back().expr->get_results().push_back( (*i)->get_type()->clone() );
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(AttrExpr *attrExpr)
-{
-  // assume no 'pointer-to-attribute'
-  NameExpr *nameExpr = dynamic_cast< NameExpr* >( attrExpr->get_attr() );
-  assert( nameExpr );
-  std::list< DeclarationWithType* > attrList;
-  indexer.lookupId( nameExpr->get_name(), attrList );
-  if( attrExpr->get_isType() || attrExpr->get_expr() ) {
-    for( std::list< DeclarationWithType* >::iterator i = attrList.begin(); i != attrList.end(); ++i ) {
-      // check if the type is function
-      if( FunctionType *function = dynamic_cast< FunctionType* >( (*i)->get_type() ) ) {
-        // assume exactly one parameter
-        if( function->get_parameters().size() == 1 ) {
-          if( attrExpr->get_isType() ) {
-            resolveAttr( *i, function, attrExpr->get_type(), env );
-          } else {
-            AlternativeFinder finder( indexer, env );
-            finder.find( attrExpr->get_expr() );
-            for( AltList::iterator choice = finder.alternatives.begin(); choice != finder.alternatives.end(); ++choice ) {
-              if( choice->expr->get_results().size() == 1 ) {
-                resolveAttr(*i, function, choice->expr->get_results().front(), choice->env );
-              }
-            }
-          }
-        }
-      }
-    }
-  } else {
-    for( std::list< DeclarationWithType* >::iterator i = attrList.begin(); i != attrList.end(); ++i ) {
-      VariableExpr newExpr( *i );
-      alternatives.push_back( Alternative( newExpr.clone(), env, Cost() ) );
-      renameTypes( alternatives.back().expr );
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(LogicalExpr *logicalExpr)
-{
-  AlternativeFinder firstFinder( indexer, env );
-  firstFinder.findWithAdjustment( logicalExpr->get_arg1() );
-  for( AltList::const_iterator first = firstFinder.alternatives.begin(); first != firstFinder.alternatives.end(); ++first ) {
-    AlternativeFinder secondFinder( indexer, first->env );
-    secondFinder.findWithAdjustment( logicalExpr->get_arg2() );
-    for( AltList::const_iterator second = secondFinder.alternatives.begin(); second != secondFinder.alternatives.end(); ++second ) {
-      LogicalExpr *newExpr = new LogicalExpr( first->expr->clone(), second->expr->clone(), logicalExpr->get_isAnd() );
-      alternatives.push_back( Alternative( newExpr, second->env, first->cost + second->cost ) );
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(ConditionalExpr *conditionalExpr)
-{
-  AlternativeFinder firstFinder( indexer, env );
-  firstFinder.findWithAdjustment( conditionalExpr->get_arg1() );
-  for( AltList::const_iterator first = firstFinder.alternatives.begin(); first != firstFinder.alternatives.end(); ++first ) {
-    AlternativeFinder secondFinder( indexer, first->env );
-    secondFinder.findWithAdjustment( conditionalExpr->get_arg2() );
-    for( AltList::const_iterator second = secondFinder.alternatives.begin(); second != secondFinder.alternatives.end(); ++second ) {
-      AlternativeFinder thirdFinder( indexer, second->env );
-      thirdFinder.findWithAdjustment( conditionalExpr->get_arg3() );
-      for( AltList::const_iterator third = thirdFinder.alternatives.begin(); third != thirdFinder.alternatives.end(); ++third ) {
-        OpenVarSet openVars;
-        AssertionSet needAssertions, haveAssertions;
-        Alternative newAlt( 0, third->env, first->cost + second->cost + third->cost );
-        std::list< Type* > commonTypes;
-        if( unifyList( second->expr->get_results().begin(), second->expr->get_results().end(), third->expr->get_results().begin(), third->expr->get_results().end(), newAlt.env, needAssertions, haveAssertions, openVars, indexer, commonTypes ) ) {
-          ConditionalExpr *newExpr = new ConditionalExpr( first->expr->clone(), second->expr->clone(), third->expr->clone() );
-          std::list< Type* >::const_iterator original = second->expr->get_results().begin();
-          std::list< Type* >::const_iterator commonType = commonTypes.begin();
-          for( ; original != second->expr->get_results().end() && commonType != commonTypes.end(); ++original, ++commonType ) {
-            if( *commonType ) {
-              newExpr->get_results().push_back( *commonType );
-            } else {
-              newExpr->get_results().push_back( (*original)->clone() );
-            }
-          }
-          newAlt.expr = newExpr;
-          inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( alternatives ) );
-        }
-      }
-    }
-  }
-}
-
-void
-AlternativeFinder::visit(CommaExpr *commaExpr)
-{
-  TypeEnvironment newEnv( env );
-  Expression *newFirstArg = resolveInVoidContext( commaExpr->get_arg1(), indexer, newEnv );
-  AlternativeFinder secondFinder( indexer, newEnv );
-  secondFinder.findWithAdjustment( commaExpr->get_arg2() );
-  for( AltList::const_iterator alt = secondFinder.alternatives.begin(); alt != secondFinder.alternatives.end(); ++alt ) {
-    alternatives.push_back( Alternative( new CommaExpr( newFirstArg->clone(), alt->expr->clone() ), alt->env, alt->cost ) );
-  }
-  delete newFirstArg;
-}
-
-void
-AlternativeFinder::visit(TupleExpr *tupleExpr)
-{
-  std::list< AlternativeFinder > subExprAlternatives;
-  findSubExprs( tupleExpr->get_exprs().begin(), tupleExpr->get_exprs().end(), back_inserter( subExprAlternatives ) );
-  std::list< AltList > possibilities;
-  combos( subExprAlternatives.begin(), subExprAlternatives.end(), back_inserter( possibilities ) );
-  for( std::list< AltList >::const_iterator i = possibilities.begin(); i != possibilities.end(); ++i ) {
-    TupleExpr *newExpr = new TupleExpr;
-    makeExprList( *i, newExpr->get_exprs() );
-    for( std::list< Expression* >::const_iterator resultExpr = newExpr->get_exprs().begin(); resultExpr != newExpr->get_exprs().end(); ++resultExpr ) {
-      for( std::list< Type* >::const_iterator resultType = (*resultExpr)->get_results().begin(); resultType != (*resultExpr)->get_results().end(); ++resultType ) {
-        newExpr->get_results().push_back( (*resultType)->clone() );
-      }
-    }
-
-    TypeEnvironment compositeEnv;
-    simpleCombineEnvironments( i->begin(), i->end(), compositeEnv );
-    alternatives.push_back( Alternative( newExpr, compositeEnv, sumCost( *i ) ) );
-  }
-}
-
+	}
+    }
+
+    bool AlternativeFinder::instantiateFunction( std::list< DeclarationWithType* >& formals, /*const*/ AltList &actuals, bool isVarArgs, OpenVarSet& openVars, TypeEnvironment &resultEnv, AssertionSet &resultNeed, AssertionSet &resultHave ) {
+	std::list< TypeEnvironment > toBeDone;
+	simpleCombineEnvironments( actuals.begin(), actuals.end(), resultEnv );
+	// make sure we don't widen any existing bindings
+	for ( TypeEnvironment::iterator i = resultEnv.begin(); i != resultEnv.end(); ++i ) {
+	    i->allowWidening  = false;
+	}
+	resultEnv.extractOpenVars( openVars );
+
+	/*
+	  Tuples::NameMatcher matcher( formals );
+	  try {
+	  matcher.match( actuals );
+	  } catch ( Tuples::NoMatch &e ) {
+	  std::cerr << "Alternative doesn't match: " << e.message << std::endl;
+	  }
+	*/
+	std::list< DeclarationWithType* >::iterator formal = formals.begin();
+	for ( AltList::const_iterator actualExpr = actuals.begin(); actualExpr != actuals.end(); ++actualExpr ) {
+	    for ( std::list< Type* >::iterator actual = actualExpr->expr->get_results().begin(); actual != actualExpr->expr->get_results().end(); ++actual ) {
+		if ( formal == formals.end() ) {
+		    return isVarArgs;
+		}
+		PRINT(
+		    std::cerr << "formal type is ";
+		    (*formal)->get_type()->print( std::cerr );
+		    std::cerr << std::endl << "actual type is ";
+		    (*actual)->print( std::cerr );
+		    std::cerr << std::endl;
+		    )
+		if ( !unify( (*formal)->get_type(), *actual, resultEnv, resultNeed, resultHave, openVars, indexer ) ) {
+		    return false;
+		}
+		formal++;
+	    }
+	}
+	// Handling of default values
+	while ( formal != formals.end() ) {
+	    if ( ObjectDecl *od = dynamic_cast<ObjectDecl *>( *formal ) )
+		if ( SingleInit *si = dynamic_cast<SingleInit *>( od->get_init() ))
+		    // so far, only constant expressions are accepted as default values
+		    if ( ConstantExpr *cnstexpr = dynamic_cast<ConstantExpr *>( si->get_value()) )
+			if ( Constant *cnst = dynamic_cast<Constant *>( cnstexpr->get_constant() ) )
+			    if ( unify( (*formal)->get_type(), cnst->get_type(), resultEnv, resultNeed, resultHave, openVars, indexer ) ) {
+				// XXX Don't know if this is right
+				actuals.push_back( Alternative( cnstexpr->clone(), env, Cost::zero ) );
+				formal++;
+				if ( formal == formals.end()) break;
+			    }
+	    return false;
+	}
+	return true;
+    }
+
+    static const int recursionLimit = 10;
+
+    void addToIndexer( AssertionSet &assertSet, SymTab::Indexer &indexer ) {
+	for ( AssertionSet::iterator i = assertSet.begin(); i != assertSet.end(); ++i ) {
+	    if ( i->second == true ) {
+		i->first->accept( indexer );
+	    }
+	}
+    }
+
+    template< typename ForwardIterator, typename OutputIterator >
+    void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, int level, const SymTab::Indexer &indexer, OutputIterator out ) {
+	if ( begin == end ) {
+	    if ( newNeed.empty() ) {
+		*out++ = newAlt;
+		return;
+	    } else if ( level >= recursionLimit ) {
+		throw SemanticError( "Too many recursive assertions" );
+	    } else {
+		AssertionSet newerNeed;
+		PRINT(
+		    std::cerr << "recursing with new set:" << std::endl;
+		    printAssertionSet( newNeed, std::cerr, 8 );
+		    )
+		inferRecursive( newNeed.begin(), newNeed.end(), newAlt, openVars, decls, newerNeed, level+1, indexer, out );
+		return;
+	    }
+	}
+
+	ForwardIterator cur = begin++;
+	if ( !cur->second ) {
+	    inferRecursive( begin, end, newAlt, openVars, decls, newNeed, level, indexer, out );
+	}
+	DeclarationWithType *curDecl = cur->first;
+	PRINT(
+	    std::cerr << "inferRecursive: assertion is ";
+	    curDecl->print( std::cerr );
+	    std::cerr << std::endl;
+	    )
+	std::list< DeclarationWithType* > candidates;
+	decls.lookupId( curDecl->get_name(), candidates );
+///   if ( candidates.empty() ) { std::cout << "no candidates!" << std::endl; }
+	for ( std::list< DeclarationWithType* >::const_iterator candidate = candidates.begin(); candidate != candidates.end(); ++candidate ) {
+	    PRINT(
+		std::cout << "inferRecursive: candidate is ";
+		(*candidate)->print( std::cout );
+		std::cout << std::endl;
+		)
+	    AssertionSet newHave, newerNeed( newNeed );
+	    TypeEnvironment newEnv( newAlt.env );
+	    OpenVarSet newOpenVars( openVars );
+	    Type *adjType = (*candidate)->get_type()->clone();
+	    adjustExprType( adjType, newEnv, indexer );
+	    adjType->accept( global_renamer );
+	    PRINT(
+		std::cerr << "unifying ";
+		curDecl->get_type()->print( std::cerr );
+		std::cerr << " with ";
+		adjType->print( std::cerr );
+		std::cerr << std::endl;
+		)
+	    if ( unify( curDecl->get_type(), adjType, newEnv, newerNeed, newHave, newOpenVars, indexer ) ) {
+		PRINT(
+		    std::cerr << "success!" << std::endl;
+		    )
+		SymTab::Indexer newDecls( decls );
+		addToIndexer( newHave, newDecls );
+		Alternative newerAlt( newAlt );
+		newerAlt.env = newEnv;
+		assert( (*candidate)->get_uniqueId() );
+		Expression *varExpr = new VariableExpr( static_cast< DeclarationWithType* >( Declaration::declFromId( (*candidate)->get_uniqueId() ) ) );
+		deleteAll( varExpr->get_results() );
+		varExpr->get_results().clear();
+		varExpr->get_results().push_front( adjType->clone() );
+		PRINT(
+		    std::cout << "satisfying assertion " << curDecl->get_uniqueId() << " ";
+		    curDecl->print( std::cout );
+		    std::cout << " with declaration " << (*candidate)->get_uniqueId() << " ";
+		    (*candidate)->print( std::cout );
+		    std::cout << std::endl;
+		    )
+		ApplicationExpr *appExpr = static_cast< ApplicationExpr* >( newerAlt.expr );
+		// XXX: this is a memory leak, but adjType can't be deleted because it might contain assertions
+		appExpr->get_inferParams()[ curDecl->get_uniqueId() ] = ParamEntry( (*candidate)->get_uniqueId(), adjType->clone(), curDecl->get_type()->clone(), varExpr );
+		inferRecursive( begin, end, newerAlt, newOpenVars, newDecls, newerNeed, level, indexer, out );
+	    } else {
+		delete adjType;
+	    }
+	}
+    }
+
+    template< typename OutputIterator >
+    void AlternativeFinder::inferParameters( const AssertionSet &need, AssertionSet &have, const Alternative &newAlt, OpenVarSet &openVars, OutputIterator out ) {
+//	PRINT(
+//	    std::cout << "inferParameters: assertions needed are" << std::endl;
+//	    printAll( need, std::cout, 8 );
+//	    )
+	SymTab::Indexer decls( indexer );
+	PRINT(
+	    std::cout << "============= original indexer" << std::endl;
+	    indexer.print( std::cout );
+	    std::cout << "============= new indexer" << std::endl;
+	    decls.print( std::cout );
+	    )
+	addToIndexer( have, decls );
+	AssertionSet newNeed;
+	inferRecursive( need.begin(), need.end(), newAlt, openVars, decls, newNeed, 0, indexer, out );
+//	PRINT(
+//	    std::cout << "declaration 14 is ";
+//	    Declaration::declFromId
+//	    *out++ = newAlt;
+//	    )
+    }
+
+    template< typename OutputIterator >
+    void AlternativeFinder::makeFunctionAlternatives( const Alternative &func, FunctionType *funcType, AltList &actualAlt, OutputIterator out ) {
+	OpenVarSet openVars;
+	AssertionSet resultNeed, resultHave;
+	TypeEnvironment resultEnv;
+	makeUnifiableVars( funcType, openVars, resultNeed );
+	if ( instantiateFunction( funcType->get_parameters(), actualAlt, funcType->get_isVarArgs(), openVars, resultEnv, resultNeed, resultHave ) ) {
+	    ApplicationExpr *appExpr = new ApplicationExpr( func.expr->clone() );
+	    Alternative newAlt( appExpr, resultEnv, sumCost( actualAlt ) );
+	    makeExprList( actualAlt, appExpr->get_args() );
+	    PRINT(
+		std::cout << "need assertions:" << std::endl;
+		printAssertionSet( resultNeed, std::cout, 8 );
+		)
+	    inferParameters( resultNeed, resultHave, newAlt, openVars, out );
+	}
+    }
+
+    void AlternativeFinder::visit( UntypedExpr *untypedExpr ) {
+	bool doneInit = false;
+	AlternativeFinder funcOpFinder( indexer, env );
+
+	AlternativeFinder funcFinder( indexer, env ); {
+	    NameExpr *fname;
+	    if ( ( fname = dynamic_cast<NameExpr *>( untypedExpr->get_function()))
+		 && ( fname->get_name() == std::string("LabAddress")) ) {
+		alternatives.push_back( Alternative( untypedExpr, env, Cost()) );
+		return;
+	    }
+	}
+
+	funcFinder.findWithAdjustment( untypedExpr->get_function() );
+	std::list< AlternativeFinder > argAlternatives;
+	findSubExprs( untypedExpr->begin_args(), untypedExpr->end_args(), back_inserter( argAlternatives ) );
+
+	std::list< AltList > possibilities;
+	combos( argAlternatives.begin(), argAlternatives.end(), back_inserter( possibilities ) );
+
+	Tuples::TupleAssignSpotter tassign( this );
+	if ( tassign.isTupleAssignment( untypedExpr, possibilities ) ) {
+	    // take care of possible tuple assignments, or discard expression
+	    return;
+	} // else ...
+
+	AltList candidates;
+
+	for ( AltList::const_iterator func = funcFinder.alternatives.begin(); func != funcFinder.alternatives.end(); ++func ) {
+	    PRINT(
+		std::cout << "working on alternative: " << std::endl;
+		func->print( std::cout, 8 );
+		)
+	    // check if the type is pointer to function
+	    PointerType *pointer;
+	    if ( func->expr->get_results().size() == 1 && ( pointer = dynamic_cast< PointerType* >( func->expr->get_results().front() ) ) ) {
+		if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
+		    for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
+			// XXX
+			//Designators::check_alternative( function, *actualAlt );
+			makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );
+		    }
+		} else if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( pointer->get_base() ) ) {
+		    EqvClass eqvClass;
+		    if ( func->env.lookup( typeInst->get_name(), eqvClass ) && eqvClass.type ) {
+			if ( FunctionType *function = dynamic_cast< FunctionType* >( eqvClass.type ) ) {
+			    for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
+				makeFunctionAlternatives( *func, function, *actualAlt, std::back_inserter( candidates ) );
+			    }
+			}
+		    }
+		}
+	    } else {
+		// seek a function operator that's compatible
+		if ( !doneInit ) {
+		    doneInit = true;
+		    NameExpr *opExpr = new NameExpr( "?()" );
+		    try {
+			funcOpFinder.findWithAdjustment( opExpr );
+		    } catch( SemanticError &e ) {
+			// it's ok if there aren't any defined function ops
+		    }
+		    PRINT(
+			std::cout << "known function ops:" << std::endl;
+			printAlts( funcOpFinder.alternatives, std::cout, 8 );
+			)
+		}
+
+		for ( AltList::const_iterator funcOp = funcOpFinder.alternatives.begin(); funcOp != funcOpFinder.alternatives.end(); ++funcOp ) {
+		    // check if the type is pointer to function
+		    PointerType *pointer;
+		    if ( funcOp->expr->get_results().size() == 1
+			&& ( pointer = dynamic_cast< PointerType* >( funcOp->expr->get_results().front() ) ) ) {
+			if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
+			    for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
+				AltList currentAlt;
+				currentAlt.push_back( *func );
+				currentAlt.insert( currentAlt.end(), actualAlt->begin(), actualAlt->end() );
+				makeFunctionAlternatives( *funcOp, function, currentAlt, std::back_inserter( candidates ) );
+			    }
+			}
+		    }
+		}
+	    }
+	}
+
+	for ( AltList::iterator withFunc = candidates.begin(); withFunc != candidates.end(); ++withFunc ) {
+	    Cost cvtCost = computeConversionCost( *withFunc, indexer );
+
+	    PRINT(
+		ApplicationExpr *appExpr = dynamic_cast< ApplicationExpr* >( withFunc->expr );
+		assert( appExpr );
+		PointerType *pointer = dynamic_cast< PointerType* >( appExpr->get_function()->get_results().front() );
+		assert( pointer );
+		FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() );
+		assert( function );
+		std::cout << "Case +++++++++++++" << std::endl;
+		std::cout << "formals are:" << std::endl;
+		printAll( function->get_parameters(), std::cout, 8 );
+		std::cout << "actuals are:" << std::endl;
+		printAll( appExpr->get_args(), std::cout, 8 );
+		std::cout << "bindings are:" << std::endl;
+		withFunc->env.print( std::cout, 8 );
+		std::cout << "cost of conversion is:" << cvtCost << std::endl;
+		)
+	    if ( cvtCost != Cost::infinity ) {
+		withFunc->cvtCost = cvtCost;
+		alternatives.push_back( *withFunc );
+	    }
+	}
+	candidates.clear();
+	candidates.splice( candidates.end(), alternatives );
+
+	findMinCost( candidates.begin(), candidates.end(), std::back_inserter( alternatives ) );
+    }
+
+    bool isLvalue( Expression *expr ) {
+	for ( std::list< Type* >::const_iterator i = expr->get_results().begin(); i != expr->get_results().end(); ++i ) {
+	    if ( !(*i)->get_isLvalue() ) return false;
+	}
+	return true;
+    }
+
+    void AlternativeFinder::visit( AddressExpr *addressExpr ) {
+	AlternativeFinder finder( indexer, env );
+	finder.find( addressExpr->get_arg() );
+	for ( std::list< Alternative >::iterator i = finder.alternatives.begin(); i != finder.alternatives.end(); ++i ) {
+	    if ( isLvalue( i->expr ) ) {
+		alternatives.push_back( Alternative( new AddressExpr( i->expr->clone() ), i->env, i->cost ) );
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( CastExpr *castExpr ) {
+	for ( std::list< Type* >::iterator i = castExpr->get_results().begin(); i != castExpr->get_results().end(); ++i ) {
+	    SymTab::validateType( *i, &indexer );
+	    adjustExprType( *i, env, indexer );
+	}
+
+	AlternativeFinder finder( indexer, env );
+	finder.findWithAdjustment( castExpr->get_arg() );
+
+	AltList candidates;
+	for ( std::list< Alternative >::iterator i = finder.alternatives.begin(); i != finder.alternatives.end(); ++i ) {
+	    AssertionSet needAssertions, haveAssertions;
+	    OpenVarSet openVars;
+
+	    // It's possible that a cast can throw away some values in a multiply-valued expression.  (An example is a
+	    // cast-to-void, which casts from one value to zero.)  Figure out the prefix of the subexpression results
+	    // that are cast directly.  The candidate is invalid if it has fewer results than there are types to cast
+	    // to.
+	    int discardedValues = (*i).expr->get_results().size() - castExpr->get_results().size();
+	    if ( discardedValues < 0 ) continue;
+	    std::list< Type* >::iterator candidate_end = (*i).expr->get_results().begin();
+	    std::advance( candidate_end, castExpr->get_results().size() );
+	    if ( !unifyList( (*i).expr->get_results().begin(), candidate_end,
+			    castExpr->get_results().begin(), castExpr->get_results().end(), i->env, needAssertions, haveAssertions, openVars, indexer ) ) continue;
+	    Cost thisCost = castCostList( (*i).expr->get_results().begin(), candidate_end,
+					  castExpr->get_results().begin(), castExpr->get_results().end(), indexer, i->env );
+	    if ( thisCost != Cost::infinity ) {
+		// count one safe conversion for each value that is thrown away
+		thisCost += Cost( 0, 0, discardedValues );
+		CastExpr *newExpr = castExpr->clone();
+		newExpr->set_arg( i->expr->clone() );
+		candidates.push_back( Alternative( newExpr, i->env, i->cost, thisCost ) );
+	    }
+	}
+
+	// findMinCost selects the alternatives with the lowest "cost" members, but has the side effect of copying the
+	// cvtCost member to the cost member (since the old cost is now irrelevant).  Thus, calling findMinCost twice
+	// selects first based on argument cost, then on conversion cost.
+	AltList minArgCost;
+	findMinCost( candidates.begin(), candidates.end(), std::back_inserter( minArgCost ) );
+	findMinCost( minArgCost.begin(), minArgCost.end(), std::back_inserter( alternatives ) );
+    }
+
+    void AlternativeFinder::visit( UntypedMemberExpr *memberExpr ) {
+	AlternativeFinder funcFinder( indexer, env );
+	funcFinder.findWithAdjustment( memberExpr->get_aggregate() );
+
+	for ( AltList::const_iterator agg = funcFinder.alternatives.begin(); agg != funcFinder.alternatives.end(); ++agg ) {
+	    if ( agg->expr->get_results().size() == 1 ) {
+		if ( StructInstType *structInst = dynamic_cast< StructInstType* >( agg->expr->get_results().front() ) ) {
+		    addAggMembers( structInst, agg->expr, agg->cost, memberExpr->get_member() );
+		} else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( agg->expr->get_results().front() ) ) {
+		    addAggMembers( unionInst, agg->expr, agg->cost, memberExpr->get_member() );
+		}
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( MemberExpr *memberExpr ) {
+	alternatives.push_back( Alternative( memberExpr->clone(), env, Cost::zero ) );
+    }
+
+    void AlternativeFinder::visit( NameExpr *nameExpr ) {
+	std::list< DeclarationWithType* > declList;
+	indexer.lookupId( nameExpr->get_name(), declList );
+	PRINT(
+	    std::cerr << "nameExpr is " << nameExpr->get_name() << std::endl;
+	    )
+	for ( std::list< DeclarationWithType* >::iterator i = declList.begin(); i != declList.end(); ++i ) {
+	    VariableExpr newExpr( *i, nameExpr->get_argName() );
+	    alternatives.push_back( Alternative( newExpr.clone(), env, Cost() ) );
+	    PRINT(
+		std::cerr << "decl is ";
+		(*i)->print( std::cerr );
+		std::cerr << std::endl;
+		std::cerr << "newExpr is ";
+		newExpr.print( std::cerr );
+		std::cerr << std::endl;
+		)
+	    renameTypes( alternatives.back().expr );
+	    if ( StructInstType *structInst = dynamic_cast< StructInstType* >( (*i)->get_type() ) ) {
+		addAggMembers( structInst, &newExpr, Cost( 0, 0, 1 ), "" );
+	    } else if ( UnionInstType *unionInst = dynamic_cast< UnionInstType* >( (*i)->get_type() ) ) {
+		addAggMembers( unionInst, &newExpr, Cost( 0, 0, 1 ), "" );
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( VariableExpr *variableExpr ) {
+	alternatives.push_back( Alternative( variableExpr->clone(), env, Cost::zero ) );
+    }
+
+    void AlternativeFinder::visit( ConstantExpr *constantExpr ) {
+	alternatives.push_back( Alternative( constantExpr->clone(), env, Cost::zero ) );
+    }
+
+    void AlternativeFinder::visit( SizeofExpr *sizeofExpr ) {
+	if ( sizeofExpr->get_isType() ) {
+	    alternatives.push_back( Alternative( sizeofExpr->clone(), env, Cost::zero ) );
+	} else {
+	    AlternativeFinder finder( indexer, env );
+	    finder.find( sizeofExpr->get_expr() );
+	    if ( finder.alternatives.size() != 1 ) {
+		throw SemanticError( "Ambiguous expression in sizeof operand: ", sizeofExpr->get_expr() );
+	    }
+	    Alternative &choice = finder.alternatives.front();
+	    alternatives.push_back( Alternative( new SizeofExpr( choice.expr->clone() ), choice.env, Cost::zero ) );
+	}
+    }
+
+    void AlternativeFinder::resolveAttr( DeclarationWithType *funcDecl, FunctionType *function, Type *argType, const TypeEnvironment &env ) {
+	// assume no polymorphism
+	// assume no implicit conversions
+	assert( function->get_parameters().size() == 1 );
+	PRINT(
+	    std::cout << "resolvAttr: funcDecl is ";
+	    funcDecl->print( std::cout );
+	    std::cout << " argType is ";
+	    argType->print( std::cout );
+	    std::cout << std::endl;
+	    )
+	if ( typesCompatibleIgnoreQualifiers( argType, function->get_parameters().front()->get_type(), indexer, env ) ) {
+	    alternatives.push_back( Alternative( new AttrExpr( new VariableExpr( funcDecl ), argType->clone() ), env, Cost::zero ) );
+	    for ( std::list< DeclarationWithType* >::iterator i = function->get_returnVals().begin(); i != function->get_returnVals().end(); ++i ) {
+		alternatives.back().expr->get_results().push_back( (*i)->get_type()->clone() );
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( AttrExpr *attrExpr ) {
+	// assume no 'pointer-to-attribute'
+	NameExpr *nameExpr = dynamic_cast< NameExpr* >( attrExpr->get_attr() );
+	assert( nameExpr );
+	std::list< DeclarationWithType* > attrList;
+	indexer.lookupId( nameExpr->get_name(), attrList );
+	if ( attrExpr->get_isType() || attrExpr->get_expr() ) {
+	    for ( std::list< DeclarationWithType* >::iterator i = attrList.begin(); i != attrList.end(); ++i ) {
+		// check if the type is function
+		if ( FunctionType *function = dynamic_cast< FunctionType* >( (*i)->get_type() ) ) {
+		    // assume exactly one parameter
+		    if ( function->get_parameters().size() == 1 ) {
+			if ( attrExpr->get_isType() ) {
+			    resolveAttr( *i, function, attrExpr->get_type(), env );
+			} else {
+			    AlternativeFinder finder( indexer, env );
+			    finder.find( attrExpr->get_expr() );
+			    for ( AltList::iterator choice = finder.alternatives.begin(); choice != finder.alternatives.end(); ++choice ) {
+				if ( choice->expr->get_results().size() == 1 ) {
+				    resolveAttr(*i, function, choice->expr->get_results().front(), choice->env );
+				}
+			    }
+			}
+		    }
+		}
+	    }
+	} else {
+	    for ( std::list< DeclarationWithType* >::iterator i = attrList.begin(); i != attrList.end(); ++i ) {
+		VariableExpr newExpr( *i );
+		alternatives.push_back( Alternative( newExpr.clone(), env, Cost() ) );
+		renameTypes( alternatives.back().expr );
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( LogicalExpr *logicalExpr ) {
+	AlternativeFinder firstFinder( indexer, env );
+	firstFinder.findWithAdjustment( logicalExpr->get_arg1() );
+	for ( AltList::const_iterator first = firstFinder.alternatives.begin(); first != firstFinder.alternatives.end(); ++first ) {
+	    AlternativeFinder secondFinder( indexer, first->env );
+	    secondFinder.findWithAdjustment( logicalExpr->get_arg2() );
+	    for ( AltList::const_iterator second = secondFinder.alternatives.begin(); second != secondFinder.alternatives.end(); ++second ) {
+		LogicalExpr *newExpr = new LogicalExpr( first->expr->clone(), second->expr->clone(), logicalExpr->get_isAnd() );
+		alternatives.push_back( Alternative( newExpr, second->env, first->cost + second->cost ) );
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( ConditionalExpr *conditionalExpr ) {
+	AlternativeFinder firstFinder( indexer, env );
+	firstFinder.findWithAdjustment( conditionalExpr->get_arg1() );
+	for ( AltList::const_iterator first = firstFinder.alternatives.begin(); first != firstFinder.alternatives.end(); ++first ) {
+	    AlternativeFinder secondFinder( indexer, first->env );
+	    secondFinder.findWithAdjustment( conditionalExpr->get_arg2() );
+	    for ( AltList::const_iterator second = secondFinder.alternatives.begin(); second != secondFinder.alternatives.end(); ++second ) {
+		AlternativeFinder thirdFinder( indexer, second->env );
+		thirdFinder.findWithAdjustment( conditionalExpr->get_arg3() );
+		for ( AltList::const_iterator third = thirdFinder.alternatives.begin(); third != thirdFinder.alternatives.end(); ++third ) {
+		    OpenVarSet openVars;
+		    AssertionSet needAssertions, haveAssertions;
+		    Alternative newAlt( 0, third->env, first->cost + second->cost + third->cost );
+		    std::list< Type* > commonTypes;
+		    if ( unifyList( second->expr->get_results().begin(), second->expr->get_results().end(), third->expr->get_results().begin(), third->expr->get_results().end(), newAlt.env, needAssertions, haveAssertions, openVars, indexer, commonTypes ) ) {
+			ConditionalExpr *newExpr = new ConditionalExpr( first->expr->clone(), second->expr->clone(), third->expr->clone() );
+			std::list< Type* >::const_iterator original = second->expr->get_results().begin();
+			std::list< Type* >::const_iterator commonType = commonTypes.begin();
+			for ( ; original != second->expr->get_results().end() && commonType != commonTypes.end(); ++original, ++commonType ) {
+			    if ( *commonType ) {
+				newExpr->get_results().push_back( *commonType );
+			    } else {
+				newExpr->get_results().push_back( (*original)->clone() );
+			    }
+			}
+			newAlt.expr = newExpr;
+			inferParameters( needAssertions, haveAssertions, newAlt, openVars, back_inserter( alternatives ) );
+		    }
+		}
+	    }
+	}
+    }
+
+    void AlternativeFinder::visit( CommaExpr *commaExpr ) {
+	TypeEnvironment newEnv( env );
+	Expression *newFirstArg = resolveInVoidContext( commaExpr->get_arg1(), indexer, newEnv );
+	AlternativeFinder secondFinder( indexer, newEnv );
+	secondFinder.findWithAdjustment( commaExpr->get_arg2() );
+	for ( AltList::const_iterator alt = secondFinder.alternatives.begin(); alt != secondFinder.alternatives.end(); ++alt ) {
+	    alternatives.push_back( Alternative( new CommaExpr( newFirstArg->clone(), alt->expr->clone() ), alt->env, alt->cost ) );
+	}
+	delete newFirstArg;
+    }
+
+    void AlternativeFinder::visit( TupleExpr *tupleExpr ) {
+	std::list< AlternativeFinder > subExprAlternatives;
+	findSubExprs( tupleExpr->get_exprs().begin(), tupleExpr->get_exprs().end(), back_inserter( subExprAlternatives ) );
+	std::list< AltList > possibilities;
+	combos( subExprAlternatives.begin(), subExprAlternatives.end(), back_inserter( possibilities ) );
+	for ( std::list< AltList >::const_iterator i = possibilities.begin(); i != possibilities.end(); ++i ) {
+	    TupleExpr *newExpr = new TupleExpr;
+	    makeExprList( *i, newExpr->get_exprs() );
+	    for ( std::list< Expression* >::const_iterator resultExpr = newExpr->get_exprs().begin(); resultExpr != newExpr->get_exprs().end(); ++resultExpr ) {
+		for ( std::list< Type* >::const_iterator resultType = (*resultExpr)->get_results().begin(); resultType != (*resultExpr)->get_results().end(); ++resultType ) {
+		    newExpr->get_results().push_back( (*resultType)->clone() );
+		}
+	    }
+
+	    TypeEnvironment compositeEnv;
+	    simpleCombineEnvironments( i->begin(), i->end(), compositeEnv );
+	    alternatives.push_back( Alternative( newExpr, compositeEnv, sumCost( *i ) ) );
+	}
+    }
 } // namespace ResolvExpr
Index: translator/ResolvExpr/AlternativeFinder.h
===================================================================
--- translator/ResolvExpr/AlternativeFinder.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/AlternativeFinder.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,11 +1,4 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: AlternativeFinder.h,v 1.19 2005/08/29 20:14:15 rcbilson Exp $
- *
- */
-
-#ifndef RESOLVEXPR_ALTERNATIVEFINDER_H
-#define RESOLVEXPR_ALTERNATIVEFINDER_H
+#ifndef ALTERNATIVEFINDER_H
+#define ALTERNATIVEFINDER_H
 
 #include <set>
@@ -18,62 +11,58 @@
 
 namespace ResolvExpr {
+    class AlternativeFinder : public Visitor {
+      public:
+	AlternativeFinder( const SymTab::Indexer &indexer, const TypeEnvironment &env );
+	void find( Expression *expr, bool adjust = false );
+	void findWithAdjustment( Expression *expr );
+	AltList &get_alternatives() { return alternatives; }
+  
+	// make this look like an STL container so that we can apply generic algorithms
+	typedef Alternative value_type;
+	typedef AltList::iterator iterator;
+	typedef AltList::const_iterator const_iterator;
+	AltList::iterator begin() { return alternatives.begin(); }
+	AltList::iterator end() { return alternatives.end(); }
+	AltList::const_iterator begin() const { return alternatives.begin(); }
+	AltList::const_iterator end() const { return alternatives.end(); }
+  
+	const SymTab::Indexer &get_indexer() const { return indexer; }
+	const TypeEnvironment &get_environ() const { return env; }
+      private:
+	virtual void visit( ApplicationExpr *applicationExpr );
+	virtual void visit( UntypedExpr *untypedExpr );
+	virtual void visit( AddressExpr *addressExpr );
+	virtual void visit( CastExpr *castExpr );
+	virtual void visit( UntypedMemberExpr *memberExpr );
+	virtual void visit( MemberExpr *memberExpr );
+	virtual void visit( NameExpr *variableExpr );
+	virtual void visit( VariableExpr *variableExpr );
+	virtual void visit( ConstantExpr *constantExpr ); 
+	virtual void visit( SizeofExpr *sizeofExpr );
+	virtual void visit( AttrExpr *attrExpr );
+	virtual void visit( LogicalExpr *logicalExpr );
+	virtual void visit( ConditionalExpr *conditionalExpr );
+	virtual void visit( CommaExpr *commaExpr );
+	virtual void visit( TupleExpr *tupleExpr );
+      public:  // xxx - temporary hack - should make Tuples::TupleAssignment a friend
+	template< typename InputIterator, typename OutputIterator >
+	    void findSubExprs( InputIterator begin, InputIterator end, OutputIterator out );
 
-class AlternativeFinder : public Visitor
-{
-public:
-  AlternativeFinder( const SymTab::Indexer &indexer, const TypeEnvironment &env );
-  void find( Expression *expr, bool adjust = false );
-  void findWithAdjustment( Expression *expr );
-  AltList &get_alternatives() { return alternatives; }
-  
-  // make this look like an STL container so that we can apply generic algorithms
-  typedef Alternative value_type;
-  typedef AltList::iterator iterator;
-  typedef AltList::const_iterator const_iterator;
-  AltList::iterator begin() { return alternatives.begin(); }
-  AltList::iterator end() { return alternatives.end(); }
-  AltList::const_iterator begin() const { return alternatives.begin(); }
-  AltList::const_iterator end() const { return alternatives.end(); }
-  
-  const SymTab::Indexer &get_indexer() const { return indexer; }
-  const TypeEnvironment &get_environ() const { return env; }
-private:
-  virtual void visit(ApplicationExpr *applicationExpr);
-  virtual void visit(UntypedExpr *untypedExpr);
-  virtual void visit(AddressExpr *addressExpr);
-  virtual void visit(CastExpr *castExpr);
-  virtual void visit(UntypedMemberExpr *memberExpr);
-  virtual void visit(MemberExpr *memberExpr);
-  virtual void visit(NameExpr *variableExpr);
-  virtual void visit(VariableExpr *variableExpr);
-  virtual void visit(ConstantExpr *constantExpr); 
-  virtual void visit(SizeofExpr *sizeofExpr);
-  virtual void visit(AttrExpr *attrExpr);
-  virtual void visit(LogicalExpr *logicalExpr);
-  virtual void visit(ConditionalExpr *conditionalExpr);
-  virtual void visit(CommaExpr *commaExpr);
-  virtual void visit(TupleExpr *tupleExpr);
- public:  // xxx - temporary hack - should make Tuples::TupleAssignment a friend
-  template< typename InputIterator, typename OutputIterator >
-  void findSubExprs( InputIterator begin, InputIterator end, OutputIterator out );
+      private:
+	template< typename StructOrUnionType > void addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Cost &newCost, const std::string &name );
+	bool instantiateFunction( std::list< DeclarationWithType* >& formals, /*const*/ AltList &actuals, bool isVarArgs, OpenVarSet& openVars, TypeEnvironment &resultEnv, AssertionSet &resultNeed, AssertionSet &resultHave );
+	template< typename OutputIterator >
+	    void makeFunctionAlternatives( const Alternative &func, FunctionType *funcType, AltList &actualAlt, OutputIterator out );
+	template< typename OutputIterator >
+	    void inferParameters( const AssertionSet &need, AssertionSet &have, const Alternative &newAlt, OpenVarSet &openVars, OutputIterator out );
+	void resolveAttr( DeclarationWithType *funcDecl, FunctionType *function, Type *argType, const TypeEnvironment &env );
 
- private:
-  template< typename StructOrUnionType > void addAggMembers( StructOrUnionType *aggInst, Expression *expr, const Cost &newCost, const std::string &name );
-  bool instantiateFunction( std::list< DeclarationWithType* >& formals, /*const*/ AltList &actuals, bool isVarArgs, OpenVarSet& openVars, TypeEnvironment &resultEnv, AssertionSet &resultNeed, AssertionSet &resultHave );
-  template< typename OutputIterator >
-  void makeFunctionAlternatives( const Alternative &func, FunctionType *funcType, AltList &actualAlt, OutputIterator out );
-  template< typename OutputIterator >
-  void inferParameters( const AssertionSet &need, AssertionSet &have, const Alternative &newAlt, OpenVarSet &openVars, OutputIterator out );
-  void resolveAttr( DeclarationWithType *funcDecl, FunctionType *function, Type *argType, const TypeEnvironment &env );
+	const SymTab::Indexer &indexer;
+	AltList alternatives;
+	const TypeEnvironment &env;
+    }; // AlternativeFinder
 
-  const SymTab::Indexer &indexer;
-  AltList alternatives;
-  const TypeEnvironment &env;
-};
-
-Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer, TypeEnvironment &env )
-;
-
+    Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer, TypeEnvironment &env );
 } // namespace ResolvExpr
 
-#endif /* #ifndef RESOLVEXPR_ALTERNATIVEFINDER_H */
+#endif // ALTERNATIVEFINDER_H
Index: translator/ResolvExpr/AlternativePrinter.cc
===================================================================
--- translator/ResolvExpr/AlternativePrinter.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/AlternativePrinter.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: AlternativePrinter.cc,v 1.5 2005/08/29 20:14:15 rcbilson Exp $
- *
- */
-
 #include "AlternativePrinter.h"
 #include "AlternativeFinder.h"
@@ -15,25 +8,18 @@
 
 namespace ResolvExpr {
+    AlternativePrinter::AlternativePrinter( std::ostream &os ) : SymTab::Indexer( false ), os( os ) {}
 
-AlternativePrinter::AlternativePrinter( std::ostream &os )
-  : SymTab::Indexer( false ), os( os )
-{
-}
-
-void 
-AlternativePrinter::visit(ExprStmt *exprStmt)
-{
-  TypeEnvironment env;
-  AlternativeFinder finder( *this, env );
-  finder.findWithAdjustment( exprStmt->get_expr() );
-  int count = 1;
-  os << "There are " << finder.get_alternatives().size() << " alternatives" << std::endl;
-  for( AltList::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
-    os << "Alternative " << count++ << " ==============" << std::endl;
-    printAll( i->expr->get_results(), os );
-//    i->print( os );
-    os << std::endl;
-  }
-}
-
+    void AlternativePrinter::visit( ExprStmt *exprStmt ) {
+	TypeEnvironment env;
+	AlternativeFinder finder( *this, env );
+	finder.findWithAdjustment( exprStmt->get_expr() );
+	int count = 1;
+	os << "There are " << finder.get_alternatives().size() << " alternatives" << std::endl;
+	for ( AltList::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
+	    os << "Alternative " << count++ << " ==============" << std::endl;
+	    printAll( i->expr->get_results(), os );
+	    //    i->print( os );
+	    os << std::endl;
+	} // for
+    } // AlternativePrinter::visit
 } // namespace ResolvExpr
Index: translator/ResolvExpr/AlternativePrinter.h
===================================================================
--- translator/ResolvExpr/AlternativePrinter.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/AlternativePrinter.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,11 +1,4 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: AlternativePrinter.h,v 1.2 2005/08/29 20:14:15 rcbilson Exp $
- *
- */
-
-#ifndef RESOLVEXPR_ALTERNATIVEPRINTER_H
-#define RESOLVEXPR_ALTERNATIVEPRINTER_H
+#ifndef ALTERNATIVEPRINTER_H
+#define ALTERNATIVEPRINTER_H
 
 #include <iostream>
@@ -15,16 +8,12 @@
 
 namespace ResolvExpr {
-
-class AlternativePrinter : public SymTab::Indexer
-{
-public:
-  AlternativePrinter( std::ostream &os );
-  virtual void visit(ExprStmt *exprStmt);
-
-private:
-  std::ostream &os;
-};
-
+    class AlternativePrinter : public SymTab::Indexer {
+      public:
+	AlternativePrinter( std::ostream &os );
+	virtual void visit(ExprStmt *exprStmt);
+      private:
+	std::ostream &os;
+    };
 } // namespace ResolvExpr
 
-#endif /* #ifndef RESOLVEXPR_ALTERNATIVEPRINTER_H */
+#endif // ALTERNATIVEPRINTER_H
Index: translator/ResolvExpr/Cost.h
===================================================================
--- translator/ResolvExpr/Cost.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/Cost.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Cost.h,v 1.2 2003/01/27 14:46:59 rcbilson Exp $
- *
- */
-
 #ifndef RESOLVEXPR_COST_H
 #define RESOLVEXPR_COST_H
@@ -12,129 +5,100 @@
 
 namespace ResolvExpr {
+    class Cost {
+      public:
+	Cost();
+	Cost( int unsafe, int poly, int safe );
+  
+	void incUnsafe( int inc = 1 );
+	void incPoly( int inc = 1 );
+	void incSafe( int inc = 1 );
+  
+	Cost operator+( const Cost &other ) const;
+	Cost operator-( const Cost &other ) const;
+	Cost &operator+=( const Cost &other );
+	bool operator<( const Cost &other ) const;
+	bool operator==( const Cost &other ) const;
+	bool operator!=( const Cost &other ) const;
+	friend std::ostream &operator<<( std::ostream &os, const Cost &cost );
+  
+	static const Cost zero;
+	static const Cost infinity;
+      private:
+	int compare( const Cost &other ) const;
 
-class Cost
-{
-public:
-  Cost();
-  Cost( int unsafe, int poly, int safe );
-  
-  void incUnsafe( int inc = 1 );
-  void incPoly( int inc = 1 );
-  void incSafe( int inc = 1 );
-  
-  Cost operator+( const Cost &other ) const;
-  Cost operator-( const Cost &other ) const;
-  Cost &operator+=( const Cost &other );
-  bool operator<( const Cost &other ) const;
-  bool operator==( const Cost &other ) const;
-  bool operator!=( const Cost &other ) const;
-  friend std::ostream &operator<<( std::ostream &os, const Cost &cost );
-  
-  static const Cost zero;
-  static const Cost infinity;
-  
-private:
-  int compare( const Cost &other ) const;
+	int unsafe;
+	int poly;
+	int safe;
+    };
 
-  int unsafe;
-  int poly;
-  int safe;
-};
+    inline Cost::Cost() : unsafe( 0 ), poly( 0 ), safe( 0 ) {}
 
-inline
-Cost::Cost()
-  : unsafe( 0 ), poly( 0 ), safe( 0 )
-{
-}
+    inline Cost::Cost( int unsafe, int poly, int safe ) : unsafe( unsafe ), poly( poly ), safe( safe ) {}
 
-inline
-Cost::Cost( int unsafe, int poly, int safe )
-  : unsafe( unsafe ), poly( poly ), safe( safe )
-{
-}
+    inline void 
+	Cost::incUnsafe( int inc ) {
+	unsafe += inc;
+    }
 
-inline void 
-Cost::incUnsafe( int inc )
-{
-  unsafe += inc;
-}
+    inline void 
+	Cost::incPoly( int inc ) {
+	unsafe += inc;
+    }
 
-inline void 
-Cost::incPoly( int inc )
-{
-  unsafe += inc;
-}
+    inline void 
+	Cost::incSafe( int inc ) {
+	unsafe += inc;
+    }
 
-inline void 
-Cost::incSafe( int inc )
-{
-  unsafe += inc;
-}
+    inline Cost Cost::operator+( const Cost &other ) const {
+	return Cost( unsafe + other.unsafe, poly + other.poly, safe + other.safe );
+    }
 
-inline Cost 
-Cost::operator+( const Cost &other ) const
-{
-  return Cost( unsafe + other.unsafe, poly + other.poly, safe + other.safe );
-}
+    inline Cost Cost::operator-( const Cost &other ) const {
+	return Cost( unsafe - other.unsafe, poly - other.poly, safe - other.safe );
+    }
 
-inline Cost 
-Cost::operator-( const Cost &other ) const
-{
-  return Cost( unsafe - other.unsafe, poly - other.poly, safe - other.safe );
-}
+    inline Cost &Cost::operator+=( const Cost &other ) {
+	unsafe += other.unsafe;
+	poly += other.poly;
+	safe += other.safe;
+	return *this;
+    }
 
-inline Cost &
-Cost::operator+=( const Cost &other )
-{
-   unsafe += other.unsafe;
-   poly += other.poly;
-   safe += other.safe;
-   return *this;
-}
+    inline bool Cost::operator<( const Cost &other ) const {
+	    if ( *this == infinity ) return false;
+	    if ( other == infinity ) return true;
+	    if ( unsafe > other.unsafe ) {
+		return false;
+	    } else if ( unsafe < other.unsafe ) {
+		return true;
+	    } else if ( poly > other.poly ) {
+		return false;
+	    } else if ( poly < other.poly ) {
+		return true;
+	    } else if ( safe > other.safe ) {
+		return false;
+	    } else if ( safe < other.safe ) {
+		return true;
+	    } else {
+		return false;
+	    }
+	}
 
-inline bool 
-Cost::operator<( const Cost &other ) const
-{
-  if( *this == infinity ) return false;
-  if( other == infinity ) return true;
-  if( unsafe > other.unsafe ) {
-    return false;
-  } else if( unsafe < other.unsafe ) {
-    return true;
-  } else if( poly > other.poly ) {
-    return false;
-  } else if( poly < other.poly ) {
-    return true;
-  } else if( safe > other.safe ) {
-    return false;
-  } else if( safe < other.safe ) {
-    return true;
-  } else {
-    return false;
-  }
-}
+    inline bool Cost::operator==( const Cost &other ) const {
+	return unsafe == other.unsafe
+	&& poly == other.poly
+	&& safe == other.safe;
+    }
 
-inline bool 
-Cost::operator==( const Cost &other ) const
-{
-  return unsafe == other.unsafe
-         && poly == other.poly
-         && safe == other.safe;
-}
+    inline bool Cost::operator!=( const Cost &other ) const {
+	return !( *this == other );
+    }
 
-inline bool 
-Cost::operator!=( const Cost &other ) const
-{
-  return !( *this == other );
-}
-
-inline std::ostream &
-operator<<( std::ostream &os, const Cost &cost )
-{
-  os << "( " << cost.unsafe << ", " << cost.poly << ", " << cost.safe << " )";
-  return os;
-}
-
+    inline std::ostream &operator<<( std::ostream &os, const Cost &cost ) {
+	os << "( " << cost.unsafe << ", " << cost.poly << ", " << cost.safe << " )";
+	return os;
+    }
 } // namespace ResolvExpr
 
-#endif /* #ifndef RESOLVEXPR_COST_H */
+#endif // RESOLVEXPR_COST_H
Index: translator/ResolvExpr/ResolveTypeof.cc
===================================================================
--- translator/ResolvExpr/ResolveTypeof.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/ResolveTypeof.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: ResolveTypeof.cc,v 1.2 2005/08/29 20:14:16 rcbilson Exp $
- *
- */
-
 #include "ResolveTypeof.h"
 #include "Alternative.h"
@@ -15,57 +8,53 @@
 
 namespace ResolvExpr {
+    namespace {
+#if 0
+	void
+	printAlts( const AltList &list, std::ostream &os, int indent = 0 )
+	{
+	    for( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) {
+		i->print( os, indent );
+		os << std::endl;
+	    }
+	}
+#endif
+    }
 
-namespace {
+    class ResolveTypeof : public Mutator {
+      public:
+	ResolveTypeof( const SymTab::Indexer &indexer ) : indexer( indexer ) {}
+	Type *mutate( TypeofType *typeofType );
+
+      private:
+	const SymTab::Indexer &indexer;
+    };
+
+    Type *resolveTypeof( Type *type, const SymTab::Indexer &indexer ) {
+	ResolveTypeof mutator( indexer );
+	return type->acceptMutator( mutator );
+    }
+
+    Type *ResolveTypeof::mutate( TypeofType *typeofType ) {
 #if 0
-  void
-  printAlts( const AltList &list, std::ostream &os, int indent = 0 )
-  {
-    for( AltList::const_iterator i = list.begin(); i != list.end(); ++i ) {
-      i->print( os, indent );
-      os << std::endl;
+	std::cout << "resolving typeof: ";
+	typeofType->print( std::cout );
+	std::cout << std::endl;
+#endif
+	if ( typeofType->get_expr() ) {
+	    Expression *newExpr = resolveInVoidContext( typeofType->get_expr(), indexer );
+	    assert( newExpr->get_results().size() > 0 );
+	    Type *newType;
+	    if ( newExpr->get_results().size() > 1 ) {
+		TupleType *tupleType = new TupleType( Type::Qualifiers() );
+		cloneAll( newExpr->get_results(), tupleType->get_types() );
+		newType = tupleType;
+	    } else {
+		newType = newExpr->get_results().front()->clone();
+	    }
+	    delete typeofType;
+	    return newType;
+	}
+	return typeofType;
     }
-  }
-#endif
-}
-
-class ResolveTypeof : public Mutator
-{
-public:
-  ResolveTypeof( const SymTab::Indexer &indexer ) : indexer( indexer ) {}
-  Type *mutate( TypeofType *typeofType );
-
-private:
-  const SymTab::Indexer &indexer;
-};
-
-Type *
-resolveTypeof( Type *type, const SymTab::Indexer &indexer )
-{
-  ResolveTypeof mutator( indexer );
-  return type->acceptMutator( mutator );
-}
-
-Type *
-ResolveTypeof::mutate( TypeofType *typeofType )
-{
-///   std::cout << "resolving typeof: ";
-///   typeofType->print( std::cout );
-///   std::cout << std::endl;
-  if( typeofType->get_expr() ) {
-    Expression *newExpr = resolveInVoidContext( typeofType->get_expr(), indexer );
-    assert( newExpr->get_results().size() > 0 );
-    Type *newType;
-    if( newExpr->get_results().size() > 1 ) {
-      TupleType *tupleType = new TupleType( Type::Qualifiers() );
-      cloneAll( newExpr->get_results(), tupleType->get_types() );
-      newType = tupleType;
-    } else {
-      newType = newExpr->get_results().front()->clone();
-    }
-    delete typeofType;
-    return newType;
-  }
-  return typeofType;
-}
 
 } // namespace ResolvExpr
Index: translator/ResolvExpr/ResolveTypeof.h
===================================================================
--- translator/ResolvExpr/ResolveTypeof.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/ResolveTypeof.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,11 +1,4 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: ResolveTypeof.h,v 1.2 2005/08/29 20:14:16 rcbilson Exp $
- *
- */
-
-#ifndef RESOLVEXPR_RESOLVETYPEOF_H
-#define RESOLVEXPR_RESOLVETYPEOF_H
+#ifndef RESOLVETYPEOF_H
+#define RESOLVETYPEOF_H
 
 #include "SynTree/SynTree.h"
@@ -13,8 +6,6 @@
 
 namespace ResolvExpr {
-
-Type *resolveTypeof( Type*, const SymTab::Indexer &indexer );
-
+    Type *resolveTypeof( Type*, const SymTab::Indexer &indexer );
 } // namespace ResolvExpr
 
-#endif /* #ifndef RESOLVEXPR_RESOLVETYPEOF_H */
+#endif // RESOLVETYPEOF_H
Index: translator/ResolvExpr/Resolver.cc
===================================================================
--- translator/ResolvExpr/Resolver.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/Resolver.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Resolver.cc,v 1.19 2005/08/29 20:14:16 rcbilson Exp $
- *
- */
-
 #include "Resolver.h"
 #include "AlternativeFinder.h"
@@ -18,273 +11,244 @@
 #include "utility.h"
 
+#include <iostream>
+using namespace std;
+
 namespace ResolvExpr {
-
-class Resolver : public SymTab::Indexer
-{
-public:
-  Resolver() : SymTab::Indexer( false ), switchType( 0 ) {}
-  
-  virtual void visit( FunctionDecl *functionDecl );
-  virtual void visit( ObjectDecl *functionDecl );
-  virtual void visit( TypeDecl *typeDecl );
-
-  virtual void visit( ExprStmt *exprStmt );
-  virtual void visit( IfStmt *ifStmt );
-  virtual void visit( WhileStmt *whileStmt );
-  virtual void visit( ForStmt *forStmt );
-  virtual void visit( SwitchStmt *switchStmt );
-  virtual void visit( ChooseStmt *switchStmt );
-  virtual void visit( CaseStmt *caseStmt );
-  virtual void visit( ReturnStmt *returnStmt );
-
-  virtual void visit( SingleInit *singleInit );
-
-private:
-  std::list< Type* > functionReturn;
-  Type* initContext;
-  Type *switchType;
-};
-
-void 
-resolve( std::list< Declaration* > translationUnit )
-{
-  Resolver resolver;
-  acceptAll( translationUnit, resolver );
-///   for( std::list< Declaration* >::iterator i = translationUnit.begin(); i != translationUnit.end(); ++i ) {
-///     (*i)->print( std::cerr );
-///     (*i)->accept( resolver );
-///   }
-}
-
-Expression *
-resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer )
-{
-  TypeEnvironment env;
-  return resolveInVoidContext( expr, indexer, env );
-}
-
-namespace {
-
-  void
-  finishExpr( Expression *expr, const TypeEnvironment &env )
-  {
-    expr->set_env( new TypeSubstitution );
-    env.makeSubstitution( *expr->get_env() );
-  }
-
-  Expression*
-  findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer )
-  {
-    global_renamer.reset();
-    TypeEnvironment env;
-    Expression *newExpr = resolveInVoidContext( untyped, indexer, env );
-    finishExpr( newExpr, env );
-    return newExpr;
-  }
-  
-  Expression*
-  findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer )
-  {
-    TypeEnvironment env;
-    AlternativeFinder finder( indexer, env );
-    finder.find( untyped );
-///     if( finder.get_alternatives().size() != 1 ) {
-///       std::cout << "untyped expr is ";
-///       untyped->print( std::cout );
-///       std::cout << std::endl << "alternatives are:";
-///       for( std::list< Alternative >::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
-///         i->print( std::cout );
-///       }
-///     }
-    assert( finder.get_alternatives().size() == 1 );
-    Alternative &choice = finder.get_alternatives().front();
-    Expression *newExpr = choice.expr->clone();
-    finishExpr( newExpr, choice.env );
-    return newExpr;
-  }
-
-  bool
-  isIntegralType( Type *type )
-  {
-    if( dynamic_cast< EnumInstType* >( type ) ) {
-      return true;
-    } else if( BasicType *bt = dynamic_cast< BasicType* >( type ) ) {
-      return bt->isInteger();
-    } else {
-      return true;
-    }
-  }
-  
-  Expression*
-  findIntegralExpression( Expression *untyped, const SymTab::Indexer &indexer )
-  {
-    TypeEnvironment env;
-    AlternativeFinder finder( indexer, env );
-    finder.find( untyped );
-///     if( finder.get_alternatives().size() != 1 ) {
-///       std::cout << "untyped expr is ";
-///       untyped->print( std::cout );
-///       std::cout << std::endl << "alternatives are:";
-///       for( std::list< Alternative >::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
-///         i->print( std::cout );
-///       }
-///     }
-    Expression *newExpr = 0;
-    const TypeEnvironment *newEnv = 0;
-    for( AltList::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
-      if( i->expr->get_results().size() == 1 && isIntegralType( i->expr->get_results().front() ) ) {
-        if( newExpr ) {
-          throw SemanticError( "Too many interpretations for switch control expression", untyped );
-        } else {
-          newExpr = i->expr->clone();
-          newEnv = &i->env;
-        }
-      }
-    }
-    if( !newExpr ) {
-      throw SemanticError( "Too many interpretations for switch control expression", untyped );
-    }
-    finishExpr( newExpr, *newEnv );
-    return newExpr;
-  }
-  
-}
-  
-void 
-Resolver::visit( ObjectDecl *objectDecl )
-{
-  Type *new_type = resolveTypeof( objectDecl->get_type(), *this );
-  objectDecl->set_type( new_type );
-  initContext = new_type;
-  SymTab::Indexer::visit( objectDecl );
-}
-  
-void 
-Resolver::visit( TypeDecl *typeDecl )
-{
-  if( typeDecl->get_base() ) {
-    Type *new_type = resolveTypeof( typeDecl->get_base(), *this );
-    typeDecl->set_base( new_type );
-  }
-  SymTab::Indexer::visit( typeDecl );
-}
-  
-void 
-Resolver::visit( FunctionDecl *functionDecl )
-{
-///   std::cout << "resolver visiting functiondecl ";
-///   functionDecl->print( std::cout );
-///   std::cout << std::endl;
-  Type *new_type = resolveTypeof( functionDecl->get_type(), *this );
-  functionDecl->set_type( new_type );
-  std::list< Type* > oldFunctionReturn = functionReturn;
-  functionReturn.clear();
-  for( std::list< DeclarationWithType* >::const_iterator i = functionDecl->get_functionType()->get_returnVals().begin(); i != functionDecl->get_functionType()->get_returnVals().end(); ++i ) {
-    functionReturn.push_back( (*i)->get_type() );
-  }
-  SymTab::Indexer::visit( functionDecl );
-  functionReturn = oldFunctionReturn;
-}
-
-void 
-Resolver::visit( ExprStmt *exprStmt )
-{
-  if( exprStmt->get_expr() ) {
-    Expression *newExpr = findVoidExpression( exprStmt->get_expr(), *this );
-    delete exprStmt->get_expr();
-    exprStmt->set_expr( newExpr );
-  }
-}
-
-void 
-Resolver::visit( IfStmt *ifStmt )
-{
-  Expression *newExpr = findSingleExpression( ifStmt->get_condition(), *this );
-  delete ifStmt->get_condition();
-  ifStmt->set_condition( newExpr );
-  Visitor::visit( ifStmt );
-}
-
-void 
-Resolver::visit( WhileStmt *whileStmt )
-{
-  Expression *newExpr = findSingleExpression( whileStmt->get_condition(), *this );
-  delete whileStmt->get_condition();
-  whileStmt->set_condition( newExpr );
-  Visitor::visit( whileStmt );
-}
-
-void 
-Resolver::visit( ForStmt *forStmt )
-{
-  Expression *newExpr;
-  if( forStmt->get_condition() ) {
-    newExpr = findSingleExpression( forStmt->get_condition(), *this );
-    delete forStmt->get_condition();
-    forStmt->set_condition( newExpr );
-  }
-  
-  if( forStmt->get_increment() ) {
-    newExpr = findVoidExpression( forStmt->get_increment(), *this );
-    delete forStmt->get_increment();
-    forStmt->set_increment( newExpr );
-  }
-  
-  Visitor::visit( forStmt );
-}
-
-template< typename SwitchClass >
-void
-handleSwitchStmt( SwitchClass *switchStmt, SymTab::Indexer &visitor )
-{
-  Expression *newExpr;
-  newExpr = findIntegralExpression( switchStmt->get_condition(), visitor );
-  delete switchStmt->get_condition();
-  switchStmt->set_condition( newExpr );
-  
-  visitor.Visitor::visit( switchStmt );
-}
-
-void 
-Resolver::visit( SwitchStmt *switchStmt )
-{
-  handleSwitchStmt( switchStmt, *this );
-}
-
-void 
-Resolver::visit( ChooseStmt *switchStmt )
-{
-  handleSwitchStmt( switchStmt, *this );
-}
-
-void 
-Resolver::visit( CaseStmt *caseStmt )
-{
-  Visitor::visit( caseStmt );
-}
-
-void 
-Resolver::visit( ReturnStmt *returnStmt )
-{
-  if( returnStmt->get_expr() ) {
-    CastExpr *castExpr = new CastExpr( returnStmt->get_expr() );
-    cloneAll( functionReturn, castExpr->get_results() );
-    Expression *newExpr = findSingleExpression( castExpr, *this );
-    delete castExpr;
-    returnStmt->set_expr( newExpr );
-  }
-}
-
-void
-Resolver::visit( SingleInit *singleInit )
-{
-  if( singleInit->get_value() ) {
-    CastExpr *castExpr = new CastExpr( singleInit->get_value(), initContext->clone() );
-    Expression *newExpr = findSingleExpression( castExpr, *this );
-    delete castExpr;
-    singleInit->set_value( newExpr );
-  }
-  singleInit->get_value()->accept( *this );
-}
-
+    class Resolver : public SymTab::Indexer {
+      public:
+	Resolver() : SymTab::Indexer( false ), switchType( 0 ) {}
+  
+	virtual void visit( FunctionDecl *functionDecl );
+	virtual void visit( ObjectDecl *functionDecl );
+	virtual void visit( TypeDecl *typeDecl );
+
+	virtual void visit( ExprStmt *exprStmt );
+	virtual void visit( IfStmt *ifStmt );
+	virtual void visit( WhileStmt *whileStmt );
+	virtual void visit( ForStmt *forStmt );
+	virtual void visit( SwitchStmt *switchStmt );
+	virtual void visit( ChooseStmt *switchStmt );
+	virtual void visit( CaseStmt *caseStmt );
+	virtual void visit( ReturnStmt *returnStmt );
+
+	virtual void visit( SingleInit *singleInit );
+	virtual void visit( ListInit *listInit );
+      private:
+	std::list< Type * > functionReturn;
+	Type *initContext;
+	Type *switchType;
+    };
+
+    void resolve( std::list< Declaration * > translationUnit ) {
+	Resolver resolver;
+	acceptAll( translationUnit, resolver );
+#if 0
+	for ( std::list< Declaration * >::iterator i = translationUnit.begin(); i != translationUnit.end(); ++i ) {
+	    (*i)->print( std::cerr );
+	    (*i)->accept( resolver );
+	}
+#endif
+    }
+
+    Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer ) {
+	TypeEnvironment env;
+	return resolveInVoidContext( expr, indexer, env );
+    }
+
+    namespace {
+	void finishExpr( Expression *expr, const TypeEnvironment &env ) {
+	    expr->set_env( new TypeSubstitution );
+	    env.makeSubstitution( *expr->get_env() );
+	}
+
+	Expression *findVoidExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
+	    global_renamer.reset();
+	    TypeEnvironment env;
+	    Expression *newExpr = resolveInVoidContext( untyped, indexer, env );
+	    finishExpr( newExpr, env );
+	    return newExpr;
+	}
+  
+	Expression *findSingleExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
+	    TypeEnvironment env;
+	    AlternativeFinder finder( indexer, env );
+	    finder.find( untyped );
+#if 0
+	    if ( finder.get_alternatives().size() != 1 ) {
+		std::cout << "untyped expr is ";
+		untyped->print( std::cout );
+		std::cout << std::endl << "alternatives are:";
+		for ( std::list< Alternative >::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
+		    i->print( std::cout );
+		}
+	    }
+#endif
+	    assert( finder.get_alternatives().size() == 1 );
+	    Alternative &choice = finder.get_alternatives().front();
+	    Expression *newExpr = choice.expr->clone();
+	    finishExpr( newExpr, choice.env );
+	    return newExpr;
+	}
+
+	bool isIntegralType( Type *type ) {
+	    if ( dynamic_cast< EnumInstType * >( type ) ) {
+		return true;
+	    } else if ( BasicType *bt = dynamic_cast< BasicType * >( type ) ) {
+		return bt->isInteger();
+	    } else {
+		return true;
+	    }
+	}
+  
+	Expression *findIntegralExpression( Expression *untyped, const SymTab::Indexer &indexer ) {
+	    TypeEnvironment env;
+	    AlternativeFinder finder( indexer, env );
+	    finder.find( untyped );
+#if 0
+	    if ( finder.get_alternatives().size() != 1 ) {
+		std::cout << "untyped expr is ";
+		untyped->print( std::cout );
+		std::cout << std::endl << "alternatives are:";
+		for ( std::list< Alternative >::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
+		    i->print( std::cout );
+		}
+	    }
+#endif
+	    Expression *newExpr = 0;
+	    const TypeEnvironment *newEnv = 0;
+	    for ( AltList::const_iterator i = finder.get_alternatives().begin(); i != finder.get_alternatives().end(); ++i ) {
+		if ( i->expr->get_results().size() == 1 && isIntegralType( i->expr->get_results().front() ) ) {
+		    if ( newExpr ) {
+			throw SemanticError( "Too many interpretations for switch control expression", untyped );
+		    } else {
+			newExpr = i->expr->clone();
+			newEnv = &i->env;
+		    }
+		}
+	    }
+	    if ( !newExpr ) {
+		throw SemanticError( "Too many interpretations for switch control expression", untyped );
+	    }
+	    finishExpr( newExpr, *newEnv );
+	    return newExpr;
+	}
+  
+    }
+  
+    void Resolver::visit( ObjectDecl *objectDecl ) {
+	Type *new_type = resolveTypeof( objectDecl->get_type(), *this );
+	objectDecl->set_type( new_type );
+	initContext = new_type;
+	SymTab::Indexer::visit( objectDecl );
+    }
+  
+    void Resolver::visit( TypeDecl *typeDecl ) {
+	if ( typeDecl->get_base() ) {
+	    Type *new_type = resolveTypeof( typeDecl->get_base(), *this );
+	    typeDecl->set_base( new_type );
+	}
+	SymTab::Indexer::visit( typeDecl );
+    }
+  
+    void Resolver::visit( FunctionDecl *functionDecl ) {
+#if 0
+	std::cout << "resolver visiting functiondecl ";
+	functionDecl->print( std::cout );
+	std::cout << std::endl;
+#endif
+	Type *new_type = resolveTypeof( functionDecl->get_type(), *this );
+	functionDecl->set_type( new_type );
+	std::list< Type * > oldFunctionReturn = functionReturn;
+	functionReturn.clear();
+	for ( std::list< DeclarationWithType * >::const_iterator i = functionDecl->get_functionType()->get_returnVals().begin(); i != functionDecl->get_functionType()->get_returnVals().end(); ++i ) {
+	    functionReturn.push_back( (*i)->get_type() );
+	}
+	SymTab::Indexer::visit( functionDecl );
+	functionReturn = oldFunctionReturn;
+    }
+
+    void Resolver::visit( ExprStmt *exprStmt ) {
+	if ( exprStmt->get_expr() ) {
+	    Expression *newExpr = findVoidExpression( exprStmt->get_expr(), *this );
+	    delete exprStmt->get_expr();
+	    exprStmt->set_expr( newExpr );
+	}
+    }
+
+    void Resolver::visit( IfStmt *ifStmt ) {
+	Expression *newExpr = findSingleExpression( ifStmt->get_condition(), *this );
+	delete ifStmt->get_condition();
+	ifStmt->set_condition( newExpr );
+	Visitor::visit( ifStmt );
+    }
+
+    void Resolver::visit( WhileStmt *whileStmt ) {
+	Expression *newExpr = findSingleExpression( whileStmt->get_condition(), *this );
+	delete whileStmt->get_condition();
+	whileStmt->set_condition( newExpr );
+	Visitor::visit( whileStmt );
+    }
+
+    void Resolver::visit( ForStmt *forStmt ) {
+	Expression *newExpr;
+	if ( forStmt->get_condition() ) {
+	    newExpr = findSingleExpression( forStmt->get_condition(), *this );
+	    delete forStmt->get_condition();
+	    forStmt->set_condition( newExpr );
+	}
+  
+	if ( forStmt->get_increment() ) {
+	    newExpr = findVoidExpression( forStmt->get_increment(), *this );
+	    delete forStmt->get_increment();
+	    forStmt->set_increment( newExpr );
+	}
+  
+	Visitor::visit( forStmt );
+    }
+
+    template< typename SwitchClass >
+    void handleSwitchStmt( SwitchClass *switchStmt, SymTab::Indexer &visitor ) {
+	Expression *newExpr;
+	newExpr = findIntegralExpression( switchStmt->get_condition(), visitor );
+	delete switchStmt->get_condition();
+	switchStmt->set_condition( newExpr );
+  
+	visitor.Visitor::visit( switchStmt );
+    }
+
+    void Resolver::visit( SwitchStmt *switchStmt ) {
+	handleSwitchStmt( switchStmt, *this );
+    }
+
+    void Resolver::visit( ChooseStmt *switchStmt ) {
+	handleSwitchStmt( switchStmt, *this );
+    }
+
+    void Resolver::visit( CaseStmt *caseStmt ) {
+	Visitor::visit( caseStmt );
+    }
+
+    void Resolver::visit( ReturnStmt *returnStmt ) {
+	if ( returnStmt->get_expr() ) {
+	    CastExpr *castExpr = new CastExpr( returnStmt->get_expr() );
+	    cloneAll( functionReturn, castExpr->get_results() );
+	    Expression *newExpr = findSingleExpression( castExpr, *this );
+	    delete castExpr;
+	    returnStmt->set_expr( newExpr );
+	}
+    }
+
+    void Resolver::visit( SingleInit *singleInit ) {
+	// if ( singleInit->get_value() ) {
+	//     CastExpr *castExpr = new CastExpr( singleInit->get_value(), initContext->clone() );
+	//     Expression *newExpr = findSingleExpression( castExpr, *this );
+	//     delete castExpr;
+	//     singleInit->set_value( newExpr );
+	// }
+	// singleInit->get_value()->accept( *this );
+    }
+
+    void Resolver::visit( ListInit *listInit ) {
+	// no cast necessary
+    }
 } // namespace ResolvExpr
Index: translator/ResolvExpr/Resolver.h
===================================================================
--- translator/ResolvExpr/Resolver.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/ResolvExpr/Resolver.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,11 +1,4 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Resolver.h,v 1.3 2005/08/29 20:14:16 rcbilson Exp $
- *
- */
-
-#ifndef RESOLVEXPR_RESOLVER_H
-#define RESOLVEXPR_RESOLVER_H
+#ifndef RESOLVER_H
+#define RESOLVER_H
 
 #include "SynTree/SynTree.h"
@@ -13,9 +6,7 @@
 
 namespace ResolvExpr {
-
-void resolve( std::list< Declaration* > translationUnit );
-Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer );
-
+    void resolve( std::list< Declaration * > translationUnit );
+    Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer );
 } // namespace ResolvExpr
 
-#endif /* #ifndef RESOLVEXPR_RESOLVER_H */
+#endif // RESOLVER_H
Index: translator/SynTree/Initializer.cc
===================================================================
--- translator/SynTree/Initializer.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/SynTree/Initializer.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Initializer.cc,v 1.10 2005/08/29 20:59:25 rcbilson Exp $
- *
- */
-
 #include "Initializer.h"
 #include "Expression.h"
@@ -11,14 +4,10 @@
 
 
-Initializer::Initializer( )
-{
-}
+Initializer::Initializer() {}
 
-Initializer::~Initializer( )
-{
-}
+Initializer::~Initializer() {}
 
 std::string Initializer::designator_name( Expression *des ) {
-    if( NameExpr *n = dynamic_cast<NameExpr *>(des) )
+    if ( NameExpr *n = dynamic_cast<NameExpr *>(des) )
 	return n->get_name();
     else
@@ -26,55 +15,37 @@
 }
 
-void 
-Initializer::print( std::ostream &os, int indent )
-{
+void Initializer::print( std::ostream &os, int indent ) {}
+
+SingleInit::SingleInit( Expression *v, std::list< Expression *> &_designators ) : value ( v ), designators( _designators ) { 
 }
 
-SingleInit::SingleInit( Expression *v, std::list< Expression *> &_designators )
-    : value ( v ), designators( _designators )
-{ 
-}
-
-SingleInit::SingleInit ( const SingleInit &other )
-    : value ( other.value )
-{
+SingleInit::SingleInit( const SingleInit &other ) : value ( other.value ) {
     cloneAll(other.designators, designators );
 }
 
-SingleInit::~SingleInit()
-{
-}
+SingleInit::~SingleInit() {}
 
 SingleInit *SingleInit::clone() const { return new SingleInit( *this); }
 
-void SingleInit::print( std::ostream &os, int indent )
-{
+void SingleInit::print( std::ostream &os, int indent ) {
     os << std::endl << std::string(indent, ' ' ) << "Simple Initializer: ";
     value->print( os, indent+2 );
 
-    if ( ! designators.empty() )
-	{
-	    os << std::endl << std::string(indent + 2, ' ' ) << "designated by: "  ;
-	    for ( std::list < Expression * >::iterator i = designators.begin(); i != designators.end(); i++ )
-		( *i )->print(os, indent + 4 );
-	}
+    if ( ! designators.empty() ) {
+	os << std::endl << std::string(indent + 2, ' ' ) << "designated by: "  ;
+	for ( std::list < Expression * >::iterator i = designators.begin(); i != designators.end(); i++ )
+	    ( *i )->print(os, indent + 4 );
+    }
 }
 
-MemberInit::MemberInit( Expression *_value, std::string _member )
-    : member ( _member ), value ( _value )
-{
-}
+MemberInit::MemberInit( Expression *_value, std::string _member ) : member ( _member ), value ( _value ) {}
 
-MemberInit::~MemberInit()
-{
-}
+MemberInit::~MemberInit() {}
 
-MemberInit * MemberInit::clone() const
-{
+MemberInit * MemberInit::clone() const {
     return new MemberInit( *this );
 }
 
-void MemberInit::print( std::ostream &os, int indent )
-{
+void MemberInit::print( std::ostream &os, int indent ) {
     os << "Member Initializer";
     value->print( os, indent+2 );
@@ -82,21 +53,16 @@
 
 ListInit::ListInit( std::list<Initializer*> &_initializers, std::list<Expression *> &_designators )
-    : initializers( _initializers ), designators( _designators )
-{
+    : initializers( _initializers ), designators( _designators ) {
 }
 
-ListInit::~ListInit()
-{
-}
+ListInit::~ListInit() {}
 
-ListInit *ListInit::clone() const
-{
+ListInit *ListInit::clone() const {
     return new ListInit( *this );
 }
 
-void ListInit::print( std::ostream &os, int indent )
-{
+void ListInit::print( std::ostream &os, int indent ) {
     os << std::endl << std::string(indent, ' ') << "Compound initializer:  "; 
-    if( ! designators.empty() ) {
+    if ( ! designators.empty() ) {
 	os << std::string(indent + 2, ' ' ) << "designated by: [";
 	for ( std::list < Expression * >::iterator i = designators.begin();
Index: translator/SynTree/Initializer.h
===================================================================
--- translator/SynTree/Initializer.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/SynTree/Initializer.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Initializer.h,v 1.14 2005/08/29 20:59:25 rcbilson Exp $
- *
- */
-
 #ifndef INITIALIZER_H
 #define INITIALIZER_H
@@ -17,7 +10,6 @@
 
 // Initializer: base class for object initializers (provide default values)
-class Initializer
-{
-public:
+class Initializer {
+  public:
     //	Initializer( std::string _name = std::string(""), int _pos = 0 );
     Initializer( );
@@ -41,6 +33,5 @@
     virtual Initializer *acceptMutator( Mutator &m ) = 0;
     virtual void print( std::ostream &os, int indent = 0 );
-    
-private:
+  private:
     //	std::string name;
     //	int pos;
@@ -48,7 +39,6 @@
 
 // SingleInit represents an initializer for a common object (e.g., int x = 4)
-class SingleInit : public Initializer
-{
-public:
+class SingleInit : public Initializer {
+  public:
     SingleInit( Expression *value, std::list< Expression *> &designators );
     SingleInit( const SingleInit &other );
@@ -65,6 +55,5 @@
     virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     virtual void print( std::ostream &os, int indent = 0 );
-    
-private:
+  private:
     //Constant *value;
     Expression *value;	// has to be a compile-time constant
@@ -72,9 +61,7 @@
 };
 
-// MemberInit represents an initializer for a member of an aggregate object
-// (e.g., struct q { int a } x = { a: 4 } )
-class MemberInit : public Initializer
-{
-public:
+// MemberInit represents an initializer for a member of an aggregate object (e.g., struct q { int a; } x = { a : 4 } )
+class MemberInit : public Initializer {
+  public:
     MemberInit( Expression *value, std::string member = std::string("") );
     virtual ~MemberInit();
@@ -89,15 +76,12 @@
     virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     virtual void print( std::ostream &os, int indent = 0 );
-    
-private:
+  private:
     std::string member;
     Expression *value;
 };
 
-// ElementInit represents an initializer of an element of an array
-// (e.g., [10] int x = { [7]: 4 }
-class ElementInit : public Initializer
-{
-public:
+// ElementInit represents an initializer of an element of an array (e.g., [10] int x = { [7] : 4 }
+class ElementInit : public Initializer {
+  public:
     ElementInit( Expression *value );
     virtual ~ElementInit();
@@ -112,17 +96,15 @@
     virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     virtual void print( std::ostream &os, int indent = 0 );
-    
-private:
+  private:
     int index;
     Expression *value;
 };
 
-// ListInit represents an initializer that is composed recursively of a list of initializers; this
-// is used to initialize an array or aggregate
-class ListInit : public Initializer
-{
-public:
+// ListInit represents an initializer that is composed recursively of a list of initializers; this is used to initialize
+// an array or aggregate
+class ListInit : public Initializer {
+  public:
     ListInit( std::list<Initializer*> &, 
-	    std::list<Expression *> &designators = *(new std::list<Expression *>()) );
+	      std::list<Expression *> &designators = *(new std::list<Expression *>()) );
     virtual ~ListInit();
 
@@ -139,16 +121,8 @@
     virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
     virtual void print( std::ostream &os, int indent = 0 );
-    
-private:
+  private:
     std::list<Initializer*> initializers;  // order *is* important
     std::list<Expression *> designators;
 };
 
-
-#endif /* #ifndef INITIALIZER_H */
-
-/*
-    Local Variables:
-    mode: c++
-    End:
-*/
+#endif // INITIALIZER_H
Index: translator/SynTree/Mutator.cc
===================================================================
--- translator/SynTree/Mutator.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/SynTree/Mutator.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Mutator.cc,v 1.30 2005/08/29 20:59:25 rcbilson Exp $
- *
- */
-
 #include <cassert>
 #include "Mutator.h"
@@ -16,15 +9,9 @@
 #include "utility.h"
 
-Mutator::Mutator()
-{
-}
-
-Mutator::~Mutator()
-{
-}
-
-ObjectDecl*
-Mutator::mutate(ObjectDecl *objectDecl)
-{
+Mutator::Mutator() {}
+
+Mutator::~Mutator() {}
+
+ObjectDecl *Mutator::mutate( ObjectDecl *objectDecl ) {
     objectDecl->set_type( maybeMutate( objectDecl->get_type(), *this ) );
     objectDecl->set_init( maybeMutate( objectDecl->get_init(), *this ) );
@@ -33,7 +20,5 @@
 }
 
-DeclarationWithType*
-Mutator::mutate(FunctionDecl *functionDecl)
-{
+DeclarationWithType *Mutator::mutate( FunctionDecl *functionDecl ) {
     functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
     mutateAll( functionDecl->get_oldDecls(), *this );
@@ -42,7 +27,5 @@
 }
 
-Declaration*
-Mutator::handleAggregateDecl(AggregateDecl *aggregateDecl)
-{
+Declaration *Mutator::handleAggregateDecl( AggregateDecl *aggregateDecl ) {
     mutateAll( aggregateDecl->get_parameters(), *this );
     mutateAll( aggregateDecl->get_members(), *this );
@@ -50,35 +33,25 @@
 }
 
-Declaration* 
-Mutator::mutate(StructDecl *aggregateDecl)
-{
+Declaration *Mutator::mutate( StructDecl *aggregateDecl ) {
     handleAggregateDecl( aggregateDecl );
     return aggregateDecl;
 }
 
-Declaration* 
-Mutator::mutate(UnionDecl *aggregateDecl)
-{
+Declaration *Mutator::mutate( UnionDecl *aggregateDecl ) {
     handleAggregateDecl( aggregateDecl );
     return aggregateDecl;
 }
 
-Declaration* 
-Mutator::mutate(EnumDecl *aggregateDecl)
-{
+Declaration *Mutator::mutate( EnumDecl *aggregateDecl ) {
     handleAggregateDecl( aggregateDecl );
     return aggregateDecl;
 }
 
-Declaration* 
-Mutator::mutate(ContextDecl *aggregateDecl)
-{
+Declaration *Mutator::mutate( ContextDecl *aggregateDecl ) {
     handleAggregateDecl( aggregateDecl );
     return aggregateDecl;
 }
 
-Declaration*
-Mutator::handleNamedTypeDecl(NamedTypeDecl *typeDecl)
-{
+Declaration *Mutator::handleNamedTypeDecl( NamedTypeDecl *typeDecl ) {
     mutateAll( typeDecl->get_parameters(), *this );
     mutateAll( typeDecl->get_assertions(), *this );
@@ -87,62 +60,46 @@
 }
 
-TypeDecl* 
-Mutator::mutate(TypeDecl *typeDecl)
-{
+TypeDecl *Mutator::mutate( TypeDecl *typeDecl ) {
     handleNamedTypeDecl( typeDecl );
     return typeDecl;
 }
 
-Declaration* 
-Mutator::mutate(TypedefDecl *typeDecl)
-{
+Declaration *Mutator::mutate( TypedefDecl *typeDecl ) {
     handleNamedTypeDecl( typeDecl );
     return typeDecl;
 }
 
-CompoundStmt*
-Mutator::mutate(CompoundStmt *compoundStmt)
-{
+CompoundStmt *Mutator::mutate( CompoundStmt *compoundStmt ) {
     mutateAll( compoundStmt->get_kids(), *this );
     return compoundStmt;
 }
 
-Statement*
-Mutator::mutate(ExprStmt *exprStmt)
-{
+Statement *Mutator::mutate( ExprStmt *exprStmt ) {
     exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
     return exprStmt;
 }
 
-Statement*
-Mutator::mutate(IfStmt *ifStmt)
-{
-    ifStmt->set_condition(  maybeMutate( ifStmt->get_condition(), *this ) );
-    ifStmt->set_thenPart(  maybeMutate( ifStmt->get_thenPart(), *this ) );
-    ifStmt->set_elsePart(  maybeMutate( ifStmt->get_elsePart(), *this ) );
+Statement *Mutator::mutate( IfStmt *ifStmt ) {
+    ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
+    ifStmt->set_thenPart( maybeMutate( ifStmt->get_thenPart(), *this ) );
+    ifStmt->set_elsePart( maybeMutate( ifStmt->get_elsePart(), *this ) );
     return ifStmt;
 }
 
-Statement*
-Mutator::mutate(WhileStmt *whileStmt)
-{
-    whileStmt->set_condition(  maybeMutate( whileStmt->get_condition(), *this ) );
-    whileStmt->set_body(    maybeMutate( whileStmt->get_body(), *this ) );
+Statement *Mutator::mutate( WhileStmt *whileStmt ) {
+    whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
+    whileStmt->set_body( maybeMutate( whileStmt->get_body(), *this ) );
     return whileStmt;
 }
 
-Statement*
-Mutator::mutate(ForStmt *forStmt)
-{
-    forStmt->set_initialization(    maybeMutate( forStmt->get_initialization(), *this ) );
-    forStmt->set_condition(  maybeMutate( forStmt->get_condition(), *this ) );
-    forStmt->set_increment(  maybeMutate( forStmt->get_increment(), *this ) );
-    forStmt->set_body(	maybeMutate( forStmt->get_body(), *this ) );
+Statement *Mutator::mutate( ForStmt *forStmt ) {
+    forStmt->set_initialization( maybeMutate( forStmt->get_initialization(), *this ) );
+    forStmt->set_condition( maybeMutate( forStmt->get_condition(), *this ) );
+    forStmt->set_increment( maybeMutate( forStmt->get_increment(), *this ) );
+    forStmt->set_body( maybeMutate( forStmt->get_body(), *this ) );
     return forStmt;
 }
 
-Statement*
-Mutator::mutate(SwitchStmt *switchStmt)
-{
+Statement *Mutator::mutate( SwitchStmt *switchStmt ) {
     switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
     mutateAll( switchStmt->get_branches(), *this );
@@ -150,22 +107,16 @@
 }
 
-Statement*
-Mutator::mutate(ChooseStmt *switchStmt)
-{
-    switchStmt->set_condition(	maybeMutate( switchStmt->get_condition(), *this ) );
+Statement *Mutator::mutate( ChooseStmt *switchStmt ) {
+    switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
     mutateAll( switchStmt->get_branches(), *this );
     return switchStmt;
 }
 
-Statement*
-Mutator::mutate(FallthruStmt *fallthruStmt)
-{
+Statement *Mutator::mutate( FallthruStmt *fallthruStmt ) {
     return fallthruStmt;
 }
 
-Statement*
-Mutator::mutate(CaseStmt *caseStmt)
-{
-    caseStmt->set_condition(	maybeMutate( caseStmt->get_condition(), *this ) );
+Statement *Mutator::mutate( CaseStmt *caseStmt ) {
+    caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
     mutateAll (caseStmt->get_statements(), *this );
 
@@ -173,20 +124,14 @@
 }
 
-Statement*
-Mutator::mutate(BranchStmt *branchStmt)
-{
+Statement *Mutator::mutate( BranchStmt *branchStmt ) {
     return branchStmt;
 }
 
-Statement*
-Mutator::mutate(ReturnStmt *returnStmt)
-{
-    returnStmt->set_expr(  maybeMutate( returnStmt->get_expr(), *this ) );
+Statement *Mutator::mutate( ReturnStmt *returnStmt ) {
+    returnStmt->set_expr( maybeMutate( returnStmt->get_expr(), *this ) );
     return returnStmt;
 }
 
-Statement*
-Mutator::mutate(TryStmt *tryStmt)
-{
+Statement *Mutator::mutate( TryStmt *tryStmt ) {
     tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
     mutateAll( tryStmt->get_catchers(), *this );
@@ -194,7 +139,5 @@
 }
 
-Statement*
-Mutator::mutate(CatchStmt *catchStmt)
-{
+Statement *Mutator::mutate( CatchStmt *catchStmt ) {
     catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
     catchStmt->set_body( maybeMutate( catchStmt->get_body(), *this ) );
@@ -202,36 +145,26 @@
 }
 
-Statement*
-Mutator::mutate(FinallyStmt *finalStmt)
-{
+Statement *Mutator::mutate( FinallyStmt *finalStmt ) {
     finalStmt->set_block( maybeMutate( finalStmt->get_block(), *this ) );
     return finalStmt;
 }
 
-NullStmt*
-Mutator::mutate(NullStmt *nullStmt)
-{
+NullStmt *Mutator::mutate( NullStmt *nullStmt ) {
     return nullStmt;
 }
 
-Statement*
-Mutator::mutate(DeclStmt *declStmt)
-{
+Statement *Mutator::mutate( DeclStmt *declStmt ) {
     declStmt->set_decl( maybeMutate( declStmt->get_decl(), *this ) );
     return declStmt;
 }
 
-Expression*
-Mutator::mutate(ApplicationExpr *applicationExpr)
-{
+Expression *Mutator::mutate( ApplicationExpr *applicationExpr ) {
     mutateAll( applicationExpr->get_results(), *this );
-    applicationExpr->set_function(  maybeMutate( applicationExpr->get_function(), *this ) );
+    applicationExpr->set_function( maybeMutate( applicationExpr->get_function(), *this ) );
     mutateAll( applicationExpr->get_args(), *this );
     return applicationExpr;
 }
 
-Expression*
-Mutator::mutate(UntypedExpr *untypedExpr)
-{
+Expression *Mutator::mutate( UntypedExpr *untypedExpr ) {
     mutateAll( untypedExpr->get_results(), *this );
     mutateAll( untypedExpr->get_args(), *this );
@@ -239,61 +172,45 @@
 }
 
-Expression*
-Mutator::mutate(NameExpr *nameExpr)
-{
+Expression *Mutator::mutate( NameExpr *nameExpr ) {
     mutateAll( nameExpr->get_results(), *this );
     return nameExpr;
 }
 
-Expression*
-Mutator::mutate(AddressExpr *addressExpr)
-{
+Expression *Mutator::mutate( AddressExpr *addressExpr ) {
     mutateAll( addressExpr->get_results(), *this );
-    addressExpr->set_arg(  maybeMutate( addressExpr->get_arg(), *this ) );
+    addressExpr->set_arg( maybeMutate( addressExpr->get_arg(), *this ) );
     return addressExpr;
 }
 
-Expression*
-Mutator::mutate(LabelAddressExpr *labelAddressExpr)
-{
+Expression *Mutator::mutate( LabelAddressExpr *labelAddressExpr ) {
     mutateAll( labelAddressExpr->get_results(), *this );
-    labelAddressExpr->set_arg(	maybeMutate( labelAddressExpr->get_arg(), *this ) );
+    labelAddressExpr->set_arg( maybeMutate( labelAddressExpr->get_arg(), *this ) );
     return labelAddressExpr;
 }
 
-Expression*
-Mutator::mutate(CastExpr *castExpr)
-{
+Expression *Mutator::mutate( CastExpr *castExpr ) {
     mutateAll( castExpr->get_results(), *this );
-    castExpr->set_arg(	maybeMutate( castExpr->get_arg(), *this ) );
+    castExpr->set_arg( maybeMutate( castExpr->get_arg(), *this ) );
     return castExpr;
 }
 
-Expression*
-Mutator::mutate(UntypedMemberExpr *memberExpr)
-{
+Expression *Mutator::mutate( UntypedMemberExpr *memberExpr ) {
     mutateAll( memberExpr->get_results(), *this );
-    memberExpr->set_aggregate(	maybeMutate( memberExpr->get_aggregate(), *this ) );
+    memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) );
     return memberExpr;
 }
 
-Expression*
-Mutator::mutate(MemberExpr *memberExpr)
-{
+Expression *Mutator::mutate( MemberExpr *memberExpr ) {
     mutateAll( memberExpr->get_results(), *this );
-    memberExpr->set_aggregate(	maybeMutate( memberExpr->get_aggregate(), *this ) );
+    memberExpr->set_aggregate( maybeMutate( memberExpr->get_aggregate(), *this ) );
     return memberExpr;
 }
 
-Expression*
-Mutator::mutate(VariableExpr *variableExpr)
-{
+Expression *Mutator::mutate( VariableExpr *variableExpr ) {
     mutateAll( variableExpr->get_results(), *this );
     return variableExpr;
 }
 
-Expression*
-Mutator::mutate(ConstantExpr *constantExpr)
-{
+Expression *Mutator::mutate( ConstantExpr *constantExpr ) {
     mutateAll( constantExpr->get_results(), *this );
 //  maybeMutate( constantExpr->get_constant(), *this )
@@ -301,59 +218,47 @@
 }
 
-Expression*
-Mutator::mutate(SizeofExpr *sizeofExpr)
-{
+Expression *Mutator::mutate( SizeofExpr *sizeofExpr ) {
     mutateAll( sizeofExpr->get_results(), *this );
-    if( sizeofExpr->get_isType() ) {
-	sizeofExpr->set_type(	 maybeMutate( sizeofExpr->get_type(), *this ) );
+    if ( sizeofExpr->get_isType() ) {
+	sizeofExpr->set_type( maybeMutate( sizeofExpr->get_type(), *this ) );
     } else {
-	sizeofExpr->set_expr(	 maybeMutate( sizeofExpr->get_expr(), *this ) );
+	sizeofExpr->set_expr( maybeMutate( sizeofExpr->get_expr(), *this ) );
     }
     return sizeofExpr;
 }
 
-Expression*
-Mutator::mutate(AttrExpr *attrExpr)
-{
+Expression *Mutator::mutate( AttrExpr *attrExpr ) {
     mutateAll( attrExpr->get_results(), *this );
-    if( attrExpr->get_isType() ) {
-	attrExpr->set_type(	 maybeMutate( attrExpr->get_type(), *this ) );
+    if ( attrExpr->get_isType() ) {
+	attrExpr->set_type( maybeMutate( attrExpr->get_type(), *this ) );
     } else {
-	attrExpr->set_expr(	 maybeMutate( attrExpr->get_expr(), *this ) );
+	attrExpr->set_expr( maybeMutate( attrExpr->get_expr(), *this ) );
     }
     return attrExpr;
 }
 
-Expression*
-Mutator::mutate(LogicalExpr *logicalExpr)
-{
+Expression *Mutator::mutate( LogicalExpr *logicalExpr ) {
     mutateAll( logicalExpr->get_results(), *this );
-    logicalExpr->set_arg1(  maybeMutate( logicalExpr->get_arg1(), *this ) );
-    logicalExpr->set_arg2(  maybeMutate( logicalExpr->get_arg2(), *this ) );
+    logicalExpr->set_arg1( maybeMutate( logicalExpr->get_arg1(), *this ) );
+    logicalExpr->set_arg2( maybeMutate( logicalExpr->get_arg2(), *this ) );
     return logicalExpr;
 }
 
-Expression*
-Mutator::mutate(ConditionalExpr *conditionalExpr)
-{
+Expression *Mutator::mutate( ConditionalExpr *conditionalExpr ) {
     mutateAll( conditionalExpr->get_results(), *this );
-    conditionalExpr->set_arg1(	maybeMutate( conditionalExpr->get_arg1(), *this ) );
-    conditionalExpr->set_arg2(	maybeMutate( conditionalExpr->get_arg2(), *this ) );
-    conditionalExpr->set_arg3(	maybeMutate( conditionalExpr->get_arg3(), *this ) );
+    conditionalExpr->set_arg1( maybeMutate( conditionalExpr->get_arg1(), *this ) );
+    conditionalExpr->set_arg2( maybeMutate( conditionalExpr->get_arg2(), *this ) );
+    conditionalExpr->set_arg3( maybeMutate( conditionalExpr->get_arg3(), *this ) );
     return conditionalExpr;
 }
 
-Expression*
-Mutator::mutate(CommaExpr *commaExpr)
-{
+Expression *Mutator::mutate( CommaExpr *commaExpr ) {
     mutateAll( commaExpr->get_results(), *this );
-    commaExpr->set_arg1(    maybeMutate( commaExpr->get_arg1(), *this ) );
-    commaExpr->set_arg2(    maybeMutate( commaExpr->get_arg2(), *this ) );
+    commaExpr->set_arg1( maybeMutate( commaExpr->get_arg1(), *this ) );
+    commaExpr->set_arg2( maybeMutate( commaExpr->get_arg2(), *this ) );
     return commaExpr;
 }
 
-Expression*
-Mutator::mutate(TupleExpr *tupleExpr)
-{
+Expression *Mutator::mutate( TupleExpr *tupleExpr ) {
     mutateAll( tupleExpr->get_results(), *this );
     mutateAll( tupleExpr->get_exprs(), *this );
@@ -361,7 +266,5 @@
 }
 
-Expression*
-Mutator::mutate(SolvedTupleExpr *tupleExpr)
-{
+Expression *Mutator::mutate( SolvedTupleExpr *tupleExpr ) {
     mutateAll( tupleExpr->get_results(), *this );
     mutateAll( tupleExpr->get_exprs(), *this );
@@ -369,7 +272,5 @@
 }
 
-Expression*
-Mutator::mutate(TypeExpr *typeExpr)
-{
+Expression *Mutator::mutate( TypeExpr *typeExpr ) {
     mutateAll( typeExpr->get_results(), *this );
     typeExpr->set_type( maybeMutate( typeExpr->get_type(), *this ) );
@@ -377,28 +278,20 @@
 }
 
-Expression*
-Mutator::mutate(UntypedValofExpr *valofExpr)
-{
+Expression *Mutator::mutate( UntypedValofExpr *valofExpr ) {
     mutateAll( valofExpr->get_results(), *this );
     return valofExpr;
 }
 
-Type*
-Mutator::mutate(VoidType *voidType)
-{
+Type *Mutator::mutate( VoidType *voidType ) {
     mutateAll( voidType->get_forall(), *this );
     return voidType;
 }
 
-Type*
-Mutator::mutate(BasicType *basicType)
-{
+Type *Mutator::mutate( BasicType *basicType ) {
     mutateAll( basicType->get_forall(), *this );
     return basicType;
 }
 
-Type*
-Mutator::mutate(PointerType *pointerType)
-{
+Type *Mutator::mutate( PointerType *pointerType ) {
     mutateAll( pointerType->get_forall(), *this );
     pointerType->set_base( maybeMutate( pointerType->get_base(), *this ) );
@@ -406,7 +299,5 @@
 }
 
-Type*
-Mutator::mutate(ArrayType *arrayType)
-{
+Type *Mutator::mutate( ArrayType *arrayType ) {
     mutateAll( arrayType->get_forall(), *this );
     arrayType->set_dimension( maybeMutate( arrayType->get_dimension(), *this ) );
@@ -415,7 +306,5 @@
 }
 
-Type*
-Mutator::mutate(FunctionType *functionType)
-{
+Type *Mutator::mutate( FunctionType *functionType ) {
     mutateAll( functionType->get_forall(), *this );
     mutateAll( functionType->get_returnVals(), *this );
@@ -424,7 +313,5 @@
 }
 
-Type*
-Mutator::handleReferenceToType(ReferenceToType *aggregateUseType)
-{
+Type *Mutator::handleReferenceToType( ReferenceToType *aggregateUseType ) {
     mutateAll( aggregateUseType->get_forall(), *this );
     mutateAll( aggregateUseType->get_parameters(), *this );
@@ -432,28 +319,20 @@
 }
 
-Type* 
-Mutator::mutate(StructInstType *aggregateUseType)
-{
-    handleReferenceToType( aggregateUseType );
-    return aggregateUseType;
-}
-
-Type* 
-Mutator::mutate(UnionInstType *aggregateUseType)
-{
-    handleReferenceToType( aggregateUseType );
-    return aggregateUseType;
-}
-
-Type* 
-Mutator::mutate(EnumInstType *aggregateUseType)
-{
-    handleReferenceToType( aggregateUseType );
-    return aggregateUseType;
-}
-
-Type* 
-Mutator::mutate(ContextInstType *aggregateUseType)
-{
+Type *Mutator::mutate( StructInstType *aggregateUseType ) {
+    handleReferenceToType( aggregateUseType );
+    return aggregateUseType;
+}
+
+Type *Mutator::mutate( UnionInstType *aggregateUseType ) {
+    handleReferenceToType( aggregateUseType );
+    return aggregateUseType;
+}
+
+Type *Mutator::mutate( EnumInstType *aggregateUseType ) {
+    handleReferenceToType( aggregateUseType );
+    return aggregateUseType;
+}
+
+Type *Mutator::mutate( ContextInstType *aggregateUseType ) {
     handleReferenceToType( aggregateUseType );
     mutateAll( aggregateUseType->get_members(), *this );
@@ -461,14 +340,10 @@
 }
 
-Type* 
-Mutator::mutate(TypeInstType *aggregateUseType)
-{
-    handleReferenceToType( aggregateUseType );
-    return aggregateUseType;
-}
-
-Type*
-Mutator::mutate(TupleType *tupleType)
-{
+Type *Mutator::mutate( TypeInstType *aggregateUseType ) {
+    handleReferenceToType( aggregateUseType );
+    return aggregateUseType;
+}
+
+Type *Mutator::mutate( TupleType *tupleType ) {
     mutateAll( tupleType->get_forall(), *this );
     mutateAll( tupleType->get_types(), *this );
@@ -476,7 +351,5 @@
 }
 
-Type*
-Mutator::mutate(TypeofType *typeofType)
-{
+Type *Mutator::mutate( TypeofType *typeofType ) {
     assert( typeofType->get_expr() );
     typeofType->set_expr( typeofType->get_expr()->acceptMutator( *this ) );
@@ -484,8 +357,6 @@
 }
 
-Type*
-Mutator::mutate(AttrType *attrType)
-{
-    if( attrType->get_isType() ) {
+Type *Mutator::mutate( AttrType *attrType ) {
+    if ( attrType->get_isType() ) {
 	assert( attrType->get_type() );
 	attrType->set_type( attrType->get_type()->acceptMutator( *this ) );
@@ -497,28 +368,20 @@
 }
 
-Initializer*
-Mutator::mutate(MemberInit *memberInit)
-{
+Initializer *Mutator::mutate( MemberInit *memberInit ) {
     memberInit->set_value( memberInit->get_value()->acceptMutator( *this ) );
     return memberInit;
 }
 
-Initializer*
-Mutator::mutate(ElementInit *elementInit)
-{
+Initializer *Mutator::mutate( ElementInit *elementInit ) {
     elementInit->set_value( elementInit->get_value()->acceptMutator( *this ) );
     return elementInit;
 }
 
-Initializer*
-Mutator::mutate(SingleInit *singleInit)
-{
+Initializer *Mutator::mutate( SingleInit *singleInit ) {
     singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) );
     return singleInit;
 }
 
-Initializer*
-Mutator::mutate(ListInit *listInit)
-{
+Initializer *Mutator::mutate( ListInit *listInit ) {
     mutateAll( listInit->get_designators(), *this );
     mutateAll( listInit->get_initializers(), *this );
@@ -526,14 +389,9 @@
 }
 
-Subrange *
-Mutator::mutate(Subrange *subrange)
-{
+Subrange *Mutator::mutate( Subrange *subrange ) {
     return subrange;
 }
 
-Constant *
-Mutator::mutate(Constant *constant)
-{
+Constant *Mutator::mutate( Constant *constant ) {
     return constant;
 }
-
Index: translator/SynTree/Mutator.h
===================================================================
--- translator/SynTree/Mutator.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/SynTree/Mutator.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Mutator.h,v 1.19 2005/08/29 20:59:25 rcbilson Exp $
- *
- */
-
 #include <cassert>
 
@@ -14,92 +7,86 @@
 #define SYNTREE_MUTATOR_H
 
-
-class Mutator
-{
-protected:
+class Mutator {
+  protected:
     Mutator();
     virtual ~Mutator();
+  public:
+    virtual ObjectDecl* mutate( ObjectDecl *objectDecl );
+    virtual DeclarationWithType* mutate( FunctionDecl *functionDecl );
+    virtual Declaration* mutate( StructDecl *aggregateDecl );
+    virtual Declaration* mutate( UnionDecl *aggregateDecl );
+    virtual Declaration* mutate( EnumDecl *aggregateDecl );
+    virtual Declaration* mutate( ContextDecl *aggregateDecl );
+    virtual TypeDecl* mutate( TypeDecl *typeDecl );
+    virtual Declaration* mutate( TypedefDecl *typeDecl );
 
-public:
-    virtual ObjectDecl* mutate(ObjectDecl *objectDecl);
-    virtual DeclarationWithType* mutate(FunctionDecl *functionDecl);
-    virtual Declaration* mutate(StructDecl *aggregateDecl);
-    virtual Declaration* mutate(UnionDecl *aggregateDecl);
-    virtual Declaration* mutate(EnumDecl *aggregateDecl);
-    virtual Declaration* mutate(ContextDecl *aggregateDecl);
-    virtual TypeDecl* mutate(TypeDecl *typeDecl);
-    virtual Declaration* mutate(TypedefDecl *typeDecl);
+    virtual CompoundStmt* mutate( CompoundStmt *compoundStmt );
+    virtual Statement* mutate( ExprStmt *exprStmt );
+    virtual Statement* mutate( IfStmt *ifStmt );
+    virtual Statement* mutate( WhileStmt *whileStmt );
+    virtual Statement* mutate( ForStmt *forStmt );
+    virtual Statement* mutate( SwitchStmt *switchStmt );
+    virtual Statement* mutate( ChooseStmt *chooseStmt );
+    virtual Statement* mutate( FallthruStmt *fallthruStmt );
+    virtual Statement* mutate( CaseStmt *caseStmt );
+    virtual Statement* mutate( BranchStmt *branchStmt );
+    virtual Statement* mutate( ReturnStmt *returnStmt );
+    virtual Statement* mutate( TryStmt *returnStmt );
+    virtual Statement* mutate( CatchStmt *catchStmt );
+    virtual Statement* mutate( FinallyStmt *catchStmt );
+    virtual NullStmt* mutate( NullStmt *nullStmt );
+    virtual Statement* mutate( DeclStmt *declStmt );
 
-    virtual CompoundStmt* mutate(CompoundStmt *compoundStmt);
-    virtual Statement* mutate(ExprStmt *exprStmt);
-    virtual Statement* mutate(IfStmt *ifStmt);
-    virtual Statement* mutate(WhileStmt *whileStmt);
-    virtual Statement* mutate(ForStmt *forStmt);
-    virtual Statement* mutate(SwitchStmt *switchStmt);
-    virtual Statement* mutate(ChooseStmt *chooseStmt);
-    virtual Statement* mutate(FallthruStmt *fallthruStmt);
-    virtual Statement* mutate(CaseStmt *caseStmt);
-    virtual Statement* mutate(BranchStmt *branchStmt);
-    virtual Statement* mutate(ReturnStmt *returnStmt);
-    virtual Statement* mutate(TryStmt *returnStmt);
-    virtual Statement* mutate(CatchStmt *catchStmt);
-    virtual Statement* mutate(FinallyStmt *catchStmt);
-    virtual NullStmt* mutate(NullStmt *nullStmt);
-    virtual Statement* mutate(DeclStmt *declStmt);
+    virtual Expression* mutate( ApplicationExpr *applicationExpr );
+    virtual Expression* mutate( UntypedExpr *untypedExpr );
+    virtual Expression* mutate( NameExpr *nameExpr );
+    virtual Expression* mutate( AddressExpr *castExpr );
+    virtual Expression* mutate( LabelAddressExpr *labAddressExpr );
+    virtual Expression* mutate( CastExpr *castExpr );
+    virtual Expression* mutate( UntypedMemberExpr *memberExpr );
+    virtual Expression* mutate( MemberExpr *memberExpr );
+    virtual Expression* mutate( VariableExpr *variableExpr );
+    virtual Expression* mutate( ConstantExpr *constantExpr ); 
+    virtual Expression* mutate( SizeofExpr *sizeofExpr );
+    virtual Expression* mutate( AttrExpr *attrExpr );
+    virtual Expression* mutate( LogicalExpr *logicalExpr );
+    virtual Expression* mutate( ConditionalExpr *conditionalExpr );
+    virtual Expression* mutate( CommaExpr *commaExpr );
+    virtual Expression* mutate( TupleExpr *tupleExpr );
+    virtual Expression* mutate( SolvedTupleExpr *tupleExpr );
+    virtual Expression* mutate( TypeExpr *typeExpr );
+    virtual Expression* mutate( UntypedValofExpr *valofExpr );
 
-    virtual Expression* mutate(ApplicationExpr *applicationExpr);
-    virtual Expression* mutate(UntypedExpr *untypedExpr);
-    virtual Expression* mutate(NameExpr *nameExpr);
-    virtual Expression* mutate(AddressExpr *castExpr);
-    virtual Expression* mutate(LabelAddressExpr *labAddressExpr);
-    virtual Expression* mutate(CastExpr *castExpr);
-    virtual Expression* mutate(UntypedMemberExpr *memberExpr);
-    virtual Expression* mutate(MemberExpr *memberExpr);
-    virtual Expression* mutate(VariableExpr *variableExpr);
-    virtual Expression* mutate(ConstantExpr *constantExpr); 
-    virtual Expression* mutate(SizeofExpr *sizeofExpr);
-    virtual Expression* mutate(AttrExpr *attrExpr);
-    virtual Expression* mutate(LogicalExpr *logicalExpr);
-    virtual Expression* mutate(ConditionalExpr *conditionalExpr);
-    virtual Expression* mutate(CommaExpr *commaExpr);
-    virtual Expression* mutate(TupleExpr *tupleExpr);
-    virtual Expression* mutate(SolvedTupleExpr *tupleExpr);
-    virtual Expression* mutate(TypeExpr *typeExpr);
-    virtual Expression* mutate(UntypedValofExpr *valofExpr);
+    virtual Type* mutate( VoidType *basicType );
+    virtual Type* mutate( BasicType *basicType );
+    virtual Type* mutate( PointerType *pointerType );
+    virtual Type* mutate( ArrayType *arrayType );
+    virtual Type* mutate( FunctionType *functionType );
+    virtual Type* mutate( StructInstType *aggregateUseType );
+    virtual Type* mutate( UnionInstType *aggregateUseType );
+    virtual Type* mutate( EnumInstType *aggregateUseType );
+    virtual Type* mutate( ContextInstType *aggregateUseType );
+    virtual Type* mutate( TypeInstType *aggregateUseType );
+    virtual Type* mutate( TupleType *tupleType );
+    virtual Type* mutate( TypeofType *typeofType );
+    virtual Type* mutate( AttrType *attrType );
 
-    virtual Type* mutate(VoidType *basicType);
-    virtual Type* mutate(BasicType *basicType);
-    virtual Type* mutate(PointerType *pointerType);
-    virtual Type* mutate(ArrayType *arrayType);
-    virtual Type* mutate(FunctionType *functionType);
-    virtual Type* mutate(StructInstType *aggregateUseType);
-    virtual Type* mutate(UnionInstType *aggregateUseType);
-    virtual Type* mutate(EnumInstType *aggregateUseType);
-    virtual Type* mutate(ContextInstType *aggregateUseType);
-    virtual Type* mutate(TypeInstType *aggregateUseType);
-    virtual Type* mutate(TupleType *tupleType);
-    virtual Type* mutate(TypeofType *typeofType);
-    virtual Type* mutate(AttrType *attrType);
+    virtual Initializer* mutate( MemberInit *memberInit );
+    virtual Initializer* mutate( ElementInit *elementInit );
+    virtual Initializer* mutate( SingleInit *singleInit );
+    virtual Initializer* mutate( ListInit *listInit );
 
-    virtual Initializer* mutate(MemberInit *memberInit);
-    virtual Initializer* mutate(ElementInit *elementInit);
-    virtual Initializer* mutate(SingleInit *singleInit);
-    virtual Initializer* mutate(ListInit *listInit);
+    virtual Subrange *mutate( Subrange *subrange );
 
-    virtual Subrange *mutate(Subrange *subrange);
-
-    virtual Constant *mutate(Constant *constant);
-
-private:
-    virtual Declaration* handleAggregateDecl(AggregateDecl *aggregateDecl);
-    virtual Declaration* handleNamedTypeDecl(NamedTypeDecl *typeDecl);
-    virtual Type* handleReferenceToType(ReferenceToType *aggregateUseType);
+    virtual Constant *mutate( Constant *constant );
+  private:
+    virtual Declaration* handleAggregateDecl(AggregateDecl *aggregateDecl );
+    virtual Declaration* handleNamedTypeDecl(NamedTypeDecl *typeDecl );
+    virtual Type* handleReferenceToType(ReferenceToType *aggregateUseType );
 };
 
 template< typename TreeType, typename MutatorType >
-inline TreeType *
-maybeMutate( TreeType *tree, MutatorType &mutator )
-{
-    if( tree ) {
+inline TreeType *maybeMutate( TreeType *tree, MutatorType &mutator ) {
+    if ( tree ) {
 	TreeType *newnode = dynamic_cast< TreeType* >( tree->acceptMutator( mutator ) );
 	assert( newnode );
@@ -112,11 +99,9 @@
 
 template< typename Container, typename MutatorType >
-inline void
-mutateAll( Container &container, MutatorType &mutator )
-{
+inline void mutateAll( Container &container, MutatorType &mutator ) {
     SemanticError errors;
-    for( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
+    for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
 	try {
-	    if( *i ) {
+	    if ( *i ) {
 ///		    *i = (*i)->acceptMutator( mutator );
 		*i = dynamic_cast< typename Container::value_type >( (*i)->acceptMutator( mutator ) );
@@ -127,12 +112,10 @@
 	}
     }
-    if( !errors.isEmpty() ) {
+    if ( !errors.isEmpty() ) {
 	throw errors;
     }
 }
 
-
-
-#endif /* #ifndef SYNTREE_MUTATOR_H */
+#endif // SYNTREE_MUTATOR_H
 
 // Local Variables: //
Index: translator/SynTree/ObjectDecl.cc
===================================================================
--- translator/SynTree/ObjectDecl.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/SynTree/ObjectDecl.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: ObjectDecl.cc,v 1.8 2005/08/29 20:59:25 rcbilson Exp $
- *
- */
-
 #include "Declaration.h"
 #include "Type.h"
@@ -14,15 +7,12 @@
 
 ObjectDecl::ObjectDecl( const std::string &name, StorageClass sc, LinkageSpec::Type linkage, Expression *bitfieldWidth, Type *type, Initializer *init )
-    : Parent( name, sc, linkage ), type( type ), init( init ), bitfieldWidth( bitfieldWidth )
-{
+    : Parent( name, sc, linkage ), type( type ), init( init ), bitfieldWidth( bitfieldWidth ) {
 }
 
 ObjectDecl::ObjectDecl( const ObjectDecl &other )
-    : Parent( other ), type( maybeClone( other.type ) ), init( maybeClone( other.init ) ), bitfieldWidth( maybeClone( other.bitfieldWidth ) )
-{
+    : Parent( other ), type( maybeClone( other.type ) ), init( maybeClone( other.init ) ), bitfieldWidth( maybeClone( other.bitfieldWidth ) ) {
 }
 
-ObjectDecl::~ObjectDecl()
-{
+ObjectDecl::~ObjectDecl() {
     delete type;
     delete init;
@@ -30,26 +20,29 @@
 }
 
-void 
-ObjectDecl::print( std::ostream &os, int indent ) const
-{
-    if( get_name() != "" ) {
+void ObjectDecl::print( std::ostream &os, int indent ) const {
+    if ( get_name() != "" ) {
 	os << get_name() << ": a ";
     }
-    if( get_linkage() != LinkageSpec::Cforall ) {
+
+    if ( get_linkage() != LinkageSpec::Cforall ) {
 	os << LinkageSpec::toString( get_linkage() ) << " ";
     }
-    if( get_storageClass() != NoStorageClass ) {
+
+    if ( get_storageClass() != NoStorageClass ) {
 	os << storageClassName[ get_storageClass() ] << ' ';
     }
-    if( get_type() ) {
+
+    if ( get_type() ) {
 	get_type()->print( os, indent );
     } else {
 	os << "untyped entity ";
     }
-    if( init ) {
+
+    if ( init ) {
 	os << "with initializer ";
 	init->print( os, indent );
     }
-    if( bitfieldWidth ) {
+
+    if ( bitfieldWidth ) {
 	os << "with bitfield width ";
 	bitfieldWidth->print( os );
@@ -57,22 +50,22 @@
 }
 
-void 
-ObjectDecl::printShort( std::ostream &os, int indent ) const
-{
-    if( get_name() != "" ) {
+void ObjectDecl::printShort( std::ostream &os, int indent ) const {
+    if ( get_name() != "" ) {
 	os << get_name() << ": a ";
     }
-    if( get_storageClass() != NoStorageClass ) {
+
+    if ( get_storageClass() != NoStorageClass ) {
 	os << storageClassName[ get_storageClass() ] << ' ';
     }
-    if( get_type() ) {
+
+    if ( get_type() ) {
 	get_type()->print( os, indent );
     } else {
 	os << "untyped entity ";
     }
-    if( bitfieldWidth ) {
+
+    if ( bitfieldWidth ) {
 	os << "with bitfield width ";
 	bitfieldWidth->print( os );
     }
 }
-
Index: translator/SynTree/Visitor.cc
===================================================================
--- translator/SynTree/Visitor.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/SynTree/Visitor.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Visitor.cc,v 1.30 2005/08/29 20:59:27 rcbilson Exp $
- *
- */
-
 #include <cassert>
 #include "Visitor.h"
@@ -16,15 +9,9 @@
 
 
-Visitor::Visitor()
-{
-}
-
-Visitor::~Visitor()
-{
-}
-
-void
-Visitor::visit(ObjectDecl *objectDecl)
-{
+Visitor::Visitor() {}
+
+Visitor::~Visitor() {}
+
+void Visitor::visit(ObjectDecl *objectDecl) {
     maybeAccept( objectDecl->get_type(), *this );
     maybeAccept( objectDecl->get_init(), *this );
@@ -32,7 +19,5 @@
 }
 
-void
-Visitor::visit(FunctionDecl *functionDecl)
-{
+void Visitor::visit(FunctionDecl *functionDecl) {
     maybeAccept( functionDecl->get_functionType(), *this );
     acceptAll( functionDecl->get_oldDecls(), *this );
@@ -40,38 +25,26 @@
 }
 
-void
-Visitor::visit(AggregateDecl *aggregateDecl)
-{
+void Visitor::visit(AggregateDecl *aggregateDecl) {
     acceptAll( aggregateDecl->get_parameters(), *this );
     acceptAll( aggregateDecl->get_members(), *this );
 }
 
-void 
-Visitor::visit(StructDecl *aggregateDecl)
-{
+void Visitor::visit(StructDecl *aggregateDecl) {
     visit( static_cast< AggregateDecl* >( aggregateDecl ) );
 }
 
-void 
-Visitor::visit(UnionDecl *aggregateDecl)
-{
+void Visitor::visit(UnionDecl *aggregateDecl) {
     visit( static_cast< AggregateDecl* >( aggregateDecl ) );
 }
 
-void 
-Visitor::visit(EnumDecl *aggregateDecl)
-{
+void Visitor::visit(EnumDecl *aggregateDecl) {
     visit( static_cast< AggregateDecl* >( aggregateDecl ) );
 }
 
-void 
-Visitor::visit(ContextDecl *aggregateDecl)
-{
+void Visitor::visit(ContextDecl *aggregateDecl) {
     visit( static_cast< AggregateDecl* >( aggregateDecl ) );
 }
 
-void
-Visitor::visit(NamedTypeDecl *typeDecl)
-{
+void Visitor::visit(NamedTypeDecl *typeDecl) {
     acceptAll( typeDecl->get_parameters(), *this );
     acceptAll( typeDecl->get_assertions(), *this );
@@ -79,31 +52,21 @@
 }
 
-void 
-Visitor::visit(TypeDecl *typeDecl)
-{
+void Visitor::visit(TypeDecl *typeDecl) {
     visit( static_cast< NamedTypeDecl* >( typeDecl ) );
 }
 
-void 
-Visitor::visit(TypedefDecl *typeDecl)
-{
+void Visitor::visit(TypedefDecl *typeDecl) {
     visit( static_cast< NamedTypeDecl* >( typeDecl ) );
 }
 
-void
-Visitor::visit(CompoundStmt *compoundStmt)
-{
+void Visitor::visit(CompoundStmt *compoundStmt) {
     acceptAll( compoundStmt->get_kids(), *this );
 }
 
-void
-Visitor::visit(ExprStmt *exprStmt)
-{
+void Visitor::visit(ExprStmt *exprStmt) {
     maybeAccept( exprStmt->get_expr(), *this );
 }
 
-void
-Visitor::visit(IfStmt *ifStmt)
-{
+void Visitor::visit(IfStmt *ifStmt) {
     maybeAccept( ifStmt->get_condition(), *this );
     maybeAccept( ifStmt->get_thenPart(), *this );
@@ -111,14 +74,10 @@
 }
 
-void
-Visitor::visit(WhileStmt *whileStmt)
-{
+void Visitor::visit(WhileStmt *whileStmt) {
     maybeAccept( whileStmt->get_condition(), *this );
     maybeAccept( whileStmt->get_body(), *this );
 }
 
-void
-Visitor::visit(ForStmt *forStmt)
-{
+void Visitor::visit(ForStmt *forStmt) {
     // ForStmt still needs to be fixed
     maybeAccept( forStmt->get_initialization(), *this );
@@ -128,73 +87,50 @@
 }
 
-void
-Visitor::visit(SwitchStmt *switchStmt)
-{
+void Visitor::visit(SwitchStmt *switchStmt) {
     maybeAccept( switchStmt->get_condition(), *this );
     acceptAll( switchStmt->get_branches(), *this );
 }
 
-void
-Visitor::visit(ChooseStmt *switchStmt)
-{
+void Visitor::visit(ChooseStmt *switchStmt) {
     maybeAccept( switchStmt->get_condition(), *this );
     acceptAll( switchStmt->get_branches(), *this );
 }
 
-void
-Visitor::visit(FallthruStmt *fallthruStmt){}
-
-void
-Visitor::visit(CaseStmt *caseStmt)
-{
+void Visitor::visit(FallthruStmt *fallthruStmt){}
+
+void Visitor::visit(CaseStmt *caseStmt) {
     maybeAccept( caseStmt->get_condition(), *this );
     acceptAll( caseStmt->get_statements(), *this );
 }
 
-void
-Visitor::visit(BranchStmt *branchStmt)
-{
-}
-
-void
-Visitor::visit(ReturnStmt *returnStmt)
-{
+void Visitor::visit(BranchStmt *branchStmt) {
+}
+
+void Visitor::visit(ReturnStmt *returnStmt) {
     maybeAccept( returnStmt->get_expr(), *this );
 }
 
-void
-Visitor::visit(TryStmt *tryStmt)
-{
+void Visitor::visit(TryStmt *tryStmt) {
     maybeAccept( tryStmt->get_block(), *this );
     acceptAll( tryStmt->get_catchers(), *this );
 }
 
-void
-Visitor::visit(CatchStmt *catchStmt)
-{
+void Visitor::visit(CatchStmt *catchStmt) {
     maybeAccept( catchStmt->get_decl(), *this );
     maybeAccept( catchStmt->get_body(), *this );
 }
 
-void
-Visitor::visit(FinallyStmt *finalStmt)
-{
+void Visitor::visit(FinallyStmt *finalStmt) {
     maybeAccept( finalStmt->get_block(), *this );
 }
 
-void
-Visitor::visit(NullStmt *nullStmt)
-{
-}
-
-void
-Visitor::visit(DeclStmt *declStmt)
-{
+void Visitor::visit(NullStmt *nullStmt) {
+}
+
+void Visitor::visit(DeclStmt *declStmt) {
     maybeAccept( declStmt->get_decl(), *this );
 }
 
-void
-Visitor::visit(ApplicationExpr *applicationExpr)
-{
+void Visitor::visit(ApplicationExpr *applicationExpr) {
     acceptAll( applicationExpr->get_results(), *this );
     maybeAccept( applicationExpr->get_function(), *this );
@@ -202,70 +138,50 @@
 }
 
-void
-Visitor::visit(UntypedExpr *untypedExpr)
-{
+void Visitor::visit(UntypedExpr *untypedExpr) {
     acceptAll( untypedExpr->get_results(), *this );
     acceptAll( untypedExpr->get_args(), *this );
 }
 
-void
-Visitor::visit(NameExpr *nameExpr)
-{
+void Visitor::visit(NameExpr *nameExpr) {
     acceptAll( nameExpr->get_results(), *this );
 }
 
-void
-Visitor::visit(AddressExpr *addressExpr)
-{
+void Visitor::visit(AddressExpr *addressExpr) {
     acceptAll( addressExpr->get_results(), *this );
     maybeAccept( addressExpr->get_arg(), *this );
 }
 
-void
-Visitor::visit(LabelAddressExpr *labAddressExpr)
-{
+void Visitor::visit(LabelAddressExpr *labAddressExpr) {
     acceptAll( labAddressExpr->get_results(), *this );
     maybeAccept( labAddressExpr->get_arg(), *this );
 }
 
-void
-Visitor::visit(CastExpr *castExpr)
-{
+void Visitor::visit(CastExpr *castExpr) {
     acceptAll( castExpr->get_results(), *this );
     maybeAccept( castExpr->get_arg(), *this );
 }
 
-void
-Visitor::visit(UntypedMemberExpr *memberExpr)
-{
+void Visitor::visit(UntypedMemberExpr *memberExpr) {
     acceptAll( memberExpr->get_results(), *this );
     maybeAccept( memberExpr->get_aggregate(), *this );
 }
 
-void
-Visitor::visit(MemberExpr *memberExpr)
-{
+void Visitor::visit(MemberExpr *memberExpr) {
     acceptAll( memberExpr->get_results(), *this );
     maybeAccept( memberExpr->get_aggregate(), *this );
 }
 
-void
-Visitor::visit(VariableExpr *variableExpr)
-{
+void Visitor::visit(VariableExpr *variableExpr) {
     acceptAll( variableExpr->get_results(), *this );
 }
 
-void
-Visitor::visit(ConstantExpr *constantExpr)
-{
+void Visitor::visit(ConstantExpr *constantExpr) {
     acceptAll( constantExpr->get_results(), *this );
     maybeAccept( constantExpr->get_constant(), *this );
 }
 
-void
-Visitor::visit(SizeofExpr *sizeofExpr)
-{
+void Visitor::visit(SizeofExpr *sizeofExpr) {
     acceptAll( sizeofExpr->get_results(), *this );
-    if( sizeofExpr->get_isType() ) {
+    if ( sizeofExpr->get_isType() ) {
 	maybeAccept( sizeofExpr->get_type(), *this );
     } else {
@@ -274,9 +190,7 @@
 }
 
-void
-Visitor::visit(AttrExpr *attrExpr)
-{
+void Visitor::visit(AttrExpr *attrExpr) {
     acceptAll( attrExpr->get_results(), *this );
-    if( attrExpr->get_isType() ) {
+    if ( attrExpr->get_isType() ) {
 	maybeAccept( attrExpr->get_type(), *this );
     } else {
@@ -285,7 +199,5 @@
 }
 
-void
-Visitor::visit(LogicalExpr *logicalExpr)
-{
+void Visitor::visit(LogicalExpr *logicalExpr) {
     acceptAll( logicalExpr->get_results(), *this );
     maybeAccept( logicalExpr->get_arg1(), *this );
@@ -293,7 +205,5 @@
 }
 
-void
-Visitor::visit(ConditionalExpr *conditionalExpr)
-{
+void Visitor::visit(ConditionalExpr *conditionalExpr) {
     acceptAll( conditionalExpr->get_results(), *this );
     maybeAccept( conditionalExpr->get_arg1(), *this );
@@ -302,7 +212,5 @@
 }
 
-void
-Visitor::visit(CommaExpr *commaExpr)
-{
+void Visitor::visit(CommaExpr *commaExpr) {
     acceptAll( commaExpr->get_results(), *this );
     maybeAccept( commaExpr->get_arg1(), *this );
@@ -310,54 +218,38 @@
 }
 
-void
-Visitor::visit(TupleExpr *tupleExpr)
-{
+void Visitor::visit(TupleExpr *tupleExpr) {
     acceptAll( tupleExpr->get_results(), *this );
     acceptAll( tupleExpr->get_exprs(), *this );
 }
 
-void
-Visitor::visit(SolvedTupleExpr *tupleExpr)
-{
+void Visitor::visit(SolvedTupleExpr *tupleExpr) {
     acceptAll( tupleExpr->get_results(), *this );
     acceptAll( tupleExpr->get_exprs(), *this );
 }
 
-void
-Visitor::visit(TypeExpr *typeExpr)
-{
+void Visitor::visit(TypeExpr *typeExpr) {
     acceptAll( typeExpr->get_results(), *this );
     maybeAccept( typeExpr->get_type(), *this );
 }
 
-void
-Visitor::visit(UntypedValofExpr *valofExpr)
-{
+void Visitor::visit(UntypedValofExpr *valofExpr) {
     acceptAll( valofExpr->get_results(), *this );
     maybeAccept( valofExpr->get_body(), *this );
 }
 
-void
-Visitor::visit(VoidType *voidType)
-{
+void Visitor::visit(VoidType *voidType) {
     acceptAll( voidType->get_forall(), *this );
 }
 
-void
-Visitor::visit(BasicType *basicType)
-{
+void Visitor::visit(BasicType *basicType) {
     acceptAll( basicType->get_forall(), *this );
 }
 
-void
-Visitor::visit(PointerType *pointerType)
-{
+void Visitor::visit(PointerType *pointerType) {
     acceptAll( pointerType->get_forall(), *this );
     maybeAccept( pointerType->get_base(), *this );
 }
 
-void
-Visitor::visit(ArrayType *arrayType)
-{
+void Visitor::visit(ArrayType *arrayType) {
     acceptAll( arrayType->get_forall(), *this );
     maybeAccept( arrayType->get_dimension(), *this );
@@ -365,7 +257,5 @@
 }
 
-void
-Visitor::visit(FunctionType *functionType)
-{
+void Visitor::visit(FunctionType *functionType) {
     acceptAll( functionType->get_forall(), *this );
     acceptAll( functionType->get_returnVals(), *this );
@@ -373,60 +263,42 @@
 }
 
-void
-Visitor::visit(ReferenceToType *aggregateUseType)
-{
+void Visitor::visit(ReferenceToType *aggregateUseType) {
     acceptAll( aggregateUseType->get_forall(), *this );
     acceptAll( aggregateUseType->get_parameters(), *this );
 }
 
-void 
-Visitor::visit(StructInstType *aggregateUseType)
-{
-    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
-}
-
-void 
-Visitor::visit(UnionInstType *aggregateUseType)
-{
-    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
-}
-
-void 
-Visitor::visit(EnumInstType *aggregateUseType)
-{
-    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
-}
-
-void 
-Visitor::visit(ContextInstType *aggregateUseType)
-{
+void Visitor::visit(StructInstType *aggregateUseType) {
+    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
+}
+
+void Visitor::visit(UnionInstType *aggregateUseType) {
+    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
+}
+
+void Visitor::visit(EnumInstType *aggregateUseType) {
+    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
+}
+
+void Visitor::visit(ContextInstType *aggregateUseType) {
     visit( static_cast< ReferenceToType* >( aggregateUseType ) );
     acceptAll( aggregateUseType->get_members(), *this );
 }
 
-void 
-Visitor::visit(TypeInstType *aggregateUseType)
-{
-    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
-}
-
-void
-Visitor::visit(TupleType *tupleType)
-{
+void Visitor::visit(TypeInstType *aggregateUseType) {
+    visit( static_cast< ReferenceToType* >( aggregateUseType ) );
+}
+
+void Visitor::visit(TupleType *tupleType) {
     acceptAll( tupleType->get_forall(), *this );
     acceptAll( tupleType->get_types(), *this );
 }
 
-void
-Visitor::visit(TypeofType *typeofType)
-{
+void Visitor::visit(TypeofType *typeofType) {
     assert( typeofType->get_expr() );
     typeofType->get_expr()->accept( *this );
 }
 
-void
-Visitor::visit(AttrType *attrType)
-{
-    if( attrType->get_isType() ) {
+void Visitor::visit(AttrType *attrType) {
+    if ( attrType->get_isType() ) {
 	assert( attrType->get_type() );
 	attrType->get_type()->accept( *this );
@@ -437,37 +309,22 @@
 }
 
-void
-Visitor::visit(MemberInit *memberInit)
-{
+void Visitor::visit(MemberInit *memberInit) {
     memberInit->get_value()->accept( *this );
 }
 
-void
-Visitor::visit(ElementInit *elementInit)
-{
+void Visitor::visit(ElementInit *elementInit) {
     elementInit->get_value()->accept( *this );
 }
 
-void
-Visitor::visit(SingleInit *singleInit)
-{
+void Visitor::visit(SingleInit *singleInit) {
     singleInit->get_value()->accept( *this );
 }
 
-void
-Visitor::visit(ListInit *listInit)
-{
+void Visitor::visit(ListInit *listInit) {
     acceptAll( listInit->get_designators(), *this );
     acceptAll( listInit->get_initializers(), *this );
 }
 
-void
-Visitor::visit(Subrange *subrange)
-{
-}
-
-void
-Visitor::visit(Constant *constant)
-{
-}
-
+void Visitor::visit(Subrange *subrange) {}
+
+void Visitor::visit(Constant *constant) {}
Index: translator/SynTree/Visitor.h
===================================================================
--- translator/SynTree/Visitor.h	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/SynTree/Visitor.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Visitor.h,v 1.23 2005/08/29 20:59:27 rcbilson Exp $
- *
- */
-
 #ifndef VISITOR_H
 #define VISITOR_H
@@ -14,91 +7,86 @@
 
 
-class Visitor
-{
-protected:
+class Visitor {
+  protected:
     Visitor();
     virtual ~Visitor();
+  public:
+    virtual void visit( ObjectDecl *objectDecl );
+    virtual void visit( FunctionDecl *functionDecl );
+    virtual void visit( StructDecl *aggregateDecl );
+    virtual void visit( UnionDecl *aggregateDecl );
+    virtual void visit( EnumDecl *aggregateDecl );
+    virtual void visit( ContextDecl *aggregateDecl );
+    virtual void visit( TypeDecl *typeDecl );
+    virtual void visit( TypedefDecl *typeDecl );
 
-public:
-    virtual void visit(ObjectDecl *objectDecl);
-    virtual void visit(FunctionDecl *functionDecl);
-    virtual void visit(StructDecl *aggregateDecl);
-    virtual void visit(UnionDecl *aggregateDecl);
-    virtual void visit(EnumDecl *aggregateDecl);
-    virtual void visit(ContextDecl *aggregateDecl);
-    virtual void visit(TypeDecl *typeDecl);
-    virtual void visit(TypedefDecl *typeDecl);
+    virtual void visit( CompoundStmt *compoundStmt );
+    virtual void visit( ExprStmt *exprStmt );
+    virtual void visit( IfStmt *ifStmt );
+    virtual void visit( WhileStmt *whileStmt );
+    virtual void visit( ForStmt *forStmt );
+    virtual void visit( SwitchStmt *switchStmt );
+    virtual void visit( ChooseStmt *switchStmt );
+    virtual void visit( FallthruStmt *switchStmt );
+    virtual void visit( CaseStmt *caseStmt );
+    virtual void visit( BranchStmt *branchStmt );
+    virtual void visit( ReturnStmt *returnStmt );
+    virtual void visit( TryStmt *tryStmt );
+    virtual void visit( CatchStmt *catchStmt );
+    virtual void visit( FinallyStmt *finallyStmt );
+    virtual void visit( NullStmt *nullStmt );
+    virtual void visit( DeclStmt *declStmt );
 
-    virtual void visit(CompoundStmt *compoundStmt);
-    virtual void visit(ExprStmt *exprStmt);
-    virtual void visit(IfStmt *ifStmt);
-    virtual void visit(WhileStmt *whileStmt);
-    virtual void visit(ForStmt *forStmt);
-    virtual void visit(SwitchStmt *switchStmt);
-    virtual void visit(ChooseStmt *switchStmt);
-    virtual void visit(FallthruStmt *switchStmt);
-    virtual void visit(CaseStmt *caseStmt);
-    virtual void visit(BranchStmt *branchStmt);
-    virtual void visit(ReturnStmt *returnStmt);
-    virtual void visit(TryStmt *tryStmt);
-    virtual void visit(CatchStmt *catchStmt);
-    virtual void visit(FinallyStmt *finallyStmt);
-    virtual void visit(NullStmt *nullStmt);
-    virtual void visit(DeclStmt *declStmt);
+    virtual void visit( ApplicationExpr *applicationExpr );
+    virtual void visit( UntypedExpr *untypedExpr );
+    virtual void visit( NameExpr *nameExpr );
+    virtual void visit( CastExpr *castExpr );
+    virtual void visit( AddressExpr *addressExpr );
+    virtual void visit( LabelAddressExpr *labAddressExpr );
+    virtual void visit( UntypedMemberExpr *memberExpr );
+    virtual void visit( MemberExpr *memberExpr );
+    virtual void visit( VariableExpr *variableExpr );
+    virtual void visit( ConstantExpr *constantExpr ); 
+    virtual void visit( SizeofExpr *sizeofExpr );
+    virtual void visit( AttrExpr *attrExpr );
+    virtual void visit( LogicalExpr *logicalExpr );
+    virtual void visit( ConditionalExpr *conditionalExpr );
+    virtual void visit( CommaExpr *commaExpr );
+    virtual void visit( TupleExpr *tupleExpr );
+    virtual void visit( SolvedTupleExpr *tupleExpr );
+    virtual void visit( TypeExpr *typeExpr );
+    virtual void visit( UntypedValofExpr *valofExpr );
 
-    virtual void visit(ApplicationExpr *applicationExpr);
-    virtual void visit(UntypedExpr *untypedExpr);
-    virtual void visit(NameExpr *nameExpr);
-    virtual void visit(CastExpr *castExpr);
-    virtual void visit(AddressExpr *addressExpr);
-    virtual void visit(LabelAddressExpr *labAddressExpr);
-    virtual void visit(UntypedMemberExpr *memberExpr);
-    virtual void visit(MemberExpr *memberExpr);
-    virtual void visit(VariableExpr *variableExpr);
-    virtual void visit(ConstantExpr *constantExpr); 
-    virtual void visit(SizeofExpr *sizeofExpr);
-    virtual void visit(AttrExpr *attrExpr);
-    virtual void visit(LogicalExpr *logicalExpr);
-    virtual void visit(ConditionalExpr *conditionalExpr);
-    virtual void visit(CommaExpr *commaExpr);
-    virtual void visit(TupleExpr *tupleExpr);
-    virtual void visit(SolvedTupleExpr *tupleExpr);
-    virtual void visit(TypeExpr *typeExpr);
-    virtual void visit(UntypedValofExpr *valofExpr);
+    virtual void visit( VoidType *basicType );
+    virtual void visit( BasicType *basicType );
+    virtual void visit( PointerType *pointerType );
+    virtual void visit( ArrayType *arrayType );
+    virtual void visit( FunctionType *functionType );
+    virtual void visit( StructInstType *aggregateUseType );
+    virtual void visit( UnionInstType *aggregateUseType );
+    virtual void visit( EnumInstType *aggregateUseType );
+    virtual void visit( ContextInstType *aggregateUseType );
+    virtual void visit( TypeInstType *aggregateUseType );
+    virtual void visit( TupleType *tupleType );
+    virtual void visit( TypeofType *typeofType );
+    virtual void visit( AttrType *attrType );
 
-    virtual void visit(VoidType *basicType);
-    virtual void visit(BasicType *basicType);
-    virtual void visit(PointerType *pointerType);
-    virtual void visit(ArrayType *arrayType);
-    virtual void visit(FunctionType *functionType);
-    virtual void visit(StructInstType *aggregateUseType);
-    virtual void visit(UnionInstType *aggregateUseType);
-    virtual void visit(EnumInstType *aggregateUseType);
-    virtual void visit(ContextInstType *aggregateUseType);
-    virtual void visit(TypeInstType *aggregateUseType);
-    virtual void visit(TupleType *tupleType);
-    virtual void visit(TypeofType *typeofType);
-    virtual void visit(AttrType *attrType);
+    virtual void visit( MemberInit *memberInit );
+    virtual void visit( ElementInit *elementInit );
+    virtual void visit( SingleInit *singleInit );
+    virtual void visit( ListInit *listInit );
 
-    virtual void visit(MemberInit *memberInit);
-    virtual void visit(ElementInit *elementInit);
-    virtual void visit(SingleInit *singleInit);
-    virtual void visit(ListInit *listInit);
+    virtual void visit( Subrange *subrange );
 
-    virtual void visit(Subrange *subrange);
-
-    virtual void visit(Constant *constant);
-
-private:
-    virtual void visit(AggregateDecl *aggregateDecl);
-    virtual void visit(NamedTypeDecl *typeDecl);
-    virtual void visit(ReferenceToType *aggregateUseType);
+    virtual void visit( Constant *constant );
+  private:
+    virtual void visit( AggregateDecl *aggregateDecl );
+    virtual void visit( NamedTypeDecl *typeDecl );
+    virtual void visit( ReferenceToType *aggregateUseType );
 };
 
 template< typename TreeType, typename VisitorType >
-inline void
-maybeAccept( TreeType *tree, VisitorType &visitor )
-{
-    if( tree ) {
+inline void maybeAccept( TreeType *tree, VisitorType &visitor ) {
+    if ( tree ) {
 	tree->accept( visitor );
     }
@@ -106,11 +94,9 @@
 
 template< typename Container, typename VisitorType >
-inline void
-acceptAll( Container &container, VisitorType &visitor )
-{
+inline void acceptAll( Container &container, VisitorType &visitor ) {
     SemanticError errors;
-   for( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
+    for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
 	try {
-	    if( *i ) {
+	    if ( *i ) {
 		(*i)->accept( visitor );
 	    }
@@ -119,5 +105,5 @@
 	}
     }
-    if( !errors.isEmpty() ) {
+    if ( !errors.isEmpty() ) {
 	throw errors;
     }
@@ -125,21 +111,19 @@
 
 template< typename Container, typename VisitorType >
-void
-acceptAllFold( Container &container, VisitorType &visitor, VisitorType &around )
-{
+void acceptAllFold( Container &container, VisitorType &visitor, VisitorType &around ) {
     SemanticError errors;
-    for( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
+    for ( typename Container::iterator i = container.begin(); i != container.end(); ++i ) {
 	try {
-	    if( *i ) {
-    VisitorType *v = new VisitorType;
+	    if ( *i ) {
+		VisitorType *v = new VisitorType;
 		(*i)->accept( *v );
 
-    typename Container::iterator nxt = i; nxt++; // forward_iterator
-    if( nxt == container.end() )
-	visitor += *v;
-    else
-	visitor += *v + around;
+		typename Container::iterator nxt = i; nxt++; // forward_iterator
+		if ( nxt == container.end() )
+		    visitor += *v;
+		else
+		    visitor += *v + around;
 
-    delete v;
+		delete v;
 	    }
 	} catch( SemanticError &e ) {
@@ -147,16 +131,8 @@
 	}
     }
-    if( !errors.isEmpty() ) {
+    if ( !errors.isEmpty() ) {
 	throw errors;
     }
 }
 
-
-#endif /* #ifndef VISITOR_H */
-
-
-/*
-    Local Variables:
-    mode: c++
-    End:
-*/
+#endif // VISITOR_H
Index: translator/examples/includes.c
===================================================================
--- translator/examples/includes.c	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/examples/includes.c	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -1,3 +1,3 @@
-#if 1
+#if 0
 #include <alloca.h>
 #include <assert.h>
Index: translator/main.cc
===================================================================
--- translator/main.cc	(revision 3848e0e8736f68e720b8e97d4e893bb0bb0aca6b)
+++ translator/main.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
@@ -38,12 +38,10 @@
 extern "C"{
 #include <unistd.h>
-extern int  getopt( int, char *const *, const char * );
-extern char *optarg;
-extern int opterr, optind, optopt;
-}
+} // extern
 
 FILE *open_prelude();
 FILE *open_builtins();
 bool beVerbose = false;
+bool resolveVerbose = false;
 
 int main( int argc, char *argv[] ) {
@@ -57,5 +55,5 @@
     opterr = 0;
 
-    while ( (c = getopt( argc, argv, "dtsgmvxcenplD:" )) != -1 ) {
+    while ( (c = getopt( argc, argv, "dtsgmvxcenprlD:" )) != -1 ) {
 	switch (c) {
 	  case 'd':
@@ -78,4 +76,8 @@
 	    /* print symbol table events */
 	    symtabp = true;
+	    break;
+	  case 'r':
+	    /* print resolver steps */
+	    resolveVerbose = true;
 	    break;
 	  case 'x':
@@ -111,22 +113,22 @@
 	  default:
 	    abort();
-	}
-    }
+	} // switch
+    } // while
 
     try {
 	if ( optind < argc ) {
 	    input = fopen( argv[ optind ], "r" );
-	    if ( !input ) {
+	    if ( ! input ) {
 		std::cout << "Error: can't open " << argv[optind] << std::endl;
 		exit( 1 );
-	    }
+	    } // if
 	    optind++;
 	} else {
 	    input = stdin;
-	}
+	} // if
 
 	if ( optind < argc ) {
 	    output = new ofstream( argv[ optind ] );
-	}
+	} // if
     
 	Parser::get_parser().set_debug( debugp );
@@ -138,5 +140,5 @@
 		std::cout << "Error: can't open builtins" << std::endl;
 		exit( 1 );
-	    }
+	    } // if
       
 	    Parser::get_parser().set_linkage( LinkageSpec::Compiler );
@@ -145,5 +147,5 @@
 	    if ( Parser::get_parser().get_parseStatus() != 0 ) {
 		return Parser::get_parser().get_parseStatus();
-	    }
+	    } // if
 	    fclose( builtins );
 
@@ -153,9 +155,9 @@
 	    } else {
 		prelude = open_prelude();
-	    }
+	    } // if
 	    if ( !prelude ) {
 		std::cout << "Error: can't open prelude" << std::endl;
 		exit( 1 );
-	    }
+	    } // if
       
 	    Parser::get_parser().set_linkage( LinkageSpec::Intrinsic );
@@ -164,7 +166,7 @@
 	    if ( Parser::get_parser().get_parseStatus() != 0 ) {
 		return Parser::get_parser().get_parseStatus();
-	    }
+	    } // if
 	    fclose( prelude );
-	}
+	} // if
     
 	if ( libp ) {
@@ -181,7 +183,7 @@
 	    if ( output != &std::cout ) {
 		delete output;
-	    }
-	    return 0;
-	}
+	    } // if
+	    return 0;
+	} // if
     
 	Parser::get_parser().set_linkage( LinkageSpec::Cforall );
@@ -190,5 +192,5 @@
 	if ( debugp || Parser::get_parser().get_parseStatus() != 0 ) {
 	    return Parser::get_parser().get_parseStatus();
-	}
+	} // if
 	fclose( input );
   
@@ -197,5 +199,5 @@
 	    Parser::get_parser().freeTree();
 	    return 0;
-	}
+	} // if
 
 	std::list< Declaration* > translationUnit;
@@ -206,5 +208,5 @@
 	    printAll( translationUnit, std::cout );
 	    return 0;
-	}
+	} // if
 
 	if ( manglep ) {
@@ -213,10 +215,10 @@
 	    acceptAll( translationUnit, printer );
 	    return 0;
-	}
+	} // if
 
 	if ( symtabp ) {
 	    SymTab::validate( translationUnit, true );
 	    return 0;
-	}
+	} // if
 
 	if ( validp ) {
@@ -224,5 +226,6 @@
 	    printAll( translationUnit, std::cout );
 	    return 0;
-	}
+	} // if
+
 	if ( exprp ) {
 	    SymTab::validate( translationUnit, false );
@@ -230,27 +233,27 @@
 	    printAll( translationUnit, std::cout );
 	    return 0;
-	}
-
-	std::cerr << "before validate" << std::endl;
+	} // if
+
+	//std::cerr << "before validate" << std::endl;
 	SymTab::validate( translationUnit, false );
 	//Try::visit( translationUnit );
 	//Tuples::mutate( translationUnit );
 	//InitTweak::mutate( translationUnit );
-	std::cerr << "before mutate" << std::endl;
+	//std::cerr << "before mutate" << std::endl;
 	ControlStruct::mutate( translationUnit );
-	std::cerr << "before fixNames" << std::endl;
+	//std::cerr << "before fixNames" << std::endl;
 	CodeGen::fixNames( translationUnit );
-	std::cerr << "before resolve" << std::endl;
+	//std::cerr << "before resolve" << std::endl;
 	ResolvExpr::resolve( translationUnit );
 	//Tuples::checkFunctions( translationUnit );
 	//      std::cerr << "Finished tuple checkfunctions" << std::endl;
 	//printAll( translationUnit, std::cerr );
-	std::cerr << "before copyParams" << std::endl;
+	//std::cerr << "before copyParams" << std::endl;
 	GenPoly::copyParams( translationUnit );
-	std::cerr << "before convertSpecializations" << std::endl;
+	//std::cerr << "before convertSpecializations" << std::endl;
 	GenPoly::convertSpecializations( translationUnit );
-	std::cerr << "before convertLvalue" << std::endl;
+	//std::cerr << "before convertLvalue" << std::endl;
 	GenPoly::convertLvalue( translationUnit );
-	std::cerr << "before box" << std::endl;
+	//std::cerr << "before box" << std::endl;
 	GenPoly::box( translationUnit );
 	//Tuples::mutate( translationUnit );
@@ -260,5 +263,5 @@
 	if ( output != &std::cout ) {
 	    delete output;
-	}
+	} // if
 
     } catch ( SemanticError &e ) {
@@ -266,5 +269,5 @@
 	if ( output != &std::cout ) {
 	    delete output;
-	}
+	} // if
 	return 1;
     } catch ( UnimplementedError &e ) {
@@ -272,5 +275,5 @@
 	if ( output != &std::cout ) {
 	    delete output;
-	}
+	} // if
 	return 1;
     } catch ( CompilerError &e ) {
@@ -279,10 +282,10 @@
 	if ( output != &std::cout ) {
 	    delete output;
-	}
+	} // if
 	return 1;
-    }
+    } // try
 
     return 0;
-}
+} // main
 
 FILE *open_prelude() {
@@ -294,11 +297,11 @@
     if ( beVerbose ) {
 	cout << "Reading from " << full_name << endl;
-    }
-
-    if (! (ret = fopen(full_name.c_str(), "r" ) ) )
+    } // if
+
+    if ( ! (ret = fopen(full_name.c_str(), "r" ) ) )
 	return fopen(name.c_str(), "r" );             // trying current directory
     else
 	return ret;
-}
+} // open_prelude
 
 FILE *open_builtins() {
@@ -310,11 +313,11 @@
     if ( beVerbose ) {
 	cout << "Reading from " << full_name << endl;
-    }
-
-    if (! (ret = fopen(full_name, "r" ) ) )
+    } // if
+
+    if ( ! (ret = fopen(full_name, "r" ) ) )
 	return fopen(name, "r" );			// trying current directory
     else
 	return ret;
-}
+} // open_builtins
 
 // Local Variables: //
