
11 Dec
2005
11 Dec
'05
6:54 a.m.
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