Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: parsing C functions.

by irah (Pilgrim)
on Jun 15, 2009 at 06:42 UTC ( [id://771559]=note: print w/replies, xml ) Need Help??


in reply to parsing C functions.

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: parsing C functions.
by cdarke (Prior) on Jun 15, 2009 at 08:03 UTC
    In your regex, match the keyword "function". The keyword is used for function in C.

    Not in any version of C that I have seen.

    Try a profiler instead: see your compiler documentation, often the -p option. See also prof(1) or gprof(1), sprof(1) for .so files.
Re^2: parsing C functions.
by targetsmart (Curate) on Jun 15, 2009 at 08:15 UTC
    If my assumption is correct
    You meant , apart from normal C code, we had to put additional comments on the start of the function like
    /* Function : main Purpose: .. Author: .. */ void main() { ... }
    and identify the functions depending upon the comments.
    You should have given a code example, otherwise this would lead to confusion
    UPDATE
    this was reply to irah's post, not directly to onkar's post.
    I just clarified what irah was trying to say

    Vivek
    -- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.
      No, its like int main(){ printf("In - %s%d%s\n",__FILE__,__LINE__,__func__); ....do something here .... printf("Out -%s%d%s\n",__FILE__,__LINE__,__func__); return 0; } in all the functions in the large code base containing at least 10000 functions like the Linux Kernel source .... Regards, Onkar

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://771559]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found