I Know that there are several similar questions about ActionScript parsers, where I think the most appropriated answer is FlexPMD (http://sourceforge.net/adobe/flexpmd/home/Home/). Sadly, this answer does not completely work for me, because I need the parser written in ActionScript, which allows me to manipulate the source code (eg. wrap all functions of source code).
In order to achieve my goal, I also read about meta-programing for AS3, but it seems to be limited for my purpose.