portAS.pl Next steps

5 March 2013

First thought: Flash Develop “FlashDevelop offers first class support for ActionScript (2 & 3) and Haxe development. Great completion & code generation, projects compilation & debugging, plenty of project templates, SWF/SWC exploration etc.” – http://www.flashdevelop.org/

With Completion and Generation Flash Develop understands AS3 source. Indeed, parsing AS3 is done via an Antlr3 grammar: http://flashdevelop.googlecode.com/svn-history/r1978/trunk/FD4/External/Plugins/CodeFormatter/ANTLR/AS3_GRAMMAR/AS3_ex.g3

Checking the source code, https://code.google.com/p/flashdevelop/, Flash Develop is C# which, while most say it shouldn’t, could compromise the portability requirement.

Second thought: Antlr3 Given the AS3 grammar is published, anyone else using it? Yes, http://flexformatter.cvs.sourceforge.net/ a pretty printer for ActionScript written in Java.

Third and almost final thought: PlayScript http://playscript.github.io/, part of the Mono Framework. All of the above has some issues with source material, needed manual editing, not “Parse all ActionScript without modifying the source”. Adobe has published open source projects that parse ActionScript. Given their kinda blessed position would seem like a stronger staring point.