Parser C/C++ text file.

Discussion in 'C Programming' started by Manu, Jan 2, 2006.

  1. Manu

    Manu Guest

    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.
    Manu, Jan 2, 2006
    #1
    1. Advertising

  2. Manu

    Artie Gold Guest

    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!"
    Artie Gold, Jan 2, 2006
    #2
    1. Advertising

  3. 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
    Emmanuel Delahaye, Jan 2, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernd Oninger
    Replies:
    0
    Views:
    746
    Bernd Oninger
    Jun 9, 2004
  2. ZOCOR

    XML Parser VS HTML Parser

    ZOCOR, Oct 3, 2004, in forum: Java
    Replies:
    11
    Views:
    802
    Paul King
    Oct 5, 2004
  3. Bernd Oninger
    Replies:
    0
    Views:
    804
    Bernd Oninger
    Jun 9, 2004
  4. Joel Hedlund
    Replies:
    2
    Views:
    493
    Joel Hedlund
    Nov 11, 2006
  5. mike b.
    Replies:
    3
    Views:
    156
    James Edward Gray II
    Jul 30, 2007
Loading...

Share This Page