From 952b036054d72a6e826d37f5a847de37f10cb405 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Wed, 28 May 2014 19:29:05 -0400
Subject: [PATCH] Revert "Fix bogus %name-prefix option syntax in all our Bison
 files."

This reverts commit 867363cbcbc3d0ccac813a74fbc8236d8873c266.

It turns out that the %name-prefix syntax without "=" does not work
at all in pre-2.4 Bison.  We are not prepared to make such a large
jump in minimum required Bison version just to suppress a warning
message in a version hardly any developers are using yet.
When 3.0 gets more popular, we'll figure out a way to deal with this.
In the meantime, BISONFLAGS=-Wno-deprecated is recommendable for
anyone using 3.0 who doesn't want to see the warning.
---
 contrib/cube/cubeparse.y                | 2 +-
 contrib/seg/segparse.y                  | 2 +-
 src/backend/bootstrap/bootparse.y       | 2 +-
 src/backend/parser/gram.y               | 2 +-
 src/backend/replication/repl_gram.y     | 2 +-
 src/interfaces/ecpg/preproc/ecpg.header | 2 +-
 src/pl/plpgsql/src/gram.y               | 2 +-
 src/test/isolation/specparse.y          | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/contrib/cube/cubeparse.y b/contrib/cube/cubeparse.y
index 20aa81eadb6..d7205b824cb 100644
--- a/contrib/cube/cubeparse.y
+++ b/contrib/cube/cubeparse.y
@@ -39,7 +39,7 @@ static NDBOX * write_point_as_box(char *s, int dim);
 /* BISON Declarations */
 %parse-param {NDBOX **result}
 %expect 0
-%name-prefix "cube_yy"
+%name-prefix="cube_yy"
 
 %token CUBEFLOAT O_PAREN C_PAREN O_BRACKET C_BRACKET COMMA
 %start box
diff --git a/contrib/seg/segparse.y b/contrib/seg/segparse.y
index 2311c1e63c0..3fad9910bd5 100644
--- a/contrib/seg/segparse.y
+++ b/contrib/seg/segparse.y
@@ -42,7 +42,7 @@ static char strbuf[25] = {
 /* BISON Declarations */
 %parse-param {SEG *result}
 %expect 0
-%name-prefix "seg_yy"
+%name-prefix="seg_yy"
 
 %union {
 	struct BND {
diff --git a/src/backend/bootstrap/bootparse.y b/src/backend/bootstrap/bootparse.y
index 0bd3aef7b85..eeffb0f990d 100644
--- a/src/backend/bootstrap/bootparse.y
+++ b/src/backend/bootstrap/bootparse.y
@@ -93,7 +93,7 @@ static int num_columns_read = 0;
 %}
 
 %expect 0
-%name-prefix "boot_yy"
+%name-prefix="boot_yy"
 
 %union
 {
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 0f9b72a3ff5..8db1e228206 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -148,7 +148,7 @@ static void processCASbits(int cas_bits, int location, const char *constrType,
 
 %pure-parser
 %expect 0
-%name-prefix "base_yy"
+%name-prefix="base_yy"
 %locations
 
 %parse-param {core_yyscan_t yyscanner}
diff --git a/src/backend/replication/repl_gram.y b/src/backend/replication/repl_gram.y
index 72c984379c6..b6cfdac1b66 100644
--- a/src/backend/replication/repl_gram.y
+++ b/src/backend/replication/repl_gram.y
@@ -51,7 +51,7 @@ Node *replication_parse_result;
 %}
 
 %expect 0
-%name-prefix "replication_yy"
+%name-prefix="replication_yy"
 
 %union {
 		char					*str;
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index 4db55eb8d7e..75538e3bd96 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -557,7 +557,7 @@ add_typedef(char *name, char *dimension, char *length, enum ECPGttype type_enum,
 %}
 
 %expect 0
-%name-prefix "base_yy"
+%name-prefix="base_yy"
 %locations
 
 %union {
diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y
index 52cbfa60af9..4b2dce8cf07 100644
--- a/src/pl/plpgsql/src/gram.y
+++ b/src/pl/plpgsql/src/gram.y
@@ -110,7 +110,7 @@ static	List			*read_raise_options(void);
 %}
 
 %expect 0
-%name-prefix "plpgsql_yy"
+%name-prefix="plpgsql_yy"
 %locations
 
 %union {
diff --git a/src/test/isolation/specparse.y b/src/test/isolation/specparse.y
index c10ec039724..bf3a9f3b505 100644
--- a/src/test/isolation/specparse.y
+++ b/src/test/isolation/specparse.y
@@ -20,7 +20,7 @@ TestSpec		parseresult;			/* result of parsing is left here */
 %}
 
 %expect 0
-%name-prefix "spec_yy"
+%name-prefix="spec_yy"
 
 %union
 {
-- 
GitLab