jai has asked for the wisdom of the Perl Monks concerning the following question:
hi,
can anyone give me the regex to match C-style functions.
given a C source file, the regex should match all the C functions and add a header b4 the function.
the functions may be of the form
the regex should match:int function(int a, char *b) { ... return 0; }
and print:int function(int a, char *b)
thanks -jai------------------------------------------------------ /* Function : function() Input: int a : char *b: Output: int : Author : Date : */ int function(int a, char *b) -----------------------------------------------------------
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: regex 2 match C function
by liz (Monsignor) on Aug 13, 2003 at 08:30 UTC | |
Re: regex 2 match C function
by Skeeve (Parson) on Aug 13, 2003 at 08:31 UTC | |
Re: regex 2 match C function
by CombatSquirrel (Hermit) on Aug 13, 2003 at 11:27 UTC | |
by jai (Sexton) on Aug 14, 2003 at 06:33 UTC | |
Re: regex 2 match C function
by tbone1 (Monsignor) on Aug 13, 2003 at 13:24 UTC | |
Re: regex 2 match C function (parser)
by kelan (Deacon) on Aug 13, 2003 at 13:50 UTC | |
Re: regex 2 match C function
by CombatSquirrel (Hermit) on Aug 13, 2003 at 15:47 UTC | |
by Anonymous Monk on Jan 24, 2014 at 09:49 UTC |
Back to
Seekers of Perl Wisdom