bpo-40334: regenerate metaparser as part of regen-all (GH-19854)
This commit is contained in:
parent
9dbaa8d9f0
commit
d2baff4301
|
@ -745,8 +745,9 @@ regen-importlib: Programs/_freeze_importlib
|
|||
############################################################################
|
||||
# Regenerate all generated files
|
||||
|
||||
regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-pegen \
|
||||
regen-token regen-keyword regen-symbol regen-ast regen-importlib clinic
|
||||
regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar \
|
||||
regen-token regen-keyword regen-symbol regen-ast regen-importlib clinic \
|
||||
regen-pegen-metaparser regen-pegen
|
||||
|
||||
############################################################################
|
||||
# Special rules for object files
|
||||
|
@ -820,6 +821,14 @@ regen-grammar: regen-token
|
|||
$(UPDATE_FILE) $(srcdir)/Include/graminit.h $(srcdir)/Include/graminit.h.new
|
||||
$(UPDATE_FILE) $(srcdir)/Python/graminit.c $(srcdir)/Python/graminit.c.new
|
||||
|
||||
.PHONY: regen-pegen-metaparser
|
||||
regen-pegen-metaparser:
|
||||
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/pegen
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3.8
|
||||
# @generated by pegen from pegen/metagrammar.gram
|
||||
# @generated by pegen from ./Tools/peg_generator/pegen/metagrammar.gram
|
||||
|
||||
import ast
|
||||
import sys
|
||||
|
|
Loading…
Reference in New Issue