scanning c-code

T

tm

Hello,

I have to to scan c-code, look for a c-struct variable(declaration) and
represent the struct in a tree-graphic.
Are there modules for scanning c-code and graphictools for the
representation stuff.
What would you advise as a starting point...
 
M

Mathias Waack

tm said:
I have to to scan c-code, look for a c-struct variable(declaration)
and represent the struct in a tree-graphic.
Are there modules for scanning c-code and graphictools for the
representation stuff.
What would you advise as a starting point...

www.doxygen.org and graphviz (the latter is used by the former).


Mathias
 
I

Ira Baxter

tm said:
I have to to scan c-code, look for a c-struct variable(declaration) and
represent the struct in a tree-graphic.
Are there modules for scanning c-code and graphictools for the
representation stuff.
What would you advise as a starting point...

I wouldn't specifically recommend python for this.
This is really a job for a parsing engine.
(To the extent that python has good parsing
tools and good C definitions, it might be an OK answer.)
Getting parsing tools in python is likely possible.
Getting a good C definition, however, is harder.

You might consider an engine designed to parse
languages that has a good C definition.
GNU C is one example.
Another is
http://www.semanticdesigns.com/Products/FrontEnds/CFrontEnd.html
 

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
474,175
Messages
2,570,942
Members
47,490
Latest member
Finplus

Latest Threads

Top