Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rd3b7937 rfaf8857  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 27 22:20:20 2016
    13 // Update Count     : 199
     12// Last Modified On : Thu Dec 17 12:59:06 2015
     13// Update Count     : 179
    1414//
    1515
     
    4545//#include "Try/Visit.h"
    4646
    47 #include "Common/SemanticError.h"
    48 #include "Common/UnimplementedError.h"
     47#include "SemanticError.h"
     48#include "UnimplementedError.h"
    4949
    5050#include "../config.h"
     
    7070        resolvep = false,                                                                       // used in AlternativeFinder
    7171        symtabp = false,
    72         treep = false,
    7372        validp = false,
    7473        errorp = false,
    7574        codegenp = false;
    7675
    77 enum { Ast, Bresolver, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, Validate, };
     76enum { Ast, Bresolver, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };
    7877
    7978static struct option long_opts[] = {
     
    8988        { "resolver", no_argument, 0, Resolver },
    9089        { "symbol", no_argument, 0, Symbol },
    91         { "tree", no_argument, 0, Tree },
    9290        { "validate", no_argument, 0, Validate },
    9391        { 0, 0, 0, 0 }
     
    103101       
    104102        int c;
    105         while ( (c = getopt_long( argc, argv, "abefglnpqrstvyzD:", long_opts, &long_index )) != -1 ) {
     103        while ( (c = getopt_long( argc, argv, "abefglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {
    106104                switch ( c ) {
    107105                  case Ast:
     
    148146                  case 's':                                                                             // print symbol table events
    149147                        symtabp = true;
    150                         break;
    151                   case Tree:
    152                   case 't':                                                                             // build in tree
    153                         treep = true;
    154148                        break;
    155149                  case 'v':                                                                             // dump AST after decl validation pass
     
    194188                if ( ! nopreludep ) {                                                   // include gcc builtins
    195189                        // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here.
    196                         FILE * builtins = fopen( libcfap | treep ? "builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
     190                        FILE * builtins = fopen( libcfap ? "./builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
    197191                        if ( builtins == NULL ) {
    198                                 std::cerr << "Error: can't open builtins.cf" << std::endl;
     192                                std::cerr << "Error: can't open builtins" << std::endl;
    199193                                exit( 1 );
    200194                        } // if
     
    204198                        if ( ! libcfap ) {
    205199                                // read the prelude in, if not generating the cfa library
    206                                 FILE * prelude = fopen( treep ? "prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
     200                                FILE * prelude = fopen( CFA_LIBDIR "/prelude.cf", "r" );
    207201                                if ( prelude == NULL ) {
    208                                         std::cerr << "Error: can't open prelude.cf" << std::endl;
     202                                        std::cerr << "Error: can't open prelude" << std::endl;
    209203                                        exit( 1 );
    210204                                } // if
Note: See TracChangeset for help on using the changeset viewer.