| From: | Chris Bitmead <chris(at)bitmead(dot)com> | 
|---|---|
| To: | Postgres Hackers List <hackers(at)postgreSQL(dot)org> | 
| Subject: | Re: Help with gram.y (UNDER) | 
| Date: | 2000-05-24 13:49:11 | 
| Message-ID: | 392BDDD7.B1838271@bitmead.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Chris Bitmead wrote:
> 
> It seems like bison is confused by having that '(' just after an
> optional syntax (UNION). 
I mean the optional UNDER
> If I place something after OptUnder (USING just
I mean USING;
i.e. CreateStmt:  CREATE OptTemp TABLE relation_name OptUnder USING  '('
OptTableElementList ')' OptInherit
This will accept "CREATE TABLE foo USING (aa text);"
but this...
CreateStmt:  CREATE OptTemp TABLE relation_name OptUnder '('
OptTableElementList ')' OptInherit
won't accept "CREATE TABLE foo (aa text);"
> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 2000-05-24 14:04:10 | Re: Fwd: Re: SQL3 UNDER | 
| Previous Message | Trond Eivind=?iso-8859-1?q?_Glomsr=F8d?= | 2000-05-24 13:39:49 | Re: Perl 5.6.0 |