def main(): with open("testfiles/parsing/Valid.txt", "r") as testfile: blueprint = TestCase.parse_syntax(testfile) if blueprint is not None: tc = TestCase(blueprint) dr = Driver(tc) dr.execute()
#!/usr/bin/python3 # Honestly, making "Driver" a class was worth it # just so we have this one called "DriverDriver.py" from Driver import Driver from TestCase import TestCase import sys with open(sys.argv[1], "r") as testfile: blueprint = TestCase.parse_syntax(testfile) if blueprint is not None: tc = TestCase(blueprint) dr = Driver(tc) dr.execute() elif blueprint is None: print("Invalid blueprint")
return parser.parse_args() if __name__ == "__main__": args = _parse_input() cnip_opt = dict(no_stdlib=args.no_stdlib, no_typedef=args.no_typedef, no_heuristic=args.no_heuristic, traces=args.trace, trace_level=args.trace_level, host_cc=args.CC, host_cc_cmd=args.command, dev_mode=args.dev) TraceManager().configure(cnip_opt['traces'], cnip_opt['trace_level']) env = EnvironmentController(os.path.expanduser('~')) env.check_all(args.non_commercial) if args.dev: run_dir = os.path.dirname(os.path.realpath(__file__)) os.environ['LD_LIBRARY_PATH'] = run_dir + '/../Plugin' os.environ['PATH'] += os.pathsep + run_dir + '/../External/PsycheC' # Let' go! driver = Driver(cnip_opt) code = driver.execute() sys.exit(code)