Re: Help with gram.y (UNDER) - Mailing list pgsql-hackers

From Chris Bitmead
Subject Re: Help with gram.y (UNDER)
Date
Msg-id 392BDA47.FE1E7686@bitmead.com
Whole thread Raw
In response to Help with gram.y (UNDER)  (Chris Bitmead <chris@bitmead.com>)
Responses Re: Help with gram.y (UNDER)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
It seems like bison is confused by having that '(' just after an
optional syntax (UNION). If I place something after OptUnder (USING just
to pick a token), then everything works fine (except of course the
spurious USING becomes part of the syntax).

Does the '(' have some kind of second-class status as a token that would
cause this wierdness?

Chris Bitmead wrote:
> 
> Can someone give be a bit of help with gram.y to get this UNDER syntax
> right? I did what I though was the obvious  syntax, but it no longer
> accepts a plain create table after this change...
> 
> OptUnder: UNDER relation_name_list      { $$ = $2; }
>         | /*EMPTY*/       { $$ = NIL; }
>         ;
> 
> CreateStmt:  CREATE OptTemp TABLE relation_name OptUnder '('
> OptTableElementList ')' OptInherit
>                         {
>                         /*etc */
>                         }
>                 ;
> 
> The full patch is here...
> ftp://ftp.tech.com.au/pub/diff.x


pgsql-hackers by date:

Previous
From: Chris Bitmead
Date:
Subject: Help with gram.y (UNDER)
Next
From: teg@redhat.com (Trond Eivind Glomsrød)
Date:
Subject: Re: Perl 5.6.0