473,796 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Seeking code to parse header files

I have been searching, unsuccessfully, for a program which will parse
header files and generate stubs for all external declarations
(classes, functions, <shuddergloba l 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.

Aug 16 '07 #1
1 2353
Baron Samedi wrote:
I have been searching, unsuccessfully, for a program which will parse
header files and generate stubs for all external declarations
(classes, functions, <shuddergloba l 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
Aug 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
2945
by: Michael Strorm | last post by:
Hi! I posted a message a while back asking for project suggestions, and decided to go with the idea of creating an adventure game (although it was never intended to be a 'proper' game, rather an excuse to write- and learn- some C++). To cut a long story short, I wrote a fair chunk of it, but realised that it's... not very good. Okay, it's my first "proper" C++ program, so that's no big deal, but I don't want to waste more time working...
0
1056
by: dev | last post by:
Hey all, I need some guidens please.. ok I have 3 xml files and they are connected with 3 different xsl pages.. i want to make a Object Class that first build up the first xml.. then the 2 etc and parse it in 1 time together.. or how can i merge 3 different xsl files and xml at the same time together
10
19531
by: Ryan Cooper | last post by:
Can anyone give me an idea or better yet, a code sample, demonstrating how to parse a JPEG header and search the header for markers located in the stream? Basically, I need to analyze an uploaded JPEG file, search for the markers C2, C6 and CA in the stream, and then set a variable of some sort to specify whether or not these markers are present. (The reason I need these is to determine whether the JPEG is in "Progressive" or "Baseline"...
67
4286
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. Unfortunately these ad hominem rhetorts are frequently introduced into purely technical discussions on the feasibility of supporting such functionality in C++. That usually serves to divert the discussion from the technical subject to a discussion of the...
11
2216
by: MLH | last post by:
Anyone tried something reliable. Need to implement sol'n to reliably create RTF's of Access reports readable by WordPad.
34
1928
by: Alan Larsson | last post by:
Is there a way i can look at the php code that is runnig a site, without any ind of admin access to the server?
3
2639
by: Jia Lu | last post by:
Hello all I see there are lots of flat db or db-like modules in the standard python modules. What about the keywords seeking speed of them ? (I want to put about 10000 articles with 10000 IDs, and I can do searching keywords with them) The db-like modules are :
0
1256
by: Baron Samedi | last post by:
I am looking for a (free) tool which takes C++ Header files as its input and generates skeletons for the corresponding source code. Just empty functions are acceptable, but a templating system would be welcome. Preferably something that runs under windows, but I could always use a Linux Live CD, as I only expect to do this once. Thanks in advance
0
1200
by: Anish Chapagain | last post by:
Hi, i tried to compile the swig .i file but am having probel with the error: parse error before % token example.i 1. %module example 2. %{ 3. #include <header.h> 4. %}
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10244
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10201
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.