Skip to contentSkip to conversation

C/C++ File Parser

DISCUSSION mudassir 3 participants 3 messages Jul 5, 2007

lore
Share & tools
lore

mudassir

author
#0 lore raw

Hi All,

I am in search of a snippet that could parse a C/C++ source file and give out as output different information on it. For example

1. Signature of function defined in a file.
2. Name of Global Variables declared.
3. Files dependencies..(#include).

Can you help?

thanks,
mudassir.

Signature · 2 lines
View this message in context: http://www.nabble.com/C-C%2B%2B-File-Parser-tf4029536.html#a11445958
Sent from the linux-c-programming mailing list archive at Nabble.com.
#1 lore raw

Look into doxygen.

-uday

Quoted 22 lines · mudassir

Hi All,

I am in search of a snippet that could parse a C/C++ source file and give out as output different information on it. For example

1. Signature of function defined in a file.
2. Name of Global Variables declared.
3. Files dependencies..(#include).

Can you help?

thanks,
mudassir.

Signature · 7 lines
View this message in context: http://www.nabble.com/C-C%2B%2B-File-Parser-tf4029536.html#a11445958
Sent from the linux-c-programming mailing list archive at Nabble.com.

-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to mudassir
Quoted 5 lines · mudassir

Hi All,

I am in search of a snippet that could parse a C/C++ source file and give out as output different information on it. For example

Quoted 8 lines

1. Signature of function defined in a file.
2. Name of Global Variables declared.
3. Files dependencies..(#include).

Can you help?

thanks,
mudassir.

Some parser engines out there would have ANSI/K&R C grammar already available for you to integrate into your program. Have a look at some in this list: http://en.wikipedia.org/wiki/List_of_Parsers