Index: translator/ControlStruct/MLEMutator.cc
===================================================================
--- translator/ControlStruct/MLEMutator.cc	(revision 134b86a0507148247f6d9b3cb3c99e475d9ae954)
+++ translator/ControlStruct/MLEMutator.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
@@ -80,4 +80,5 @@
       return branchStmt;
 
+    // test if continue target is a loop
     if ( branchStmt->get_type() == BranchStmt::Continue && enclosingLoops.empty() )
       throw SemanticError( "'continue' outside a loop" );
Index: translator/Parser/DeclarationNode.cc
===================================================================
--- translator/Parser/DeclarationNode.cc	(revision 134b86a0507148247f6d9b3cb3c99e475d9ae954)
+++ translator/Parser/DeclarationNode.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
@@ -112,5 +112,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newFunction( std::string* name, DeclarationNode *ret, DeclarationNode *param, StatementNode *body, bool newStyle )
@@ -136,5 +135,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newQualifier( Qualifier q )
@@ -146,5 +144,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newStorageClass( StorageClass sc )
@@ -155,5 +152,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newBasicType( BasicType bt )
@@ -165,5 +161,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newModifier( Modifier mod )
@@ -175,5 +170,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newForall( DeclarationNode* forall )
@@ -185,5 +179,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newFromTypedef( std::string* name )
@@ -197,5 +190,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newAggregate( TyCon kind, std::string* name, DeclarationNode *formals, ExpressionNode *actuals, DeclarationNode *fields )
@@ -214,5 +206,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newEnum( std::string *name, DeclarationNode *constants )
@@ -229,5 +220,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newEnumConstant( std::string* name, ExpressionNode *constant )
@@ -239,5 +229,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newName( std::string* name )
@@ -248,5 +237,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newFromTypeGen( std::string* name, ExpressionNode *params )
@@ -260,5 +248,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newTypeParam( TypeClass tc, std::string* name )
@@ -272,5 +259,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newContext( std::string *name, DeclarationNode *params, DeclarationNode *asserts )
@@ -285,5 +271,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newContextUse( std::string *name, ExpressionNode *params )
@@ -298,5 +283,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newTypeDecl( std::string *name, DeclarationNode *typeParams )
@@ -311,5 +295,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newPointer( DeclarationNode *qualifiers )
@@ -320,5 +303,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newArray( ExpressionNode *size, DeclarationNode *qualifiers, bool isStatic )
@@ -332,5 +314,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newVarArray( DeclarationNode *qualifiers )
@@ -344,5 +325,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newBitfield( ExpressionNode *size )
@@ -353,5 +333,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newTuple( DeclarationNode *members )
@@ -363,5 +342,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newTypeof( ExpressionNode *expr )
@@ -373,5 +351,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newAttr( std::string *name, ExpressionNode *expr )
@@ -384,5 +361,4 @@
 }
 
-/* static class method */
 DeclarationNode *
 DeclarationNode::newAttr( std::string *name, DeclarationNode *type )
Index: translator/Parser/TypedefTable.cc
===================================================================
--- translator/Parser/TypedefTable.cc	(revision 134b86a0507148247f6d9b3cb3c99e475d9ae954)
+++ translator/Parser/TypedefTable.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: TypedefTable.cc,v 1.7 2004/09/14 17:21:12 rcbilson Exp $
- *
- */
-
 #include <map>
 #include <list>
@@ -19,12 +12,7 @@
 #endif
 
-TypedefTable::TypedefTable()
-    : currentScope(0)
-{
-}
+TypedefTable::TypedefTable() : currentScope(0) {}
 
-bool
-TypedefTable::isKind(string identifier, kind_t kind) const
-{
+bool TypedefTable::isKind(string identifier, kind_t kind) const {
     tableType::const_iterator id_pos = table.find(identifier);
     if (id_pos == table.end()) {
@@ -35,105 +23,79 @@
 }
 
-bool
-TypedefTable::isIdentifier(string identifier) const
-{
+bool TypedefTable::isIdentifier(string identifier) const {
     return isKind(identifier, ID);
 }
 
-bool
-TypedefTable::isTypedef(string identifier) const
-{
+bool TypedefTable::isTypedef(string identifier) const {
     return isKind(identifier, TD);
 }
 
-bool
-TypedefTable::isTypegen(string identifier) const
-{
+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;
+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 {
-      list<Entry>::iterator listPos = (*curPos).second.begin();
-      while( listPos != (*curPos).second.end() && listPos->scope > scope ) {
-        listPos++;
-      }
-      (*curPos).second.insert(listPos, newEntry);
+	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(const std::string &identifier, kind_t kind) {
+    addToScope( identifier, kind, currentScope );
 }
 
-void
-TypedefTable::addToCurrentScope(kind_t kind)
-{
-  addToCurrentScope( nextIdentifiers.top(), kind );
+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(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::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(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::addToEnclosingScope2(kind_t kind) {
+    addToEnclosingScope2( nextIdentifiers.top(), kind );
 }
 
-void
-TypedefTable::setNextIdentifier( const std::string &identifier )
-{
-  nextIdentifiers.top() = identifier;
+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::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)
-{
+void TypedefTable::enterScope(void) {
     currentScope += 1;
     deferListStack.push( deferListType() );
@@ -142,7 +104,5 @@
 }
 
-void
-TypedefTable::leaveScope(void)
-{
+void TypedefTable::leaveScope(void) {
     debugPrint( "Leaving scope " << currentScope << endl );
     for (tableType::iterator i = table.begin(); i != table.end(); i++) {
@@ -151,11 +111,11 @@
 	    declList.pop_front();
 	}
-	if( declList.empty() ) {
-	  table.erase( i );
+	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 );
+	addToCurrentScope( i->identifier, i->kind );
     }
     deferListStack.pop();
@@ -164,20 +124,14 @@
 }
 
-void
-TypedefTable::enterContext( std::string contextName )
-{
-  currentContext = contextName;
-  contextScope = currentScope;
+void TypedefTable::enterContext( std::string contextName ) {
+    currentContext = contextName;
+    contextScope = currentScope;
 }
 
-void
-TypedefTable::leaveContext(void)
-{
-  currentContext = "";
+void TypedefTable::leaveContext(void) {
+    currentContext = "";
 }
 
-void
-TypedefTable::print(void) const
-{
+void TypedefTable::print(void) const {
     for (tableType::const_iterator i = table.begin(); i != table.end(); i++) {
 	debugPrint( (*i).first << ": " );
Index: translator/Parser/cfa.y
===================================================================
--- translator/Parser/cfa.y	(revision 134b86a0507148247f6d9b3cb3c99e475d9ae954)
+++ translator/Parser/cfa.y	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
@@ -10,6 +10,6 @@
  * Created On       : Sat Sep  1 20:22:55 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Mon Nov  3 16:24:24 2014
- * Update Count     : 880
+ * Last Modified On : Sun Nov  9 22:45:42 2014
+ * Update Count     : 881
  */
 
@@ -84,5 +84,5 @@
 
 /* names and constants: lexer differentiates between identifier and typedef names */
-%token<tok> IDENTIFIER		TYPEDEFname		TYPEGENname
+%token<tok> IDENTIFIER		QUOTED_IDENTIFIER	TYPEDEFname		TYPEGENname
 %token<tok> ATTR_IDENTIFIER	ATTR_TYPEDEFname	ATTR_TYPEGENname
 %token<tok> INTEGERconstant	FLOATINGconstant	CHARACTERconstant       STRINGliteral
Index: translator/Parser/lex.l
===================================================================
--- translator/Parser/lex.l	(revision 134b86a0507148247f6d9b3cb3c99e475d9ae954)
+++ translator/Parser/lex.l	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
@@ -10,6 +10,6 @@
  * Created On       : Sat Sep 22 08:58:10 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Sat Nov  1 18:09:47 2003
- * Update Count     : 197
+ * Last Modified On : Tue Nov 11 08:10:05 2014
+ * Update Count     : 215
  */
 
@@ -17,10 +17,10 @@
 
 %{
-/* 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 *****************************/
+// 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>
@@ -28,9 +28,9 @@
 #include "lex.h"
 #include "ParseNode.h"
-#include "cfa.tab.h" /* YACC generated definitions based on C++ grammar */
+#include "cfa.tab.h" // YACC generated definitions based on C++ grammar
 
 char *yyfilename;
 
-#define WHITE_RETURN(x)		/* do nothing */
+#define WHITE_RETURN(x)					// do nothing
 #define NEWLINE_RETURN()	WHITE_RETURN('\n')
 #define RETURN_VAL(x)		yylval.tok.str = new std::string(yytext); \
@@ -39,14 +39,15 @@
                                 return(x)
 
-#define KEYWORD_RETURN(x)	RETURN_VAL(x)		/* keyword */
+#define KEYWORD_RETURN(x)	RETURN_VAL(x)		// keyword
 #define IDENTIFIER_RETURN()	RETURN_VAL((typedefTable.isIdentifier(yytext) ? IDENTIFIER : typedefTable.isTypedef(yytext) ? TYPEDEFname : TYPEGENname))
-#define ATTRIBUTE_RETURN()	RETURN_VAL((typedefTable.isIdentifier(yytext) ? ATTR_IDENTIFIER : typedefTable.isTypedef(yytext) ? ATTR_TYPEDEFname : ATTR_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 */
+//#define ATTRIBUTE_RETURN()	RETURN_VAL((typedefTable.isIdentifier(yytext) ? ATTR_IDENTIFIER : typedefTable.isTypedef(yytext) ? ATTR_TYPEDEFname : ATTR_TYPEGENname))
+#define ATTRIBUTE_RETURN()	RETURN_VAL(ATTR_IDENTIFIER)
+
+#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 ) {
@@ -68,11 +69,14 @@
 universal_char "\\"((u{hex_quad})|(U{hex_quad}{2}))
 
-	/* identifier, GCC: $ in identifier */
+	// identifier, GCC: $ in identifier
 identifier ([a-zA-Z_$]|{universal_char})([0-9a-zA-Z_$]|{universal_char})*
 
-	/* attribute identifier, GCC: $ in identifier */
+	// quoted identifier
+quoted_identifier "`"{identifier}"`"
+
+	// attribute identifier, GCC: $ in identifier
 attr_identifier "@"{identifier}
 
-	/*  numeric constants, CFA: '_' in constant */
+	// numeric constants, CFA: '_' in constant
 hex_quad {hex}{4}
 integer_suffix "_"?(([uU][lL]?)|([uU]("ll"|"LL")?)|([lL][uU]?)|("ll"|"LL")[uU]?)
@@ -99,11 +103,12 @@
 hex_floating_constant {hex_prefix}(({hex_fractional_constant}{binary_exponent})|({hex_digits}{binary_exponent})){floating_suffix}?
 
-	/* character escape sequence, GCC: \e => esc character */
+	// character escape sequence, GCC: \e => esc character
 simple_escape "\\"[abefnrtv'"?\\]
+	// ' stop highlighting
 octal_escape "\\"{octal}{1,3}
 hex_escape "\\""x"{hex}+
 escape_seq {simple_escape}|{octal_escape}|{hex_escape}|{universal_char}
 
-	/* display/white-space characters */
+	// display/white-space characters
 h_tab [\011]
 form_feed [\014]
@@ -112,5 +117,5 @@
 h_white [ ]|{h_tab}
 
-	/* operators */
+	// operators
 op_unary_only "~"|"!"
 op_unary_binary "+"|"-"|"*"
@@ -124,8 +129,10 @@
 
 %x COMMENT
+%x QUOTED
 
 %%
 	/* line directives */
 ^{h_white}*"#"{h_white}*[0-9]+{h_white}*["][^"\n]+["][^\n]*"\n" {
+	/* " stop highlighting */
 	char *end_num;
 	char *begin_string, *end_string;
@@ -178,5 +185,5 @@
 catch			{KEYWORD_RETURN(CATCH);}	/* CFA */
 char			{KEYWORD_RETURN(CHAR);}
-choose			{KEYWORD_RETURN(CHOOSE);}
+choose			{KEYWORD_RETURN(CHOOSE);}	/* CFA */
 _Complex		{KEYWORD_RETURN(COMPLEX);}	/* ANSI99 */
 __complex		{KEYWORD_RETURN(COMPLEX);}	/* GCC */
@@ -185,21 +192,21 @@
 __const			{KEYWORD_RETURN(CONST);}	/* GCC */
 __const__		{KEYWORD_RETURN(CONST);}	/* GCC */
-context			{KEYWORD_RETURN(CONTEXT);}
+context			{KEYWORD_RETURN(CONTEXT);}	/* CFA */
 continue		{KEYWORD_RETURN(CONTINUE);}
 default			{KEYWORD_RETURN(DEFAULT);}
 do			{KEYWORD_RETURN(DO);}
 double			{KEYWORD_RETURN(DOUBLE);}
-dtype			{KEYWORD_RETURN(DTYPE);}
+dtype			{KEYWORD_RETURN(DTYPE);}	/* CFA */
 else			{KEYWORD_RETURN(ELSE);}
 enum			{KEYWORD_RETURN(ENUM);}
 __extension__		{KEYWORD_RETURN(EXTENSION);}	/* GCC */
 extern			{KEYWORD_RETURN(EXTERN);}
-fallthru		{KEYWORD_RETURN(FALLTHRU);}
+fallthru		{KEYWORD_RETURN(FALLTHRU);}	/* CFA */
 finally			{KEYWORD_RETURN(FINALLY);}	/* CFA */
 float			{KEYWORD_RETURN(FLOAT);}
 for			{KEYWORD_RETURN(FOR);}
-forall			{KEYWORD_RETURN(FORALL);}
+forall			{KEYWORD_RETURN(FORALL);}	/* CFA */
 fortran			{KEYWORD_RETURN(FORTRAN);}
-ftype			{KEYWORD_RETURN(FTYPE);}
+ftype			{KEYWORD_RETURN(FTYPE);}	/* CFA */
 goto			{KEYWORD_RETURN(GOTO);}
 if			{KEYWORD_RETURN(IF);}
@@ -213,5 +220,5 @@
 __label__		{KEYWORD_RETURN(LABEL);}	/* GCC */
 long			{KEYWORD_RETURN(LONG);}
-lvalue			{KEYWORD_RETURN(LVALUE);}
+lvalue			{KEYWORD_RETURN(LVALUE);}	/* CFA */
 register		{KEYWORD_RETURN(REGISTER);}
 restrict		{KEYWORD_RETURN(RESTRICT);}	/* ANSI99 */
@@ -229,5 +236,5 @@
 throw			{KEYWORD_RETURN(THROW);}	/* CFA */
 try			{KEYWORD_RETURN(TRY);}		/* CFA */
-type			{KEYWORD_RETURN(TYPE);}
+type			{KEYWORD_RETURN(TYPE);}		/* CFA */
 typedef			{KEYWORD_RETURN(TYPEDEF);}
 typeof			{KEYWORD_RETURN(TYPEOF);}	/* GCC */
@@ -245,4 +252,7 @@
 {identifier}		{IDENTIFIER_RETURN();}
 {attr_identifier}	{ATTRIBUTE_RETURN();}
+"`"			{BEGIN QUOTED;}
+<QUOTED>{identifier}	{IDENTIFIER_RETURN();}
+<QUOTED>"`"		{BEGIN 0;}
 
 	/* numeric constants */
@@ -257,7 +267,9 @@
 	/* character constant, allows empty value */
 "L"?[']([^'\\\n]|{escape_seq})*['] {RETURN_VAL(CHARACTERconstant);}
+	/* ' stop highlighting */
 
 	/* string constant */
 "L"?["]([^"\\\n]|{escape_seq})*["] {RETURN_VAL(STRINGliteral);}
+	/* " stop highlighting */
 
 	/* punctuation */
@@ -367,6 +379,6 @@
 
 
-/* Local Variables: */
-/* fill-column: 100 */
-/* compile-command: "gmake" */
-/* End: */
+// Local Variables:
+// fill-column: 100
+// compile-command: "make"
+// End:
Index: translator/main.cc
===================================================================
--- translator/main.cc	(revision 134b86a0507148247f6d9b3cb3c99e475d9ae954)
+++ translator/main.cc	(revision 8c17ab009047298326a3dc92f5ddacbdc08bdc94)
@@ -38,7 +38,7 @@
 extern "C"{
 #include <unistd.h>
-  extern int  getopt(int, char *const *, const char *);
-  extern char *optarg;
-  extern int opterr, optind, optopt;
+extern int  getopt( int, char *const *, const char * );
+extern char *optarg;
+extern int opterr, optind, optopt;
 }
 
@@ -47,265 +47,265 @@
 bool beVerbose = false;
 
-int main(int argc, char *argv[]){
-  bool debugp = false, treep = false, astp = false, manglep = false, symtabp = false, validp = false;
-  bool preludep = true, protop = false, libp = false;
-  bool exprp = false;
-  int c;
-  FILE *input, *prelude, *builtins;
-  std::ostream *output = &std::cout;
-
-  opterr = 0;
-
-  while((c = getopt(argc, argv, "dtsgmvxcenplD:")) != -1) {
-    switch(c){
-    case 'd':
-      /* bison debugging info */
-      debugp = true;
-      break;
-    case 't':
-      /* dump parse tree */
-      treep = true;
-      break;
-    case 's':
-      /* dump AST */
-      astp = true;
-      break;
-     case 'g':
-       /* print alternatives for expressions */
-       manglep = true;
-       break;
-     case 'm':
-       /* print symbol table events */
-       symtabp = true;
-       break;
-    case 'x':
-      /* dump AST after decl validation pass */
-      validp = true;
-      break;
-    case 'e':
-      /* dump AST after expression analysis */
-      exprp = true;
-      break;
-    case 'n':
-      /* don't read preamble */
-      preludep = false;
-      break;
-    case 'p':
-      /* generate prototypes for preamble functions */
-      protop = true;
-      break;
-    case 'l':
-      /* generate libcfa.c */
-      libp = true;
-      break;
-    case 'v':
-      /* verbose */
-      beVerbose = true;
-      break;
-    case 'D':
-      /* ignore -Dxxx */
-      break;
-    case '?':
-      cout << "Unknown option: '" << (char)optopt << "'" << endl;
-      exit(1);
-    default:
-      abort();
+int main( int argc, char *argv[] ) {
+    bool debugp = false, treep = false, astp = false, manglep = false, symtabp = false, validp = false;
+    bool preludep = true, protop = false, libp = false;
+    bool exprp = false;
+    int c;
+    FILE *input, *prelude, *builtins;
+    std::ostream *output = &std::cout;
+
+    opterr = 0;
+
+    while ( (c = getopt( argc, argv, "dtsgmvxcenplD:" )) != -1 ) {
+	switch (c) {
+	  case 'd':
+	    /* bison debugging info */
+	    debugp = true;
+	    break;
+	  case 't':
+	    /* dump parse tree */
+	    treep = true;
+	    break;
+	  case 's':
+	    /* dump AST */
+	    astp = true;
+	    break;
+	  case 'g':
+	    /* print alternatives for expressions */
+	    manglep = true;
+	    break;
+	  case 'm':
+	    /* print symbol table events */
+	    symtabp = true;
+	    break;
+	  case 'x':
+	    /* dump AST after decl validation pass */
+	    validp = true;
+	    break;
+	  case 'e':
+	    /* dump AST after expression analysis */
+	    exprp = true;
+	    break;
+	  case 'n':
+	    /* don't read preamble */
+	    preludep = false;
+	    break;
+	  case 'p':
+	    /* generate prototypes for preamble functions */
+	    protop = true;
+	    break;
+	  case 'l':
+	    /* generate libcfa.c */
+	    libp = true;
+	    break;
+	  case 'v':
+	    /* verbose */
+	    beVerbose = true;
+	    break;
+	  case 'D':
+	    /* ignore -Dxxx */
+	    break;
+	  case '?':
+	    cout << "Unknown option: '" << (char)optopt << "'" << endl;
+	    exit(1);
+	  default:
+	    abort();
+	}
     }
-  }
-
-  try {
-    if( optind < argc ) {
-      input = fopen( argv[ optind ], "r" );
-      if( !input ) {
-        std::cout << "Error: can't open " << argv[optind] << std::endl;
-        exit( 1 );
-      }
-      optind++;
-    } else {
-      input = stdin;
+
+    try {
+	if ( optind < argc ) {
+	    input = fopen( argv[ optind ], "r" );
+	    if ( !input ) {
+		std::cout << "Error: can't open " << argv[optind] << std::endl;
+		exit( 1 );
+	    }
+	    optind++;
+	} else {
+	    input = stdin;
+	}
+
+	if ( optind < argc ) {
+	    output = new ofstream( argv[ optind ] );
+	}
+    
+	Parser::get_parser().set_debug( debugp );
+    
+	if ( preludep ) {
+	    // include gcc builtins
+	    builtins = open_builtins();
+	    if ( !builtins ) {
+		std::cout << "Error: can't open builtins" << std::endl;
+		exit( 1 );
+	    }
+      
+	    Parser::get_parser().set_linkage( LinkageSpec::Compiler );
+	    Parser::get_parser().parse( builtins );
+    
+	    if ( Parser::get_parser().get_parseStatus() != 0 ) {
+		return Parser::get_parser().get_parseStatus();
+	    }
+	    fclose( builtins );
+
+	    // include cfa prelude
+	    if ( libp ) {
+		prelude = input;
+	    } else {
+		prelude = open_prelude();
+	    }
+	    if ( !prelude ) {
+		std::cout << "Error: can't open prelude" << std::endl;
+		exit( 1 );
+	    }
+      
+	    Parser::get_parser().set_linkage( LinkageSpec::Intrinsic );
+	    Parser::get_parser().parse( prelude );
+    
+	    if ( Parser::get_parser().get_parseStatus() != 0 ) {
+		return Parser::get_parser().get_parseStatus();
+	    }
+	    fclose( prelude );
+	}
+    
+	if ( libp ) {
+	    std::list< Declaration* > translationUnit;
+	    buildList( Parser::get_parser().get_parseTree(), translationUnit );
+	    Parser::get_parser().freeTree();
+	    SymTab::validate( translationUnit, false );
+	    CodeGen::fixNames( translationUnit );
+	    LibCfa::makeLibCfa( translationUnit );
+	    ResolvExpr::resolve( translationUnit );
+	    GenPoly::convertLvalue( translationUnit );
+	    GenPoly::box( translationUnit );
+	    CodeGen::generate( translationUnit, *output, true );
+	    if ( output != &std::cout ) {
+		delete output;
+	    }
+	    return 0;
+	}
+    
+	Parser::get_parser().set_linkage( LinkageSpec::Cforall );
+  
+	Parser::get_parser().parse( input );
+	if ( debugp || Parser::get_parser().get_parseStatus() != 0 ) {
+	    return Parser::get_parser().get_parseStatus();
+	}
+	fclose( input );
+  
+	if ( treep ) {
+	    Parser::get_parser().get_parseTree()->printList( std::cout );
+	    Parser::get_parser().freeTree();
+	    return 0;
+	}
+
+	std::list< Declaration* > translationUnit;
+	buildList( Parser::get_parser().get_parseTree(), translationUnit );
+
+	Parser::get_parser().freeTree();
+	if ( astp ) {
+	    printAll( translationUnit, std::cout );
+	    return 0;
+	}
+
+	if ( manglep ) {
+	    SymTab::validate( translationUnit, false );
+	    ResolvExpr::AlternativePrinter printer( std::cout );
+	    acceptAll( translationUnit, printer );
+	    return 0;
+	}
+
+	if ( symtabp ) {
+	    SymTab::validate( translationUnit, true );
+	    return 0;
+	}
+
+	if ( validp ) {
+	    SymTab::validate( translationUnit, false );
+	    printAll( translationUnit, std::cout );
+	    return 0;
+	}
+	if ( exprp ) {
+	    SymTab::validate( translationUnit, false );
+	    ResolvExpr::resolve( translationUnit );
+	    printAll( translationUnit, std::cout );
+	    return 0;
+	}
+
+	SymTab::validate( translationUnit, false );
+	//Try::visit( translationUnit );
+	//Tuples::mutate( translationUnit );
+	//InitTweak::mutate( translationUnit );
+	ControlStruct::mutate( translationUnit );
+	CodeGen::fixNames( translationUnit );
+	ResolvExpr::resolve( translationUnit );
+	//Tuples::checkFunctions( translationUnit );
+	//      std::cerr << "Finished tuple checkfunctions" << std::endl;
+	//printAll( translationUnit, std::cerr );
+	GenPoly::copyParams( translationUnit );
+	GenPoly::convertSpecializations( translationUnit );
+	GenPoly::convertLvalue( translationUnit );
+	GenPoly::box( translationUnit );
+	//Tuples::mutate( translationUnit );
+
+	CodeGen::generate( translationUnit, *output, protop );
+
+	if ( output != &std::cout ) {
+	    delete output;
+	}
+
+    } catch ( SemanticError &e ) {
+	e.print( cout );
+	if ( output != &std::cout ) {
+	    delete output;
+	}
+	return 1;
+    } catch ( UnimplementedError &e ) {
+	std::cout << "Sorry, " << e.get_what() << " is not currently implemented" << std::endl;
+	if ( output != &std::cout ) {
+	    delete output;
+	}
+	return 1;
+    } catch ( CompilerError &e ) {
+	std::cerr << "Compiler Error: " << e.get_what() << std::endl;
+	std::cerr << "(please report bugs to " << std::endl;
+	if ( output != &std::cout ) {
+	    delete output;
+	}
+	return 1;
     }
 
-    if( optind < argc ) {
-      output = new ofstream( argv[ optind ] );
+    return 0;
+}
+
+FILE *open_prelude() {
+    FILE *ret;
+
+    const string name("prelude.cf"),
+	full_name = string(CFA_LIBDIR) + "/" + name;
+
+    if ( beVerbose ) {
+	cout << "Reading from " << full_name << endl;
     }
-    
-    Parser::get_parser().set_debug( debugp );
-    
-    if( preludep ) {
-      // include gcc builtins
-      builtins = open_builtins();
-      if( !builtins ) {
-        std::cout << "Error: can't open builtins" << std::endl;
-        exit( 1 );
-      }
-      
-      Parser::get_parser().set_linkage( LinkageSpec::Compiler );
-      Parser::get_parser().parse( builtins );
-    
-      if( Parser::get_parser().get_parseStatus() != 0 ) {
-        return Parser::get_parser().get_parseStatus();
-      }
-      fclose( builtins );
-
-      // include cfa prelude
-      if( libp ) {
-        prelude = input;
-      } else {
-        prelude = open_prelude();
-      }
-      if( !prelude ) {
-        std::cout << "Error: can't open prelude" << std::endl;
-        exit( 1 );
-      }
-      
-      Parser::get_parser().set_linkage( LinkageSpec::Intrinsic );
-      Parser::get_parser().parse( prelude );
-    
-      if( Parser::get_parser().get_parseStatus() != 0 ) {
-        return Parser::get_parser().get_parseStatus();
-      }
-      fclose( prelude );
+
+    if (! (ret = fopen(full_name.c_str(), "r" ) ) )
+	return fopen(name.c_str(), "r" );             // trying current directory
+    else
+	return ret;
+}
+
+FILE *open_builtins() {
+    FILE *ret;
+
+    const char *name = "builtins.cf";
+    const char *full_name = CFA_LIBDIR "/builtins.cf";
+
+    if ( beVerbose ) {
+	cout << "Reading from " << full_name << endl;
     }
-    
-    if( libp ) {
-      std::list< Declaration* > translationUnit;
-      buildList( Parser::get_parser().get_parseTree(), translationUnit );
-      Parser::get_parser().freeTree();
-      SymTab::validate( translationUnit, false );
-      CodeGen::fixNames( translationUnit );
-      LibCfa::makeLibCfa( translationUnit );
-      ResolvExpr::resolve( translationUnit );
-      GenPoly::convertLvalue( translationUnit );
-      GenPoly::box( translationUnit );
-      CodeGen::generate( translationUnit, *output, true );
-      if( output != &std::cout ) {
-	delete output;
-      }
-      return 0;
-    }
-    
-    Parser::get_parser().set_linkage( LinkageSpec::Cforall );
-  
-    Parser::get_parser().parse( input );
-    if( debugp || Parser::get_parser().get_parseStatus() != 0 ) {
-      return Parser::get_parser().get_parseStatus();
-    }
-    fclose( input );
-  
-    if( treep ) {
-      Parser::get_parser().get_parseTree()->printList( std::cout );
-      Parser::get_parser().freeTree();
-      return 0;
-    }
-
-    std::list< Declaration* > translationUnit;
-    buildList( Parser::get_parser().get_parseTree(), translationUnit );
-
-    Parser::get_parser().freeTree();
-    if( astp ) {
-      printAll( translationUnit, std::cout );
-      return 0;
-    }
-
-    if( manglep ) {
-      SymTab::validate( translationUnit, false );
-      ResolvExpr::AlternativePrinter printer( std::cout );
-      acceptAll( translationUnit, printer );
-      return 0;
-    }
-
-    if( symtabp ) {
-      SymTab::validate( translationUnit, true );
-      return 0;
-    }
-
-    if( validp ) {
-      SymTab::validate( translationUnit, false );
-      printAll( translationUnit, std::cout );
-      return 0;
-    }
-    if( exprp ) {
-      SymTab::validate( translationUnit, false );
-      ResolvExpr::resolve( translationUnit );
-      printAll( translationUnit, std::cout );
-      return 0;
-    }
-
-    SymTab::validate( translationUnit, false );
-    //Try::visit( translationUnit );
-    //Tuples::mutate( translationUnit );
-    //InitTweak::mutate( translationUnit );
-    ControlStruct::mutate( translationUnit );
-    CodeGen::fixNames( translationUnit );
-    ResolvExpr::resolve( translationUnit );
-    //Tuples::checkFunctions( translationUnit );
-    //      std::cerr << "Finished tuple checkfunctions" << std::endl;
-    //printAll( translationUnit, std::cerr );
-    GenPoly::copyParams( translationUnit );
-    GenPoly::convertSpecializations( translationUnit );
-    GenPoly::convertLvalue( translationUnit );
-    GenPoly::box( translationUnit );
-    //Tuples::mutate( translationUnit );
-
-    CodeGen::generate( translationUnit, *output, protop );
-
-    if( output != &std::cout ) {
-	delete output;
-    }
-
-  } catch ( SemanticError &e ) {
-    e.print( cout );
-    if( output != &std::cout ) {
-      delete output;
-    }
-    return 1;
-  } catch ( UnimplementedError &e ) {
-    std::cout << "Sorry, " << e.get_what() << " is not currently implemented" << std::endl;
-    if( output != &std::cout ) {
-      delete output;
-    }
-    return 1;
-  } catch ( CompilerError &e ) {
-    std::cerr << "Compiler Error: " << e.get_what() << std::endl;
-    std::cerr << "(please report bugs to " << std::endl;
-    if( output != &std::cout ) {
-      delete output;
-    }
-    return 1;
-  }
-
-  return 0;
-}
-
-FILE *open_prelude(){
-  FILE *ret;
-
-  const string name("prelude.cf"),
-               full_name = string(CFA_LIBDIR) + "/" + name;
-
-  if( beVerbose ) {
-    cout << "Reading from " << full_name << endl;
-  }
-
-  if (! (ret = fopen(full_name.c_str(), "r" ) ) )
-    return fopen(name.c_str(), "r" );             // trying current directory
-  else
-    return ret;
-}
-
-FILE *open_builtins(){
-  FILE *ret;
-
-  const char *name = "builtins.cf";
-  const char *full_name = CFA_LIBDIR "/builtins.cf";
-
-  if( beVerbose ) {
-    cout << "Reading from " << full_name << endl;
-  }
-
-  if (! (ret = fopen(full_name, "r" ) ) )
-    return fopen(name, "r" );             // trying current directory
-  else
-    return ret;
+
+    if (! (ret = fopen(full_name, "r" ) ) )
+	return fopen(name, "r" );			// trying current directory
+    else
+	return ret;
 }
 
