Skip to content

Commit

Permalink
Use different variable names for storing ArgumentParser and ParserToo…
Browse files Browse the repository at this point in the history
…l objects (#255)
  • Loading branch information
akosthekiss authored Nov 24, 2024
1 parent 71c6738 commit 4a701b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions grammarinator/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__':
Expand Down

0 comments on commit 4a701b9

Please sign in to comment.