// 
// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
//
// The contents of this file are covered under the licence agreement in the
// file "LICENCE" distributed with Cforall.
// 
// main.cc -- 
// 
// Author           : Peter A. Buhr
// Created On       : Wed Jun 28 22:57:26 2017
// Last Modified By : Peter A. Buhr
// Last Modified On : Wed Jun 28 22:58:40 2017
// Update Count     : 3
// 

#include <iostream>
#include <string>
using namespace std;
#include "filter.h"

extern int yydebug;
extern int yyparse( void );

int main( int argc, char *argv[] ) {
	switch ( argc ) {
	  case 2: {
		  string arg( argv[1] );

		  if ( arg == "-identity" ) {
			  filter = Identity;
		  } else if ( arg == "-parse_tree" ) {
			  filter = Parse_Tree;
		  } else if ( arg == "-nocode" ) {
			  filter = Nocode;
		  } else if ( arg == "-latex" ) {
			  filter = LaTeX;
		  } else if ( arg == "-html" ) {
			  filter = HTML;
		  } else {
			  cerr << "Unknown printer option: " << argv[1] << endl;
			  goto usage;
		  } // if
		  break;
	  }
	  usage:
	  default:
		cerr << "Usage: " << argv[0] << " [-identity | -parse_tree | -nocode | -latex | -html] < bison.y" << endl;
		exit( -1 );
	}

	//yydebug = 1;
	yyparse();
}

// Local Variables: //
// mode: c++ //
// tab-width: 4 //
// compile-command: "make install" //
// End: //
