in reply to Re^2: C/C++ function parsing
in thread C/C++ function parsing

"May be with this you could help me out in a better way."

You'll need to specify what you want help with; an explanation of what you mean by "a better way" would also be useful. You should provide: some sample, representative input; actual and expected output (as well as an indication of where you're encountering difficulties getiing the actual output to match the expected output); any error and warning messages; along with anything else that helps to describe the problems you are encountering. All of this is explained in the guidelines "How do I post a question effectively?".

Here's some points on the code you've currently posted:

-- Ken

Replies are listed 'Best First'.
Re^4: C/C++ function parsing
by ssriganesh (Initiate) on Jan 15, 2014 at 06:55 UTC
    Hi Ken,

    Thanks for the feedback, I would incorporate it while posting questions.

    The Code which I had posted is the partial code/sub routine code which is used, and the reason why the strict and warnings are missing.

    Some things like autodie and FILE2, i would incorporate in my present code

    In a single line the problem statement is:

    "how do I parse the data which spans multiple lines."

    More about about the question, I am writing a parser for c/c++ functions in the perl, which can detect the c/c++ functions which are spanning multiple lines, as in example

    Function declared in multiple lines

    NS_IMETHOD HandleEvent(nsPresContext* aPresContext, nsGUIEvent* aEvent, nsEventStatus* aEventStatus);

    Function declared in Single Line

    nsHTMLFramesetFrame::nsHTMLFramesetFrame(nsStyleContext* aContext)

    The code I posted in my earlier post is able to parse the functions declared in a single line, but fails to detect the functions declared in multiple lines.

    I need help in modifying the perl code to parse multiple line functions in a .cpp /.c file