This project has a new home at google code
There are lots of new updates ... http://code.google.com/p/as2dacperl
AS2NDAC (AS2NaturalDocsAutoComment)
A Perl script which automatically creates NaturalDocs comments for AS2.0 Class and Interface .as files. It's based on G.Wygonik's JSFL AS2.0 autodocumentor for NaturalDocs. This alpha release creates useable comments, however, no additional options are supported, see below for proposed roadmap
The AS2NDAC project is listed on OSFlash.org
Current Functionality
Presently the test version expects 2 filenames, inputFile & outputFile. It then parses the inputFile, creates the NaturalDocs compatible documentation comments and writes the outputFile.
The following auto commenting takes place...:
Interface definitions
Only interface declarations not directly preceeded by a block comment are parsed.
- interface name
- description stub
- extended interface
- ToDo Stub
- Note Stub
- Version stub
- Author stub
Interface method declarations
Only interface methods declarations not preceeded by a block comment are parsed.
- method name
- description stub
- parameter list
- parameter name
- data type
- parameter description stub
- return type
Class definitions
Only class declarations not preceeded by a block comment are parsed.
- class name
- description stub
- dynamic and intrinsic attributes are noted in the description
- extended super class
- implemented interfaces
- Usage stub
- Example stub
- ToDo Stub
- Note Stub
- Version stub
- Author stub
Class method declarations
Only class methods declarations not preceeded by a block comment are parsed. Functions declared within other methods are not parsed, also functions declared as properties and defined inline will also fail to document correctly.
E.g. public var testFunction:Function = function(){ // my code }
Would fail.
- method name
- description stub
- member access (private, public, static)
- parameter list
- parameter name
- data type
- parameter description stub
- return type
Class property declarations
Only class properties not preceeded by a block comment are parsed. Properties declared within methods are not parsed, also functions declared as properties and defined inline will also fail to document correctly.
E.g. public var testFunction:Function = function(){ // my code }
Would fail.
- property/var name
- description stub
- member access (private, public, static)
- data type
Click here for a short example class autodocumented with the script.
Roadmap
The following features are under consideration for future releases, there are no updates planned at present. (I'm too busy! Sorry!)
Config File - Various options specified in a (XML based) configuration file.
- Default author & version
- Default documentation stubs
- Structure specific documentation options
- Miscellaneous documentation options
Multiple filename & input/output folder - I will be adding better filename support so that you can parse a set of files without writing an additional .bat script. This will be done when the code parsing has been tested properly and the feature set for single file parsing is stable.
C# .NET based GUI version. - This is currently in development.
Known issues
- UTF8 BOM - UTF BOM files seem to cause some problems.
- Multiline method definitions - When functions are defined over multiple lines the complete parameter list and return type are not found, since documentation comments will only include whatever is on the same line as the function keyword. You may be in the habit of creating multi-line parameter lists, (I was) and this will be addressed in a later version.

7 Comments Add your own
1. mentalaxis » as2nda&hellip | October 29th, 2005 at 8:02 pm
[...] AS2NDAC [...]
2. mentalaxis » ASDoc &hellip | August 14th, 2006 at 9:55 pm
[...] If you’ve been using Flash or Flex in any serious way you’re probably familiar with similar products such as NaturalDocs (also see AS2NDAC) and no doubt you’d probably given up on the idea that ASDoc would ever be publicly released… I get more pleased about the direction Adobe is taking with Flash and labs.adobe every day. [...]
3. Jason Milkins | August 15th, 2006 at 3:13 am
I have an updated version of AS2NDAC which I need to test a little.
It adds features like JavaDoc generation and a few configuration options.
4. Myles | October 30th, 2006 at 9:06 pm
Thanks for the cool utility. I’ve used the following command to run from cygwin and autocomment an entire package hierarchy
find . -type f -name ‘*.as’ | xargs -i as2ndautocomment.pl {} {}
I also created a little tool for eclipse that will run naturaldocs on directories, if anyone is interested I can show how it can be really quickly setup. I have minimal experience with eclipse so an experienced user could surely make it better.
5. Script-it.blog&hellip | June 29th, 2007 at 2:10 pm
[...] een lijst van gevonden automates. A3D NaturalDocs Gmodeler ZenDoc AS2NDAC [...]
6. Jason Milkins | March 13th, 2008 at 1:18 am
find . -type f -name ‘*.as’ -exec as2ndautocomment.pl {} {} \;
Works better
7. Jason Milkins | March 13th, 2008 at 1:20 am
Go visit the new homepage at http://code.google.com/p/as2dacperl
There is a fully re-written version there in preparation for the AS3.0 version.
Leave a Comment
You must be logged in to post a comment .
Trackback this post | Subscribe to the comments via RSS Feed