Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Parsing C Functions..by pc88mxer (Vicar) |
on Apr 27, 2008 at 20:02 UTC ( [id://683189]=note: print w/replies, xml ) | Need Help?? |
How about just matching open/close brace pairs that are at column 0? Will that work for you? Something like: m/^\{.*?^\}/ms
Another option is to fully parse the C code. There's a good start at this described here: Converting C to English with Perl Update: Here's another grammar which might help: Parsing C
In Section
Seekers of Perl Wisdom
|
|