diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/bootstrap/Makefile | 34 | ||||
-rw-r--r-- | src/backend/bootstrap/bootparse.y | 6 | ||||
-rw-r--r-- | src/backend/bootstrap/bootscanner.l | 3 | ||||
-rw-r--r-- | src/backend/bootstrap/bootstrap.c | 9 | ||||
-rw-r--r-- | src/backend/utils/misc/Makefile | 6 | ||||
-rw-r--r-- | src/backend/utils/misc/guc-file.l | 3 |
6 files changed, 26 insertions, 35 deletions
diff --git a/src/backend/bootstrap/Makefile b/src/backend/bootstrap/Makefile index ccc6abe6702..ed73205fd3b 100644 --- a/src/backend/bootstrap/Makefile +++ b/src/backend/bootstrap/Makefile @@ -2,7 +2,7 @@ # # Makefile for the bootstrap module # -# $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.33 2006/01/05 01:56:29 momjian Exp $ +# $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.34 2006/03/07 01:03:12 tgl Exp $ # #------------------------------------------------------------------------- @@ -20,43 +20,37 @@ SUBSYS.o: $(OBJS) $(LD) $(LDREL) $(LDOUT) $@ $^ -bootstrap.o bootparse.o: $(srcdir)/bootstrap_tokens.h - # bootscanner is compiled as part of bootparse bootparse.o: $(srcdir)/bootscanner.c -# `sed' rules to remove conflicts between bootstrap scanner and parser -# and the SQL scanner and parser. For correctness' sake the rules that -# use this must depend on this Makefile. -define sed-magic -sed -e 's/^yy/Int_yy/g' \ - -e 's/\([^a-zA-Z0-9_]\)yy/\1Int_yy/g' -endef - +# See notes in src/backend/parser/Makefile about the following two rules $(srcdir)/bootparse.c: $(srcdir)/bootstrap_tokens.h ; -$(srcdir)/bootstrap_tokens.h: bootparse.y Makefile +$(srcdir)/bootstrap_tokens.h: bootparse.y ifdef YACC $(YACC) -d $(YFLAGS) $< - $(sed-magic) < y.tab.c > $(srcdir)/bootparse.c - $(sed-magic) < y.tab.h > $(srcdir)/bootstrap_tokens.h - rm -f y.tab.c y.tab.h + mv -f y.tab.c $(srcdir)/bootparse.c + mv -f y.tab.h $(srcdir)/bootstrap_tokens.h else @$(missing) bison $< $@ endif -$(srcdir)/bootscanner.c: bootscanner.l Makefile +$(srcdir)/bootscanner.c: bootscanner.l ifdef FLEX - $(FLEX) $(FLEXFLAGS) $< - $(sed-magic) lex.yy.c > $@ - rm -f lex.yy.c + $(FLEX) $(FLEXFLAGS) -o'$@' $< else @$(missing) flex $< $@ endif +# Force these dependencies to be known even without dependency info built: +bootstrap.o bootparse.o: $(srcdir)/bootstrap_tokens.h + + +# bootparse.c, bootstrap_tokens.h, and bootscanner.c are in the distribution +# tarball, so they are not cleaned here. clean: - rm -f SUBSYS.o $(OBJS) bootstrap.o + rm -f SUBSYS.o $(OBJS) # And the garbage that might have been left behind by partial build: @rm -f y.tab.h y.tab.c y.output lex.yy.c diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y index b1a985adba2..8b8645bd600 100644 --- a/src/backend/bootstrap/bootparse.y +++ b/src/backend/bootstrap/bootparse.y @@ -2,14 +2,14 @@ /*------------------------------------------------------------------------- * * bootparse.y - * yacc parser grammar for the "backend" initialization program. + * yacc grammar for the "bootstrap" mode (BKI file format) * * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.79 2006/03/05 15:58:22 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.80 2006/03/07 01:03:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -79,6 +79,8 @@ int num_columns_read = 0; %} +%name-prefix="boot_yy" + %union { List *list; diff --git a/src/backend/bootstrap/bootscanner.l b/src/backend/bootstrap/bootscanner.l index f65d8ac3eac..f75d79a8d02 100644 --- a/src/backend/bootstrap/bootscanner.l +++ b/src/backend/bootstrap/bootscanner.l @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.41 2006/03/05 15:58:22 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.42 2006/03/07 01:03:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -54,6 +54,7 @@ static int yyline = 1; /* line number for error reporting */ %option nodefault %option nounput %option noyywrap +%option prefix="boot_yy" D [0-9] diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index f0138c0bfc3..1d48fc44e18 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.212 2006/03/05 15:58:22 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.213 2006/03/07 01:03:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,8 +53,6 @@ extern char *optarg; #define ALLOC(t, c) ((t *) calloc((unsigned)(c), sizeof(t))) -extern int Int_yyparse(void); - static void usage(void); static void bootstrap_signals(void); static hashnode *AddStr(char *str, int strlength, int mderef); @@ -468,11 +466,8 @@ BootstrapMain(int argc, char *argv[]) /* * Process bootstrap input. - * - * the sed script boot.sed renamed yyparse to Int_yyparse for the - * bootstrap parser to avoid conflicts with the normal SQL parser */ - Int_yyparse(); + boot_yyparse(); /* Perform a checkpoint to ensure everything's down to disk */ SetProcessingMode(NormalProcessing); diff --git a/src/backend/utils/misc/Makefile b/src/backend/utils/misc/Makefile index 5153366b281..5a37d7790b3 100644 --- a/src/backend/utils/misc/Makefile +++ b/src/backend/utils/misc/Makefile @@ -4,7 +4,7 @@ # Makefile for utils/misc # # IDENTIFICATION -# $PostgreSQL: pgsql/src/backend/utils/misc/Makefile,v 1.24 2005/10/03 22:52:23 tgl Exp $ +# $PostgreSQL: pgsql/src/backend/utils/misc/Makefile,v 1.25 2006/03/07 01:03:12 tgl Exp $ # #------------------------------------------------------------------------- @@ -33,9 +33,7 @@ guc.o: $(srcdir)/guc-file.c $(srcdir)/guc-file.c: guc-file.l ifdef FLEX - $(FLEX) $(FLEXFLAGS) $< - sed -e 's/^yy/GUC_yy/g' -e 's/\([^a-zA-Z0-9_]\)yy/\1GUC_yy/g' lex.yy.c > $@ - rm -f lex.yy.c + $(FLEX) $(FLEXFLAGS) -o'$@' $< else @$(missing) flex $< $@ endif diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l index b061935aec6..dd59d5f99b2 100644 --- a/src/backend/utils/misc/guc-file.l +++ b/src/backend/utils/misc/guc-file.l @@ -4,7 +4,7 @@ * * Copyright (c) 2000-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.36 2006/03/05 15:58:49 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.37 2006/03/07 01:03:12 tgl Exp $ */ %{ @@ -61,6 +61,7 @@ static char *GUC_scanstr(const char *s); %option nodefault %option nounput %option noyywrap +%option prefix="GUC_yy" SIGN ("-"|"+") |