[C2hs] A problem parsing a C header

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Fri Dec 9 11:37:33 EST 2005


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.

I might have another go some time but I could probably do with some
help.

Duncan



More information about the C2hs mailing list