Changes in src/main.cc [de62360d:68cd1ce]
- File:
-
- 1 edited
-
src/main.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
rde62360d r68cd1ce 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 22 17:02:11201513 // Update Count : 7 312 // Last Modified On : Fri Jun 12 06:56:40 2015 13 // Update Count : 70 14 14 // 15 15 … … 58 58 bool 59 59 astp = false, 60 bresolvep = false,61 60 exprp = false, 62 61 expraltp = false, 63 62 grammarp = false, 64 63 libcfap = false, 65 nopreludep = false,66 protop = false,67 parsep = false,68 64 resolvep = false, // used in AlternativeFinder 69 65 symtabp = false, 66 parsep = false, 70 67 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 73 enum { Ast, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, }; 75 74 76 75 static struct option long_opts[] = { 77 76 { "ast", no_argument, 0, Ast }, 78 { "before-resolver", no_argument, 0, Bresolver },79 77 { "expr", no_argument, 0, Expr }, 80 78 { "expralt", no_argument, 0, ExprAlt }, … … 99 97 100 98 int c; 101 while ( (c = getopt_long( argc, argv, "a befglnpqrsvyzD:", long_opts, &long_index )) != -1 ) {99 while ( (c = getopt_long( argc, argv, "aefglnpqrsvyzD:", long_opts, &long_index )) != -1 ) { 102 100 switch ( c ) { 103 101 case Ast: … … 105 103 astp = true; 106 104 break; 107 case Bresolver:108 case 'b': // print before resolver steps109 bresolvep = true;110 break;111 105 case Expr: 112 106 case 'e': // dump AST after expression analysis … … 127 121 case Nopreamble: 128 122 case 'n': // do not read preamble 129 nopreludep = true;123 preludep = false; 130 124 break; 131 125 case Prototypes: … … 184 178 185 179 // read in the builtins and the prelude 186 if ( ! nopreludep ) {// include gcc builtins180 if ( preludep ) { // include gcc builtins 187 181 FILE * builtins = fopen( CFA_LIBDIR "/builtins.cf", "r" ); 188 182 if ( builtins == NULL ) { … … 257 251 } // if 258 252 259 if ( bresolvep ) {260 printAll( translationUnit, std::cout );261 return 0;262 } // if263 264 253 OPTPRINT( "resolve" ) 265 254 ResolvExpr::resolve( translationUnit );
Note:
See TracChangeset
for help on using the changeset viewer.