J
jeniffer
I am writing a perl code to find out the location (line number) of
ending bracket of a function given its name and start line number .Do i
just scan character by character (from start line number ) and
increment a counter when I encounter { decrement the counter by 1 on
getting } ,and when the counter = 0 ,I take the line number .This would
free me from parsing the code .Is this method correct? or can i do it
in a better way by regular expression ? I need to have a fast approach
since the code has finally to work on thousands of C files.
ending bracket of a function given its name and start line number .Do i
just scan character by character (from start line number ) and
increment a counter when I encounter { decrement the counter by 1 on
getting } ,and when the counter = 0 ,I take the line number .This would
free me from parsing the code .Is this method correct? or can i do it
in a better way by regular expression ? I need to have a fast approach
since the code has finally to work on thousands of C files.