extracting all function names from a C file

K

kunal s patel

Hi all,
If I want to extract all the function names in a C file programatically then
what would be the best approach for that ?

Kunal
 
C

Carl Daniel [VC++ MVP]

kunal s patel said:
Hi all,
If I want to extract all the function names in a C file programatically
then
what would be the best approach for that ?

Use a parser-generating tool like ANTLR (www.antlr.org) to build a parser
for the C language grammar and have that parser dump the name of each
function that it encounters.

-cd
 

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

Top