Re: help with bison - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: help with bison
Date
Msg-id Pine.LNX.4.21.0204111448440.30496-100000@linuxworld.com.au
Whole thread Raw
In response to help with bison  (Neil Conway <nconway@klamath.dyndns.org>)
Responses Re: help with bison  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: help with bison  (Neil Conway <nconway@klamath.dyndns.org>)
List pgsql-hackers
On Wed, 10 Apr 2002, Neil Conway wrote:

> Hi all,
> 
> I'm working on a fairly large patch (cleaning up Karel Zak's
> PREPARE/EXECUTE work), and I'm having some problems with bison (I'm
> a yacc newbie). In fact, my grammar currently has an obscene
> 20 shift/reduce and 4 reduce/reduce conflicts!

Your first set of problems is coming from PrepareStmt:

---

PrepareStmt:  PREPARE name AS prepare_query types_prepare_clause
prepare_store

---

There is a reasonably clear problem here. prepare_query encompasses much
of the grammar of the parser so it will definately cause shift/reduce and
reduce/reduce conflicts with the other two productions which follow
it. Easy solution?

PrepareStmt:  PREPARE name types_prepare_clause prepare_store AS
prepare_query

Your second problem is in ExecuteStmt:

ExecuteStmt: EXECUTE name into_clause USING execute_using prepare_store

Here your problem is with execute_using and prepare_store. I am not sure
why.

Gavin



pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: RFC: Restructuring pg_aggregate
Next
From: Bruce Momjian
Date:
Subject: Re: RFC: Restructuring pg_aggregate