analyzing C source code

Sage
Posts: 1,403
Joined: 2005.07
Post: #1
I want to do various analysis of source codes, like counting number of functions in a source file and listing the lines they are declared on for example.

I have a feeling i'd be using yacc or lex for something like this, not sure how to get started or what to do once I am.

So where can I find langauge descriptions in a format I can use?
and what sorts of tools/programs can I use for this?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Member
Posts: 201
Joined: 2002.06
Post: #2
I say just use grep unless you need to be keeping up with symbols.
Quote this message in a reply
Member
Posts: 469
Joined: 2002.10
Post: #3
I recommend googling for "Source code analysis."

There are plenty of packages out there that will do much more than what you want.
e.g Source Navigator.

You just have to find one that can analyze the your language and has a license that you are comfortable with.

---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Quote this message in a reply
Post Reply