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

Function main

Tools/peg_generator/pegen/grammar_visualizer.py:50–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49
50def main() -> None:
51 args = argparser.parse_args()
52
53 try:
54 grammar, parser, tokenizer = build_parser(args.filename)
55 except Exception as err:
56 print("ERROR: Failed to parse grammar file", err, file=sys.stderr)
57 sys.exit(1)
58
59 visitor = ASTGrammarPrinter()
60 visitor.print_grammar_ast(grammar)
61
62
63if __name__ == "__main__":

Callers 1

Calls 5

print_grammar_astMethod · 0.95
build_parserFunction · 0.90
ASTGrammarPrinterClass · 0.85
parse_argsMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…