diff --git a/common/read_sources.py b/common/read_sources.py index 32d160d..169895c 100755 --- a/common/read_sources.py +++ b/common/read_sources.py @@ -167,6 +167,8 @@ def source_tokenizer(buffer): start_index = 0 is_blank_from_zero, previous, current = True, "", "" ln = line.expandtabs(4) + idx_comment = ln.find("#") + ln = ln[:idx_comment] if idx_comment > -1 else ln for pos, current in enumerate(ln): # check for indentation if current == " " and previous in ["", " "] and start_index == 0: diff --git a/envs/bin/run b/envs/bin/run index af7e8d1..edd38da 100755 --- a/envs/bin/run +++ b/envs/bin/run @@ -108,6 +108,9 @@ if __name__ == "__main__": parser.add_argument( "-c", "--clean", help="clean working directory", action="store_true", default=False ) + parser.add_argument( + "-l", "--custom_log", help="use custom `log_*", action="store_true", default=False + ) parser.add_argument( "-b", "--batch", @@ -198,7 +201,7 @@ if __name__ == "__main__": # run a simulation if args.sim: - type, files, params = prepare_task(type="sim") + type, files, params = prepare_task(type="sim", use_custom_logger=args.custom_log) # load the simulator script if type is SimType.DIGITAL: tool_name = Config.tools.get("DIG_SIMULATOR")