MCPcopy Index your code
hub / github.com/python/cpython / build_python_generator

Function build_python_generator

Tools/peg_generator/pegen/build.py:313–322  ·  view source on GitHub ↗
(
    grammar: Grammar,
    grammar_file: str,
    output_file: str,
    skip_actions: bool = False,
)

Source from the content-addressed store, hash-verified

311
312
313def build_python_generator(
314 grammar: Grammar,
315 grammar_file: str,
316 output_file: str,
317 skip_actions: bool = False,
318) -> ParserGenerator:
319 with open(output_file, "w") as file:
320 gen: ParserGenerator = PythonParserGenerator(grammar, file) # TODO: skip_actions
321 gen.generate(grammar_file)
322 return gen
323
324
325def build_c_parser_and_generator(

Callers 1

Calls 3

generateMethod · 0.95
openFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…