Re: Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch
Date
Msg-id 4623C4DB.1070505@dunslane.net
Whole thread Raw
In response to Re: Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: Re: IDENTITY/GENERATED v36 Re: [PATCHES] Final version of IDENTITY/GENERATED patch  (Zoltan Boszormenyi <zb@cybertec.at>)
List pgsql-hackers
Florian G. Pflug wrote:
>>>>
>>>> bison -y -d  gram.y
>>>> conflicts: 2 shift/reduce
>
> I'ts been quite a time since I last used bison, but as far as I
> remember, you can tell it to write a rather details log about
> it's analysis of the grammar. That log should include more
> detailed information about those conflicts - maybe that helps
> to figure out their exact cause, and to find a workaround.
>

You can almost always get rid of shift/reduce conflicts by unwinding 
some of the productions - resist the temptation to factor the grammar. 
The effect of this is to eliminate places where the parser has to decide 
between shifting and reducing. (This is why, for example, almost all the 
"drop foo if exists" variants require separate productions rather than 
using opt_if_exists.)

cheers

andrew


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Vista/IPv6
Next
From: Tom Lane
Date:
Subject: Re: Hacking on PostgreSQL via GIT