Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rde62360d r68cd1ce  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jun 22 17:02:11 2015
    13 // Update Count     : 73
     12// Last Modified On : Fri Jun 12 06:56:40 2015
     13// Update Count     : 70
    1414//
    1515
     
    5858bool
    5959        astp = false,
    60         bresolvep = false,
    6160        exprp = false,
    6261        expraltp = false,
    6362        grammarp = false,
    6463        libcfap = false,
    65         nopreludep = false,
    66         protop = false,
    67         parsep = false,
    6864        resolvep = false,                                                                       // used in AlternativeFinder
    6965        symtabp = false,
     66        parsep = false,
    7067        validp = false,
    71         errorp = false,
    72         codegenp = false;
    73 
    74 enum { Ast, Bresolver, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };
     68        preludep = true,
     69        protop = false,
     70        codegenp = false,
     71        errorp = false;
     72
     73enum { Ast, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };
    7574
    7675static struct option long_opts[] = {
    7776        { "ast", no_argument, 0, Ast },
    78         { "before-resolver", no_argument, 0, Bresolver },
    7977        { "expr", no_argument, 0, Expr },
    8078        { "expralt", no_argument, 0, ExprAlt },
     
    9997       
    10098        int c;
    101         while ( (c = getopt_long( argc, argv, "abefglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {
     99        while ( (c = getopt_long( argc, argv, "aefglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {
    102100                switch ( c ) {
    103101                  case Ast:
     
    105103                        astp = true;
    106104                        break;
    107                   case Bresolver:
    108                   case 'b':                                                                             // print before resolver steps
    109                         bresolvep = true;
    110                         break;
    111105                  case Expr:
    112106                  case 'e':                                                                             // dump AST after expression analysis
     
    127121                  case Nopreamble:
    128122                  case 'n':                                                                             // do not read preamble
    129                         nopreludep = true;
     123                        preludep = false;
    130124                        break;
    131125                  case Prototypes:
     
    184178
    185179                // read in the builtins and the prelude
    186                 if ( ! nopreludep ) {                                                   // include gcc builtins
     180                if ( preludep ) {                                                               // include gcc builtins
    187181                        FILE * builtins = fopen( CFA_LIBDIR "/builtins.cf", "r" );
    188182                        if ( builtins == NULL ) {
     
    257251                } // if
    258252
    259                 if ( bresolvep ) {
    260                         printAll( translationUnit, std::cout );
    261                         return 0;
    262                 } // if
    263 
    264253                OPTPRINT( "resolve" )
    265254                ResolvExpr::resolve( translationUnit );
Note: See TracChangeset for help on using the changeset viewer.