Created
February 10, 2026 01:43
-
-
Save AaronNGray/5f4fa311f1491536eb722da264784cbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: regen-pegen-metaparser | |
| regen-pegen-metaparser: | |
| @$(MKDIR_P) $(srcdir)/Tools/peg_generator/pegen | |
| PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q python \ | |
| $(srcdir)/Tools/peg_generator/pegen/metagrammar.gram \ | |
| -o $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py.new | |
| $(UPDATE_FILE) $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py \ | |
| $(srcdir)/Tools/peg_generator/pegen/grammar_parser.py.new | |
| .PHONY: regen-pegen | |
| regen-pegen: | |
| @$(MKDIR_P) $(srcdir)/Parser | |
| @$(MKDIR_P) $(srcdir)/Parser/tokenizer | |
| @$(MKDIR_P) $(srcdir)/Parser/lexer | |
| PYTHONPATH=$(srcdir)/Tools/peg_generator $(PYTHON_FOR_REGEN) -m pegen -q c \ | |
| $(srcdir)/Grammar/python.gram \ | |
| $(srcdir)/Grammar/Tokens \ | |
| -o $(srcdir)/Parser/parser.c.new | |
| $(UPDATE_FILE) --create $(srcdir)/Parser/parser.c $(srcdir)/Parser/parser.c.new | |
| .PHONY: regen-ast | |
| regen-ast: | |
| # Regenerate 3 files using Parser/asdl_c.py: | |
| # - Include/internal/pycore_ast.h | |
| # - Include/internal/pycore_ast_state.h | |
| # - Python/Python-ast.c | |
| $(MKDIR_P) $(srcdir)/Include | |
| $(MKDIR_P) $(srcdir)/Python | |
| $(PYTHON_FOR_REGEN) $(srcdir)/Parser/asdl_c.py \ | |
| $(srcdir)/Parser/Python.asdl \ | |
| -H $(srcdir)/Include/internal/pycore_ast.h.new \ | |
| -I $(srcdir)/Include/internal/pycore_ast_state.h.new \ | |
| -C $(srcdir)/Python/Python-ast.c.new | |
| $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_ast.h $(srcdir)/Include/internal/pycore_ast.h.new | |
| $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_ast_state.h $(srcdir)/Include/internal/pycore_ast_state.h.new | |
| $(UPDATE_FILE) $(srcdir)/Python/Python-ast.c $(srcdir)/Python/Python-ast.c.new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment