plpgsql requires bison

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: jwieck(at)debis(dot)com
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: plpgsql requires bison
Date: 1999-08-06 18:25:22
Message-ID: 199908061825.OAA03292@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have received a report that pl/plpgsql requires bison to compile. I
have verified this is true, at least on BSD/OS 4.01, and since we enable
plpgsql compile by default, this requires bison for our standard build.

The issue appears to be contents of gram.tab.c, which is part of our
distribution, and contains at the top:


/* A Bison parser, made from gram.y
by GNU Bison version 1.25
*/

#define YYBISON 1 /* Identify Bison output. */

#define K_ALIAS 258
#define K_ASSIGN 259
#define K_BEGIN 260
#define K_CONSTANT 261
#define K_DEBUG 262
#define K_DECLARE 263
#define K_DEFAULT 264
#define K_DOTDOT 265
#define K_ELSE 266
#define K_END 267

and later on, the contents of gram.y tables. The file appears to allow
for the passage of keywords, but is not done by flex/yacc combination.
I did:

yacc -d gram.y
sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <y.tab.c >pl_gram.c
sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' <y.tab.h >pl.tab.h
rm -f y.tab.c y.tab.h

but got errors like:

scan.l: In function `plpgsql_yylex':
scan.l:85: `K_ASSIGN' undeclared (first use this function)
scan.l:85: (Each undeclared identifier is reported only once
scan.l:85: for each function it appears in.)
scan.l:87: `K_DOTDOT' undeclared (first use this function)
scan.l:88: `K_ALIAS' undeclared (first use this function)

Jan, is this a known portability problem?

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 1999-08-06 18:54:31 Re: [HACKERS] Unable to create tables...
Previous Message Don Baccus 1999-08-06 18:23:47 Re: [HACKERS] Unable to create tables...