summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2021-11-21 01:08:50 (GMT)
committerGitHub <noreply@github.com>2021-11-21 01:08:50 (GMT)
commitc9c4444d9f11ae80c2c4cc7d40b6718419d81a97 (patch)
tree5feef111609a1ecfe4b714e9f3ef62f3014c3552 /Tools
parentf7638dd0f90b2afd9295ee179119f4a29859953a (diff)
downloadcpython-c9c4444d9f11ae80c2c4cc7d40b6718419d81a97.zip
cpython-c9c4444d9f11ae80c2c4cc7d40b6718419d81a97.tar.gz
cpython-c9c4444d9f11ae80c2c4cc7d40b6718419d81a97.tar.bz2
Refactor parser compilation units into specific components (GH-29676)
Diffstat (limited to 'Tools')
-rw-r--r--Tools/peg_generator/Makefile2
-rw-r--r--Tools/peg_generator/pegen/build.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/Tools/peg_generator/Makefile b/Tools/peg_generator/Makefile
index 6ad9c91..d010f19 100644
--- a/Tools/peg_generator/Makefile
+++ b/Tools/peg_generator/Makefile
@@ -22,7 +22,7 @@ data/xxl.py:
build: peg_extension/parse.c
-peg_extension/parse.c: $(GRAMMAR) $(TOKENS) pegen/*.py peg_extension/peg_extension.c ../../Parser/pegen.c ../../Parser/string_parser.c ../../Parser/*.h pegen/grammar_parser.py
+peg_extension/parse.c: $(GRAMMAR) $(TOKENS) pegen/*.py peg_extension/peg_extension.c ../../Parser/pegen.c ../../Parser/pegen_errors.c ../../Parser/string_parser.c ../../Parser/action_helpers.c ../../Parser/*.h pegen/grammar_parser.py
$(PYTHON) -m pegen -q c $(GRAMMAR) $(TOKENS) -o peg_extension/parse.c --compile-extension
clean:
diff --git a/Tools/peg_generator/pegen/build.py b/Tools/peg_generator/pegen/build.py
index bf01078..c69e5c9 100644
--- a/Tools/peg_generator/pegen/build.py
+++ b/Tools/peg_generator/pegen/build.py
@@ -69,6 +69,8 @@ def compile_c_extension(
str(MOD_DIR.parent.parent.parent / "Python" / "asdl.c"),
str(MOD_DIR.parent.parent.parent / "Parser" / "tokenizer.c"),
str(MOD_DIR.parent.parent.parent / "Parser" / "pegen.c"),
+ str(MOD_DIR.parent.parent.parent / "Parser" / "pegen_errors.c"),
+ str(MOD_DIR.parent.parent.parent / "Parser" / "action_helpers.c"),
str(MOD_DIR.parent.parent.parent / "Parser" / "string_parser.c"),
str(MOD_DIR.parent / "peg_extension" / "peg_extension.c"),
generated_source_path,