Related articles |
---|
C structure analyzer ("Reflection" in C?) phollingsworth@sbsintl.com (1999-07-19) |
Re: C structure analyzer ("Reflection" in C?) jsgray@acm.org.nospam (Jan Gray) (1999-07-20) |
Re: C structure analyzer ("Reflection" in C?) pmai@acm.org (1999-07-21) |
Re: C structure analyzer ("Reflection" in C?) kst@cts.com (Keith Thompson) (1999-07-23) |
Re: C structure analyzer ("Reflection" in C?) jerry.pendergraft@endocardial.com (Jerry Pendergraft) (1999-07-28) |
Re: C structure analyzer ("Reflection" in C?) norbert@dune.gia.rwth-aachen.de (Norbert Berzen) (1999-07-30) |
Re: C structure analyzer ("Reflection" in C?) kst@cts.com (Keith Thompson) (1999-07-30) |
Re: C structure analyzer ("Reflection" in C?) dibyendu@mazumdar.demon.co.uk (Dibyendu Majumdar) (1999-07-30) |
Re: C structure analyzer ("Reflection" in C?) denne@aps.rwth-aachen.de (Volker Denneberg) (1999-07-30) |
[1 later articles] |
From: | pmai@acm.org (Pierre R. Mai) |
Newsgroups: | comp.compilers |
Date: | 21 Jul 1999 00:18:59 -0400 |
Organization: | Technical University Berlin, Germany |
References: | 99-07-063 99-07-093 |
Keywords: | C, comment |
"Jan Gray" <jsgray@acm.org> writes:
> [I suspect it'd be easier to write some perl programs that understand
> just enough C to process the structure declarations in the source than
> to grovel through the COFF symbols. -John]
I'd imagine that glue-generating tools like SWIG (which parses C/C++
to automatically generate glue-code for embedded scripting languages
like Perl, Tcl, Guile, etc.) could be "misused" for this job.
Especially SWIG seems well suited for something like this. See
http://www.swig.org/ for information on SWIG.
I'd try to avoid writing something to parse the C headers, since this
usually ends up being more work than at first assumed (depending on
the headers in question, typedefs have to be resolved, etc.)...
Regs, Pierre.
--
Pierre Mai <pmai@acm.org> PGP and GPG keys at your nearest Keyserver
[Someone else wrote in and noted that in the CPAN perl archive there's
a C source analysis module that looks like it does a pretty good job
of parsing C code. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.