Beispiel #1
0
def parse():
    if not args["reparse"]:
        settings.use_filesystem_cache = False
    settings.unit_testing_mode = True

    c = CodeParser()
    
    if args["verbose"]:
        c.verbose = True

    if args["reparse"]:
        c.reparse(args["source"])
    else:
        c.parse(args["source"])

    #Since this is for unit testing, we will access the "private" variables.
    for fname in c._modulefiles:
        for moduledat in c._modulefiles[fname]:
            if args["verbose"]:
                print(c.modules[moduledat])
            else:
                print(moduledat)
            
        # for progdat in c._programfiles[fname]:
        #     if args["verbose"]:
        #         print c.programs[progdat]
        #     else:
        #         print progdat

    return c
Beispiel #2
0
def parse():
    if not args["reparse"]:
        settings.use_filesystem_cache = False
    settings.unit_testing_mode = True

    c = CodeParser()

    if args["verbose"]:
        c.verbose = True

    if args["reparse"]:
        c.reparse(args["source"])
    else:
        c.parse(args["source"])

    #Since this is for unit testing, we will access the "private" variables.
    for fname in c._modulefiles:
        for moduledat in c._modulefiles[fname]:
            if args["verbose"]:
                print(c.modules[moduledat])
            else:
                print(moduledat)

        # for progdat in c._programfiles[fname]:
        #     if args["verbose"]:
        #         print c.programs[progdat]
        #     else:
        #         print progdat

    return c
Beispiel #3
0
def _parse():
    """Parses the specified Fortran source file from which the wrappers will
    be constructed for ctypes.
    """
    if not args["reparse"]:
        settings.use_filesystem_cache = False

    c = CodeParser()    
    if args["verbose"]:
        c.verbose = True

    if args["reparse"]:
        c.reparse(args["source"])
    else:
        c.parse(args["source"])

    return c