Parser C/C++ text file.

M

Manu

Hy everyone,
i'd like to know if there's a way to get, given a text file (.cpp), the list
of function whitin the file. I think there are rules to define a char array
as function .. but what are they?

Thanks in advance.
 
A

Artie Gold

Manu said:
Hy everyone,
i'd like to know if there's a way to get, given a text file (.cpp), the list
of function whitin the file. I think there are rules to define a char array
as function .. but what are they?

Thanks in advance.
Yes. It's called parsing (as alluded to in your title).

What's your question about the ISO standard C language?

--ag
 
E

Emmanuel Delahaye

Manu a écrit :
i'd like to know if there's a way to get, given a text file (.cpp), the list
of function whitin the file. I think there are rules to define a char array
as function .. but what are they?

I'm not sure I have understood your question, but a .cpp is hardly a
C-file, but rather a C++ file...

That said, if you are using a C99 compiler (gcc 3.x for instance), the
__func__ macro defines a string with the name of the current function.

I'm not sure that this is what you was looking for...
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top