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) |
Re: Parsing typedefs with C (2) paco@s04.eps.ua.es (1995-12-18) |
From: | Andrew Dunbar <andrewd@agnus.livewire.com.au> |
Newsgroups: | comp.compilers |
Date: | 9 Dec 1995 19:18:06 -0500 |
Organization: | Compilers Central |
Keywords: | C, parse, yacc, question |
I'm trying to parse C using yacc but I've hit a problem with
typedefs. Normally the lexer checks each identifier to see if it
is in the symbol table as a typedef-name. However I do not wish
to process the include files so I do not know which identifiers
are typedef-names. How can I make the yacc grammar cope with
declarations such as this:
FILE *fp;
I'm only trying to make some tools to manipulate indenting, alter
the names of global variables and such. It does not have to be
100% accurate.
Can anybody help?
Andrew Dunbar
GPSoftware
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.