Seeking code to parse header files

B

Baron Samedi

I have been searching, unsuccessfully, for a program which will parse
header files and generate stubs for all external declarations
(classes, functions, <shudder> global variables).

I want this so that I can generate dummies for interfacing software,
for unit testing. As I say, I haven't found it, so it looks like I
will have to code my own.

Before I reinvent the wheel, does anyone know of any freely available
software to parse header files?

Thanks in advance.
 
A

Alan Woodland

Baron said:
I have been searching, unsuccessfully, for a program which will parse
header files and generate stubs for all external declarations
(classes, functions, <shudder> global variables).

I want this so that I can generate dummies for interfacing software,
for unit testing. As I say, I haven't found it, so it looks like I
will have to code my own.

Before I reinvent the wheel, does anyone know of any freely available
software to parse header files?
There are two freely available projects that I'm aware of which can do
this. Firstly SWIG (http://www.swig.org), and secondly the gcc-xml
project (http://www.gccxml.org). Swig has an XML output target, which is
what I used a while ago in a project to parse some C++, although the
swig parser isn't really a full C++ parser (it only parses a commonly
used subset)

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top