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