Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rbff09c8 r6de43b6  
    1010// Author           : Richard C. Bilson
    1111// Created On       : Fri May 15 23:12:02 2015
    12 // Last Modified By : Andrew Beach
    13 // Last Modified On : Wed Jul 26 14:38:00 2017
    14 // Update Count     : 443
     12// Last Modified By : Peter A. Buhr
     13// Last Modified On : Tue Oct 31 12:22:40 2017
     14// Update Count     : 445
    1515//
    1616
     
    4444#include "ControlStruct/Mutate.h"           // for mutate
    4545#include "GenPoly/Box.h"                    // for box
    46 #include "GenPoly/CopyParams.h"             // for copyParams
    4746#include "GenPoly/InstantiateGeneric.h"     // for instantiateGeneric
    4847#include "GenPoly/Lvalue.h"                 // for convertLvalue
     
    9493        codegenp = false,
    9594        prettycodegenp = false,
    96         nolinemarks = false;
     95        linemarks = false;
    9796
    9897static void parse_cmdline( int argc, char *argv[], const char *& filename );
     
    239238                } // if
    240239
    241                 // OPTPRINT( "Concurrency" )
    242                 // Concurrency::applyKeywords( translationUnit );
    243 
    244240                // add the assignment statement after the initialization of a type parameter
    245241                OPTPRINT( "validate" )
     
    324320                OPTPRINT("instantiateGenerics")
    325321                GenPoly::instantiateGeneric( translationUnit );
    326                 OPTPRINT( "copyParams" );
    327                 GenPoly::copyParams( translationUnit );
    328322                OPTPRINT( "convertLvalue" )
    329323                GenPoly::convertLvalue( translationUnit );
     
    346340
    347341                CodeTools::fillLocations( translationUnit );
    348                 CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, ! nolinemarks );
     342                CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks );
    349343
    350344                CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
     
    384378
    385379void parse_cmdline( int argc, char * argv[], const char *& filename ) {
    386         enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
     380        enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, TupleExpansion, Validate, };
    387381
    388382        static struct option long_opts[] = {
     
    396390                { "grammar", no_argument, 0, Grammar },
    397391                { "libcfa", no_argument, 0, LibCFA },
     392                { "line-marks", no_argument, 0, Linemarks },
     393                { "no-line-marks", no_argument, 0, Nolinemarks },
    398394                { "no-preamble", no_argument, 0, Nopreamble },
    399395                { "parse", no_argument, 0, Parse },
     
    411407
    412408        int c;
    413         while ( (c = getopt_long( argc, argv, "abBcCdefglLmnpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
     409        while ( (c = getopt_long( argc, argv, "abBcCdefglLmnNpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
    414410                switch ( c ) {
    415411                  case Ast:
     
    451447                        libcfap = true;
    452448                        break;
    453                   case 'L':                                                                             // surpress lines marks
    454                         nolinemarks = true;
     449                  case Linemarks:
     450                  case 'L':                                                                             // print lines marks
     451                        linemarks = true;
    455452                        break;
    456453                  case Nopreamble:
    457454                  case 'n':                                                                             // do not read preamble
    458455                        nopreludep = true;
     456                        break;
     457                  case Nolinemarks:
     458                  case 'N':                                                                             // suppress line marks
     459                        linemarks = false;
    459460                        break;
    460461                  case Prototypes:
     
    508509                                assertf( false, "Unknown option: %s\n", argv[optind - 1] );
    509510                        } // if
     511                        #if __GNUC__ < 7
     512                        #else
     513                                __attribute__((fallthrough));
     514                        #endif
    510515                  default:
    511516                        abort();
Note: See TracChangeset for help on using the changeset viewer.