extract c/cpp include file with regular expression

T

tiefeng wu

Hi all!
I need to parse c/cpp source files, one requirement is to extract
included header file name.
here is my solution:None

Pretty ugly! And I know for a valid c/cpp source file, it will be not
necessary to check and match '<' with '>' and " with ",
but I'm wondering to see more elegant way to do such thing.

tiefeng wu
2009-07-23
 
T

tiefeng wu

Thanks, Philip Semanchuk and Nick Craig-Wood!
My goal is gather informations from cpp sources and generate cross
referenced html files (as more detail as fine)
So I think " missing some unusual cases" might be acceptable, but
informations you introduced make me more interests to dig things out
:)
I know some programs like doxygen do such things, but I can learn much
by doing this than simply write configuration files.

cheers!

tiefeng wu
2009-07-24
 

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

No members online now.

Forum statistics

Threads
474,201
Messages
2,571,049
Members
47,654
Latest member
LannySinge

Latest Threads

Top