mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Fix the Tools/peg_generator/scripts/benchmark.py script (GH-19848)
This commit is contained in:
parent
289842ae82
commit
6bd99d5f00
2 changed files with 4 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ import memory_profiler
|
|||
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from peg_extension import parse
|
||||
from pegen.build import build_parser_and_generator
|
||||
from pegen.build import build_c_parser_and_generator
|
||||
from scripts.test_parse_directory import parse_directory
|
||||
|
||||
argparser = argparse.ArgumentParser(
|
||||
|
|
@ -93,8 +93,9 @@ def run_benchmark_stdlib(subcommand, parser):
|
|||
modes = {"compile": 2, "parse": 1, "check": 0}
|
||||
extension = None
|
||||
if parser == "pegen":
|
||||
extension = build_parser_and_generator(
|
||||
extension = build_c_parser_and_generator(
|
||||
"../../Grammar/python.gram",
|
||||
"../../Grammar/Tokens",
|
||||
"peg_extension/parse.c",
|
||||
compile_extension=True,
|
||||
skip_actions=False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue