Re: Declaration, Definition & Reference listers for C

"Basile Starynkevitch \[news\]" <basile-news@starynkevitch.net>
24 Aug 2005 17:58:34 -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)
[1 later articles]
| List of all articles for this month |
From: "Basile Starynkevitch \[news\]" <basile-news@starynkevitch.net>
Newsgroups: comp.compilers
Date: 24 Aug 2005 17:58:34 -0400
Organization: http://starynkevitch.net - Ours
References: 05-08-075
Keywords: practice, tools
Posted-Date: 24 Aug 2005 17:58:34 EDT

On 2005-08-21, John Carter <john.carter@tait.co.nz> 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?
>


I'll recommend using CIL for this. http://manju.cs.berkeley.edu/cil/


It parses a full C program, and gives you an abstract syntax tree,
symbol tables, etc.. It is written (and is extensible & usable) in
Ocaml, a functional language well suited for such tasks.


Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile(at)starynkevitch(dot)net
8, rue de la Faïencerie, 92340 Bourg La Reine, France



Post a followup to this message

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