[C2hs] A problem parsing a C header
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Sun Dec 11 06:54:30 EST 2005
Duncan Coutts:
> On Fri, 2005-12-09 at 11:23 +0000, Duncan Coutts wrote:
>
> > However the change to the grammar to make this possible is non-trivial.
> >
> > The grammar I was working from originally makes the same mistake.
> > http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
> >
> > The gcc grammar has a very complex way of partitioning the typedef and
> > non-typedef cases to allow a typedefed name to be reused as an
> > identifier in the right context.
> >
> > I'm still looking into it.
>
> I've spent quite some time trying to fix this using the gcc grammar as a
> guide however I can't make a grammar that is free of reduce/reduce
> conflicts.
What did you try to do? Adding a new case to the direct_declarator
definition that parses a `typedef' instead of an `ident'?
Manuel
More information about the C2hs
mailing list