Re: Parsing C typedefs using yacc

solution@gate.net (Ken Walter)
10 Dec 1995 15:20:19 -0500

          From comp.compilers

Related articles
Parsing C typedefs using yacc andrewd@agnus.livewire.com.au (Andrew Dunbar) (1995-12-09)
Re: Parsing C typedefs using yacc solution@gate.net (1995-12-10)
Re: Parsing C typedefs using yacc paco@s04.eps.ua.es (1995-12-17)
| List of all articles for this month |
From: solution@gate.net (Ken Walter)
Newsgroups: comp.compilers
Date: 10 Dec 1995 15:20:19 -0500
Organization: Solution Technology
References: 95-12-033
Keywords: C, parse, comment

Andrew Dunbar <andrewd@agnus.livewire.com.au> writes:
:>I'm trying to parse C using yacc but I've hit a problem with
:>typedefs. ...


That is one of the BIG problems with C/C++ declarations. They can look
like expressions unless you have feedback from previous declarations.
Nothing much you can do about it except accept the ambiguity.


Ken Walter
[At least one parser I've seen that didn't actually keep a symbol
table has used the ugly but fairly effective hack of presuming that
mystery tokens that start with a capital letter are typedef
names. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.