Hi, I wonder if tehre is already a solution to my task out here.
To help instrument my c code, I want to run a perl script which automatically scans the source file, and separates each function definition, maybe putting them into arrays.
I am baffled as to what kind of regex will give me such results. In particular, the source file can be badly formated, and the only way the extract a whole function body is by counting the number of matching {, and }.
Could anyone point to a resource for doing that?