@@ -290,40 +290,21 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
290
290
291
291
##########################################################################
292
292
# Parser
293
- PGEN= Parser/pgen$(EXE)
294
-
295
293
POBJS= \
296
294
Parser/acceler.o \
297
295
Parser/grammar1.o \
298
296
Parser/listnode.o \
299
297
Parser/node.o \
300
298
Parser/parser.o \
301
- Parser/bitset.o \
302
- Parser/metagrammar.o \
303
- Parser/firstsets.o \
304
- Parser/grammar.o \
305
299
Parser/token.o \
306
- Parser/pgen.o
307
300
308
301
PARSER_OBJS= $(POBJS) Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o
309
302
310
- PGOBJS= \
311
- Objects/obmalloc.o \
312
- Python/dynamic_annotations.o \
313
- Python/mysnprintf.o \
314
- Python/pyctype.o \
315
- Parser/tokenizer_pgen.o \
316
- Parser/printgrammar.o \
317
- Parser/parsetok_pgen.o \
318
- Parser/pgenmain.o
319
-
320
303
PARSER_HEADERS= \
321
304
$(srcdir)/Parser/parser.h \
322
305
$(srcdir)/Include/parsetok.h \
323
306
$(srcdir)/Parser/tokenizer.h
324
307
325
- PGENOBJS= $(POBJS) $(PGOBJS)
326
-
327
308
##########################################################################
328
309
# Python
329
310
@@ -801,31 +782,18 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
801
782
802
783
$(IO_OBJS): $(IO_H)
803
784
804
- $(PGEN): $(PGENOBJS)
805
- $(CC) $(OPT) $(PY_CORE_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
806
-
807
785
.PHONY: regen-grammar
808
- regen-grammar: $(PGEN)
786
+ regen-grammar:
809
787
# Regenerate Include/graminit.h and Python/graminit.c
810
- # from Grammar/Grammar using pgen
788
+ # from Grammar/Grammar using pgen2
811
789
@$(MKDIR_P) Include
812
- $(PGEN) $(srcdir)/Grammar/Grammar \
790
+ $(PYTHON_FOR_REGEN) -m Parser.pgen $(srcdir)/Grammar/Grammar \
791
+ $(srcdir)/Grammar/Tokens \
813
792
$(srcdir)/Include/graminit.h.new \
814
793
$(srcdir)/Python/graminit.c.new
815
794
$(UPDATE_FILE) $(srcdir)/Include/graminit.h $(srcdir)/Include/graminit.h.new
816
795
$(UPDATE_FILE) $(srcdir)/Python/graminit.c $(srcdir)/Python/graminit.c.new
817
796
818
- Parser/grammar.o: $(srcdir)/Parser/grammar.c \
819
- $(srcdir)/Include/token.h \
820
- $(srcdir)/Include/grammar.h
821
- Parser/metagrammar.o: $(srcdir)/Parser/metagrammar.c
822
-
823
- Parser/tokenizer_pgen.o: $(srcdir)/Parser/tokenizer.c
824
- Parser/parsetok_pgen.o: $(srcdir)/Parser/parsetok.c
825
- Parser/printgrammar.o: $(srcdir)/Parser/printgrammar.c
826
-
827
- Parser/pgenmain.o: $(srcdir)/Include/parsetok.h
828
-
829
797
.PHONY=regen-ast
830
798
regen-ast:
831
799
# Regenerate Include/Python-ast.h using Parser/asdl_c.py -h
@@ -1015,7 +983,6 @@ PYTHON_HEADERS= \
1015
983
$(srcdir)/Include/longobject.h \
1016
984
$(srcdir)/Include/marshal.h \
1017
985
$(srcdir)/Include/memoryobject.h \
1018
- $(srcdir)/Include/metagrammar.h \
1019
986
$(srcdir)/Include/methodobject.h \
1020
987
$(srcdir)/Include/modsupport.h \
1021
988
$(srcdir)/Include/moduleobject.h \
@@ -1027,7 +994,6 @@ PYTHON_HEADERS= \
1027
994
$(srcdir)/Include/osdefs.h \
1028
995
$(srcdir)/Include/osmodule.h \
1029
996
$(srcdir)/Include/patchlevel.h \
1030
- $(srcdir)/Include/pgen.h \
1031
997
$(srcdir)/Include/pgenheaders.h \
1032
998
$(srcdir)/Include/pyarena.h \
1033
999
$(srcdir)/Include/pycapsule.h \
@@ -1768,7 +1734,7 @@ profile-removal:
1768
1734
rm -f profile-run-stamp
1769
1735
1770
1736
clobber: clean profile-removal
1771
- -rm -f $(BUILDPYTHON) $(PGEN) $( LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
1737
+ -rm -f $(BUILDPYTHON) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
1772
1738
tags TAGS \
1773
1739
config.cache config.log pyconfig.h Modules/config.c
1774
1740
-rm -rf build platform
0 commit comments