in reply to Parsing C Functions..

Just about anything is possible with regexes if you go far enough but take one look at the back pages of Jeffrey Friedl's "Mastering Regular Expressions" to see the horrifying 2 page regex that results from parsing plain old email addresses correctly.

You might be able to do what you want the way you're trying but I would suggest instead giving Parse::RecDescent a shot. Bit of a learning curve but the resulting code will be much easier to read, tweak, and reuse.

(update: switched ISBN to 2nd ed.)

Replies are listed 'Best First'.
Re^2: Parsing C Functions..
by Starky (Chaplain) on Apr 28, 2008 at 11:59 UTC
      It took me a while before I realized that csourceparser.pl was actually stored in demo/demo_another_Cgrammar.pl of Parse::RecDescent.