MCPcopy Create free account
hub / github.com/aff3ct/aff3ct / adp_parse_args

Function adp_parse_args

scripts/debug_parser/aff3ct_debug_parser.py:240–258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

238
239
240def adp_parse_args():
241 parser = argparse.ArgumentParser()
242
243 parser.add_argument("path", type=str, help="path to the file to be parsed")
244 parser.add_argument("--mod", type=str, required=True, help="module to be extracted, ex : Source_random_fast")
245 parser.add_argument("--tsk", type=str, required=True, help="task to be extracted, ex : generate")
246 parser.add_argument("--txt", help="export as txt", action='store_true')
247 parser.add_argument("--bin", help="export as bin", action='store_true')
248 parser.add_argument("--src", help="export as c source", action='store_true')
249 parser.add_argument("--mat", help="export as matlab .mat file", action='store_true')
250 parser.add_argument("--fra", type=check_positive, help="export a single frame, whose index is specified")
251 parser.add_argument("-o", "--output", type=check_directory, help="path to the output folder", default="./")
252
253 args = parser.parse_args()
254
255 if not (args.txt or args.bin or args.src or args.mat):
256 parser.error('At least one of the export types is required (e.g. --txt)')
257
258 return args
259
260
261def get_task_ios(lines, key):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected