extracting all function names from a C file

  • Thread starter Thread starter kunal s patel
  • Start date Start date
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
 
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
 
Back
Top