Re: Declaration, Definition & Reference listers for C

Darius Blasband <darius@raincode.com>
24 Aug 2005 18:24:30 -0400

          From comp.compilers

Related articles
Declaration, Definition & Reference listers for C john.carter@tait.co.nz (John Carter) (2005-08-21)
Re: Declaration, Definition & Reference listers for C basile-news@starynkevitch.net (Basile Starynkevitch \[news\]) (2005-08-24)
Re: Declaration, Definition & Reference listers for C codeworker@free.fr (=?iso-8859-1?q?C=E9dric_LEMAIRE?=) (2005-08-24)
Re: Declaration, Definition & Reference listers for C nmm1@cus.cam.ac.uk (2005-08-24)
Re: Declaration, Definition & Reference listers for C Markus.Elfring@web.de (2005-08-24)
Re: Declaration, Definition & Reference listers for C DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-08-24)
Re: Declaration, Definition & Reference listers for C darius@raincode.com (Darius Blasband) (2005-08-24)
Re: Declaration, Definition & Reference listers for C aycock@cse.cpsc.ucalgary.ca (John Aycock) (2005-08-24)
Re: Declaration, Definition & Reference listers for C nicola.musatti@gmail.com (Nicola Musatti) (2005-08-24)
| List of all articles for this month |
From: Darius Blasband <darius@raincode.com>
Newsgroups: comp.compilers
Date: 24 Aug 2005 18:24:30 -0400
Organization: Compilers Central
References: 05-08-075
Keywords: analysis, tools
Posted-Date: 24 Aug 2005 18:24:30 EDT

Have you tried ctags and its multiple variants ?


In any case, you don't have to write a C preprocessor yourself. You
can use an existing one, and use it as a first pass to your own
parsers.


Alternatively, you might consider using
RainCode (http://www.raincode.com) for C, which is freely available
and which parses C programs. You can write a small script to extract
the info you need from the parse tree (40 lines max), or alternatively,
use the canonic XML representation, which is pragmatic but
probably too large for most XML parsers out there.


Darius.




John Carter wrote:
> I'm interested in the large scale structure of very large programs (1000's
> of files)
>
> So to experiment with this I need to extract every {typedef, struct,
> union, enum, macro, variable and function} {declaration, definition and
> reference} from 1000's of C files.
>
> Anybody know of a tool to parse standard C and spit out this information?


Post a followup to this message

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