Remove all traces that suggest that a non-Bison yacc might be supported, and
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 29 Aug 2008 13:02:33 +0000 (13:02 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 29 Aug 2008 13:02:33 +0000 (13:02 +0000)
change build system to use only Bison.  Simplify build rules, make file names
uniform.  Don't build the token table header file where it is not needed.

28 files changed:
config/programs.m4
configure
configure.in
contrib/cube/.cvsignore
contrib/cube/Makefile
contrib/seg/.cvsignore
contrib/seg/Makefile
doc/src/sgml/installation.sgml
src/Makefile.global.in
src/backend/Makefile
src/backend/bootstrap/.cvsignore
src/backend/bootstrap/Makefile
src/backend/bootstrap/bootscanner.l
src/backend/parser/.cvsignore
src/backend/parser/Makefile
src/backend/parser/keywords.c
src/backend/parser/parser.c
src/backend/parser/scan.l
src/include/Makefile
src/interfaces/ecpg/preproc/Makefile
src/pl/plpgsql/src/.cvsignore
src/pl/plpgsql/src/Makefile
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_funcs.c
src/pl/plpgsql/src/pl_handler.c
src/tools/msvc/clean.bat
src/tools/msvc/pgbison.bat

index cf659555c07eacd998d46035b22d4dbccbfb47ce..589be5e3102a4d2f7c6471f3f697f77763d4f411 100644 (file)
@@ -1,43 +1,41 @@
-# $PostgreSQL: pgsql/config/programs.m4,v 1.23 2008/05/27 22:18:04 tgl Exp $
+# $PostgreSQL: pgsql/config/programs.m4,v 1.24 2008/08/29 13:02:32 petere Exp $
 
 
-# PGAC_PATH_YACC
-# --------------
-# Look for Bison, set the output variable YACC to its path if found.
+# PGAC_PATH_BISON
+# ---------------
+# Look for Bison, set the output variable BISON to its path if found.
 # Reject versions before 1.875 (they have bugs or capacity limits).
 # Note we do not accept other implementations of yacc.
 
-AC_DEFUN([PGAC_PATH_YACC],
+AC_DEFUN([PGAC_PATH_BISON],
 [# Let the user override the search
-if test -z "$YACC"; then
-  AC_CHECK_PROGS(YACC, ['bison -y'])
+if test -z "$BISON"; then
+  AC_CHECK_PROGS(BISON, bison)
 fi
 
-if test "$YACC"; then
-  pgac_yacc_version=`$YACC --version 2>/dev/null | sed q`
-  AC_MSG_NOTICE([using $pgac_yacc_version])
-  if echo "$pgac_yacc_version" | $AWK '{ if ([$]4 < 1.875) exit 0; else exit 1;}'
+if test "$BISON"; then
+  pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
+  AC_MSG_NOTICE([using $pgac_bison_version])
+  if echo "$pgac_bison_version" | $AWK '{ if ([$]4 < 1.875) exit 0; else exit 1;}'
   then
     AC_MSG_WARN([
 *** The installed version of Bison is too old to use with PostgreSQL.
 *** Bison version 1.875 or later is required.])
-    YACC=""
+    BISON=""
   fi
 fi
 
-if test -z "$YACC"; then
+if test -z "$BISON"; then
   AC_MSG_WARN([
 *** Without Bison you will not be able to build PostgreSQL from CVS nor
 *** change any of the parser definition files.  You can obtain Bison from
 *** a GNU mirror site.  (If you are using the official distribution of
 *** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)  To use a different yacc program (possible,
-*** but not recommended), set the environment variable YACC before running
-*** 'configure'.])
+*** output is pre-generated.)])
 fi
-# We don't need AC_SUBST(YACC) because AC_PATH_PROG did it
-AC_SUBST(YFLAGS)
-])# PGAC_PATH_YACC
+# We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
+AC_SUBST(BISONFLAGS)
+])# PGAC_PATH_BISON
 
 
 
index 042ea1598a32791b095a189b0d97b339b64dc7d2..b8a7287efa8d294be77401f001bf406ff451b35e 100755 (executable)
--- a/configure
+++ b/configure
@@ -718,8 +718,8 @@ STRIP_SHARED_LIB
 TAR
 LN_S
 AWK
-YACC
-YFLAGS
+BISON
+BISONFLAGS
 FLEX
 FLEXFLAGS
 PERL
@@ -5952,18 +5952,18 @@ done
 
 
 # Let the user override the search
-if test -z "$YACC"; then
-  for ac_prog in 'bison -y'
+if test -z "$BISON"; then
+  for ac_prog in bison
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_prog_YACC+set}" = set; then
+if test "${ac_cv_prog_BISON+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+  if test -n "$BISON"; then
+  ac_cv_prog_BISON="$BISON" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -5972,7 +5972,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_YACC="$ac_prog"
+    ac_cv_prog_BISON="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -5982,26 +5982,26 @@ IFS=$as_save_IFS
 
 fi
 fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
-  { echo "$as_me:$LINENO: result: $YACC" >&5
-echo "${ECHO_T}$YACC" >&6; }
+BISON=$ac_cv_prog_BISON
+if test -n "$BISON"; then
+  { echo "$as_me:$LINENO: result: $BISON" >&5
+echo "${ECHO_T}$BISON" >&6; }
 else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
 
 
-  test -n "$YACC" && break
+  test -n "$BISON" && break
 done
 
 fi
 
-if test "$YACC"; then
-  pgac_yacc_version=`$YACC --version 2>/dev/null | sed q`
-  { echo "$as_me:$LINENO: using $pgac_yacc_version" >&5
-echo "$as_me: using $pgac_yacc_version" >&6;}
-  if echo "$pgac_yacc_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
+if test "$BISON"; then
+  pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
+  { echo "$as_me:$LINENO: using $pgac_bison_version" >&5
+echo "$as_me: using $pgac_bison_version" >&6;}
+  if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
   then
     { echo "$as_me:$LINENO: WARNING:
 *** The installed version of Bison is too old to use with PostgreSQL.
@@ -6009,29 +6009,25 @@ echo "$as_me: using $pgac_yacc_version" >&6;}
 echo "$as_me: WARNING:
 *** The installed version of Bison is too old to use with PostgreSQL.
 *** Bison version 1.875 or later is required." >&2;}
-    YACC=""
+    BISON=""
   fi
 fi
 
-if test -z "$YACC"; then
+if test -z "$BISON"; then
   { echo "$as_me:$LINENO: WARNING:
 *** Without Bison you will not be able to build PostgreSQL from CVS nor
 *** change any of the parser definition files.  You can obtain Bison from
 *** a GNU mirror site.  (If you are using the official distribution of
 *** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)  To use a different yacc program (possible,
-*** but not recommended), set the environment variable YACC before running
-*** 'configure'." >&5
+*** output is pre-generated.)" >&5
 echo "$as_me: WARNING:
 *** Without Bison you will not be able to build PostgreSQL from CVS nor
 *** change any of the parser definition files.  You can obtain Bison from
 *** a GNU mirror site.  (If you are using the official distribution of
 *** PostgreSQL then you do not need to worry about this, because the Bison
-*** output is pre-generated.)  To use a different yacc program (possible,
-*** but not recommended), set the environment variable YACC before running
-*** 'configure'." >&2;}
+*** output is pre-generated.)" >&2;}
 fi
-# We don't need AC_SUBST(YACC) because AC_PATH_PROG did it
+# We don't need AC_SUBST(BISON) because AC_PATH_PROG did it
 
 
 { echo "$as_me:$LINENO: checking for flex" >&5
@@ -26600,8 +26596,8 @@ for ac_last_try in false false false false false :; do
 TAR!$TAR$ac_delim
 LN_S!$LN_S$ac_delim
 AWK!$AWK$ac_delim
-YACC!$YACC$ac_delim
-YFLAGS!$YFLAGS$ac_delim
+BISON!$BISON$ac_delim
+BISONFLAGS!$BISONFLAGS$ac_delim
 FLEX!$FLEX$ac_delim
 FLEXFLAGS!$FLEXFLAGS$ac_delim
 PERL!$PERL$ac_delim
index 6cde15e30cc869c0aa1500087871afb98127e85c..e351bd1c85a7b93e1c9c799694d9ce0093a86ee0 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.564 2008/08/19 19:17:40 tgl Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.565 2008/08/29 13:02:32 petere Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -783,7 +783,7 @@ AC_PATH_PROG(TAR, tar)
 AC_PROG_LN_S
 AC_PROG_AWK
 
-PGAC_PATH_YACC
+PGAC_PATH_BISON
 PGAC_PATH_FLEX
 
 PGAC_PATH_PERL
index fe92b5e14fdfd75a47a02e2a0faac57a2553b8b6..19ecc85b586bf6ecd330367429850552bb410946 100644 (file)
@@ -1,3 +1,2 @@
 cubeparse.c
-cubeparse.h
 cubescan.c
index a1610fe91aaa5dfebf0d2ab7222477af40982d6f..7f91b14c64d8020d0626185e68d975c27e200e50 100644 (file)
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.21 2007/11/10 23:59:50 momjian Exp $
+# $PostgreSQL: pgsql/contrib/cube/Makefile,v 1.22 2008/08/29 13:02:32 petere Exp $
 
 MODULE_big = cube
 OBJS= cube.o cubeparse.o
@@ -26,15 +26,9 @@ endif
 # cubescan is compiled as part of cubeparse
 cubeparse.o: $(srcdir)/cubescan.c
 
-# See notes in src/backend/parser/Makefile about the following two rules
-
-$(srcdir)/cubeparse.c: $(srcdir)/cubeparse.h ;
-
-$(srcdir)/cubeparse.h: cubeparse.y
-ifdef YACC
-   $(YACC) -d $(YFLAGS) $<
-   mv -f y.tab.c $(srcdir)/cubeparse.c
-   mv -f y.tab.h $(srcdir)/cubeparse.h
+$(srcdir)/cubeparse.c: cubeparse.y
+ifdef BISON
+   $(BISON) $(BISONFLAGS) -o $@ $<
 else
    @$(missing) bison $< $@
 endif
@@ -46,7 +40,7 @@ else
    @$(missing) flex $< $@
 endif
 
-distprep: $(srcdir)/cubeparse.c $(srcdir)/cubeparse.h $(srcdir)/cubescan.c
+distprep: $(srcdir)/cubeparse.c $(srcdir)/cubescan.c
 
 maintainer-clean:
-   rm -f $(srcdir)/cubeparse.c $(srcdir)/cubeparse.h $(srcdir)/cubescan.c
+   rm -f $(srcdir)/cubeparse.c $(srcdir)/cubescan.c
index e69a249aecb185979ce67a558dfcc482e569b74b..aa740d3474e6a785c54e631c30499f202f2c9ffe 100644 (file)
@@ -1,3 +1,2 @@
 segparse.c
-segparse.h
 segscan.c
index 25c559324171dda31ffcf3621f551e9ac9782d18..31012da3441d21332c8fd2d55a56b749a6a047b6 100644 (file)
@@ -1,4 +1,4 @@
-# $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.20 2007/11/10 23:59:51 momjian Exp $
+# $PostgreSQL: pgsql/contrib/seg/Makefile,v 1.21 2008/08/29 13:02:32 petere Exp $
 
 MODULE_big = seg
 OBJS = seg.o segparse.o
@@ -23,15 +23,9 @@ endif
 # segscan is compiled as part of segparse
 segparse.o: $(srcdir)/segscan.c
 
-# See notes in src/backend/parser/Makefile about the following two rules
-
-$(srcdir)/segparse.c: $(srcdir)/segparse.h ;
-
-$(srcdir)/segparse.h: segparse.y
-ifdef YACC
-   $(YACC) -d $(YFLAGS) $<
-   mv -f y.tab.c $(srcdir)/segparse.c
-   mv -f y.tab.h $(srcdir)/segparse.h
+$(srcdir)/segparse.c: segparse.y
+ifdef BISON
+   $(BISON) $(BISONFLAGS) -o $@ $<
 else
    @$(missing) bison $< $@
 endif
@@ -43,7 +37,7 @@ else
    @$(missing) flex $< $@
 endif
 
-distprep: $(srcdir)/segparse.c $(srcdir)/segparse.h $(srcdir)/segscan.c
+distprep: $(srcdir)/segparse.c $(srcdir)/segscan.c
 
 maintainer-clean:
-   rm -f $(srcdir)/segparse.c $(srcdir)/segparse.h $(srcdir)/segscan.c
+   rm -f $(srcdir)/segparse.c $(srcdir)/segscan.c
index c787a313882f8b0cb97dddbe3a5db90adbc2c652..a5dfa8d081006b848e602f5f70a8bc32f24749a6 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.311 2008/07/23 17:07:50 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.312 2008/08/29 13:02:32 petere Exp $ -->
 
 <chapter id="installation">
  <title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -276,6 +276,9 @@ su - postgres
       <indexterm>
        <primary>flex</primary>
       </indexterm>
+      <indexterm>
+       <primary>lex</primary>
+      </indexterm>
       <indexterm>
        <primary>bison</primary>
       </indexterm>
@@ -287,10 +290,8 @@ su - postgres
       are needed to build a CVS checkout or if you changed the actual
       scanner and parser definition files. If you need them, be sure
       to get <application>Flex</> 2.5.4 or later and
-      <application>Bison</> 1.875 or later. Other <application>yacc</>
-      programs can sometimes be used, but doing so requires extra
-      effort and is not recommended. Other <application>lex</>
-      programs will definitely not work.
+      <application>Bison</> 1.875 or later. Other <application>lex</>
+      and <application>yacc</> programs cannot be used.
      </para>
     </listitem>
    </itemizedlist>
@@ -1341,6 +1342,15 @@ su - postgres
      this manner:
  
      <variablelist>
+      <varlistentry>
+       <term><envar>BISON</envar></term>
+       <listitem>
+        <para>
+         Bison program
+        </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry>
        <term><envar>CC</envar></term>
        <listitem>
@@ -1395,6 +1405,15 @@ su - postgres
        </listitem>
       </varlistentry>
 
+      <varlistentry>
+       <term><envar>FLEX</envar></term>
+       <listitem>
+        <para>
+         Flex program
+        </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry>
        <term><envar>LDFLAGS</envar></term>
        <listitem>
@@ -1462,15 +1481,6 @@ su - postgres
         </para>
        </listitem>
       </varlistentry>
-
-      <varlistentry>
-       <term><envar>YACC</envar></term>
-       <listitem>
-        <para>
-         Yacc program (<literal>bison -y</literal> if using Bison)
-        </para>
-       </listitem>
-      </varlistentry>
      </variablelist>
     </para>
    </step>
index 7af95f98f9f8942b87c33591b40f0fa9739a6630..6212a1467ffd4580ba7b274a4a026c99de232679 100644 (file)
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.241 2008/02/17 16:36:43 petere Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.242 2008/08/29 13:02:32 petere Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -216,8 +216,8 @@ CFLAGS = @CFLAGS@
 
 # Kind-of compilers
 
-YACC = @YACC@
-YFLAGS = @YFLAGS@
+BISON = @BISON@
+BISONFLAGS = @BISONFLAGS@ $(YFLAGS)
 FLEX = @FLEX@
 FLEXFLAGS = @FLEXFLAGS@ $(LFLAGS)
 DTRACE = @DTRACE@
index 0025a0c2a114ea6ed646ec6f5b893aa3da1daf25..7fd613f6c9fc5d6b93efd2ed0daae88a9b910bf7 100644 (file)
@@ -5,7 +5,7 @@
 # Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
 #
-# $PostgreSQL: pgsql/src/backend/Makefile,v 1.129 2008/08/01 13:16:08 alvherre Exp $
+# $PostgreSQL: pgsql/src/backend/Makefile,v 1.130 2008/08/29 13:02:32 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -105,7 +105,7 @@ endif
 endif # aix
 
 # Update the commonly used headers before building the subdirectories
-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/parse.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
+$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h
 
 
 # The postgres.o target is needed by the rule in Makefile.global that
@@ -118,8 +118,8 @@ postgres.o: $(OBJS)
 # the make files in our subdirectories. Note that it's important we
 # match the dependencies shown in the subdirectory makefiles!
 
-$(srcdir)/parser/parse.h: parser/gram.y
-   $(MAKE) -C parser parse.h
+$(srcdir)/parser/gram.h: parser/gram.y
+   $(MAKE) -C parser gram.h
 
 utils/fmgroids.h: utils/Gen_fmgrtab.sh $(top_srcdir)/src/include/catalog/pg_proc.h
    $(MAKE) -C utils fmgroids.h
@@ -131,7 +131,7 @@ utils/probes.h: utils/probes.d
 # we can cut down on the -I options. Also, a symlink is automatically
 # up to date when we update the base file.
 
-$(top_builddir)/src/include/parser/parse.h: $(srcdir)/parser/parse.h
+$(top_builddir)/src/include/parser/gram.h: $(srcdir)/parser/gram.h
    prereqdir=`cd $(dir $<) >/dev/null && pwd` && \
      cd $(dir $@) && rm -f $(notdir $@) && \
      $(LN_S) "$$prereqdir/$(notdir $<)" .
@@ -154,8 +154,8 @@ endif
 ##########################################################################
 
 distprep:
-   $(MAKE) -C parser   gram.c parse.h scan.c
-   $(MAKE) -C bootstrap    bootparse.c bootstrap_tokens.h bootscanner.c
+   $(MAKE) -C parser   gram.c gram.h scan.c
+   $(MAKE) -C bootstrap    bootparse.c bootscanner.c
    $(MAKE) -C utils/misc   guc-file.c
 
 
@@ -239,7 +239,7 @@ endif
 
 clean:
    rm -f $(LOCALOBJS) postgres$(X) $(POSTGRES_IMP) \
-       $(top_srcdir)/src/include/parser/parse.h \
+       $(top_srcdir)/src/include/parser/gram.h \
        $(top_builddir)/src/include/utils/fmgroids.h
 ifeq ($(PORTNAME), cygwin)
    rm -f postgres.dll postgres.def libpostgres.a
@@ -254,10 +254,9 @@ distclean: clean
 maintainer-clean: distclean
    rm -f $(srcdir)/bootstrap/bootparse.c \
          $(srcdir)/bootstrap/bootscanner.c \
-         $(srcdir)/bootstrap/bootstrap_tokens.h \
          $(srcdir)/parser/gram.c \
          $(srcdir)/parser/scan.c \
-         $(srcdir)/parser/parse.h \
+         $(srcdir)/parser/gram.h \
          $(srcdir)/utils/misc/guc-file.c
 
 
index 511777ca30c9aa4abd75d734682762e248e17be0..5201be98868a5a283132e6738ab1c790b063a348 100644 (file)
@@ -1,3 +1,2 @@
 bootparse.c
-bootstrap_tokens.h
 bootscanner.c
index ac83245395d2a91065fcedcd954986789b3f8879..3a68367aaee359621587e2110c8429a4bf5337d4 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Makefile for the bootstrap module
 #
-# $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.36 2008/02/19 10:30:07 petere Exp $
+# $PostgreSQL: pgsql/src/backend/bootstrap/Makefile,v 1.37 2008/08/29 13:02:32 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -20,15 +20,9 @@ include $(top_srcdir)/src/backend/common.mk
 # bootscanner is compiled as part of bootparse
 bootparse.o: $(srcdir)/bootscanner.c
 
-# 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
-ifdef YACC
-   $(YACC) -d $(YFLAGS) $<
-   mv -f y.tab.c $(srcdir)/bootparse.c
-   mv -f y.tab.h $(srcdir)/bootstrap_tokens.h
+$(srcdir)/bootparse.c: bootparse.y
+ifdef BISON
+   $(BISON) $(BISONFLAGS) -o $@ $<
 else
    @$(missing) bison $< $@
 endif
@@ -40,12 +34,6 @@ 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:
-# 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
+# bootparse.c and bootscanner.c are in the distribution tarball, so
+# they are not cleaned here.
index ebcd9e99d57663008d165a58c6e1da133b096904..49bef984203ba4e9f71dfaa704bbe4ac271d390d 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.46 2008/05/09 15:36:31 petere Exp $
+ *   $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.47 2008/08/29 13:02:32 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -37,7 +37,7 @@
 #include "utils/rel.h"
 
 /* Not needed now that this file is compiled as part of bootparse. */
-/* #include "bootstrap_tokens.h" */
+/* #include "bootparse.h" */
 
 
 /* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
index 84c828f3bf4d30b68981b68f4427be90372bb2c6..6545728c5c55ce8ea688e3ba552df7a15375afc9 100644 (file)
@@ -1,3 +1,3 @@
-parse.h
+gram.h
 gram.c
 scan.c
index 9a2d58419dc83c5f084937e76c4ac1556dba69f5..04b9ed61f4445707bd1c7cdb3588c2148d1c4256 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Makefile for parser
 #
-# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.46 2008/02/19 10:30:07 petere Exp $
+# $PostgreSQL: pgsql/src/backend/parser/Makefile,v 1.47 2008/08/29 13:02:32 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -32,13 +32,11 @@ gram.o: $(srcdir)/scan.c
 # important, otherwise make will choose the built-in rule for
 # gram.y=>gram.c.
 
-$(srcdir)/gram.c: $(srcdir)/parse.h ;
+$(srcdir)/gram.h: $(srcdir)/gram.c ;
 
-$(srcdir)/parse.h: gram.y
-ifdef YACC
-   $(YACC) -d $(YFLAGS) $<
-   mv -f y.tab.c $(srcdir)/gram.c
-   mv -f y.tab.h $(srcdir)/parse.h
+$(srcdir)/gram.c: gram.y
+ifdef BISON
+   $(BISON) -d $(BISONFLAGS) -o $@ $<
 else
    @$(missing) bison $< $@
 endif
@@ -53,11 +51,8 @@ endif
 
 
 # Force these dependencies to be known even without dependency info built:
-gram.o keywords.o parser.o: $(srcdir)/parse.h
+gram.o keywords.o parser.o: $(srcdir)/gram.h
 
 
-# gram.c, parse.h, and scan.c are in the distribution tarball, so they
+# gram.c, gram.h, and scan.c are in the distribution tarball, so they
 # are not cleaned here.
-clean: 
-# 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
index 97fba9c9562e1739f2170083762dedb40dcf1cf5..2b7a56bccd2d10b483a870c75a9a223708b38f81 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.199 2008/07/16 01:30:22 tgl Exp $
+ *   $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.200 2008/08/29 13:02:32 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,7 +22,7 @@
 #include <ctype.h>
 
 /*
- * This macro definition overrides the YYSTYPE union definition in parse.h.
+ * This macro definition overrides the YYSTYPE union definition in gram.h.
  * We don't need that struct in this file, and including the real definition
  * would require sucking in some backend-only include files.
  */
@@ -30,7 +30,7 @@
 
 #include "parser/keywords.h"
 #ifndef ECPG_COMPILE
-#include "parser/parse.h"
+#include "parser/gram.h"
 #else
 #include "preproc.h"
 #endif
index 000f19f4a31da2d371dd8f1985a4770b515b4452..1535318735c1074b425112bb483d873f2830fd70 100644 (file)
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.73 2008/01/01 19:45:51 momjian Exp $
+ *   $PostgreSQL: pgsql/src/backend/parser/parser.c,v 1.74 2008/08/29 13:02:32 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
-#include "parser/gramparse.h"  /* required before parser/parse.h! */
-#include "parser/parse.h"
+#include "parser/gramparse.h"  /* required before parser/gram.h! */
+#include "parser/gram.h"
 #include "parser/parser.h"
 
 
index 1608abb4d9531d885cdfe368a01b8de9d03e38d3..804bfe71272b419909c54dc53729413dc32d8b31 100644 (file)
@@ -24,7 +24,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.144 2008/05/09 15:36:31 petere Exp $
+ *   $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.145 2008/08/29 13:02:32 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,7 +36,7 @@
 #include "parser/gramparse.h"
 #include "parser/keywords.h"
 /* Not needed now that this file is compiled as part of gram.y */
-/* #include "parser/parse.h" */
+/* #include "parser/gram.h" */
 #include "parser/scansup.h"
 #include "mb/pg_wchar.h"
 
index a37414b69914de71142aa142193674a2ff82cae5..ad244be32b8a1ec66dea3891798d390d04315ea2 100644 (file)
@@ -4,7 +4,7 @@
 #
 # 'make install' installs whole contents of src/include.
 #
-# $PostgreSQL: pgsql/src/include/Makefile,v 1.25 2008/05/14 19:10:29 tgl Exp $
+# $PostgreSQL: pgsql/src/include/Makefile,v 1.26 2008/08/29 13:02:32 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -61,7 +61,7 @@ uninstall:
 
 
 clean:
-   rm -f utils/fmgroids.h parser/parse.h utils/probes.h
+   rm -f utils/fmgroids.h parser/gram.h utils/probes.h
 
 distclean maintainer-clean: clean
    rm -f pg_config.h dynloader.h pg_config_os.h stamp-h
index 6fb55dc8d8e0a4bd57d4c0092e5377e788b1f479..8deaace574dfe3b95ae2dc890fa052669789ebe8 100644 (file)
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1998-2008, PostgreSQL Global Development Group
 #
-# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.135 2008/05/21 19:51:01 meskes Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.136 2008/08/29 13:02:32 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -36,13 +36,11 @@ ecpg: $(OBJS)
 # pgc is compiled as part of preproc
 preproc.o: $(srcdir)/pgc.c
 
-$(srcdir)/preproc.c: $(srcdir)/preproc.h ;
+$(srcdir)/preproc.h: $(srcdir)/preproc.c ;
 
-$(srcdir)/preproc.h: preproc.y
-ifdef YACC
-   $(YACC) -d $(YFLAGS) $<
-   mv -f y.tab.c $(srcdir)/preproc.c
-   mv -f y.tab.h $(srcdir)/preproc.h
+$(srcdir)/preproc.c: preproc.y
+ifdef BISON
+   $(BISON) -d $(BISONFLAGS) -o $@ $<
 else
    @$(missing) bison $< $@
 endif
@@ -74,10 +72,8 @@ uninstall:
 
 clean distclean:
    rm -f keywords.c *.o ecpg$(X)
-# garbage from partial builds
-   @rm -f y.tab.c y.tab.h
 # garbage from development
-   @rm -f core a.out *.output *.tab.c
+   @rm -f core a.out
 
 # `make clean' does not remove preproc.c, preproc.h, or pgc.c since we
 # want to ship those files in the distribution for people with
index 8625a9b63444a2c4cc839e845ec430fd3559efdf..e3b861c6fef73505149ee084fa379e5ece6738f3 100644 (file)
@@ -1,3 +1,3 @@
 pl_gram.c
-pl.tab.h
+pl_gram.h
 pl_scan.c
index e3c4f7b8135912fb69ba47c603b4c0813aa26653..cc2a9fca2d1ac554ad18a333c4b9333b963515a1 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Makefile for the plpgsql shared object
 #
-# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.32 2008/04/07 14:15:58 petere Exp $
+# $PostgreSQL: pgsql/src/pl/plpgsql/src/Makefile,v 1.33 2008/08/29 13:02:33 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -33,20 +33,18 @@ uninstall: uninstall-lib
 
 
 # Force these dependencies to be known even without dependency info built:
-pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl.tab.h
+pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o: plpgsql.h $(srcdir)/pl_gram.h
 
 # pl_scan is compiled as part of pl_gram
 pl_gram.o: $(srcdir)/pl_scan.c
 
 # See notes in src/backend/parser/Makefile about the following two rules
 
-$(srcdir)/pl_gram.c: $(srcdir)/pl.tab.h ;
+$(srcdir)/pl_gram.h: $(srcdir)/pl_gram.c ;
 
-$(srcdir)/pl.tab.h: gram.y
-ifdef YACC
-   $(YACC) -d $(YFLAGS) $<
-   mv -f y.tab.c $(srcdir)/pl_gram.c
-   mv -f y.tab.h $(srcdir)/pl.tab.h
+$(srcdir)/pl_gram.c: gram.y
+ifdef BISON
+   $(BISON) -d $(BISONFLAGS) -o $@ $<
 else
    @$(missing) bison $< $@
 endif
@@ -62,14 +60,12 @@ else
    @$(missing) flex $< $@
 endif
 
-distprep: $(srcdir)/pl_scan.c $(srcdir)/pl.tab.h $(srcdir)/pl_gram.c
+distprep: $(srcdir)/pl_scan.c $(srcdir)/pl_gram.h $(srcdir)/pl_gram.c
 
-# pl_gram.c, pl.tab.h, and pl_scan.c are in the distribution tarball,
+# pl_gram.c, pl_gram.h, and pl_scan.c are in the distribution tarball,
 # so they are not cleaned here.
 clean distclean: clean-lib
    rm -f $(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
 
 maintainer-clean: clean
-   rm -f $(srcdir)/pl_gram.c $(srcdir)/pl.tab.h $(srcdir)/pl_scan.c
+   rm -f $(srcdir)/pl_gram.c $(srcdir)/pl_gram.h $(srcdir)/pl_scan.c
index b7b4eed97056504853c0816856c7c572519b8a29..43664459abbd0e7ffc73bacd17f7bdd7a2b1fa33 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.128 2008/07/18 03:32:53 tgl Exp $
+ *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.129 2008/08/29 13:02:33 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -17,7 +17,7 @@
 
 #include <ctype.h>
 
-#include "pl.tab.h"
+#include "pl_gram.h"
 
 #include "catalog/namespace.h"
 #include "catalog/pg_attrdef.h"
index 3cc3d1a3b0794cc61eee265079bc9df74575440e..4316f3467a16d9c8f85fa23314f5dc9ac2137cdc 100644 (file)
@@ -8,13 +8,12 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.217 2008/08/25 22:42:34 tgl Exp $
+ *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.218 2008/08/29 13:02:33 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
 
 #include "plpgsql.h"
-#include "pl.tab.h"
 
 #include <ctype.h>
 
index aab349bdb2c0359b06cf9f4dd96c020045616e4f..de7a54e6f8279237c826dd21b227809eab0c59c7 100644 (file)
@@ -8,13 +8,12 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.72 2008/05/15 22:39:49 tgl Exp $
+ *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.73 2008/08/29 13:02:33 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
 
 #include "plpgsql.h"
-#include "pl.tab.h"
 
 #include <ctype.h>
 
index 0dfa486fe87ff87ca0b4b8389be5238ca2b74d65..818690501b0334192438cdca4a8ae8ea55e42cf0 100644 (file)
@@ -8,13 +8,12 @@
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.39 2008/05/12 00:00:54 alvherre Exp $
+ *   $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_handler.c,v 1.40 2008/08/29 13:02:33 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
 
 #include "plpgsql.h"
-#include "pl.tab.h"
 
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
index f91cdd27968ad735a9ec6bb4a2a6fe7449d9d719..8007f116efe10b63a1c398cd16aa38b9256baad8 100755 (executable)
@@ -1,5 +1,5 @@
 @echo off
-REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.13 2008/08/18 13:42:49 mha Exp $
+REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.14 2008/08/29 13:02:33 petere Exp $
 
 set DIST=0
 if "%1"=="dist" set DIST=1
@@ -18,7 +18,7 @@ if exist src\backend\win32ver.rc del /q src\backend\win32ver.rc
 REM Delete files created with GenerateFiles() in Solution.pm
 if exist src\include\pg_config.h del /q src\include\pg_config.h
 if exist src\include\pg_config_os.h del /q src\include\pg_config_os.h
-if %DIST%==1 if exist src\backend\parser\parse.h del /q src\backend\parser\parse.h
+if %DIST%==1 if exist src\backend\parser\gram.h del /q src\backend\parser\gram.h
 if exist src\include\utils\fmgroids.h del /q src\include\utils\fmgroids.h
 if exist src\include\utils\probes.h del /q src\include\utils\probes.h
 
@@ -31,7 +31,6 @@ if %DIST%==1 if exist src\backend\parser\scan.c del /q src\backend\parser\scan.c
 if %DIST%==1 if exist src\backend\parser\gram.c del /q src\backend\parser\gram.c
 if %DIST%==1 if exist src\backend\bootstrap\bootscanner.c del /q src\backend\bootstrap\bootscanner.c
 if %DIST%==1 if exist src\backend\bootstrap\bootparse.c del /q src\backend\bootstrap\bootparse.c
-if %DIST%==1 if exist src\backend\bootstrap\bootstrap_tokens.h del /q src\backend\bootstrap\bootstrap_tokens.h
 if %DIST%==1 if exist src\backend\utils\misc\guc-file.c del /q src\backend\utils\misc\guc-file.c
 
 
index 396bfb5b45b34cb78dc17e1107be0291e50d12ee..2e0f100f21081c959afcb2782e79e869e5eac483 100755 (executable)
@@ -1,5 +1,5 @@
 @echo off
-REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.8 2007/12/19 12:29:36 mha Exp $
+REM $PostgreSQL: pgsql/src/tools/msvc/pgbison.bat,v 1.9 2008/08/29 13:02:33 petere Exp $
 
 IF NOT EXIST src\tools\msvc\buildenv.pl goto nobuildenv
 perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat
@@ -15,8 +15,8 @@ if %BV% GEQ 2.2 goto bisonok
 goto nobison
 :bisonok
 
-if "%1" == "src\backend\parser\gram.y" call :generate %1 src\backend\parser\gram.c src\backend\parser\parse.h
-if "%1" == "src\backend\bootstrap\bootparse.y" call :generate %1 src\backend\bootstrap\bootparse.c src\backend\bootstrap\bootstrap_tokens.h
+if "%1" == "src\backend\parser\gram.y" call :generate %1 src\backend\parser\gram.c src\backend\parser\gram.h
+if "%1" == "src\backend\bootstrap\bootparse.y" call :generate %1 src\backend\bootstrap\bootparse.c
 if "%1" == "src\pl\plpgsql\src\gram.y" call :generate %1 src\pl\plpgsql\src\pl_gram.c src\pl\plpgsql\src\pl.tab.h
 if "%1" == "src\interfaces\ecpg\preproc\preproc.y" call :generate %1 src\interfaces\ecpg\preproc\preproc.c src\interfaces\ecpg\preproc\preproc.h
 if "%1" == "contrib\cube\cubeparse.y" call :generate %1 contrib\cube\cubeparse.c contrib\cube\cubeparse.h