Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Parser C/C++ text file. (http://www.velocityreviews.com/forums/t440732-parser-c-c-text-file.html)

Manu 01-02-2006 04:50 PM

Parser C/C++ text file.
 
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.



Artie Gold 01-02-2006 06:05 PM

Re: Parser C/C++ text file.
 
Manu wrote:
> 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

--
Artie Gold -- Austin, Texas
http://goldsays.blogspot.com
http://www.cafepress.com/goldsays
"If you have nothing to hide, you're not trying!"

Emmanuel Delahaye 01-02-2006 06:53 PM

Re: Parser C/C++ text file.
 
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...

--
A+

Emmanuel Delahaye


All times are GMT. The time now is 05:44 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.