You may do better with a grammar. There are BNF grammars floating around - in the draft standard for one source - and Parse::RecDescent ought to be able to handle the subset for declarations.
After Compline,
Zaxo
In reply to Re: need regex to parse c++ functions
by Zaxo
in thread need regex to parse c++ functions
by Chief of Chaos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |