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

Function main

Tools/peg_generator/pegen/first_sets.py:134–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133
134def main() -> None:
135 args = argparser.parse_args()
136
137 try:
138 grammar, parser, tokenizer = build_parser(args.grammar_file)
139 except Exception as err:
140 print("ERROR: Failed to parse grammar file", err, file=sys.stderr)
141 sys.exit(1)
142
143 firs_sets = FirstSetCalculator(grammar.rules).calculate()
144 pprint.pprint(firs_sets)
145
146
147if __name__ == "__main__":

Callers 1

first_sets.pyFile · 0.70

Calls 6

build_parserFunction · 0.90
FirstSetCalculatorClass · 0.85
calculateMethod · 0.80
parse_argsMethod · 0.45
exitMethod · 0.45
pprintMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…