Re: help with bison

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: help with bison
Date: 2002-04-11 05:02:49
Message-ID: Pine.LNX.4.21.0204111448440.30496-100000@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-04-11 05:03:33 Re: RFC: Restructuring pg_aggregate
Previous Message Peter Eisentraut 2002-04-11 05:01:56 Re: timeout implementation issues