C source viewer/mapper?
Simon Burton
simonb at webone.com.au
Sun Dec 22 21:50:55 EST 2002
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 map
> of the c program, a flowchart that draws that subroutines as blocks, points
> out what variables traverse the blocks, and highlights external traffic to
> sockets and ports.
>
> A basic google search comes up empty, in spite of the fact that I'm not the
> first to want such a thing. Thinkgeek offers a linux kernel map poster that
> was generated by perl scripts.
>
> So I guess that means roll my own, which means building a c interpreter, by
> which time I'll have relearnt enough c to read the code in the first place,
> but producing code is much cooler than simply reading code.
>
> So, does anybody have any hints or pointers to hints that would help on this
> mad errand?
>
> Thanks
> Bruce
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,
cheerioh,
Simon Burton
http://arrowtheory.com
More information about the Python-list
mailing list