Re: C/C++ header file parser (David Wagner)
3 Oct 2006 18:12:22 -0400

          From comp.compilers

Related articles
C/C++ header file parser (Pankaj Garg) (2006-09-30)
Re: C/C++ header file parser (2006-10-03)
Re: C/C++ header file parser (Pascal Bourguignon) (2006-10-03)
Re: C/C++ header file parser (Alex McDonald) (2006-10-03)
Re: C/C++ header file parser (Paul Pluzhnikov) (2006-10-03)
Re: C/C++ header file parser (Michael Tiomkin) (2006-10-03)
Re: C/C++ header file parser (Ira Baxter) (2006-10-10)
| List of all articles for this month |

From: (David Wagner)
Newsgroups: comp.compilers
Date: 3 Oct 2006 18:12:22 -0400
Organization: University of California, Berkeley
References: 06-09-169
Keywords: C, C++, parse
Posted-Date: 03 Oct 2006 18:12:22 EDT

Pankaj Garg wrote:
>I need to parse C/C++ header files and extract information about data
>types, functions and function arguments. Which tools/libraries would
>be suitable for me? Are there any examples/sample programs for such.
>I don't want to build a full fledged yacc based parser so i am looking
>for a ready made parser, preferably open source.

First, please fix the email address listed in the From: line.
I tried replying by email, but the email bounced.

Regarding your question, search the archives, and you will find
several options listed. One option is that you could try Elsa/Oink:
Elsa is a C and C++ parser. Oink is a layer on top of Elsa that
simplifies ("lowers") the C++ and puts it into a canonical form so it
is a little easier to deal with. It's open source. It's not perfect,
but it seems fairly solid. We've been using it in our research to
parse and analyze all Debian C/C++ packages, and it works pretty well:
Elsa can parse most, but not all, of those packages.

Post a followup to this message

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