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

Function generate_c_parser_source

Tools/peg_generator/pegen/testutil.py:78–82  ·  view source on GitHub ↗
(grammar: Grammar)

Source from the content-addressed store, hash-verified

76
77
78def generate_c_parser_source(grammar: Grammar) -> str:
79 out = io.StringIO()
80 genr = CParserGenerator(grammar, ALL_TOKENS, EXACT_TOKENS, NON_EXACT_TOKENS, out)
81 genr.generate("<string>")
82 return out.getvalue()
83
84
85def generate_parser_c_extension(

Callers 3

test_no_soft_keywordsMethod · 0.90
test_soft_keywordsMethod · 0.90

Calls 3

generateMethod · 0.95
getvalueMethod · 0.95
CParserGeneratorClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…