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


In reply to Re^4: C/C++ function parsing by ssriganesh
in thread C/C++ function parsing by ssriganesh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.