From 3b6421b55b9ea752f856e9ab7c3a9ae3dc7b4f3c Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Wed, 20 Nov 2024 23:50:45 +0100 Subject: [PATCH] Use different variable names for storing ArgumentParser and ParserTool objects --- grammarinator/parse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grammarinator/parse.py b/grammarinator/parse.py index ca2c9bd..7777c39 100644 --- a/grammarinator/parse.py +++ b/grammarinator/parse.py @@ -82,14 +82,14 @@ def execute(): parser.error(e) with ParserTool(grammars=args.grammar, hidden=args.hidden, transformers=args.transformer, parser_dir=args.parser_dir, antlr=args.antlr, rule=args.rule, - population=DefaultPopulation(args.out, args.tree_extension, codec=args.tree_codec), max_depth=args.max_depth, lib_dir=args.lib, cleanup=args.cleanup, encoding=args.encoding, errors=args.encoding_errors) as parser: + population=DefaultPopulation(args.out, args.tree_extension, codec=args.tree_codec), max_depth=args.max_depth, lib_dir=args.lib, cleanup=args.cleanup, encoding=args.encoding, errors=args.encoding_errors) as parser_tool: if args.jobs > 1: with Pool(args.jobs) as pool: - for _ in pool.imap_unordered(parser.parse, iter_files(args)): + for _ in pool.imap_unordered(parser_tool.parse, iter_files(args)): pass else: for fn in iter_files(args): - parser.parse(fn) + parser_tool.parse(fn) if __name__ == '__main__':