The DMS Software Reengineering Toolkit can be used
to automate conversions, although this one could
be pretty hard. It can be obtained with a full
ANSI C front end having name and type resolution,
which can answer the questions of what variables
are used where. "What variables traverse blocks"
is a dataflow question, and requires pretty serious
dataflow infrastructure to answer "easily".
Alas, we aren't quite that far along, so getting
this information is possible but not fun.
I will say that starting from scratch to build
the entire infrastructure you need for processing
C might sound like fun, but it will take you
a lot more effort than you think.
[Yes, I'm biased, but that comes from way
too much experience doing this kind of thing].
This is why we offer a commercial product;
it allows us to distribute the engineering cost
across a lot of customers.
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
"Simon Burton" <simonb at webone.com.au> wrote in message
news:pan.2002.12.23.02.50.50.847704 at webone.com.au...
On Fri, 20 Dec 2002 04:50:57 +0000, noc wrote:
I have a c program that I want to replace with a python script.
But I don't know c all that well. What I'd like to is look at a visual
of the c program, a flowchart that draws that subroutines as blocks,
out what variables traverse the blocks, and highlights external traffic
sockets and ports.
A basic google search comes up empty, in spite of the fact that I'm not
first to want such a thing. Thinkgeek offers a linux kernel map poster
was generated by perl scripts.
So I guess that means roll my own, which means building a c interpreter,
which time I'll have relearnt enough c to read the code in the first
but producing code is much cooler than simply reading code.
So, does anybody have any hints or pointers to hints that would help on
I am working on a c code parser written in python right now.
My main focus is parsing .h files to generate wrapper code for python
(yes i know about SWIG), but i hope it will do a lot more, such
as general "explaining" that you (and many others) would like.
highlighting external traffic to sockets is somewhat specific,
but my hope is that a well written python c-parser will allow for
custom extensions without to much hassle.
let me know if you're interested; i'll announce something on c.l.py
soon i hope,