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