You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Michael Schmalle <te...@gmail.com> on 2015/06/04 17:12:41 UTC

[FalconJX] Parse JavaScript extern files to create ActionScript API

Hey,

Well I am a gluten for punishment but, I love parsers and translations so
without further ado;

>From this source file;

https://github.com/google/closure-compiler/blob/master/externs/w3c_dom1.js

I am creating the following ActionScript, long but worth looking at. :)

I found a lot of extern files, so this is how we do it in the start. We
could even defined externs ourselves, the benefit is, one file of a bunch
of javascript classes translates into a bunch of ActionScript files.

This is grabbing docs and analyzing types. More to test but I am using the
Rhino parser and AST, made my own walker and wrote the logic to assemble
class, field and method definitions while the root AST is walked.

So now, if you want a creatjs API, just follow GCC extern file template and
you will have it.

Mike

--------------------------------------------------------------------
ActionScript output, will be individual files
--------------------------------------------------------------------



package dom {

public Document extends Node {

    native public function Document();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-implementation
     */
    native public var implementation:DOMImplementation;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-doctype
     */
    native public var doctype:DocumentType;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-documentElement
     */
    native public var documentElement:Element;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createComment
     */
    native public function createComment(data:String):Comment;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-A6C9094
     */
    native public function getElementsByTagName(tagname:String):NodeList;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createEntityReference
     */
    native public function
createEntityReference(name:String):EntityReference;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createAttribute
     */
    native public function createAttribute(name:String):Attr;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createTextNode
     */
    native public function createTextNode(data:Object):Text;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createCDATASection
     */
    native public function createCDATASection(data:String):CDATASection;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createProcessingInstruction
     */
    native public function createProcessingInstruction(target:String,
data:String):ProcessingInstruction;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createElement
     * @see
http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-instantiate
     */
    native public function createElement(tagName:String,
opt_typeExtension:String = null):Element;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createDocumentFragment
     */
    native public function createDocumentFragment():DocumentFragment;

}
}

package dom {

public CharacterData extends Node {

    native public function CharacterData();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7D61178C
     */
    native public var length:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-72AB8359
     */
    native public var data:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E5CBA7FB
     */
    native public function replaceData(offset:Number, count:Number,
arg:Number):void;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7C603781
     */
    native public function deleteData(offset:Number, count:Number):void;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6531BCCF
     */
    native public function substringData(offset:Number,
count:Number):String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-3EDB695F
     */
    native public function insertData(offset:Number, arg:Number):void;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-32791A2F
     */
    native public function appendData(arg:String):void;

}
}

package dom {

public DocumentFragment extends Node {

    native public function DocumentFragment();

}
}

package dom {

public Attr extends Node {

    native public function Attr();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-862529273
     */
    native public var specified:Boolean;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1112119403
     */
    native public var name:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-221662474
     */
    native public var value:String;

}
}

package dom {

public Comment extends CharacterData {

    native public function Comment();

}
}

package dom {

public Notation extends Node {

    native public function Notation();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-54F2B4D0
     */
    native public var publicId:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E8AAB1D0
     */
    native public var systemId:String;

}
}

package dom {

public NamedNodeMap {

    native public function NamedNodeMap();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6D0FB19E
     */
    native public var length:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1074577549
     */
    native public function getNamedItem(name:String):Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-349467F9
     */
    native public function item(index:Number):Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1025163788
     */
    native public function setNamedItem(arg:Node):Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D58B193
     */
    native public function removeNamedItem(name:String):Node;

}
}

package dom {

public CDATASection extends Text {

    native public function CDATASection();

}
}

package dom {

public Text extends CharacterData {

    native public function Text();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-38853C1D
     */
    native public function splitText(offset:Number):Text;

}
}

package dom {

public Node implements EventTarget {

    native public function Node();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var TEXT_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var ENTITY_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var DOCUMENT_TYPE_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var NOTATION_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var CDATA_SECTION_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var DOCUMENT_FRAGMENT_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var COMMENT_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var PROCESSING_INSTRUCTION_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var XPATH_NAMESPACE_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var ELEMENT_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var ENTITY_REFERENCE_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var ATTRIBUTE_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
     */
    native public static var DOCUMENT_NODE:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-previousSibling
     */
    native public var previousSibling:Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-parentNode
     */
    native public var parentNode:Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeValue
     */
    native public var nodeValue:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeName
     */
    native public var nodeName:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-firstChild
     */
    native public var firstChild:Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-childNodes
     */
    native public var childNodes:NodeList;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-attributes
     */
    native public var attributes:NamedNodeMap;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeType
     */
    native public var nodeType:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-ownerDocument
     */
    native public var ownerDocument:Document;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nextSibling
     */
    native public var nextSibling:Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-lastChild
     */
    native public var lastChild:Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeChild
     */
    native public function removeChild(oldChild:Node):Node;

    /**
     */
    native public override function addEventListener(type:Boolean,
listener:Boolean, opt_useCapture:Boolean = null):Object;

    /**
     */
    native public override function dispatchEvent(evt:Object):Object;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-insertBefore
     */
    native public function insertBefore(newChild:Node, refChild:Node):Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-hasChildNodes
     */
    native public function hasChildNodes():Boolean;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-appendChild
     */
    native public function appendChild(newChild:Node):Node;

    /**
     */
    native public override function removeEventListener(type:Boolean,
listener:Boolean, opt_useCapture:Boolean = null):Object;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-replaceChild
     */
    native public function replaceChild(newChild:Node, oldChild:Node):Node;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-cloneNode
     */
    native public function cloneNode(deep:Boolean):Node;

}
}

package dom {

public DOMException {

    native public function DOMException();

}
}

package dom {

public DOMImplementation {

    native public function DOMImplementation();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5CED94D7
     */
    native public function hasFeature(feature:String,
version:String):Boolean;

}
}

package dom {

public ProcessingInstruction extends Node {

    native public function ProcessingInstruction();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1478689192
     */
    native public var target:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-837822393
     */
    native public var data:String;

}
}

package dom {

public DocumentType extends Node {

    native public function DocumentType();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D46829EF
     */
    native public var notations:NamedNodeMap;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1844763134
     */
    native public var name:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1788794630
     */
    native public var entities:NamedNodeMap;

}
}

package dom {

public ExceptionCode {

    native public function ExceptionCode();

}
}

package dom {

public Window implements EventTarget {

    native public function Window();

    /**
     */
    native public var onmousewheel:Function;

    /**
     */
    native public var onunload:Function;

    /**
     */
    native public var onerror:Function;

    /**
     */
    native public var onhashchange:Function;

    /**
     */
    native public var onpopstate:Function;

    /**
     */
    native public var onresize:Function;

    /**
     */
    native public var onblur:Function;

    /**
     */
    native public var onmouseup:Function;

    /**
     */
    native public var onpaint:Function;

    /**
     */
    native public var onclose:Function;

    /**
     */
    native public var Window:Object;

    /**
     */
    native public var onbeforeunload:Function;

    /**
     */
    native public var onmousemove:Function;

    /**
     */
    native public var oncontextmenu:Function;

    /**
     */
    native public var ondblclick:Function;

    /**
     */
    native public var onmouseout:Function;

    /**
     */
    native public var onkeyup:Function;

    /**
     */
    native public var onfocus:Function;

    /**
     */
    native public var onkeydown:Function;

    /**
     */
    native public var onkeypress:Function;

    /**
     */
    native public var onsubmit:Function;

    /**
     */
    native public var onchange:Function;

    /**
     */
    native public var onabort:Function;

    /**
     */
    native public var onreset:Function;

    /**
     */
    native public var onmouseover:Function;

    /**
     */
    native public var onselect:Function;

    /**
     */
    native public var onload:Function;

    /**
     */
    native public var onwheel:Function;

    /**
     */
    native public var onscroll:Function;

    /**
     */
    native public var onclick:Function;

    /**
     */
    native public var ondragdrop:Function;

    /**
     */
    native public var onmousedown:Function;

    /**
     */
    native public override function addEventListener(type:Boolean,
listener:Boolean, opt_useCapture:Boolean = null):Object;

    /**
     */
    native public override function dispatchEvent(evt:Object):Object;

    /**
     */
    native public override function removeEventListener(type:Boolean,
listener:Boolean, opt_useCapture:Boolean = null):Object;

}
}

package dom {

public EntityReference extends Node {

    native public function EntityReference();

}
}

package dom {

public NodeList {

    native public function NodeList();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-203510337
     */
    native public var length:Number;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-844377136
     */
    native public function item(index:Number):Node;

}
}

package dom {

public Element extends Node {

    native public function Element();

    /**
     */
    native public var onmousewheel:Function;

    /**
     */
    native public var oncompositionstart:Function;

    /**
     */
    native public var onunload:Function;

    /**
     */
    native public var onerror:Function;

    /**
     */
    native public var onresize:Function;

    /**
     */
    native public var onmouseup:Function;

    /**
     */
    native public var onblur:Function;

    /**
     */
    native public var onbeforeinput:Function;

    /**
     */
    native public var onmousemove:Function;

    /**
     */
    native public var onbeforeunload:Function;

    /**
     */
    native public var oncontextmenu:Function;

    /**
     */
    native public var onfocusout:Function;

    /**
     */
    native public var ondblclick:Function;

    /**
     */
    native public var onmouseout:Function;

    /**
     */
    native public var onkeyup:Function;

    /**
     */
    native public var oncompositionend:Function;

    /**
     */
    native public var onfocus:Function;

    /**
     */
    native public var onkeydown:Function;

    /**
     */
    native public var onkeypress:Function;

    /**
     */
    native public var onsubmit:Function;

    /**
     */
    native public var onchange:Function;

    /**
     */
    native public var onabort:Function;

    /**
     */
    native public var onreset:Function;

    /**
     */
    native public var onmouseover:Function;

    /**
     */
    native public var oninput:Function;

    /**
     */
    native public var oncompositionupdate:Function;

    /**
     */
    native public var onselect:Function;

    /**
     */
    native public var oncut:Function;

    /**
     */
    native public var ontextinput:Function;

    /**
     */
    native public var onload:Function;

    /**
     */
    native public var onwheel:Function;

    /**
     */
    native public var onpaste:Function;

    /**
     */
    native public var onscroll:Function;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-tagName
     */
    native public var tagName:String;

    /**
     */
    native public var onclick:Function;

    /**
     */
    native public var onmousedown:Function;

    /**
     */
    native public var oncopy:Function;

    /**
     */
    native public var onfocusin:Function;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttributeNode
     */
    native public function removeAttributeNode(oldAttr:Attr):Attr;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1938918D
     */
    native public function getElementsByTagName(tagname:String):NodeList;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttributeNode
     */
    native public function getAttributeNode(name:String):Attr;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttributeNode
     */
    native public function setAttributeNode(newAttr:Attr):Attr;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttribute
     */
    native public function removeAttribute(name:String):void;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttribute
     */
    native public function setAttribute(name:String, value:String):void;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttribute
     * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
     */
    native public function getAttribute(name:String, opt_flags:String =
null):String;

}
}

package dom {

public Entity extends Node {

    native public function Entity();

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7303025
     */
    native public var publicId:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7C29F3E
     */
    native public var systemId:String;

    /**
     * @see
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6ABAEB38
     */
    native public var notationName:String;

}
}

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Josh Tynjala <jo...@gmail.com>.
Alex,

es3.js and es5.js from the same directory look pretty promising:

https://github.com/google/closure-compiler/blob/master/externs/es3.js
https://github.com/google/closure-compiler/blob/master/externs/es5.js

- Josh

On Thu, Jun 4, 2015 at 9:19 AM, Alex Harui <ah...@adobe.com> wrote:

> Awesome!
>
> So we can forget d.ts files and IDL files, right?  Plus at least
> w3c_dom1.js is Apache Licensed.
>
> I was actually going to spend some time today on the JS primitives swc
> (Number, String, Array).  Have you seen any externs file for those?  I
> doubt it exists.
>
> -Alex
>
> On 6/4/15, 8:12 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Hey,
> >
> >Well I am a gluten for punishment but, I love parsers and translations so
> >without further ado;
> >
> >From this source file;
> >
> >
> https://github.com/google/closure-compiler/blob/master/externs/w3c_dom1.js
> >
> >I am creating the following ActionScript, long but worth looking at. :)
> >
> >I found a lot of extern files, so this is how we do it in the start. We
> >could even defined externs ourselves, the benefit is, one file of a bunch
> >of javascript classes translates into a bunch of ActionScript files.
> >
> >This is grabbing docs and analyzing types. More to test but I am using the
> >Rhino parser and AST, made my own walker and wrote the logic to assemble
> >class, field and method definitions while the root AST is walked.
> >
> >So now, if you want a creatjs API, just follow GCC extern file template
> >and
> >you will have it.
> >
> >Mike
> >
> >--------------------------------------------------------------------
> >ActionScript output, will be individual files
> >--------------------------------------------------------------------
> >
> >
> >
> >package dom {
> >
> >public Document extends Node {
> >
> >    native public function Document();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-implementation
> >     */
> >    native public var implementation:DOMImplementation;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-doctype
> >     */
> >    native public var doctype:DocumentType;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-documentElement
> >     */
> >    native public var documentElement:Element;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createComment
> >     */
> >    native public function createComment(data:String):Comment;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >A6C9094
> >     */
> >    native public function getElementsByTagName(tagname:String):NodeList;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createEntityReference
> >     */
> >    native public function
> >createEntityReference(name:String):EntityReference;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createAttribute
> >     */
> >    native public function createAttribute(name:String):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createTextNode
> >     */
> >    native public function createTextNode(data:Object):Text;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createCDATASection
> >     */
> >    native public function createCDATASection(data:String):CDATASection;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createProcessingInstruction
> >     */
> >    native public function createProcessingInstruction(target:String,
> >data:String):ProcessingInstruction;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createElement
> >     * @see
> >
> http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-int
> >erface-to-instantiate
> >     */
> >    native public function createElement(tagName:String,
> >opt_typeExtension:String = null):Element;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createDocumentFragment
> >     */
> >    native public function createDocumentFragment():DocumentFragment;
> >
> >}
> >}
> >
> >package dom {
> >
> >public CharacterData extends Node {
> >
> >    native public function CharacterData();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >7D61178C
> >     */
> >    native public var length:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >72AB8359
> >     */
> >    native public var data:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >E5CBA7FB
> >     */
> >    native public function replaceData(offset:Number, count:Number,
> >arg:Number):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >7C603781
> >     */
> >    native public function deleteData(offset:Number, count:Number):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >6531BCCF
> >     */
> >    native public function substringData(offset:Number,
> >count:Number):String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >3EDB695F
> >     */
> >    native public function insertData(offset:Number, arg:Number):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >32791A2F
> >     */
> >    native public function appendData(arg:String):void;
> >
> >}
> >}
> >
> >package dom {
> >
> >public DocumentFragment extends Node {
> >
> >    native public function DocumentFragment();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Attr extends Node {
> >
> >    native public function Attr();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >862529273
> >     */
> >    native public var specified:Boolean;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1112119403
> >     */
> >    native public var name:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >221662474
> >     */
> >    native public var value:String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Comment extends CharacterData {
> >
> >    native public function Comment();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Notation extends Node {
> >
> >    native public function Notation();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >54F2B4D0
> >     */
> >    native public var publicId:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >E8AAB1D0
> >     */
> >    native public var systemId:String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public NamedNodeMap {
> >
> >    native public function NamedNodeMap();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >6D0FB19E
> >     */
> >    native public var length:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1074577549
> >     */
> >    native public function getNamedItem(name:String):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >349467F9
> >     */
> >    native public function item(index:Number):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1025163788
> >     */
> >    native public function setNamedItem(arg:Node):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D58B193
> >     */
> >    native public function removeNamedItem(name:String):Node;
> >
> >}
> >}
> >
> >package dom {
> >
> >public CDATASection extends Text {
> >
> >    native public function CDATASection();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Text extends CharacterData {
> >
> >    native public function Text();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >38853C1D
> >     */
> >    native public function splitText(offset:Number):Text;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Node implements EventTarget {
> >
> >    native public function Node();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var TEXT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ENTITY_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var DOCUMENT_TYPE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var NOTATION_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var CDATA_SECTION_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var DOCUMENT_FRAGMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var COMMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var PROCESSING_INSTRUCTION_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var XPATH_NAMESPACE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ELEMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ENTITY_REFERENCE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ATTRIBUTE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var DOCUMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-previousSibling
> >     */
> >    native public var previousSibling:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-parentNode
> >     */
> >    native public var parentNode:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nodeValue
> >     */
> >    native public var nodeValue:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nodeName
> >     */
> >    native public var nodeName:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-firstChild
> >     */
> >    native public var firstChild:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-childNodes
> >     */
> >    native public var childNodes:NodeList;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-attributes
> >     */
> >    native public var attributes:NamedNodeMap;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nodeType
> >     */
> >    native public var nodeType:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-ownerDocument
> >     */
> >    native public var ownerDocument:Document;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nextSibling
> >     */
> >    native public var nextSibling:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-lastChild
> >     */
> >    native public var lastChild:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-removeChild
> >     */
> >    native public function removeChild(oldChild:Node):Node;
> >
> >    /**
> >     */
> >    native public override function addEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >    /**
> >     */
> >    native public override function dispatchEvent(evt:Object):Object;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-insertBefore
> >     */
> >    native public function insertBefore(newChild:Node,
> >refChild:Node):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-hasChildNodes
> >     */
> >    native public function hasChildNodes():Boolean;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-appendChild
> >     */
> >    native public function appendChild(newChild:Node):Node;
> >
> >    /**
> >     */
> >    native public override function removeEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-replaceChild
> >     */
> >    native public function replaceChild(newChild:Node,
> >oldChild:Node):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-cloneNode
> >     */
> >    native public function cloneNode(deep:Boolean):Node;
> >
> >}
> >}
> >
> >package dom {
> >
> >public DOMException {
> >
> >    native public function DOMException();
> >
> >}
> >}
> >
> >package dom {
> >
> >public DOMImplementation {
> >
> >    native public function DOMImplementation();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >5CED94D7
> >     */
> >    native public function hasFeature(feature:String,
> >version:String):Boolean;
> >
> >}
> >}
> >
> >package dom {
> >
> >public ProcessingInstruction extends Node {
> >
> >    native public function ProcessingInstruction();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1478689192
> >     */
> >    native public var target:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >837822393
> >     */
> >    native public var data:String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public DocumentType extends Node {
> >
> >    native public function DocumentType();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D46829EF
> >     */
> >    native public var notations:NamedNodeMap;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1844763134
> >     */
> >    native public var name:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1788794630
> >     */
> >    native public var entities:NamedNodeMap;
> >
> >}
> >}
> >
> >package dom {
> >
> >public ExceptionCode {
> >
> >    native public function ExceptionCode();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Window implements EventTarget {
> >
> >    native public function Window();
> >
> >    /**
> >     */
> >    native public var onmousewheel:Function;
> >
> >    /**
> >     */
> >    native public var onunload:Function;
> >
> >    /**
> >     */
> >    native public var onerror:Function;
> >
> >    /**
> >     */
> >    native public var onhashchange:Function;
> >
> >    /**
> >     */
> >    native public var onpopstate:Function;
> >
> >    /**
> >     */
> >    native public var onresize:Function;
> >
> >    /**
> >     */
> >    native public var onblur:Function;
> >
> >    /**
> >     */
> >    native public var onmouseup:Function;
> >
> >    /**
> >     */
> >    native public var onpaint:Function;
> >
> >    /**
> >     */
> >    native public var onclose:Function;
> >
> >    /**
> >     */
> >    native public var Window:Object;
> >
> >    /**
> >     */
> >    native public var onbeforeunload:Function;
> >
> >    /**
> >     */
> >    native public var onmousemove:Function;
> >
> >    /**
> >     */
> >    native public var oncontextmenu:Function;
> >
> >    /**
> >     */
> >    native public var ondblclick:Function;
> >
> >    /**
> >     */
> >    native public var onmouseout:Function;
> >
> >    /**
> >     */
> >    native public var onkeyup:Function;
> >
> >    /**
> >     */
> >    native public var onfocus:Function;
> >
> >    /**
> >     */
> >    native public var onkeydown:Function;
> >
> >    /**
> >     */
> >    native public var onkeypress:Function;
> >
> >    /**
> >     */
> >    native public var onsubmit:Function;
> >
> >    /**
> >     */
> >    native public var onchange:Function;
> >
> >    /**
> >     */
> >    native public var onabort:Function;
> >
> >    /**
> >     */
> >    native public var onreset:Function;
> >
> >    /**
> >     */
> >    native public var onmouseover:Function;
> >
> >    /**
> >     */
> >    native public var onselect:Function;
> >
> >    /**
> >     */
> >    native public var onload:Function;
> >
> >    /**
> >     */
> >    native public var onwheel:Function;
> >
> >    /**
> >     */
> >    native public var onscroll:Function;
> >
> >    /**
> >     */
> >    native public var onclick:Function;
> >
> >    /**
> >     */
> >    native public var ondragdrop:Function;
> >
> >    /**
> >     */
> >    native public var onmousedown:Function;
> >
> >    /**
> >     */
> >    native public override function addEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >    /**
> >     */
> >    native public override function dispatchEvent(evt:Object):Object;
> >
> >    /**
> >     */
> >    native public override function removeEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >}
> >}
> >
> >package dom {
> >
> >public EntityReference extends Node {
> >
> >    native public function EntityReference();
> >
> >}
> >}
> >
> >package dom {
> >
> >public NodeList {
> >
> >    native public function NodeList();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >203510337
> >     */
> >    native public var length:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >844377136
> >     */
> >    native public function item(index:Number):Node;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Element extends Node {
> >
> >    native public function Element();
> >
> >    /**
> >     */
> >    native public var onmousewheel:Function;
> >
> >    /**
> >     */
> >    native public var oncompositionstart:Function;
> >
> >    /**
> >     */
> >    native public var onunload:Function;
> >
> >    /**
> >     */
> >    native public var onerror:Function;
> >
> >    /**
> >     */
> >    native public var onresize:Function;
> >
> >    /**
> >     */
> >    native public var onmouseup:Function;
> >
> >    /**
> >     */
> >    native public var onblur:Function;
> >
> >    /**
> >     */
> >    native public var onbeforeinput:Function;
> >
> >    /**
> >     */
> >    native public var onmousemove:Function;
> >
> >    /**
> >     */
> >    native public var onbeforeunload:Function;
> >
> >    /**
> >     */
> >    native public var oncontextmenu:Function;
> >
> >    /**
> >     */
> >    native public var onfocusout:Function;
> >
> >    /**
> >     */
> >    native public var ondblclick:Function;
> >
> >    /**
> >     */
> >    native public var onmouseout:Function;
> >
> >    /**
> >     */
> >    native public var onkeyup:Function;
> >
> >    /**
> >     */
> >    native public var oncompositionend:Function;
> >
> >    /**
> >     */
> >    native public var onfocus:Function;
> >
> >    /**
> >     */
> >    native public var onkeydown:Function;
> >
> >    /**
> >     */
> >    native public var onkeypress:Function;
> >
> >    /**
> >     */
> >    native public var onsubmit:Function;
> >
> >    /**
> >     */
> >    native public var onchange:Function;
> >
> >    /**
> >     */
> >    native public var onabort:Function;
> >
> >    /**
> >     */
> >    native public var onreset:Function;
> >
> >    /**
> >     */
> >    native public var onmouseover:Function;
> >
> >    /**
> >     */
> >    native public var oninput:Function;
> >
> >    /**
> >     */
> >    native public var oncompositionupdate:Function;
> >
> >    /**
> >     */
> >    native public var onselect:Function;
> >
> >    /**
> >     */
> >    native public var oncut:Function;
> >
> >    /**
> >     */
> >    native public var ontextinput:Function;
> >
> >    /**
> >     */
> >    native public var onload:Function;
> >
> >    /**
> >     */
> >    native public var onwheel:Function;
> >
> >    /**
> >     */
> >    native public var onpaste:Function;
> >
> >    /**
> >     */
> >    native public var onscroll:Function;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-tagName
> >     */
> >    native public var tagName:String;
> >
> >    /**
> >     */
> >    native public var onclick:Function;
> >
> >    /**
> >     */
> >    native public var onmousedown:Function;
> >
> >    /**
> >     */
> >    native public var oncopy:Function;
> >
> >    /**
> >     */
> >    native public var onfocusin:Function;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-removeAttributeNode
> >     */
> >    native public function removeAttributeNode(oldAttr:Attr):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1938918D
> >     */
> >    native public function getElementsByTagName(tagname:String):NodeList;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-getAttributeNode
> >     */
> >    native public function getAttributeNode(name:String):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-setAttributeNode
> >     */
> >    native public function setAttributeNode(newAttr:Attr):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-removeAttribute
> >     */
> >    native public function removeAttribute(name:String):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-setAttribute
> >     */
> >    native public function setAttribute(name:String, value:String):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-getAttribute
> >     * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
> >     */
> >    native public function getAttribute(name:String, opt_flags:String =
> >null):String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Entity extends Node {
> >
> >    native public function Entity();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D7303025
> >     */
> >    native public var publicId:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D7C29F3E
> >     */
> >    native public var systemId:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >6ABAEB38
> >     */
> >    native public var notationName:String;
> >
> >}
> >}
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
On Thu, Jun 4, 2015 at 1:28 PM, Josh Tynjala <jo...@gmail.com> wrote:

> As far as packages go, I think if a class is top-level in JavaScript, it
> should be the same in ActionScript. At least by default.
>
>
I only added the dom because I wasn't really thinking about it.

What about local name collisions with users Actionscript? We should just
not care?

Mike




> - Josh
>
> On Thu, Jun 4, 2015 at 10:20 AM, Alex Harui <ah...@adobe.com> wrote:
>
> >
> >
> > On 6/4/15, 9:53 AM, "Michael Schmalle" <te...@gmail.com>
> wrote:
> >
> > >Yeah to be honest my main concern was these SWCs. When I started testing
> > >the emitter for DOM stuff like I showed the other day, I couldn't
> > >"believe"
> > >in it because I was using the Randori stuff.
> > >
> > >Now with this, the first step is actually real and under the project's
> > >control, all of it.
> > >
> > >1. I'm going to use packages, what should the package be for the DOM.swc
> > >and JS.swc(was builtin.swc)?
> >
> > If you mean the AS package for the classes in these SWCs, I have to admit
> > I was a bit surprised to see in the AS output example that Document in a
> > “dom” package.  I would think these two SWCs would not have their classes
> > in any AS package (IOW, “package {“).  Aren’t classes like Document
> > effectively global just like Math?
> >
> > >2. I am using Rhino and QDox(hack for getting an easy parser for the
> > >jsdocs), so I guess a download jar entry is going to have to be added to
> > >the build script? I am not good at ant.
> >
> > Rhino 1.74 or later is MPL.  If we don’t need an earlier version then yes
> > we can download it and Qdox (which is AL).  Just check in code that uses
> > these jars (but not the jars) and I’ll get the build scripts to download
> > them.
> >
> >
> > >3. How is the source files going to be handled for the extern files?
> > >Download them during build and then run the tool?
> >
> > IMO, yes.  But we might bundle them in the source release package.
> >
> > >4. I think I am going to utilize that JavaScript metadata tag for these
> so
> > >it's easy to resolve stuff during compile.
> >
> > I guess that’s ok with me.  Why do you not want to introduce new metadata
> > keywords and/or use asdoc similar to how goog is using jsdoc?  I’d worry
> > about a JavaScript metadata statement getting longer and longer as we add
> > more attributes to it.  Having each attribute be a keyword or asdoc/jsdoc
> > tag seems like it would be more manageable?
> >
> > -Alex
> >
> >
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Josh Tynjala <jo...@gmail.com>.
As far as packages go, I think if a class is top-level in JavaScript, it
should be the same in ActionScript. At least by default.

- Josh

On Thu, Jun 4, 2015 at 10:20 AM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 6/4/15, 9:53 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Yeah to be honest my main concern was these SWCs. When I started testing
> >the emitter for DOM stuff like I showed the other day, I couldn't
> >"believe"
> >in it because I was using the Randori stuff.
> >
> >Now with this, the first step is actually real and under the project's
> >control, all of it.
> >
> >1. I'm going to use packages, what should the package be for the DOM.swc
> >and JS.swc(was builtin.swc)?
>
> If you mean the AS package for the classes in these SWCs, I have to admit
> I was a bit surprised to see in the AS output example that Document in a
> “dom” package.  I would think these two SWCs would not have their classes
> in any AS package (IOW, “package {“).  Aren’t classes like Document
> effectively global just like Math?
>
> >2. I am using Rhino and QDox(hack for getting an easy parser for the
> >jsdocs), so I guess a download jar entry is going to have to be added to
> >the build script? I am not good at ant.
>
> Rhino 1.74 or later is MPL.  If we don’t need an earlier version then yes
> we can download it and Qdox (which is AL).  Just check in code that uses
> these jars (but not the jars) and I’ll get the build scripts to download
> them.
>
>
> >3. How is the source files going to be handled for the extern files?
> >Download them during build and then run the tool?
>
> IMO, yes.  But we might bundle them in the source release package.
>
> >4. I think I am going to utilize that JavaScript metadata tag for these so
> >it's easy to resolve stuff during compile.
>
> I guess that’s ok with me.  Why do you not want to introduce new metadata
> keywords and/or use asdoc similar to how goog is using jsdoc?  I’d worry
> about a JavaScript metadata statement getting longer and longer as we add
> more attributes to it.  Having each attribute be a keyword or asdoc/jsdoc
> tag seems like it would be more manageable?
>
> -Alex
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
> I think IIRC, I actually tried a simple test case and it would work.

I meant wouldn't work, I could not get it to work ever.

Mike

On Thu, Jun 4, 2015 at 2:36 PM, Michael Schmalle <te...@gmail.com>
wrote:

> BTW, the loop always happens at the VERY end of the comment, so when you
> get to the end the(the last call of next() that should return null);
>
> tok = tokenizer.next();
>
> never returns, it gets stuck trying to exit.
>
> Mike
>
> On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle <
> teotigraphixllc@gmail.com> wrote:
>
>> I posted about this a couple weeks ago and I tried recompiling with JFlex
>> 1.5 I think, the older version and still had the problem.
>>
>> Maybe I messed up something but I tried with my same asdoc code when I
>> fixed the build for the FlexJS asdocs. I wanted to see it work with my
>> version of a documentor.
>>
>> I think IIRC, I actually tried a simple test case and it would work.
>>
>> I have code that uses the tokenizer;
>>
>>
>>     public void compile()
>>     {
>>         if (token == null)
>>             return;
>>
>>         String data = token.getText();
>>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>>         tokenizer.setReader(new StringReader(data));
>>         ASDocToken tok = tokenizer.next();
>>         boolean foundDescription = false;
>>         DocTag pendingTag = null;
>>
>>         try
>>         {
>>             while (tok != null)
>>             {
>>                 if (!foundDescription
>>                         && tok.getType() == ASTokenTypes.TOKEN_ASDOC_TEXT)
>>                 {
>>                     description = tok.getText();
>>                 }
>>                 else
>>                 {
>>                     // do tags
>>                     if (tok.getType() == ASTokenTypes.TOKEN_ASDOC_TAG)
>>                     {
>>                         if (pendingTag != null)
>>                         {
>>                             addTag(pendingTag);
>>                             pendingTag = null;
>>                         }
>>                         pendingTag = new
>> DocTag(tok.getText().substring(1));
>>                     }
>>                     else if (tok.getType() ==
>> ASTokenTypes.TOKEN_ASDOC_TEXT)
>>                     {
>>                         pendingTag.setDescription(tok.getText());
>>                         addTag(pendingTag);
>>                         pendingTag = null;
>>                     }
>>                 }
>>
>>                 foundDescription = true;
>>
>>                 tok = tokenizer.next();
>>             }
>>         }
>>         catch (Exception e)
>>         {
>>             e.printStackTrace();
>>         }
>>     }
>>
>> Mike
>>
>>
>> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>>>
>>>
>>> On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com>
>>> wrote:
>>> >>Hmm.  Maybe I should spend some time looking into fixing
>>> ASDocTokenizer?
>>> >> Was the problem that it didn’t work on every AS file we current have?
>>> >>
>>> >
>>> >
>>> >It doesn't work on anything, there is an infinite loop in the scanner
>>> that
>>> >is created by JFlex, the RawASDocTokenizer is broken.
>>> >
>>> >What is weird is I was using the SAME code base when I wrote the asdoc
>>> >documenter I have 2 years ago and it worked fine.
>>>
>>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What setup
>>> did
>>> you have for trying it?  Did you run it on the Flex SDK or FlexJS SDK or
>>> did it even loop on a simple test case?
>>>
>>> -Alex
>>>
>>>
>>
>

Re: TLF Performance Issue fix?

Posted by Harbs <ha...@gmail.com>.
Yes. I hope to have some time this week.

@Jason, help on this would be awesome.

On Jun 6, 2015, at 12:55 AM, Alex Harui <ah...@adobe.com> wrote:

> Harbs, will you have time to look at the table code’s impact on
> performance?
> 
> @Jason.  You can get the repos and follow the README file instructions to
> get set up.   Here is one wiki page that might help [1].  Or you can get
> the code from our github mirrors and submit pull requests as well.
> 
> -Alex
> 
> [1] 
> https://cwiki.apache.org/confluence/display/FLEX/Git+for+Apache+Flex+Guide
> 
> On 6/5/15, 12:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:
> 
>> Hey guys, we are currently stuck on SDK 4.13 due to the TLF performance
>> issue and the huge reliance on TLF in our Dedoose.  Have there been any
>> updates on this issue? Are there any projected updates on this issue?
>> 
>> Separately, I would like to get my hands a little dirty here if needed.
>> TLF is extremely important to our product, and in the near future we will
>> have to implement some required feature.  I know TLF is extremely
>> challenging, but it is what it is.   Is there a guide somewhere on
>> setting up the Flex SDK, and how to work with the rest of the team in
>> solving issues, submitting changes.  I know nothing about that particular
>> process but would like to help.  In addition our team has created some
>> components that I feel might be valuable to the community that we would
>> like to donate. 
>> 
>> ~ JT
> 


Re: TLF Performance Issue fix?

Posted by Alex Harui <ah...@adobe.com>.
Harbs, will you have time to look at the table code’s impact on
performance?

@Jason.  You can get the repos and follow the README file instructions to
get set up.   Here is one wiki page that might help [1].  Or you can get
the code from our github mirrors and submit pull requests as well.

-Alex

[1] 
https://cwiki.apache.org/confluence/display/FLEX/Git+for+Apache+Flex+Guide

On 6/5/15, 12:14 PM, "Jason Taylor" <ja...@dedoose.com> wrote:

>Hey guys, we are currently stuck on SDK 4.13 due to the TLF performance
>issue and the huge reliance on TLF in our Dedoose.  Have there been any
>updates on this issue? Are there any projected updates on this issue?
>
>Separately, I would like to get my hands a little dirty here if needed.
>TLF is extremely important to our product, and in the near future we will
>have to implement some required feature.  I know TLF is extremely
>challenging, but it is what it is.   Is there a guide somewhere on
>setting up the Flex SDK, and how to work with the rest of the team in
>solving issues, submitting changes.  I know nothing about that particular
>process but would like to help.  In addition our team has created some
>components that I feel might be valuable to the community that we would
>like to donate. 
>
>~ JT


TLF Performance Issue fix?

Posted by Jason Taylor <ja...@dedoose.com>.
Hey guys, we are currently stuck on SDK 4.13 due to the TLF performance issue and the huge reliance on TLF in our Dedoose.  Have there been any updates on this issue? Are there any projected updates on this issue?

Separately, I would like to get my hands a little dirty here if needed.  TLF is extremely important to our product, and in the near future we will have to implement some required feature.  I know TLF is extremely challenging, but it is what it is.   Is there a guide somewhere on setting up the Flex SDK, and how to work with the rest of the team in solving issues, submitting changes.  I know nothing about that particular process but would like to help.  In addition our team has created some components that I feel might be valuable to the community that we would like to donate. 

~ JT

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
There are a few non-standard DOM extensions here:

https://github.com/google/closure-compiler/blob/master/externs/ie_dom.js
(depends on w3c_dom2.js)
https://github.com/google/closure-compiler/blob/master/externs/gecko_dom.js
(depends on w3c_dom2.js)
https://github.com/google/closure-compiler/blob/master/externs/webkit_dom.js
(depends on w3c_dom2.js)
https://github.com/google/closure-compiler/blob/master/externs/iphone.js
https://github.com/google/closure-compiler/blob/master/externs/chrome.js

Perhaps we could create separate swcs for them for folks who want to target
these specific browsers.

Also, if we want to support embedding Flash content on the web page/apps we
create with FlexJS, we might want to include this one as well:
https://github.com/google/closure-compiler/blob/master/externs/flash.js
(depends on w3c_dom2.js)

In addition, I feel we might want these in DOM.swc as well
https://github.com/google/closure-compiler/blob/master/externs/w3c_elementtraversal.js
(depends on w3c_dom1.js)

In general, what do you think about including all the w3c_*.js files?

Thanks,
Om

On Fri, Jun 5, 2015 at 12:12 PM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

>
>
> On Fri, Jun 5, 2015 at 8:42 AM, Michael Schmalle <
> teotigraphixllc@gmail.com> wrote:
>
>> This is what I am into right now; :)
>>
>>
>> visitScript
>> 239        ASSIGN 0 58
>> 239          GETPROP 0 21
>> 239            GETPROP 0 15
>> 239              NAME 0 5 Array
>> 245              NAME 6 9 prototype
>> 255            NAME 16 5 every
>> 263          FUNCTION 24 34
>> 272            NAME 9 8 callback
>> 282            NAME 19 11 opt_thisobj
>> 295            BLOCK 32 2
>>
>> 302        ASSIGN 0 53
>> 302          GETPROP 0 11
>> 302            NAME 0 5 Array
>> 308            NAME 6 5 every
>> 316          FUNCTION 14 39
>> 325            NAME 9 3 arr
>> 330            NAME 14 8 callback
>> 340            NAME 24 11 opt_context
>> 353            BLOCK 37 2
>>
>> [function_static_test] Array.every : Has function conflict.
>>
>>
>> There are some weird stuff I have to resolve, I am working on the es3.js
>> right now, it combined with es5.js should be our new "playerglobal.swc".
>>
>> I am unit testing the hell out of this stuff so it should be solid when it
>> hits prime time. I just wrote a bunch of tests for the "Stupid Crazy" GCC
>> type annotations, that replaced my hack type parsing yesterday.
>>
>> I took 2 days Thurs and Fri(today) to see what I could get done. I have to
>> be honest, unless things really get rolling with the tests today where
>> these little issues iron out fast with my tests, it will be a week or so
>> before I check in code, I am working in a test project right now.
>>
>> When I plan on commiting this code is when I get JS.swc and DOM.swc
>> compiling. Which JS.swc will be es3.js and es5.js, I will have to talk
>> with
>> you guys about what comprises DON.swc, it will at least be w3c_dom1.js,
>> w3c_dom2.js, w3c_dom3.js, w3c_css1.js, w3c_range.js and some more.
>>
>> You see there are dependencies that these files hav on each other, Om, if
>> you wanted to help me out, go through the GitHub externals repo files and
>> figure out what files need to be our standard DOM.swc.
>>
>>
> I will start looking at it and see if I can be of any help here.
>
> Thanks,
> Om
>
>
>> Mike
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Jun 5, 2015 at 11:31 AM, Alex Harui <ah...@adobe.com> wrote:
>>
>> >
>> >
>> > On 6/5/15, 8:18 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>> >
>> > >On Jun 5, 2015 3:12 AM, "Michael Schmalle" <te...@gmail.com>
>> > >wrote:
>> > >>
>> > >> @Om ... SVG, this should get you excited. :)
>> > >>
>> > >> http://snag.gy/xEpfa.jpg
>> > >>
>> > >> Mike
>> > >
>> > >Fantastic!   What a great way to stay the day :-)
>> > >
>> > >When will we able to start testing all this?
>> >
>> > Whenever you help us get it packaged up. ;-)
>> >
>> > I have several things in my queue:
>> > -ASDOC for Falcon
>> > -ASDOC for Windows
>> > -Installer 3.2 release
>> > -Quarterly Report
>> > -Falcon and FlexJS build scripts.
>> >
>> > The latter should get the nightly builds closer to working with IJ.
>> This
>> > stuff Mike’s been working on will likely get folded into Falcon and/or
>> > FlexJS build scripts and result in other packages.  But if you help out
>> > things will get done sooner.
>> >
>> > -Alex
>> >
>> >
>>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Fri, Jun 5, 2015 at 8:42 AM, Michael Schmalle <te...@gmail.com>
wrote:

> This is what I am into right now; :)
>
>
> visitScript
> 239        ASSIGN 0 58
> 239          GETPROP 0 21
> 239            GETPROP 0 15
> 239              NAME 0 5 Array
> 245              NAME 6 9 prototype
> 255            NAME 16 5 every
> 263          FUNCTION 24 34
> 272            NAME 9 8 callback
> 282            NAME 19 11 opt_thisobj
> 295            BLOCK 32 2
>
> 302        ASSIGN 0 53
> 302          GETPROP 0 11
> 302            NAME 0 5 Array
> 308            NAME 6 5 every
> 316          FUNCTION 14 39
> 325            NAME 9 3 arr
> 330            NAME 14 8 callback
> 340            NAME 24 11 opt_context
> 353            BLOCK 37 2
>
> [function_static_test] Array.every : Has function conflict.
>
>
> There are some weird stuff I have to resolve, I am working on the es3.js
> right now, it combined with es5.js should be our new "playerglobal.swc".
>
> I am unit testing the hell out of this stuff so it should be solid when it
> hits prime time. I just wrote a bunch of tests for the "Stupid Crazy" GCC
> type annotations, that replaced my hack type parsing yesterday.
>
> I took 2 days Thurs and Fri(today) to see what I could get done. I have to
> be honest, unless things really get rolling with the tests today where
> these little issues iron out fast with my tests, it will be a week or so
> before I check in code, I am working in a test project right now.
>
> When I plan on commiting this code is when I get JS.swc and DOM.swc
> compiling. Which JS.swc will be es3.js and es5.js, I will have to talk with
> you guys about what comprises DON.swc, it will at least be w3c_dom1.js,
> w3c_dom2.js, w3c_dom3.js, w3c_css1.js, w3c_range.js and some more.
>
> You see there are dependencies that these files hav on each other, Om, if
> you wanted to help me out, go through the GitHub externals repo files and
> figure out what files need to be our standard DOM.swc.
>
>
I will start looking at it and see if I can be of any help here.

Thanks,
Om


> Mike
>
>
>
>
>
>
>
>
>
>
> On Fri, Jun 5, 2015 at 11:31 AM, Alex Harui <ah...@adobe.com> wrote:
>
> >
> >
> > On 6/5/15, 8:18 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
> >
> > >On Jun 5, 2015 3:12 AM, "Michael Schmalle" <te...@gmail.com>
> > >wrote:
> > >>
> > >> @Om ... SVG, this should get you excited. :)
> > >>
> > >> http://snag.gy/xEpfa.jpg
> > >>
> > >> Mike
> > >
> > >Fantastic!   What a great way to stay the day :-)
> > >
> > >When will we able to start testing all this?
> >
> > Whenever you help us get it packaged up. ;-)
> >
> > I have several things in my queue:
> > -ASDOC for Falcon
> > -ASDOC for Windows
> > -Installer 3.2 release
> > -Quarterly Report
> > -Falcon and FlexJS build scripts.
> >
> > The latter should get the nightly builds closer to working with IJ.  This
> > stuff Mike’s been working on will likely get folded into Falcon and/or
> > FlexJS build scripts and result in other packages.  But if you help out
> > things will get done sooner.
> >
> > -Alex
> >
> >
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
This is what I am into right now; :)


visitScript
239        ASSIGN 0 58
239          GETPROP 0 21
239            GETPROP 0 15
239              NAME 0 5 Array
245              NAME 6 9 prototype
255            NAME 16 5 every
263          FUNCTION 24 34
272            NAME 9 8 callback
282            NAME 19 11 opt_thisobj
295            BLOCK 32 2

302        ASSIGN 0 53
302          GETPROP 0 11
302            NAME 0 5 Array
308            NAME 6 5 every
316          FUNCTION 14 39
325            NAME 9 3 arr
330            NAME 14 8 callback
340            NAME 24 11 opt_context
353            BLOCK 37 2

[function_static_test] Array.every : Has function conflict.


There are some weird stuff I have to resolve, I am working on the es3.js
right now, it combined with es5.js should be our new "playerglobal.swc".

I am unit testing the hell out of this stuff so it should be solid when it
hits prime time. I just wrote a bunch of tests for the "Stupid Crazy" GCC
type annotations, that replaced my hack type parsing yesterday.

I took 2 days Thurs and Fri(today) to see what I could get done. I have to
be honest, unless things really get rolling with the tests today where
these little issues iron out fast with my tests, it will be a week or so
before I check in code, I am working in a test project right now.

When I plan on commiting this code is when I get JS.swc and DOM.swc
compiling. Which JS.swc will be es3.js and es5.js, I will have to talk with
you guys about what comprises DON.swc, it will at least be w3c_dom1.js,
w3c_dom2.js, w3c_dom3.js, w3c_css1.js, w3c_range.js and some more.

You see there are dependencies that these files hav on each other, Om, if
you wanted to help me out, go through the GitHub externals repo files and
figure out what files need to be our standard DOM.swc.

Mike










On Fri, Jun 5, 2015 at 11:31 AM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 6/5/15, 8:18 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >On Jun 5, 2015 3:12 AM, "Michael Schmalle" <te...@gmail.com>
> >wrote:
> >>
> >> @Om ... SVG, this should get you excited. :)
> >>
> >> http://snag.gy/xEpfa.jpg
> >>
> >> Mike
> >
> >Fantastic!   What a great way to stay the day :-)
> >
> >When will we able to start testing all this?
>
> Whenever you help us get it packaged up. ;-)
>
> I have several things in my queue:
> -ASDOC for Falcon
> -ASDOC for Windows
> -Installer 3.2 release
> -Quarterly Report
> -Falcon and FlexJS build scripts.
>
> The latter should get the nightly builds closer to working with IJ.  This
> stuff Mike’s been working on will likely get folded into Falcon and/or
> FlexJS build scripts and result in other packages.  But if you help out
> things will get done sooner.
>
> -Alex
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Fri, Jun 5, 2015 at 8:31 AM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 6/5/15, 8:18 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >On Jun 5, 2015 3:12 AM, "Michael Schmalle" <te...@gmail.com>
> >wrote:
> >>
> >> @Om ... SVG, this should get you excited. :)
> >>
> >> http://snag.gy/xEpfa.jpg
> >>
> >> Mike
> >
> >Fantastic!   What a great way to stay the day :-)
> >
> >When will we able to start testing all this?
>
> Whenever you help us get it packaged up. ;-)
>
> I have several things in my queue:
> -ASDOC for Falcon
> -ASDOC for Windows
> -Installer 3.2 release
> -Quarterly Report
> -Falcon and FlexJS build scripts.
>
> The latter should get the nightly builds closer to working with IJ.  This
> stuff Mike’s been working on will likely get folded into Falcon and/or
> FlexJS build scripts and result in other packages.  But if you help out
> things will get done sooner.
>
>
Most of the Falcon stuff is unfamiliar territory for me.  Are there JIRA
tickets for the ASDoc on Windows and Falcon + FlexJS build scripts work?

Thanks,
Om


> -Alex
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.

On 6/5/15, 8:18 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>On Jun 5, 2015 3:12 AM, "Michael Schmalle" <te...@gmail.com>
>wrote:
>>
>> @Om ... SVG, this should get you excited. :)
>>
>> http://snag.gy/xEpfa.jpg
>>
>> Mike
>
>Fantastic!   What a great way to stay the day :-)
>
>When will we able to start testing all this?

Whenever you help us get it packaged up. ;-)

I have several things in my queue:
-ASDOC for Falcon
-ASDOC for Windows
-Installer 3.2 release
-Quarterly Report
-Falcon and FlexJS build scripts.

The latter should get the nightly builds closer to working with IJ.  This
stuff Mike’s been working on will likely get folded into Falcon and/or
FlexJS build scripts and result in other packages.  But if you help out
things will get done sooner.

-Alex


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Jun 5, 2015 3:12 AM, "Michael Schmalle" <te...@gmail.com>
wrote:
>
> @Om ... SVG, this should get you excited. :)
>
> http://snag.gy/xEpfa.jpg
>
> Mike

Fantastic!   What a great way to stay the day :-)

When will we able to start testing all this?

Thanks,
Om

>
> On Fri, Jun 5, 2015 at 6:02 AM, Michael Schmalle <
teotigraphixllc@gmail.com>
> wrote:
>
> > BTW I need to brush up on canvas but I see;
> >
> > So I assume the HTMLCanvasElement.getContext() passes a
> > CanvasRenderingContext2D correct?
> >
> > I can't wait to get out of this compiler stuff and actually try to test
> > some of this stuff in the browser. :)
> >
> > Mike
> >
> >
> > public class CanvasRenderingContext2D {
> > ...
> >     /**
> >      * @see html5
> >      */
> >     native public var canvas:HTMLCanvasElement;
> > ...
> > }
> >
> >
> >
> > public class HTMLCanvasElement extends HTMLElement {
> >
> >     native public function HTMLCanvasElement();
> >
> >     /**
> >      * @see html5
> >      */
> >     native public var height:Number;
> >
> >     /**
> >      * @see html5
> >      */
> >     native public var width:Number;
> >
> >     /**
> >      * @see html5
> >      */
> >     native public function toDataURL(opt_type:String = null,
> > ...var_args):String;
> >
> >     /**
> >      * @see html5
> >      */
> >     native public function getContext(contextId:String, opt_args:Object
=
> > null):Object;
> >
> > }
> >
> >
> >
> > On Fri, Jun 5, 2015 at 5:50 AM, Michael Schmalle <
> > teotigraphixllc@gmail.com> wrote:
> >
> >>
> >>
> >> On Fri, Jun 5, 2015 at 12:39 AM, OmPrakash Muppirala <
> >> bigosmallm@gmail.com> wrote:
> >>
> >>> Fantastic work,  Mike!
> >>>
> >>> I dont see any SVG elements, is that part of something other spec?
> >>>
> >>
> >> Haven't got that far yet, was busy getting inheritance and edge cases
> >> fixed with the base DOM stuff.
> >>
> >> I have looked through the closure/externs and it doesn't look like they
> >> have an SVG.js. If you now, you will need to find one or write it. :)
> >>
> >>
> >>>
> >>> On that line,  how would one get Canvas, Webgl, etc.?
> >>>
> >>
> >>
> >> I think Canavs is HTMLCanvasNode which is in the html5.js externs.
> >>
> >> WebGL,
> >> https://github.com/google/closure-compiler/blob/master/externs/webgl.js
> >>
> >> Yeah that is today, I will post up when I get them in.
> >>
> >> Mike
> >>
> >>
> >>
> >>>
> >>> Thanks,
> >>> Om
> >>> On Jun 4, 2015 5:31 PM, "Josh Tynjala" <jo...@gmail.com> wrote:
> >>>
> >>> > Agreed! Great stuff, Mike.
> >>> >
> >>> > - Josh
> >>> >
> >>> > On Thu, Jun 4, 2015 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
> >>> >
> >>> > > Amazing!
> >>> > >
> >>> > > On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
> >>> > wrote:
> >>> > >
> >>> > > >Well so far I have got the below compiling into .as classes and
> >>> > interfaces
> >>> > > >using the following externals files;
> >>> > > >
> >>> > > >There is a definite order these need to be parsed in, I am still
> >>> > figuring
> >>> > > >them out. I plan on adding in the asdocs, the version of JS the
API
> >>> was
> >>> > > >introduced in.
> >>> > > >
> >>> > > >Mike
> >>> > > >
> >>> > > >html5.js
> >>> > > >missing.js
> >>> > > >w3c_css.js
> >>> > > >w3c_css3d.js
> >>> > > >w3c_dom1.js
> >>> > > >w3c_dom2.js
> >>> > > >w3c_dom3.js
> >>> > > >w3c_event.js
> >>> > > >w3c_range.js
> >>> > > >
> >>> > > >
> >>> > > >Attr.as
> >>> > > >CanvasGradient.as
> >>> > > >CanvasPattern.as
> >>> > > >CanvasRenderingContext2D.as
> >>> > > >CaretPosition.as
> >>> > > >CDATASection.as
> >>> > > >CharacterData.as
> >>> > > >ClientInformation.as
> >>> > > >ClientRect.as
> >>> > > >ClientRectList.as
> >>> > > >Comment.as
> >>> > > >Counter.as
> >>> > > >CSSCharsetRule.as
> >>> > > >CSSFontFaceRule.as
> >>> > > >CSSImportRule.as
> >>> > > >CSSInterface.as
> >>> > > >CSSMatrix.as
> >>> > > >CSSMediaRule.as
> >>> > > >CSSPageRule.as
> >>> > > >CSSPrimitiveValue.as
> >>> > > >CSSProperties.as
> >>> > > >CSSRule.as
> >>> > > >CSSRuleList.as
> >>> > > >CSSStyleDeclaration.as
> >>> > > >CSSStyleRule.as
> >>> > > >CSSStyleSheet.as
> >>> > > >CSSUnknownRule.as
> >>> > > >CSSValue.as
> >>> > > >CSSValueList.as
> >>> > > >CustomEvent.as
> >>> > > >Database.as
> >>> > > >DatabaseCallback.as
> >>> > > >DataTransfer.as
> >>> > > >DedicatedWorkerGlobalScope.as
> >>> > > >Document.as
> >>> > > >DocumentCSS.as
> >>> > > >DocumentEvent.as
> >>> > > >DocumentFragment.as
> >>> > > >DocumentRange.as
> >>> > > >DocumentStyle.as
> >>> > > >DocumentType.as
> >>> > > >DOMApplicationCache.as
> >>> > > >DOMConfiguration.as
> >>> > > >DOMError.as
> >>> > > >DOMErrorHandler.as
> >>> > > >DOMException.as
> >>> > > >DOMImplementation.as
> >>> > > >DOMImplementationCSS.as
> >>> > > >DOMImplementationList.as
> >>> > > >DOMImplementationSource.as
> >>> > > >DOMLocator.as
> >>> > > >DOMStringList.as
> >>> > > >DOMTokenList.as
> >>> > > >DragEvent.as
> >>> > > >Element.as
> >>> > > >ElementCSSInlineStyle.as
> >>> > > >Entity.as
> >>> > > >EntityReference.as
> >>> > > >ErrorEvent.as
> >>> > > >Event.as
> >>> > > >EventListener.as
> >>> > > >EventTarget.as
> >>> > > >ExceptionCode.as
> >>> > > >FileList.as
> >>> > > >FontFace.as
> >>> > > >FontFaceSet.as
> >>> > > >HashChangeEvent.as
> >>> > > >HTMLAnchorElement.as
> >>> > > >HTMLAppletElement.as
> >>> > > >HTMLAreaElement.as
> >>> > > >HTMLAudioElement.as
> >>> > > >HTMLBaseElement.as
> >>> > > >HTMLBaseFontElement.as
> >>> > > >HTMLBodyElement.as
> >>> > > >HTMLBRElement.as
> >>> > > >HTMLButtonElement.as
> >>> > > >HTMLCanvasElement.as
> >>> > > >HTMLCollection.as
> >>> > > >HTMLContentElement.as
> >>> > > >HTMLDetailsElement.as
> >>> > > >HTMLDialogElement.as
> >>> > > >HTMLDirectoryElement.as
> >>> > > >HTMLDivElement.as
> >>> > > >HTMLDListElement.as
> >>> > > >HTMLDocument.as
> >>> > > >HTMLElement.as
> >>> > > >HTMLEmbedElement.as
> >>> > > >HTMLFieldSetElement.as
> >>> > > >HTMLFontElement.as
> >>> > > >HTMLFormElement.as
> >>> > > >HTMLFrameElement.as
> >>> > > >HTMLFrameSetElement.as
> >>> > > >HTMLHeadElement.as
> >>> > > >HTMLHeadingElement.as
> >>> > > >HTMLHRElement.as
> >>> > > >HTMLHtmlElement.as
> >>> > > >HTMLIFrameElement.as
> >>> > > >HTMLImageElement.as
> >>> > > >HTMLInputElement.as
> >>> > > >HTMLIsIndexElement.as
> >>> > > >HTMLLabelElement.as
> >>> > > >HTMLLegendElement.as
> >>> > > >HTMLLIElement.as
> >>> > > >HTMLLinkElement.as
> >>> > > >HTMLMapElement.as
> >>> > > >HTMLMediaElement.as
> >>> > > >HTMLMenuElement.as
> >>> > > >HTMLMenuItemElement.as
> >>> > > >HTMLMetaElement.as
> >>> > > >HTMLModElement.as
> >>> > > >HTMLObjectElement.as
> >>> > > >HTMLOListElement.as
> >>> > > >HTMLOptGroupElement.as
> >>> > > >HTMLOptionElement.as
> >>> > > >HTMLOptionsCollection.as
> >>> > > >HTMLParagraphElement.as
> >>> > > >HTMLParamElement.as
> >>> > > >HTMLPictureElement.as
> >>> > > >HTMLPreElement.as
> >>> > > >HTMLQuoteElement.as
> >>> > > >HTMLScriptElement.as
> >>> > > >HTMLSelectElement.as
> >>> > > >HTMLShadowElement.as
> >>> > > >HTMLSourceElement.as
> >>> > > >HTMLStyleElement.as
> >>> > > >HTMLTableCaptionElement.as
> >>> > > >HTMLTableCellElement.as
> >>> > > >HTMLTableColElement.as
> >>> > > >HTMLTableElement.as
> >>> > > >HTMLTableRowElement.as
> >>> > > >HTMLTableSectionElement.as
> >>> > > >HTMLTemplateElement.as
> >>> > > >HTMLTextAreaElement.as
> >>> > > >HTMLTitleElement.as
> >>> > > >HTMLUListElement.as
> >>> > > >HTMLVideoElement.as
> >>> > > >Image.as
> >>> > > >ImageData.as
> >>> > > >KeyboardEvent.as
> >>> > > >LinkStyle.as
> >>> > > >MediaError.as
> >>> > > >MediaList.as
> >>> > > >MediaQueryList.as
> >>> > > >MediaQueryListListener.as
> >>> > > >MessageChannel.as
> >>> > > >MessageEvent.as
> >>> > > >MessagePort.as
> >>> > > >MouseEvent.as
> >>> > > >MSCSSMatrix.as
> >>> > > >MutationEvent.as
> >>> > > >MutationObserver.as
> >>> > > >MutationRecord.as
> >>> > > >NamedNodeMap.as
> >>> > > >NameList.as
> >>> > > >Node.as
> >>> > > >NodeFilter.as
> >>> > > >NodeIterator.as
> >>> > > >NodeList.as
> >>> > > >Notation.as
> >>> > > >openDatabase.as
> >>> > > >PageTransitionEvent.as
> >>> > > >PopStateEvent.as
> >>> > > >postMessage.as
> >>> > > >ProcessingInstruction.as
> >>> > > >ProgressEvent.as
> >>> > > >Range.as
> >>> > > >RangeException.as
> >>> > > >Rect.as
> >>> > > >RelatedEvent.as
> >>> > > >RGBColor.as
> >>> > > >Screen.as
> >>> > > >ShadowRoot.as
> >>> > > >SharedWorker.as
> >>> > > >SharedWorkerGlobalScope.as
> >>> > > >SQLError.as
> >>> > > >SQLResultSet.as
> >>> > > >SQLResultSetRowList.as
> >>> > > >SQLTransaction.as
> >>> > > >StyleSheet.as
> >>> > > >StyleSheetList.as
> >>> > > >Text.as
> >>> > > >TextMetrics.as
> >>> > > >TextTrack.as
> >>> > > >TextTrackCue.as
> >>> > > >TextTrackCueList.as
> >>> > > >TextTrackList.as
> >>> > > >TimeRanges.as
> >>> > > >TreeWalker.as
> >>> > > >TypeInfo.as
> >>> > > >UIEvent.as
> >>> > > >UserDataHandler.as
> >>> > > >ValidityState.as
> >>> > > >ViewCSS.as
> >>> > > >VTTCue.as
> >>> > > >WebKitCSSMatrix.as
> >>> > > >WebSocket.as
> >>> > > >WebWorker.as
> >>> > > >Window.as
> >>> > > >Worker.as
> >>> > > >WorkerGlobalScope.as
> >>> > > >WorkerLocation.as
> >>> > > >XMLHttpRequestEventTarget.as
> >>> > > >XMLHttpRequestUpload.as
> >>> > > >
> >>> > > >
> >>> > > >
> >>> > > >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
> >>> > > ><te...@gmail.com>
> >>> > > >wrote:
> >>> > > >
> >>> > > >> Yeah sorry to confuse you, the Velocity stuff doesn't matter,
for
> >>> that
> >>> > > >> matter my asdoc framework I wrote doesn't(it was just showing I
> >>> had
> >>> > all
> >>> > > >> this working in the context of Falcon), we just need the
> >>> > ASDocTokenizer
> >>> > > >>to
> >>> > > >> tokenize the comment data given to the ASDocDelegate.
> >>> > > >>
> >>> > > >> Mike
> >>> > > >>
> >>> > > >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
> >>> > > >> teotigraphixllc@gmail.com> wrote:
> >>> > > >>
> >>> > > >>> The way I did it was, I did exactly what you did, implemented
the
> >>> > > >>> ASDocDelegate and saved the tokes as it parsed all the files.
> >>> > > >>>
> >>> > > >>> Then I used the token String like you in the ASDocTokenizer to
> >>> parse
> >>> > > >>>the
> >>> > > >>> loop I showed you above.
> >>> > > >>>
> >>> > > >>> I would add the DocTag and stuff if you can get the
> >>> ASDocTokenizer
> >>> > > >>> working like how I have it in the code above. I already wrote
an
> >>> API
> >>> > > >>>for
> >>> > > >>> easy access to the tags and comment in an ASDocCOmment class
that
> >>> > has a
> >>> > > >>> list of DocTags.
> >>> > > >>>
> >>> > > >>> Mike
> >>> > > >>>
> >>> > > >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com>
> >>> wrote:
> >>> > > >>>
> >>> > > >>>> For this exercise though, we don’t care about the output as
> >>> Velocity
> >>> > > >>>>or
> >>> > > >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
> >>> Falcon
> >>> > > >>>>you
> >>> > > >>>> retrieve ASDoc comments via node.getASDocComment() and get an
> >>> > > >>>> ASDocComment
> >>> > > >>>> instance.  Do you want the Token to be the root of a
mini-tree
> >>> of
> >>> > > >>>>parsed
> >>> > > >>>> nodes?
> >>> > > >>>>
> >>> > > >>>> -Alex
> >>> > > >>>>
> >>> > > >>>>
> >>> > > >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <
> >>> teotigraphixllc@gmail.com>
> >>> > > >>>> wrote:
> >>> > > >>>>
> >>> > > >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
> >>> > Velocity
> >>> > > >>>> >templates instead of XSL.
> >>> > > >>>> >
> >>> > > >>>> >That DocTag is my class.
> >>> > > >>>> >
> >>> > > >>>> >Mike
> >>> > > >>>> >
> >>> > > >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <aharui@adobe.com
>
> >>> > wrote:
> >>> > > >>>> >
> >>> > > >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I
see
> >>> > > >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that
would
> >>> be
> >>> > > >>>> >>equivalent
> >>> > > >>>> >> to MXMLC.java and have a main() method.  The current Flex
> >>> SDK has
> >>> > > >>>>an
> >>> > > >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have
them
> >>> > around
> >>> > > >>>> >> somewhere?   Otherwise I will try to quickly create them.
> >>> > > >>>> >>
> >>> > > >>>> >> -Alex
> >>> > > >>>> >>
> >>> > > >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <
> >>> > teotigraphixllc@gmail.com
> >>> > > >
> >>> > > >>>> >>wrote:
> >>> > > >>>> >>
> >>> > > >>>> >> >BTW, the loop always happens at the VERY end of the
> >>> comment, so
> >>> > > >>>>when
> >>> > > >>>> >>you
> >>> > > >>>> >> >get to the end the(the last call of next() that should
> >>> return
> >>> > > >>>>null);
> >>> > > >>>> >> >
> >>> > > >>>> >> >tok = tokenizer.next();
> >>> > > >>>> >> >
> >>> > > >>>> >> >never returns, it gets stuck trying to exit.
> >>> > > >>>> >> >
> >>> > > >>>> >> >Mike
> >>> > > >>>> >> >
> >>> > > >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> >>> > > >>>> >> ><te...@gmail.com>
> >>> > > >>>> >> >wrote:
> >>> > > >>>> >> >
> >>> > > >>>> >> >> I posted about this a couple weeks ago and I tried
> >>> recompiling
> >>> > > >>>>with
> >>> > > >>>> >> >>JFlex
> >>> > > >>>> >> >> 1.5 I think, the older version and still had the
problem.
> >>> > > >>>> >> >>
> >>> > > >>>> >> >> Maybe I messed up something but I tried with my same
asdoc
> >>> > code
> >>> > > >>>> when
> >>> > > >>>> >>I
> >>> > > >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see
it
> >>> work
> >>> > > >>>>with
> >>> > > >>>> >>my
> >>> > > >>>> >> >> version of a documentor.
> >>> > > >>>> >> >>
> >>> > > >>>> >> >> I think IIRC, I actually tried a simple test case and
it
> >>> would
> >>> > > >>>> work.
> >>> > > >>>> >> >>
> >>> > > >>>> >> >> I have code that uses the tokenizer;
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>     public void compile()
> >>> > > >>>> >> >>     {
> >>> > > >>>> >> >>         if (token == null)
> >>> > > >>>> >> >>             return;
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>         String data = token.getText();
> >>> > > >>>> >> >>         ASDocTokenizer tokenizer = new
> >>> ASDocTokenizer(false);
> >>> > > >>>> >> >>         tokenizer.setReader(new StringReader(data));
> >>> > > >>>> >> >>         ASDocToken tok = tokenizer.next();
> >>> > > >>>> >> >>         boolean foundDescription = false;
> >>> > > >>>> >> >>         DocTag pendingTag = null;
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>         try
> >>> > > >>>> >> >>         {
> >>> > > >>>> >> >>             while (tok != null)
> >>> > > >>>> >> >>             {
> >>> > > >>>> >> >>                 if (!foundDescription
> >>> > > >>>> >> >>                         && tok.getType() ==
> >>> > > >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>> > > >>>> >> >>                 {
> >>> > > >>>> >> >>                     description = tok.getText();
> >>> > > >>>> >> >>                 }
> >>> > > >>>> >> >>                 else
> >>> > > >>>> >> >>                 {
> >>> > > >>>> >> >>                     // do tags
> >>> > > >>>> >> >>                     if (tok.getType() ==
> >>> > > >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
> >>> > > >>>> >> >>                     {
> >>> > > >>>> >> >>                         if (pendingTag != null)
> >>> > > >>>> >> >>                         {
> >>> > > >>>> >> >>                             addTag(pendingTag);
> >>> > > >>>> >> >>                             pendingTag = null;
> >>> > > >>>> >> >>                         }
> >>> > > >>>> >> >>                         pendingTag = new
> >>> > > >>>> >> >> DocTag(tok.getText().substring(1));
> >>> > > >>>> >> >>                     }
> >>> > > >>>> >> >>                     else if (tok.getType() ==
> >>> > > >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>> > > >>>> >> >>                     {
> >>> > > >>>> >> >>
> >>> > > >>>>pendingTag.setDescription(tok.getText());
> >>> > > >>>> >> >>                         addTag(pendingTag);
> >>> > > >>>> >> >>                         pendingTag = null;
> >>> > > >>>> >> >>                     }
> >>> > > >>>> >> >>                 }
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>                 foundDescription = true;
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>                 tok = tokenizer.next();
> >>> > > >>>> >> >>             }
> >>> > > >>>> >> >>         }
> >>> > > >>>> >> >>         catch (Exception e)
> >>> > > >>>> >> >>         {
> >>> > > >>>> >> >>             e.printStackTrace();
> >>> > > >>>> >> >>         }
> >>> > > >>>> >> >>     }
> >>> > > >>>> >> >>
> >>> > > >>>> >> >> Mike
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>
> >>> > > >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <
> >>> aharui@adobe.com>
> >>> > > >>>> wrote:
> >>> > > >>>> >> >>
> >>> > > >>>> >> >>>
> >>> > > >>>> >> >>>
> >>> > > >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
> >>> > > >>>> teotigraphixllc@gmail.com>
> >>> > > >>>> >> >>> wrote:
> >>> > > >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into
> >>> fixing
> >>> > > >>>> >> >>>ASDocTokenizer?
> >>> > > >>>> >> >>> >> Was the problem that it didn’t work on every AS
file
> >>> we
> >>> > > >>>>current
> >>> > > >>>> >> >>>have?
> >>> > > >>>> >> >>> >>
> >>> > > >>>> >> >>> >
> >>> > > >>>> >> >>> >
> >>> > > >>>> >> >>> >It doesn't work on anything, there is an infinite
loop
> >>> in
> >>> > the
> >>> > > >>>> >>scanner
> >>> > > >>>> >> >>> that
> >>> > > >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> >>> > > >>>> >> >>> >
> >>> > > >>>> >> >>> >What is weird is I was using the SAME code base when
I
> >>> wrote
> >>> > > >>>>the
> >>> > > >>>> >>asdoc
> >>> > > >>>> >> >>> >documenter I have 2 years ago and it worked fine.
> >>> > > >>>> >> >>>
> >>> > > >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a
> >>> look.
> >>> > > >>>>What
> >>> > > >>>> >>setup
> >>> > > >>>> >> >>>did
> >>> > > >>>> >> >>> you have for trying it?  Did you run it on the Flex
SDK
> >>> or
> >>> > > >>>>FlexJS
> >>> > > >>>> >>SDK
> >>> > > >>>> >> >>>or
> >>> > > >>>> >> >>> did it even loop on a simple test case?
> >>> > > >>>> >> >>>
> >>> > > >>>> >> >>> -Alex
> >>> > > >>>> >> >>>
> >>> > > >>>> >> >>>
> >>> > > >>>> >> >>
> >>> > > >>>> >>
> >>> > > >>>> >>
> >>> > > >>>>
> >>> > > >>>>
> >>> > > >>>
> >>> > > >>
> >>> > >
> >>> > >
> >>> >
> >>>
> >>
> >>
> >

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
@Om ... SVG, this should get you excited. :)

http://snag.gy/xEpfa.jpg

Mike

On Fri, Jun 5, 2015 at 6:02 AM, Michael Schmalle <te...@gmail.com>
wrote:

> BTW I need to brush up on canvas but I see;
>
> So I assume the HTMLCanvasElement.getContext() passes a
> CanvasRenderingContext2D correct?
>
> I can't wait to get out of this compiler stuff and actually try to test
> some of this stuff in the browser. :)
>
> Mike
>
>
> public class CanvasRenderingContext2D {
> ...
>     /**
>      * @see html5
>      */
>     native public var canvas:HTMLCanvasElement;
> ...
> }
>
>
>
> public class HTMLCanvasElement extends HTMLElement {
>
>     native public function HTMLCanvasElement();
>
>     /**
>      * @see html5
>      */
>     native public var height:Number;
>
>     /**
>      * @see html5
>      */
>     native public var width:Number;
>
>     /**
>      * @see html5
>      */
>     native public function toDataURL(opt_type:String = null,
> ...var_args):String;
>
>     /**
>      * @see html5
>      */
>     native public function getContext(contextId:String, opt_args:Object =
> null):Object;
>
> }
>
>
>
> On Fri, Jun 5, 2015 at 5:50 AM, Michael Schmalle <
> teotigraphixllc@gmail.com> wrote:
>
>>
>>
>> On Fri, Jun 5, 2015 at 12:39 AM, OmPrakash Muppirala <
>> bigosmallm@gmail.com> wrote:
>>
>>> Fantastic work,  Mike!
>>>
>>> I dont see any SVG elements, is that part of something other spec?
>>>
>>
>> Haven't got that far yet, was busy getting inheritance and edge cases
>> fixed with the base DOM stuff.
>>
>> I have looked through the closure/externs and it doesn't look like they
>> have an SVG.js. If you now, you will need to find one or write it. :)
>>
>>
>>>
>>> On that line,  how would one get Canvas, Webgl, etc.?
>>>
>>
>>
>> I think Canavs is HTMLCanvasNode which is in the html5.js externs.
>>
>> WebGL,
>> https://github.com/google/closure-compiler/blob/master/externs/webgl.js
>>
>> Yeah that is today, I will post up when I get them in.
>>
>> Mike
>>
>>
>>
>>>
>>> Thanks,
>>> Om
>>> On Jun 4, 2015 5:31 PM, "Josh Tynjala" <jo...@gmail.com> wrote:
>>>
>>> > Agreed! Great stuff, Mike.
>>> >
>>> > - Josh
>>> >
>>> > On Thu, Jun 4, 2015 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>> >
>>> > > Amazing!
>>> > >
>>> > > On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
>>> > wrote:
>>> > >
>>> > > >Well so far I have got the below compiling into .as classes and
>>> > interfaces
>>> > > >using the following externals files;
>>> > > >
>>> > > >There is a definite order these need to be parsed in, I am still
>>> > figuring
>>> > > >them out. I plan on adding in the asdocs, the version of JS the API
>>> was
>>> > > >introduced in.
>>> > > >
>>> > > >Mike
>>> > > >
>>> > > >html5.js
>>> > > >missing.js
>>> > > >w3c_css.js
>>> > > >w3c_css3d.js
>>> > > >w3c_dom1.js
>>> > > >w3c_dom2.js
>>> > > >w3c_dom3.js
>>> > > >w3c_event.js
>>> > > >w3c_range.js
>>> > > >
>>> > > >
>>> > > >Attr.as
>>> > > >CanvasGradient.as
>>> > > >CanvasPattern.as
>>> > > >CanvasRenderingContext2D.as
>>> > > >CaretPosition.as
>>> > > >CDATASection.as
>>> > > >CharacterData.as
>>> > > >ClientInformation.as
>>> > > >ClientRect.as
>>> > > >ClientRectList.as
>>> > > >Comment.as
>>> > > >Counter.as
>>> > > >CSSCharsetRule.as
>>> > > >CSSFontFaceRule.as
>>> > > >CSSImportRule.as
>>> > > >CSSInterface.as
>>> > > >CSSMatrix.as
>>> > > >CSSMediaRule.as
>>> > > >CSSPageRule.as
>>> > > >CSSPrimitiveValue.as
>>> > > >CSSProperties.as
>>> > > >CSSRule.as
>>> > > >CSSRuleList.as
>>> > > >CSSStyleDeclaration.as
>>> > > >CSSStyleRule.as
>>> > > >CSSStyleSheet.as
>>> > > >CSSUnknownRule.as
>>> > > >CSSValue.as
>>> > > >CSSValueList.as
>>> > > >CustomEvent.as
>>> > > >Database.as
>>> > > >DatabaseCallback.as
>>> > > >DataTransfer.as
>>> > > >DedicatedWorkerGlobalScope.as
>>> > > >Document.as
>>> > > >DocumentCSS.as
>>> > > >DocumentEvent.as
>>> > > >DocumentFragment.as
>>> > > >DocumentRange.as
>>> > > >DocumentStyle.as
>>> > > >DocumentType.as
>>> > > >DOMApplicationCache.as
>>> > > >DOMConfiguration.as
>>> > > >DOMError.as
>>> > > >DOMErrorHandler.as
>>> > > >DOMException.as
>>> > > >DOMImplementation.as
>>> > > >DOMImplementationCSS.as
>>> > > >DOMImplementationList.as
>>> > > >DOMImplementationSource.as
>>> > > >DOMLocator.as
>>> > > >DOMStringList.as
>>> > > >DOMTokenList.as
>>> > > >DragEvent.as
>>> > > >Element.as
>>> > > >ElementCSSInlineStyle.as
>>> > > >Entity.as
>>> > > >EntityReference.as
>>> > > >ErrorEvent.as
>>> > > >Event.as
>>> > > >EventListener.as
>>> > > >EventTarget.as
>>> > > >ExceptionCode.as
>>> > > >FileList.as
>>> > > >FontFace.as
>>> > > >FontFaceSet.as
>>> > > >HashChangeEvent.as
>>> > > >HTMLAnchorElement.as
>>> > > >HTMLAppletElement.as
>>> > > >HTMLAreaElement.as
>>> > > >HTMLAudioElement.as
>>> > > >HTMLBaseElement.as
>>> > > >HTMLBaseFontElement.as
>>> > > >HTMLBodyElement.as
>>> > > >HTMLBRElement.as
>>> > > >HTMLButtonElement.as
>>> > > >HTMLCanvasElement.as
>>> > > >HTMLCollection.as
>>> > > >HTMLContentElement.as
>>> > > >HTMLDetailsElement.as
>>> > > >HTMLDialogElement.as
>>> > > >HTMLDirectoryElement.as
>>> > > >HTMLDivElement.as
>>> > > >HTMLDListElement.as
>>> > > >HTMLDocument.as
>>> > > >HTMLElement.as
>>> > > >HTMLEmbedElement.as
>>> > > >HTMLFieldSetElement.as
>>> > > >HTMLFontElement.as
>>> > > >HTMLFormElement.as
>>> > > >HTMLFrameElement.as
>>> > > >HTMLFrameSetElement.as
>>> > > >HTMLHeadElement.as
>>> > > >HTMLHeadingElement.as
>>> > > >HTMLHRElement.as
>>> > > >HTMLHtmlElement.as
>>> > > >HTMLIFrameElement.as
>>> > > >HTMLImageElement.as
>>> > > >HTMLInputElement.as
>>> > > >HTMLIsIndexElement.as
>>> > > >HTMLLabelElement.as
>>> > > >HTMLLegendElement.as
>>> > > >HTMLLIElement.as
>>> > > >HTMLLinkElement.as
>>> > > >HTMLMapElement.as
>>> > > >HTMLMediaElement.as
>>> > > >HTMLMenuElement.as
>>> > > >HTMLMenuItemElement.as
>>> > > >HTMLMetaElement.as
>>> > > >HTMLModElement.as
>>> > > >HTMLObjectElement.as
>>> > > >HTMLOListElement.as
>>> > > >HTMLOptGroupElement.as
>>> > > >HTMLOptionElement.as
>>> > > >HTMLOptionsCollection.as
>>> > > >HTMLParagraphElement.as
>>> > > >HTMLParamElement.as
>>> > > >HTMLPictureElement.as
>>> > > >HTMLPreElement.as
>>> > > >HTMLQuoteElement.as
>>> > > >HTMLScriptElement.as
>>> > > >HTMLSelectElement.as
>>> > > >HTMLShadowElement.as
>>> > > >HTMLSourceElement.as
>>> > > >HTMLStyleElement.as
>>> > > >HTMLTableCaptionElement.as
>>> > > >HTMLTableCellElement.as
>>> > > >HTMLTableColElement.as
>>> > > >HTMLTableElement.as
>>> > > >HTMLTableRowElement.as
>>> > > >HTMLTableSectionElement.as
>>> > > >HTMLTemplateElement.as
>>> > > >HTMLTextAreaElement.as
>>> > > >HTMLTitleElement.as
>>> > > >HTMLUListElement.as
>>> > > >HTMLVideoElement.as
>>> > > >Image.as
>>> > > >ImageData.as
>>> > > >KeyboardEvent.as
>>> > > >LinkStyle.as
>>> > > >MediaError.as
>>> > > >MediaList.as
>>> > > >MediaQueryList.as
>>> > > >MediaQueryListListener.as
>>> > > >MessageChannel.as
>>> > > >MessageEvent.as
>>> > > >MessagePort.as
>>> > > >MouseEvent.as
>>> > > >MSCSSMatrix.as
>>> > > >MutationEvent.as
>>> > > >MutationObserver.as
>>> > > >MutationRecord.as
>>> > > >NamedNodeMap.as
>>> > > >NameList.as
>>> > > >Node.as
>>> > > >NodeFilter.as
>>> > > >NodeIterator.as
>>> > > >NodeList.as
>>> > > >Notation.as
>>> > > >openDatabase.as
>>> > > >PageTransitionEvent.as
>>> > > >PopStateEvent.as
>>> > > >postMessage.as
>>> > > >ProcessingInstruction.as
>>> > > >ProgressEvent.as
>>> > > >Range.as
>>> > > >RangeException.as
>>> > > >Rect.as
>>> > > >RelatedEvent.as
>>> > > >RGBColor.as
>>> > > >Screen.as
>>> > > >ShadowRoot.as
>>> > > >SharedWorker.as
>>> > > >SharedWorkerGlobalScope.as
>>> > > >SQLError.as
>>> > > >SQLResultSet.as
>>> > > >SQLResultSetRowList.as
>>> > > >SQLTransaction.as
>>> > > >StyleSheet.as
>>> > > >StyleSheetList.as
>>> > > >Text.as
>>> > > >TextMetrics.as
>>> > > >TextTrack.as
>>> > > >TextTrackCue.as
>>> > > >TextTrackCueList.as
>>> > > >TextTrackList.as
>>> > > >TimeRanges.as
>>> > > >TreeWalker.as
>>> > > >TypeInfo.as
>>> > > >UIEvent.as
>>> > > >UserDataHandler.as
>>> > > >ValidityState.as
>>> > > >ViewCSS.as
>>> > > >VTTCue.as
>>> > > >WebKitCSSMatrix.as
>>> > > >WebSocket.as
>>> > > >WebWorker.as
>>> > > >Window.as
>>> > > >Worker.as
>>> > > >WorkerGlobalScope.as
>>> > > >WorkerLocation.as
>>> > > >XMLHttpRequestEventTarget.as
>>> > > >XMLHttpRequestUpload.as
>>> > > >
>>> > > >
>>> > > >
>>> > > >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
>>> > > ><te...@gmail.com>
>>> > > >wrote:
>>> > > >
>>> > > >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for
>>> that
>>> > > >> matter my asdoc framework I wrote doesn't(it was just showing I
>>> had
>>> > all
>>> > > >> this working in the context of Falcon), we just need the
>>> > ASDocTokenizer
>>> > > >>to
>>> > > >> tokenize the comment data given to the ASDocDelegate.
>>> > > >>
>>> > > >> Mike
>>> > > >>
>>> > > >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
>>> > > >> teotigraphixllc@gmail.com> wrote:
>>> > > >>
>>> > > >>> The way I did it was, I did exactly what you did, implemented the
>>> > > >>> ASDocDelegate and saved the tokes as it parsed all the files.
>>> > > >>>
>>> > > >>> Then I used the token String like you in the ASDocTokenizer to
>>> parse
>>> > > >>>the
>>> > > >>> loop I showed you above.
>>> > > >>>
>>> > > >>> I would add the DocTag and stuff if you can get the
>>> ASDocTokenizer
>>> > > >>> working like how I have it in the code above. I already wrote an
>>> API
>>> > > >>>for
>>> > > >>> easy access to the tags and comment in an ASDocCOmment class that
>>> > has a
>>> > > >>> list of DocTags.
>>> > > >>>
>>> > > >>> Mike
>>> > > >>>
>>> > > >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com>
>>> wrote:
>>> > > >>>
>>> > > >>>> For this exercise though, we don’t care about the output as
>>> Velocity
>>> > > >>>>or
>>> > > >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
>>> Falcon
>>> > > >>>>you
>>> > > >>>> retrieve ASDoc comments via node.getASDocComment() and get an
>>> > > >>>> ASDocComment
>>> > > >>>> instance.  Do you want the Token to be the root of a mini-tree
>>> of
>>> > > >>>>parsed
>>> > > >>>> nodes?
>>> > > >>>>
>>> > > >>>> -Alex
>>> > > >>>>
>>> > > >>>>
>>> > > >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <
>>> teotigraphixllc@gmail.com>
>>> > > >>>> wrote:
>>> > > >>>>
>>> > > >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
>>> > Velocity
>>> > > >>>> >templates instead of XSL.
>>> > > >>>> >
>>> > > >>>> >That DocTag is my class.
>>> > > >>>> >
>>> > > >>>> >Mike
>>> > > >>>> >
>>> > > >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com>
>>> > wrote:
>>> > > >>>> >
>>> > > >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>>> > > >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would
>>> be
>>> > > >>>> >>equivalent
>>> > > >>>> >> to MXMLC.java and have a main() method.  The current Flex
>>> SDK has
>>> > > >>>>an
>>> > > >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
>>> > around
>>> > > >>>> >> somewhere?   Otherwise I will try to quickly create them.
>>> > > >>>> >>
>>> > > >>>> >> -Alex
>>> > > >>>> >>
>>> > > >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <
>>> > teotigraphixllc@gmail.com
>>> > > >
>>> > > >>>> >>wrote:
>>> > > >>>> >>
>>> > > >>>> >> >BTW, the loop always happens at the VERY end of the
>>> comment, so
>>> > > >>>>when
>>> > > >>>> >>you
>>> > > >>>> >> >get to the end the(the last call of next() that should
>>> return
>>> > > >>>>null);
>>> > > >>>> >> >
>>> > > >>>> >> >tok = tokenizer.next();
>>> > > >>>> >> >
>>> > > >>>> >> >never returns, it gets stuck trying to exit.
>>> > > >>>> >> >
>>> > > >>>> >> >Mike
>>> > > >>>> >> >
>>> > > >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>>> > > >>>> >> ><te...@gmail.com>
>>> > > >>>> >> >wrote:
>>> > > >>>> >> >
>>> > > >>>> >> >> I posted about this a couple weeks ago and I tried
>>> recompiling
>>> > > >>>>with
>>> > > >>>> >> >>JFlex
>>> > > >>>> >> >> 1.5 I think, the older version and still had the problem.
>>> > > >>>> >> >>
>>> > > >>>> >> >> Maybe I messed up something but I tried with my same asdoc
>>> > code
>>> > > >>>> when
>>> > > >>>> >>I
>>> > > >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it
>>> work
>>> > > >>>>with
>>> > > >>>> >>my
>>> > > >>>> >> >> version of a documentor.
>>> > > >>>> >> >>
>>> > > >>>> >> >> I think IIRC, I actually tried a simple test case and it
>>> would
>>> > > >>>> work.
>>> > > >>>> >> >>
>>> > > >>>> >> >> I have code that uses the tokenizer;
>>> > > >>>> >> >>
>>> > > >>>> >> >>
>>> > > >>>> >> >>     public void compile()
>>> > > >>>> >> >>     {
>>> > > >>>> >> >>         if (token == null)
>>> > > >>>> >> >>             return;
>>> > > >>>> >> >>
>>> > > >>>> >> >>         String data = token.getText();
>>> > > >>>> >> >>         ASDocTokenizer tokenizer = new
>>> ASDocTokenizer(false);
>>> > > >>>> >> >>         tokenizer.setReader(new StringReader(data));
>>> > > >>>> >> >>         ASDocToken tok = tokenizer.next();
>>> > > >>>> >> >>         boolean foundDescription = false;
>>> > > >>>> >> >>         DocTag pendingTag = null;
>>> > > >>>> >> >>
>>> > > >>>> >> >>         try
>>> > > >>>> >> >>         {
>>> > > >>>> >> >>             while (tok != null)
>>> > > >>>> >> >>             {
>>> > > >>>> >> >>                 if (!foundDescription
>>> > > >>>> >> >>                         && tok.getType() ==
>>> > > >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>>> > > >>>> >> >>                 {
>>> > > >>>> >> >>                     description = tok.getText();
>>> > > >>>> >> >>                 }
>>> > > >>>> >> >>                 else
>>> > > >>>> >> >>                 {
>>> > > >>>> >> >>                     // do tags
>>> > > >>>> >> >>                     if (tok.getType() ==
>>> > > >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>>> > > >>>> >> >>                     {
>>> > > >>>> >> >>                         if (pendingTag != null)
>>> > > >>>> >> >>                         {
>>> > > >>>> >> >>                             addTag(pendingTag);
>>> > > >>>> >> >>                             pendingTag = null;
>>> > > >>>> >> >>                         }
>>> > > >>>> >> >>                         pendingTag = new
>>> > > >>>> >> >> DocTag(tok.getText().substring(1));
>>> > > >>>> >> >>                     }
>>> > > >>>> >> >>                     else if (tok.getType() ==
>>> > > >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>>> > > >>>> >> >>                     {
>>> > > >>>> >> >>
>>> > > >>>>pendingTag.setDescription(tok.getText());
>>> > > >>>> >> >>                         addTag(pendingTag);
>>> > > >>>> >> >>                         pendingTag = null;
>>> > > >>>> >> >>                     }
>>> > > >>>> >> >>                 }
>>> > > >>>> >> >>
>>> > > >>>> >> >>                 foundDescription = true;
>>> > > >>>> >> >>
>>> > > >>>> >> >>                 tok = tokenizer.next();
>>> > > >>>> >> >>             }
>>> > > >>>> >> >>         }
>>> > > >>>> >> >>         catch (Exception e)
>>> > > >>>> >> >>         {
>>> > > >>>> >> >>             e.printStackTrace();
>>> > > >>>> >> >>         }
>>> > > >>>> >> >>     }
>>> > > >>>> >> >>
>>> > > >>>> >> >> Mike
>>> > > >>>> >> >>
>>> > > >>>> >> >>
>>> > > >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <
>>> aharui@adobe.com>
>>> > > >>>> wrote:
>>> > > >>>> >> >>
>>> > > >>>> >> >>>
>>> > > >>>> >> >>>
>>> > > >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
>>> > > >>>> teotigraphixllc@gmail.com>
>>> > > >>>> >> >>> wrote:
>>> > > >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into
>>> fixing
>>> > > >>>> >> >>>ASDocTokenizer?
>>> > > >>>> >> >>> >> Was the problem that it didn’t work on every AS file
>>> we
>>> > > >>>>current
>>> > > >>>> >> >>>have?
>>> > > >>>> >> >>> >>
>>> > > >>>> >> >>> >
>>> > > >>>> >> >>> >
>>> > > >>>> >> >>> >It doesn't work on anything, there is an infinite loop
>>> in
>>> > the
>>> > > >>>> >>scanner
>>> > > >>>> >> >>> that
>>> > > >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>>> > > >>>> >> >>> >
>>> > > >>>> >> >>> >What is weird is I was using the SAME code base when I
>>> wrote
>>> > > >>>>the
>>> > > >>>> >>asdoc
>>> > > >>>> >> >>> >documenter I have 2 years ago and it worked fine.
>>> > > >>>> >> >>>
>>> > > >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a
>>> look.
>>> > > >>>>What
>>> > > >>>> >>setup
>>> > > >>>> >> >>>did
>>> > > >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK
>>> or
>>> > > >>>>FlexJS
>>> > > >>>> >>SDK
>>> > > >>>> >> >>>or
>>> > > >>>> >> >>> did it even loop on a simple test case?
>>> > > >>>> >> >>>
>>> > > >>>> >> >>> -Alex
>>> > > >>>> >> >>>
>>> > > >>>> >> >>>
>>> > > >>>> >> >>
>>> > > >>>> >>
>>> > > >>>> >>
>>> > > >>>>
>>> > > >>>>
>>> > > >>>
>>> > > >>
>>> > >
>>> > >
>>> >
>>>
>>
>>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
BTW I need to brush up on canvas but I see;

So I assume the HTMLCanvasElement.getContext() passes a
CanvasRenderingContext2D correct?

I can't wait to get out of this compiler stuff and actually try to test
some of this stuff in the browser. :)

Mike


public class CanvasRenderingContext2D {
...
    /**
     * @see html5
     */
    native public var canvas:HTMLCanvasElement;
...
}



public class HTMLCanvasElement extends HTMLElement {

    native public function HTMLCanvasElement();

    /**
     * @see html5
     */
    native public var height:Number;

    /**
     * @see html5
     */
    native public var width:Number;

    /**
     * @see html5
     */
    native public function toDataURL(opt_type:String = null,
...var_args):String;

    /**
     * @see html5
     */
    native public function getContext(contextId:String, opt_args:Object =
null):Object;

}



On Fri, Jun 5, 2015 at 5:50 AM, Michael Schmalle <te...@gmail.com>
wrote:

>
>
> On Fri, Jun 5, 2015 at 12:39 AM, OmPrakash Muppirala <bigosmallm@gmail.com
> > wrote:
>
>> Fantastic work,  Mike!
>>
>> I dont see any SVG elements, is that part of something other spec?
>>
>
> Haven't got that far yet, was busy getting inheritance and edge cases
> fixed with the base DOM stuff.
>
> I have looked through the closure/externs and it doesn't look like they
> have an SVG.js. If you now, you will need to find one or write it. :)
>
>
>>
>> On that line,  how would one get Canvas, Webgl, etc.?
>>
>
>
> I think Canavs is HTMLCanvasNode which is in the html5.js externs.
>
> WebGL,
> https://github.com/google/closure-compiler/blob/master/externs/webgl.js
>
> Yeah that is today, I will post up when I get them in.
>
> Mike
>
>
>
>>
>> Thanks,
>> Om
>> On Jun 4, 2015 5:31 PM, "Josh Tynjala" <jo...@gmail.com> wrote:
>>
>> > Agreed! Great stuff, Mike.
>> >
>> > - Josh
>> >
>> > On Thu, Jun 4, 2015 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> > > Amazing!
>> > >
>> > > On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
>> > wrote:
>> > >
>> > > >Well so far I have got the below compiling into .as classes and
>> > interfaces
>> > > >using the following externals files;
>> > > >
>> > > >There is a definite order these need to be parsed in, I am still
>> > figuring
>> > > >them out. I plan on adding in the asdocs, the version of JS the API
>> was
>> > > >introduced in.
>> > > >
>> > > >Mike
>> > > >
>> > > >html5.js
>> > > >missing.js
>> > > >w3c_css.js
>> > > >w3c_css3d.js
>> > > >w3c_dom1.js
>> > > >w3c_dom2.js
>> > > >w3c_dom3.js
>> > > >w3c_event.js
>> > > >w3c_range.js
>> > > >
>> > > >
>> > > >Attr.as
>> > > >CanvasGradient.as
>> > > >CanvasPattern.as
>> > > >CanvasRenderingContext2D.as
>> > > >CaretPosition.as
>> > > >CDATASection.as
>> > > >CharacterData.as
>> > > >ClientInformation.as
>> > > >ClientRect.as
>> > > >ClientRectList.as
>> > > >Comment.as
>> > > >Counter.as
>> > > >CSSCharsetRule.as
>> > > >CSSFontFaceRule.as
>> > > >CSSImportRule.as
>> > > >CSSInterface.as
>> > > >CSSMatrix.as
>> > > >CSSMediaRule.as
>> > > >CSSPageRule.as
>> > > >CSSPrimitiveValue.as
>> > > >CSSProperties.as
>> > > >CSSRule.as
>> > > >CSSRuleList.as
>> > > >CSSStyleDeclaration.as
>> > > >CSSStyleRule.as
>> > > >CSSStyleSheet.as
>> > > >CSSUnknownRule.as
>> > > >CSSValue.as
>> > > >CSSValueList.as
>> > > >CustomEvent.as
>> > > >Database.as
>> > > >DatabaseCallback.as
>> > > >DataTransfer.as
>> > > >DedicatedWorkerGlobalScope.as
>> > > >Document.as
>> > > >DocumentCSS.as
>> > > >DocumentEvent.as
>> > > >DocumentFragment.as
>> > > >DocumentRange.as
>> > > >DocumentStyle.as
>> > > >DocumentType.as
>> > > >DOMApplicationCache.as
>> > > >DOMConfiguration.as
>> > > >DOMError.as
>> > > >DOMErrorHandler.as
>> > > >DOMException.as
>> > > >DOMImplementation.as
>> > > >DOMImplementationCSS.as
>> > > >DOMImplementationList.as
>> > > >DOMImplementationSource.as
>> > > >DOMLocator.as
>> > > >DOMStringList.as
>> > > >DOMTokenList.as
>> > > >DragEvent.as
>> > > >Element.as
>> > > >ElementCSSInlineStyle.as
>> > > >Entity.as
>> > > >EntityReference.as
>> > > >ErrorEvent.as
>> > > >Event.as
>> > > >EventListener.as
>> > > >EventTarget.as
>> > > >ExceptionCode.as
>> > > >FileList.as
>> > > >FontFace.as
>> > > >FontFaceSet.as
>> > > >HashChangeEvent.as
>> > > >HTMLAnchorElement.as
>> > > >HTMLAppletElement.as
>> > > >HTMLAreaElement.as
>> > > >HTMLAudioElement.as
>> > > >HTMLBaseElement.as
>> > > >HTMLBaseFontElement.as
>> > > >HTMLBodyElement.as
>> > > >HTMLBRElement.as
>> > > >HTMLButtonElement.as
>> > > >HTMLCanvasElement.as
>> > > >HTMLCollection.as
>> > > >HTMLContentElement.as
>> > > >HTMLDetailsElement.as
>> > > >HTMLDialogElement.as
>> > > >HTMLDirectoryElement.as
>> > > >HTMLDivElement.as
>> > > >HTMLDListElement.as
>> > > >HTMLDocument.as
>> > > >HTMLElement.as
>> > > >HTMLEmbedElement.as
>> > > >HTMLFieldSetElement.as
>> > > >HTMLFontElement.as
>> > > >HTMLFormElement.as
>> > > >HTMLFrameElement.as
>> > > >HTMLFrameSetElement.as
>> > > >HTMLHeadElement.as
>> > > >HTMLHeadingElement.as
>> > > >HTMLHRElement.as
>> > > >HTMLHtmlElement.as
>> > > >HTMLIFrameElement.as
>> > > >HTMLImageElement.as
>> > > >HTMLInputElement.as
>> > > >HTMLIsIndexElement.as
>> > > >HTMLLabelElement.as
>> > > >HTMLLegendElement.as
>> > > >HTMLLIElement.as
>> > > >HTMLLinkElement.as
>> > > >HTMLMapElement.as
>> > > >HTMLMediaElement.as
>> > > >HTMLMenuElement.as
>> > > >HTMLMenuItemElement.as
>> > > >HTMLMetaElement.as
>> > > >HTMLModElement.as
>> > > >HTMLObjectElement.as
>> > > >HTMLOListElement.as
>> > > >HTMLOptGroupElement.as
>> > > >HTMLOptionElement.as
>> > > >HTMLOptionsCollection.as
>> > > >HTMLParagraphElement.as
>> > > >HTMLParamElement.as
>> > > >HTMLPictureElement.as
>> > > >HTMLPreElement.as
>> > > >HTMLQuoteElement.as
>> > > >HTMLScriptElement.as
>> > > >HTMLSelectElement.as
>> > > >HTMLShadowElement.as
>> > > >HTMLSourceElement.as
>> > > >HTMLStyleElement.as
>> > > >HTMLTableCaptionElement.as
>> > > >HTMLTableCellElement.as
>> > > >HTMLTableColElement.as
>> > > >HTMLTableElement.as
>> > > >HTMLTableRowElement.as
>> > > >HTMLTableSectionElement.as
>> > > >HTMLTemplateElement.as
>> > > >HTMLTextAreaElement.as
>> > > >HTMLTitleElement.as
>> > > >HTMLUListElement.as
>> > > >HTMLVideoElement.as
>> > > >Image.as
>> > > >ImageData.as
>> > > >KeyboardEvent.as
>> > > >LinkStyle.as
>> > > >MediaError.as
>> > > >MediaList.as
>> > > >MediaQueryList.as
>> > > >MediaQueryListListener.as
>> > > >MessageChannel.as
>> > > >MessageEvent.as
>> > > >MessagePort.as
>> > > >MouseEvent.as
>> > > >MSCSSMatrix.as
>> > > >MutationEvent.as
>> > > >MutationObserver.as
>> > > >MutationRecord.as
>> > > >NamedNodeMap.as
>> > > >NameList.as
>> > > >Node.as
>> > > >NodeFilter.as
>> > > >NodeIterator.as
>> > > >NodeList.as
>> > > >Notation.as
>> > > >openDatabase.as
>> > > >PageTransitionEvent.as
>> > > >PopStateEvent.as
>> > > >postMessage.as
>> > > >ProcessingInstruction.as
>> > > >ProgressEvent.as
>> > > >Range.as
>> > > >RangeException.as
>> > > >Rect.as
>> > > >RelatedEvent.as
>> > > >RGBColor.as
>> > > >Screen.as
>> > > >ShadowRoot.as
>> > > >SharedWorker.as
>> > > >SharedWorkerGlobalScope.as
>> > > >SQLError.as
>> > > >SQLResultSet.as
>> > > >SQLResultSetRowList.as
>> > > >SQLTransaction.as
>> > > >StyleSheet.as
>> > > >StyleSheetList.as
>> > > >Text.as
>> > > >TextMetrics.as
>> > > >TextTrack.as
>> > > >TextTrackCue.as
>> > > >TextTrackCueList.as
>> > > >TextTrackList.as
>> > > >TimeRanges.as
>> > > >TreeWalker.as
>> > > >TypeInfo.as
>> > > >UIEvent.as
>> > > >UserDataHandler.as
>> > > >ValidityState.as
>> > > >ViewCSS.as
>> > > >VTTCue.as
>> > > >WebKitCSSMatrix.as
>> > > >WebSocket.as
>> > > >WebWorker.as
>> > > >Window.as
>> > > >Worker.as
>> > > >WorkerGlobalScope.as
>> > > >WorkerLocation.as
>> > > >XMLHttpRequestEventTarget.as
>> > > >XMLHttpRequestUpload.as
>> > > >
>> > > >
>> > > >
>> > > >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
>> > > ><te...@gmail.com>
>> > > >wrote:
>> > > >
>> > > >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for
>> that
>> > > >> matter my asdoc framework I wrote doesn't(it was just showing I had
>> > all
>> > > >> this working in the context of Falcon), we just need the
>> > ASDocTokenizer
>> > > >>to
>> > > >> tokenize the comment data given to the ASDocDelegate.
>> > > >>
>> > > >> Mike
>> > > >>
>> > > >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
>> > > >> teotigraphixllc@gmail.com> wrote:
>> > > >>
>> > > >>> The way I did it was, I did exactly what you did, implemented the
>> > > >>> ASDocDelegate and saved the tokes as it parsed all the files.
>> > > >>>
>> > > >>> Then I used the token String like you in the ASDocTokenizer to
>> parse
>> > > >>>the
>> > > >>> loop I showed you above.
>> > > >>>
>> > > >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
>> > > >>> working like how I have it in the code above. I already wrote an
>> API
>> > > >>>for
>> > > >>> easy access to the tags and comment in an ASDocCOmment class that
>> > has a
>> > > >>> list of DocTags.
>> > > >>>
>> > > >>> Mike
>> > > >>>
>> > > >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com>
>> wrote:
>> > > >>>
>> > > >>>> For this exercise though, we don’t care about the output as
>> Velocity
>> > > >>>>or
>> > > >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
>> Falcon
>> > > >>>>you
>> > > >>>> retrieve ASDoc comments via node.getASDocComment() and get an
>> > > >>>> ASDocComment
>> > > >>>> instance.  Do you want the Token to be the root of a mini-tree of
>> > > >>>>parsed
>> > > >>>> nodes?
>> > > >>>>
>> > > >>>> -Alex
>> > > >>>>
>> > > >>>>
>> > > >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <
>> teotigraphixllc@gmail.com>
>> > > >>>> wrote:
>> > > >>>>
>> > > >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
>> > Velocity
>> > > >>>> >templates instead of XSL.
>> > > >>>> >
>> > > >>>> >That DocTag is my class.
>> > > >>>> >
>> > > >>>> >Mike
>> > > >>>> >
>> > > >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com>
>> > wrote:
>> > > >>>> >
>> > > >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>> > > >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
>> > > >>>> >>equivalent
>> > > >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK
>> has
>> > > >>>>an
>> > > >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
>> > around
>> > > >>>> >> somewhere?   Otherwise I will try to quickly create them.
>> > > >>>> >>
>> > > >>>> >> -Alex
>> > > >>>> >>
>> > > >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <
>> > teotigraphixllc@gmail.com
>> > > >
>> > > >>>> >>wrote:
>> > > >>>> >>
>> > > >>>> >> >BTW, the loop always happens at the VERY end of the comment,
>> so
>> > > >>>>when
>> > > >>>> >>you
>> > > >>>> >> >get to the end the(the last call of next() that should return
>> > > >>>>null);
>> > > >>>> >> >
>> > > >>>> >> >tok = tokenizer.next();
>> > > >>>> >> >
>> > > >>>> >> >never returns, it gets stuck trying to exit.
>> > > >>>> >> >
>> > > >>>> >> >Mike
>> > > >>>> >> >
>> > > >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>> > > >>>> >> ><te...@gmail.com>
>> > > >>>> >> >wrote:
>> > > >>>> >> >
>> > > >>>> >> >> I posted about this a couple weeks ago and I tried
>> recompiling
>> > > >>>>with
>> > > >>>> >> >>JFlex
>> > > >>>> >> >> 1.5 I think, the older version and still had the problem.
>> > > >>>> >> >>
>> > > >>>> >> >> Maybe I messed up something but I tried with my same asdoc
>> > code
>> > > >>>> when
>> > > >>>> >>I
>> > > >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it
>> work
>> > > >>>>with
>> > > >>>> >>my
>> > > >>>> >> >> version of a documentor.
>> > > >>>> >> >>
>> > > >>>> >> >> I think IIRC, I actually tried a simple test case and it
>> would
>> > > >>>> work.
>> > > >>>> >> >>
>> > > >>>> >> >> I have code that uses the tokenizer;
>> > > >>>> >> >>
>> > > >>>> >> >>
>> > > >>>> >> >>     public void compile()
>> > > >>>> >> >>     {
>> > > >>>> >> >>         if (token == null)
>> > > >>>> >> >>             return;
>> > > >>>> >> >>
>> > > >>>> >> >>         String data = token.getText();
>> > > >>>> >> >>         ASDocTokenizer tokenizer = new
>> ASDocTokenizer(false);
>> > > >>>> >> >>         tokenizer.setReader(new StringReader(data));
>> > > >>>> >> >>         ASDocToken tok = tokenizer.next();
>> > > >>>> >> >>         boolean foundDescription = false;
>> > > >>>> >> >>         DocTag pendingTag = null;
>> > > >>>> >> >>
>> > > >>>> >> >>         try
>> > > >>>> >> >>         {
>> > > >>>> >> >>             while (tok != null)
>> > > >>>> >> >>             {
>> > > >>>> >> >>                 if (!foundDescription
>> > > >>>> >> >>                         && tok.getType() ==
>> > > >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>> > > >>>> >> >>                 {
>> > > >>>> >> >>                     description = tok.getText();
>> > > >>>> >> >>                 }
>> > > >>>> >> >>                 else
>> > > >>>> >> >>                 {
>> > > >>>> >> >>                     // do tags
>> > > >>>> >> >>                     if (tok.getType() ==
>> > > >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>> > > >>>> >> >>                     {
>> > > >>>> >> >>                         if (pendingTag != null)
>> > > >>>> >> >>                         {
>> > > >>>> >> >>                             addTag(pendingTag);
>> > > >>>> >> >>                             pendingTag = null;
>> > > >>>> >> >>                         }
>> > > >>>> >> >>                         pendingTag = new
>> > > >>>> >> >> DocTag(tok.getText().substring(1));
>> > > >>>> >> >>                     }
>> > > >>>> >> >>                     else if (tok.getType() ==
>> > > >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>> > > >>>> >> >>                     {
>> > > >>>> >> >>
>> > > >>>>pendingTag.setDescription(tok.getText());
>> > > >>>> >> >>                         addTag(pendingTag);
>> > > >>>> >> >>                         pendingTag = null;
>> > > >>>> >> >>                     }
>> > > >>>> >> >>                 }
>> > > >>>> >> >>
>> > > >>>> >> >>                 foundDescription = true;
>> > > >>>> >> >>
>> > > >>>> >> >>                 tok = tokenizer.next();
>> > > >>>> >> >>             }
>> > > >>>> >> >>         }
>> > > >>>> >> >>         catch (Exception e)
>> > > >>>> >> >>         {
>> > > >>>> >> >>             e.printStackTrace();
>> > > >>>> >> >>         }
>> > > >>>> >> >>     }
>> > > >>>> >> >>
>> > > >>>> >> >> Mike
>> > > >>>> >> >>
>> > > >>>> >> >>
>> > > >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <
>> aharui@adobe.com>
>> > > >>>> wrote:
>> > > >>>> >> >>
>> > > >>>> >> >>>
>> > > >>>> >> >>>
>> > > >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
>> > > >>>> teotigraphixllc@gmail.com>
>> > > >>>> >> >>> wrote:
>> > > >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
>> > > >>>> >> >>>ASDocTokenizer?
>> > > >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
>> > > >>>>current
>> > > >>>> >> >>>have?
>> > > >>>> >> >>> >>
>> > > >>>> >> >>> >
>> > > >>>> >> >>> >
>> > > >>>> >> >>> >It doesn't work on anything, there is an infinite loop in
>> > the
>> > > >>>> >>scanner
>> > > >>>> >> >>> that
>> > > >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>> > > >>>> >> >>> >
>> > > >>>> >> >>> >What is weird is I was using the SAME code base when I
>> wrote
>> > > >>>>the
>> > > >>>> >>asdoc
>> > > >>>> >> >>> >documenter I have 2 years ago and it worked fine.
>> > > >>>> >> >>>
>> > > >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
>> > > >>>>What
>> > > >>>> >>setup
>> > > >>>> >> >>>did
>> > > >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
>> > > >>>>FlexJS
>> > > >>>> >>SDK
>> > > >>>> >> >>>or
>> > > >>>> >> >>> did it even loop on a simple test case?
>> > > >>>> >> >>>
>> > > >>>> >> >>> -Alex
>> > > >>>> >> >>>
>> > > >>>> >> >>>
>> > > >>>> >> >>
>> > > >>>> >>
>> > > >>>> >>
>> > > >>>>
>> > > >>>>
>> > > >>>
>> > > >>
>> > >
>> > >
>> >
>>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
On Fri, Jun 5, 2015 at 12:39 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> Fantastic work,  Mike!
>
> I dont see any SVG elements, is that part of something other spec?
>

Haven't got that far yet, was busy getting inheritance and edge cases fixed
with the base DOM stuff.

I have looked through the closure/externs and it doesn't look like they
have an SVG.js. If you now, you will need to find one or write it. :)


>
> On that line,  how would one get Canvas, Webgl, etc.?
>


I think Canavs is HTMLCanvasNode which is in the html5.js externs.

WebGL,
https://github.com/google/closure-compiler/blob/master/externs/webgl.js

Yeah that is today, I will post up when I get them in.

Mike



>
> Thanks,
> Om
> On Jun 4, 2015 5:31 PM, "Josh Tynjala" <jo...@gmail.com> wrote:
>
> > Agreed! Great stuff, Mike.
> >
> > - Josh
> >
> > On Thu, Jun 4, 2015 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> > > Amazing!
> > >
> > > On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
> > wrote:
> > >
> > > >Well so far I have got the below compiling into .as classes and
> > interfaces
> > > >using the following externals files;
> > > >
> > > >There is a definite order these need to be parsed in, I am still
> > figuring
> > > >them out. I plan on adding in the asdocs, the version of JS the API
> was
> > > >introduced in.
> > > >
> > > >Mike
> > > >
> > > >html5.js
> > > >missing.js
> > > >w3c_css.js
> > > >w3c_css3d.js
> > > >w3c_dom1.js
> > > >w3c_dom2.js
> > > >w3c_dom3.js
> > > >w3c_event.js
> > > >w3c_range.js
> > > >
> > > >
> > > >Attr.as
> > > >CanvasGradient.as
> > > >CanvasPattern.as
> > > >CanvasRenderingContext2D.as
> > > >CaretPosition.as
> > > >CDATASection.as
> > > >CharacterData.as
> > > >ClientInformation.as
> > > >ClientRect.as
> > > >ClientRectList.as
> > > >Comment.as
> > > >Counter.as
> > > >CSSCharsetRule.as
> > > >CSSFontFaceRule.as
> > > >CSSImportRule.as
> > > >CSSInterface.as
> > > >CSSMatrix.as
> > > >CSSMediaRule.as
> > > >CSSPageRule.as
> > > >CSSPrimitiveValue.as
> > > >CSSProperties.as
> > > >CSSRule.as
> > > >CSSRuleList.as
> > > >CSSStyleDeclaration.as
> > > >CSSStyleRule.as
> > > >CSSStyleSheet.as
> > > >CSSUnknownRule.as
> > > >CSSValue.as
> > > >CSSValueList.as
> > > >CustomEvent.as
> > > >Database.as
> > > >DatabaseCallback.as
> > > >DataTransfer.as
> > > >DedicatedWorkerGlobalScope.as
> > > >Document.as
> > > >DocumentCSS.as
> > > >DocumentEvent.as
> > > >DocumentFragment.as
> > > >DocumentRange.as
> > > >DocumentStyle.as
> > > >DocumentType.as
> > > >DOMApplicationCache.as
> > > >DOMConfiguration.as
> > > >DOMError.as
> > > >DOMErrorHandler.as
> > > >DOMException.as
> > > >DOMImplementation.as
> > > >DOMImplementationCSS.as
> > > >DOMImplementationList.as
> > > >DOMImplementationSource.as
> > > >DOMLocator.as
> > > >DOMStringList.as
> > > >DOMTokenList.as
> > > >DragEvent.as
> > > >Element.as
> > > >ElementCSSInlineStyle.as
> > > >Entity.as
> > > >EntityReference.as
> > > >ErrorEvent.as
> > > >Event.as
> > > >EventListener.as
> > > >EventTarget.as
> > > >ExceptionCode.as
> > > >FileList.as
> > > >FontFace.as
> > > >FontFaceSet.as
> > > >HashChangeEvent.as
> > > >HTMLAnchorElement.as
> > > >HTMLAppletElement.as
> > > >HTMLAreaElement.as
> > > >HTMLAudioElement.as
> > > >HTMLBaseElement.as
> > > >HTMLBaseFontElement.as
> > > >HTMLBodyElement.as
> > > >HTMLBRElement.as
> > > >HTMLButtonElement.as
> > > >HTMLCanvasElement.as
> > > >HTMLCollection.as
> > > >HTMLContentElement.as
> > > >HTMLDetailsElement.as
> > > >HTMLDialogElement.as
> > > >HTMLDirectoryElement.as
> > > >HTMLDivElement.as
> > > >HTMLDListElement.as
> > > >HTMLDocument.as
> > > >HTMLElement.as
> > > >HTMLEmbedElement.as
> > > >HTMLFieldSetElement.as
> > > >HTMLFontElement.as
> > > >HTMLFormElement.as
> > > >HTMLFrameElement.as
> > > >HTMLFrameSetElement.as
> > > >HTMLHeadElement.as
> > > >HTMLHeadingElement.as
> > > >HTMLHRElement.as
> > > >HTMLHtmlElement.as
> > > >HTMLIFrameElement.as
> > > >HTMLImageElement.as
> > > >HTMLInputElement.as
> > > >HTMLIsIndexElement.as
> > > >HTMLLabelElement.as
> > > >HTMLLegendElement.as
> > > >HTMLLIElement.as
> > > >HTMLLinkElement.as
> > > >HTMLMapElement.as
> > > >HTMLMediaElement.as
> > > >HTMLMenuElement.as
> > > >HTMLMenuItemElement.as
> > > >HTMLMetaElement.as
> > > >HTMLModElement.as
> > > >HTMLObjectElement.as
> > > >HTMLOListElement.as
> > > >HTMLOptGroupElement.as
> > > >HTMLOptionElement.as
> > > >HTMLOptionsCollection.as
> > > >HTMLParagraphElement.as
> > > >HTMLParamElement.as
> > > >HTMLPictureElement.as
> > > >HTMLPreElement.as
> > > >HTMLQuoteElement.as
> > > >HTMLScriptElement.as
> > > >HTMLSelectElement.as
> > > >HTMLShadowElement.as
> > > >HTMLSourceElement.as
> > > >HTMLStyleElement.as
> > > >HTMLTableCaptionElement.as
> > > >HTMLTableCellElement.as
> > > >HTMLTableColElement.as
> > > >HTMLTableElement.as
> > > >HTMLTableRowElement.as
> > > >HTMLTableSectionElement.as
> > > >HTMLTemplateElement.as
> > > >HTMLTextAreaElement.as
> > > >HTMLTitleElement.as
> > > >HTMLUListElement.as
> > > >HTMLVideoElement.as
> > > >Image.as
> > > >ImageData.as
> > > >KeyboardEvent.as
> > > >LinkStyle.as
> > > >MediaError.as
> > > >MediaList.as
> > > >MediaQueryList.as
> > > >MediaQueryListListener.as
> > > >MessageChannel.as
> > > >MessageEvent.as
> > > >MessagePort.as
> > > >MouseEvent.as
> > > >MSCSSMatrix.as
> > > >MutationEvent.as
> > > >MutationObserver.as
> > > >MutationRecord.as
> > > >NamedNodeMap.as
> > > >NameList.as
> > > >Node.as
> > > >NodeFilter.as
> > > >NodeIterator.as
> > > >NodeList.as
> > > >Notation.as
> > > >openDatabase.as
> > > >PageTransitionEvent.as
> > > >PopStateEvent.as
> > > >postMessage.as
> > > >ProcessingInstruction.as
> > > >ProgressEvent.as
> > > >Range.as
> > > >RangeException.as
> > > >Rect.as
> > > >RelatedEvent.as
> > > >RGBColor.as
> > > >Screen.as
> > > >ShadowRoot.as
> > > >SharedWorker.as
> > > >SharedWorkerGlobalScope.as
> > > >SQLError.as
> > > >SQLResultSet.as
> > > >SQLResultSetRowList.as
> > > >SQLTransaction.as
> > > >StyleSheet.as
> > > >StyleSheetList.as
> > > >Text.as
> > > >TextMetrics.as
> > > >TextTrack.as
> > > >TextTrackCue.as
> > > >TextTrackCueList.as
> > > >TextTrackList.as
> > > >TimeRanges.as
> > > >TreeWalker.as
> > > >TypeInfo.as
> > > >UIEvent.as
> > > >UserDataHandler.as
> > > >ValidityState.as
> > > >ViewCSS.as
> > > >VTTCue.as
> > > >WebKitCSSMatrix.as
> > > >WebSocket.as
> > > >WebWorker.as
> > > >Window.as
> > > >Worker.as
> > > >WorkerGlobalScope.as
> > > >WorkerLocation.as
> > > >XMLHttpRequestEventTarget.as
> > > >XMLHttpRequestUpload.as
> > > >
> > > >
> > > >
> > > >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
> > > ><te...@gmail.com>
> > > >wrote:
> > > >
> > > >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for
> that
> > > >> matter my asdoc framework I wrote doesn't(it was just showing I had
> > all
> > > >> this working in the context of Falcon), we just need the
> > ASDocTokenizer
> > > >>to
> > > >> tokenize the comment data given to the ASDocDelegate.
> > > >>
> > > >> Mike
> > > >>
> > > >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
> > > >> teotigraphixllc@gmail.com> wrote:
> > > >>
> > > >>> The way I did it was, I did exactly what you did, implemented the
> > > >>> ASDocDelegate and saved the tokes as it parsed all the files.
> > > >>>
> > > >>> Then I used the token String like you in the ASDocTokenizer to
> parse
> > > >>>the
> > > >>> loop I showed you above.
> > > >>>
> > > >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
> > > >>> working like how I have it in the code above. I already wrote an
> API
> > > >>>for
> > > >>> easy access to the tags and comment in an ASDocCOmment class that
> > has a
> > > >>> list of DocTags.
> > > >>>
> > > >>> Mike
> > > >>>
> > > >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com>
> wrote:
> > > >>>
> > > >>>> For this exercise though, we don’t care about the output as
> Velocity
> > > >>>>or
> > > >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
> Falcon
> > > >>>>you
> > > >>>> retrieve ASDoc comments via node.getASDocComment() and get an
> > > >>>> ASDocComment
> > > >>>> instance.  Do you want the Token to be the root of a mini-tree of
> > > >>>>parsed
> > > >>>> nodes?
> > > >>>>
> > > >>>> -Alex
> > > >>>>
> > > >>>>
> > > >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <
> teotigraphixllc@gmail.com>
> > > >>>> wrote:
> > > >>>>
> > > >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
> > Velocity
> > > >>>> >templates instead of XSL.
> > > >>>> >
> > > >>>> >That DocTag is my class.
> > > >>>> >
> > > >>>> >Mike
> > > >>>> >
> > > >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com>
> > wrote:
> > > >>>> >
> > > >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
> > > >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
> > > >>>> >>equivalent
> > > >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK
> has
> > > >>>>an
> > > >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
> > around
> > > >>>> >> somewhere?   Otherwise I will try to quickly create them.
> > > >>>> >>
> > > >>>> >> -Alex
> > > >>>> >>
> > > >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <
> > teotigraphixllc@gmail.com
> > > >
> > > >>>> >>wrote:
> > > >>>> >>
> > > >>>> >> >BTW, the loop always happens at the VERY end of the comment,
> so
> > > >>>>when
> > > >>>> >>you
> > > >>>> >> >get to the end the(the last call of next() that should return
> > > >>>>null);
> > > >>>> >> >
> > > >>>> >> >tok = tokenizer.next();
> > > >>>> >> >
> > > >>>> >> >never returns, it gets stuck trying to exit.
> > > >>>> >> >
> > > >>>> >> >Mike
> > > >>>> >> >
> > > >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> > > >>>> >> ><te...@gmail.com>
> > > >>>> >> >wrote:
> > > >>>> >> >
> > > >>>> >> >> I posted about this a couple weeks ago and I tried
> recompiling
> > > >>>>with
> > > >>>> >> >>JFlex
> > > >>>> >> >> 1.5 I think, the older version and still had the problem.
> > > >>>> >> >>
> > > >>>> >> >> Maybe I messed up something but I tried with my same asdoc
> > code
> > > >>>> when
> > > >>>> >>I
> > > >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it
> work
> > > >>>>with
> > > >>>> >>my
> > > >>>> >> >> version of a documentor.
> > > >>>> >> >>
> > > >>>> >> >> I think IIRC, I actually tried a simple test case and it
> would
> > > >>>> work.
> > > >>>> >> >>
> > > >>>> >> >> I have code that uses the tokenizer;
> > > >>>> >> >>
> > > >>>> >> >>
> > > >>>> >> >>     public void compile()
> > > >>>> >> >>     {
> > > >>>> >> >>         if (token == null)
> > > >>>> >> >>             return;
> > > >>>> >> >>
> > > >>>> >> >>         String data = token.getText();
> > > >>>> >> >>         ASDocTokenizer tokenizer = new
> ASDocTokenizer(false);
> > > >>>> >> >>         tokenizer.setReader(new StringReader(data));
> > > >>>> >> >>         ASDocToken tok = tokenizer.next();
> > > >>>> >> >>         boolean foundDescription = false;
> > > >>>> >> >>         DocTag pendingTag = null;
> > > >>>> >> >>
> > > >>>> >> >>         try
> > > >>>> >> >>         {
> > > >>>> >> >>             while (tok != null)
> > > >>>> >> >>             {
> > > >>>> >> >>                 if (!foundDescription
> > > >>>> >> >>                         && tok.getType() ==
> > > >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> > > >>>> >> >>                 {
> > > >>>> >> >>                     description = tok.getText();
> > > >>>> >> >>                 }
> > > >>>> >> >>                 else
> > > >>>> >> >>                 {
> > > >>>> >> >>                     // do tags
> > > >>>> >> >>                     if (tok.getType() ==
> > > >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
> > > >>>> >> >>                     {
> > > >>>> >> >>                         if (pendingTag != null)
> > > >>>> >> >>                         {
> > > >>>> >> >>                             addTag(pendingTag);
> > > >>>> >> >>                             pendingTag = null;
> > > >>>> >> >>                         }
> > > >>>> >> >>                         pendingTag = new
> > > >>>> >> >> DocTag(tok.getText().substring(1));
> > > >>>> >> >>                     }
> > > >>>> >> >>                     else if (tok.getType() ==
> > > >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> > > >>>> >> >>                     {
> > > >>>> >> >>
> > > >>>>pendingTag.setDescription(tok.getText());
> > > >>>> >> >>                         addTag(pendingTag);
> > > >>>> >> >>                         pendingTag = null;
> > > >>>> >> >>                     }
> > > >>>> >> >>                 }
> > > >>>> >> >>
> > > >>>> >> >>                 foundDescription = true;
> > > >>>> >> >>
> > > >>>> >> >>                 tok = tokenizer.next();
> > > >>>> >> >>             }
> > > >>>> >> >>         }
> > > >>>> >> >>         catch (Exception e)
> > > >>>> >> >>         {
> > > >>>> >> >>             e.printStackTrace();
> > > >>>> >> >>         }
> > > >>>> >> >>     }
> > > >>>> >> >>
> > > >>>> >> >> Mike
> > > >>>> >> >>
> > > >>>> >> >>
> > > >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <
> aharui@adobe.com>
> > > >>>> wrote:
> > > >>>> >> >>
> > > >>>> >> >>>
> > > >>>> >> >>>
> > > >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
> > > >>>> teotigraphixllc@gmail.com>
> > > >>>> >> >>> wrote:
> > > >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
> > > >>>> >> >>>ASDocTokenizer?
> > > >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
> > > >>>>current
> > > >>>> >> >>>have?
> > > >>>> >> >>> >>
> > > >>>> >> >>> >
> > > >>>> >> >>> >
> > > >>>> >> >>> >It doesn't work on anything, there is an infinite loop in
> > the
> > > >>>> >>scanner
> > > >>>> >> >>> that
> > > >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> > > >>>> >> >>> >
> > > >>>> >> >>> >What is weird is I was using the SAME code base when I
> wrote
> > > >>>>the
> > > >>>> >>asdoc
> > > >>>> >> >>> >documenter I have 2 years ago and it worked fine.
> > > >>>> >> >>>
> > > >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
> > > >>>>What
> > > >>>> >>setup
> > > >>>> >> >>>did
> > > >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
> > > >>>>FlexJS
> > > >>>> >>SDK
> > > >>>> >> >>>or
> > > >>>> >> >>> did it even loop on a simple test case?
> > > >>>> >> >>>
> > > >>>> >> >>> -Alex
> > > >>>> >> >>>
> > > >>>> >> >>>
> > > >>>> >> >>
> > > >>>> >>
> > > >>>> >>
> > > >>>>
> > > >>>>
> > > >>>
> > > >>
> > >
> > >
> >
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Fantastic work,  Mike!

I dont see any SVG elements, is that part of something other spec?

On that line,  how would one get Canvas, Webgl, etc.?

Thanks,
Om
On Jun 4, 2015 5:31 PM, "Josh Tynjala" <jo...@gmail.com> wrote:

> Agreed! Great stuff, Mike.
>
> - Josh
>
> On Thu, Jun 4, 2015 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>
> > Amazing!
> >
> > On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
> wrote:
> >
> > >Well so far I have got the below compiling into .as classes and
> interfaces
> > >using the following externals files;
> > >
> > >There is a definite order these need to be parsed in, I am still
> figuring
> > >them out. I plan on adding in the asdocs, the version of JS the API was
> > >introduced in.
> > >
> > >Mike
> > >
> > >html5.js
> > >missing.js
> > >w3c_css.js
> > >w3c_css3d.js
> > >w3c_dom1.js
> > >w3c_dom2.js
> > >w3c_dom3.js
> > >w3c_event.js
> > >w3c_range.js
> > >
> > >
> > >Attr.as
> > >CanvasGradient.as
> > >CanvasPattern.as
> > >CanvasRenderingContext2D.as
> > >CaretPosition.as
> > >CDATASection.as
> > >CharacterData.as
> > >ClientInformation.as
> > >ClientRect.as
> > >ClientRectList.as
> > >Comment.as
> > >Counter.as
> > >CSSCharsetRule.as
> > >CSSFontFaceRule.as
> > >CSSImportRule.as
> > >CSSInterface.as
> > >CSSMatrix.as
> > >CSSMediaRule.as
> > >CSSPageRule.as
> > >CSSPrimitiveValue.as
> > >CSSProperties.as
> > >CSSRule.as
> > >CSSRuleList.as
> > >CSSStyleDeclaration.as
> > >CSSStyleRule.as
> > >CSSStyleSheet.as
> > >CSSUnknownRule.as
> > >CSSValue.as
> > >CSSValueList.as
> > >CustomEvent.as
> > >Database.as
> > >DatabaseCallback.as
> > >DataTransfer.as
> > >DedicatedWorkerGlobalScope.as
> > >Document.as
> > >DocumentCSS.as
> > >DocumentEvent.as
> > >DocumentFragment.as
> > >DocumentRange.as
> > >DocumentStyle.as
> > >DocumentType.as
> > >DOMApplicationCache.as
> > >DOMConfiguration.as
> > >DOMError.as
> > >DOMErrorHandler.as
> > >DOMException.as
> > >DOMImplementation.as
> > >DOMImplementationCSS.as
> > >DOMImplementationList.as
> > >DOMImplementationSource.as
> > >DOMLocator.as
> > >DOMStringList.as
> > >DOMTokenList.as
> > >DragEvent.as
> > >Element.as
> > >ElementCSSInlineStyle.as
> > >Entity.as
> > >EntityReference.as
> > >ErrorEvent.as
> > >Event.as
> > >EventListener.as
> > >EventTarget.as
> > >ExceptionCode.as
> > >FileList.as
> > >FontFace.as
> > >FontFaceSet.as
> > >HashChangeEvent.as
> > >HTMLAnchorElement.as
> > >HTMLAppletElement.as
> > >HTMLAreaElement.as
> > >HTMLAudioElement.as
> > >HTMLBaseElement.as
> > >HTMLBaseFontElement.as
> > >HTMLBodyElement.as
> > >HTMLBRElement.as
> > >HTMLButtonElement.as
> > >HTMLCanvasElement.as
> > >HTMLCollection.as
> > >HTMLContentElement.as
> > >HTMLDetailsElement.as
> > >HTMLDialogElement.as
> > >HTMLDirectoryElement.as
> > >HTMLDivElement.as
> > >HTMLDListElement.as
> > >HTMLDocument.as
> > >HTMLElement.as
> > >HTMLEmbedElement.as
> > >HTMLFieldSetElement.as
> > >HTMLFontElement.as
> > >HTMLFormElement.as
> > >HTMLFrameElement.as
> > >HTMLFrameSetElement.as
> > >HTMLHeadElement.as
> > >HTMLHeadingElement.as
> > >HTMLHRElement.as
> > >HTMLHtmlElement.as
> > >HTMLIFrameElement.as
> > >HTMLImageElement.as
> > >HTMLInputElement.as
> > >HTMLIsIndexElement.as
> > >HTMLLabelElement.as
> > >HTMLLegendElement.as
> > >HTMLLIElement.as
> > >HTMLLinkElement.as
> > >HTMLMapElement.as
> > >HTMLMediaElement.as
> > >HTMLMenuElement.as
> > >HTMLMenuItemElement.as
> > >HTMLMetaElement.as
> > >HTMLModElement.as
> > >HTMLObjectElement.as
> > >HTMLOListElement.as
> > >HTMLOptGroupElement.as
> > >HTMLOptionElement.as
> > >HTMLOptionsCollection.as
> > >HTMLParagraphElement.as
> > >HTMLParamElement.as
> > >HTMLPictureElement.as
> > >HTMLPreElement.as
> > >HTMLQuoteElement.as
> > >HTMLScriptElement.as
> > >HTMLSelectElement.as
> > >HTMLShadowElement.as
> > >HTMLSourceElement.as
> > >HTMLStyleElement.as
> > >HTMLTableCaptionElement.as
> > >HTMLTableCellElement.as
> > >HTMLTableColElement.as
> > >HTMLTableElement.as
> > >HTMLTableRowElement.as
> > >HTMLTableSectionElement.as
> > >HTMLTemplateElement.as
> > >HTMLTextAreaElement.as
> > >HTMLTitleElement.as
> > >HTMLUListElement.as
> > >HTMLVideoElement.as
> > >Image.as
> > >ImageData.as
> > >KeyboardEvent.as
> > >LinkStyle.as
> > >MediaError.as
> > >MediaList.as
> > >MediaQueryList.as
> > >MediaQueryListListener.as
> > >MessageChannel.as
> > >MessageEvent.as
> > >MessagePort.as
> > >MouseEvent.as
> > >MSCSSMatrix.as
> > >MutationEvent.as
> > >MutationObserver.as
> > >MutationRecord.as
> > >NamedNodeMap.as
> > >NameList.as
> > >Node.as
> > >NodeFilter.as
> > >NodeIterator.as
> > >NodeList.as
> > >Notation.as
> > >openDatabase.as
> > >PageTransitionEvent.as
> > >PopStateEvent.as
> > >postMessage.as
> > >ProcessingInstruction.as
> > >ProgressEvent.as
> > >Range.as
> > >RangeException.as
> > >Rect.as
> > >RelatedEvent.as
> > >RGBColor.as
> > >Screen.as
> > >ShadowRoot.as
> > >SharedWorker.as
> > >SharedWorkerGlobalScope.as
> > >SQLError.as
> > >SQLResultSet.as
> > >SQLResultSetRowList.as
> > >SQLTransaction.as
> > >StyleSheet.as
> > >StyleSheetList.as
> > >Text.as
> > >TextMetrics.as
> > >TextTrack.as
> > >TextTrackCue.as
> > >TextTrackCueList.as
> > >TextTrackList.as
> > >TimeRanges.as
> > >TreeWalker.as
> > >TypeInfo.as
> > >UIEvent.as
> > >UserDataHandler.as
> > >ValidityState.as
> > >ViewCSS.as
> > >VTTCue.as
> > >WebKitCSSMatrix.as
> > >WebSocket.as
> > >WebWorker.as
> > >Window.as
> > >Worker.as
> > >WorkerGlobalScope.as
> > >WorkerLocation.as
> > >XMLHttpRequestEventTarget.as
> > >XMLHttpRequestUpload.as
> > >
> > >
> > >
> > >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
> > ><te...@gmail.com>
> > >wrote:
> > >
> > >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for that
> > >> matter my asdoc framework I wrote doesn't(it was just showing I had
> all
> > >> this working in the context of Falcon), we just need the
> ASDocTokenizer
> > >>to
> > >> tokenize the comment data given to the ASDocDelegate.
> > >>
> > >> Mike
> > >>
> > >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
> > >> teotigraphixllc@gmail.com> wrote:
> > >>
> > >>> The way I did it was, I did exactly what you did, implemented the
> > >>> ASDocDelegate and saved the tokes as it parsed all the files.
> > >>>
> > >>> Then I used the token String like you in the ASDocTokenizer to parse
> > >>>the
> > >>> loop I showed you above.
> > >>>
> > >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
> > >>> working like how I have it in the code above. I already wrote an API
> > >>>for
> > >>> easy access to the tags and comment in an ASDocCOmment class that
> has a
> > >>> list of DocTags.
> > >>>
> > >>> Mike
> > >>>
> > >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:
> > >>>
> > >>>> For this exercise though, we don’t care about the output as Velocity
> > >>>>or
> > >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon
> > >>>>you
> > >>>> retrieve ASDoc comments via node.getASDocComment() and get an
> > >>>> ASDocComment
> > >>>> instance.  Do you want the Token to be the root of a mini-tree of
> > >>>>parsed
> > >>>> nodes?
> > >>>>
> > >>>> -Alex
> > >>>>
> > >>>>
> > >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com>
> > >>>> wrote:
> > >>>>
> > >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
> Velocity
> > >>>> >templates instead of XSL.
> > >>>> >
> > >>>> >That DocTag is my class.
> > >>>> >
> > >>>> >Mike
> > >>>> >
> > >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com>
> wrote:
> > >>>> >
> > >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
> > >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
> > >>>> >>equivalent
> > >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK has
> > >>>>an
> > >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
> around
> > >>>> >> somewhere?   Otherwise I will try to quickly create them.
> > >>>> >>
> > >>>> >> -Alex
> > >>>> >>
> > >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <
> teotigraphixllc@gmail.com
> > >
> > >>>> >>wrote:
> > >>>> >>
> > >>>> >> >BTW, the loop always happens at the VERY end of the comment, so
> > >>>>when
> > >>>> >>you
> > >>>> >> >get to the end the(the last call of next() that should return
> > >>>>null);
> > >>>> >> >
> > >>>> >> >tok = tokenizer.next();
> > >>>> >> >
> > >>>> >> >never returns, it gets stuck trying to exit.
> > >>>> >> >
> > >>>> >> >Mike
> > >>>> >> >
> > >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> > >>>> >> ><te...@gmail.com>
> > >>>> >> >wrote:
> > >>>> >> >
> > >>>> >> >> I posted about this a couple weeks ago and I tried recompiling
> > >>>>with
> > >>>> >> >>JFlex
> > >>>> >> >> 1.5 I think, the older version and still had the problem.
> > >>>> >> >>
> > >>>> >> >> Maybe I messed up something but I tried with my same asdoc
> code
> > >>>> when
> > >>>> >>I
> > >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it work
> > >>>>with
> > >>>> >>my
> > >>>> >> >> version of a documentor.
> > >>>> >> >>
> > >>>> >> >> I think IIRC, I actually tried a simple test case and it would
> > >>>> work.
> > >>>> >> >>
> > >>>> >> >> I have code that uses the tokenizer;
> > >>>> >> >>
> > >>>> >> >>
> > >>>> >> >>     public void compile()
> > >>>> >> >>     {
> > >>>> >> >>         if (token == null)
> > >>>> >> >>             return;
> > >>>> >> >>
> > >>>> >> >>         String data = token.getText();
> > >>>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
> > >>>> >> >>         tokenizer.setReader(new StringReader(data));
> > >>>> >> >>         ASDocToken tok = tokenizer.next();
> > >>>> >> >>         boolean foundDescription = false;
> > >>>> >> >>         DocTag pendingTag = null;
> > >>>> >> >>
> > >>>> >> >>         try
> > >>>> >> >>         {
> > >>>> >> >>             while (tok != null)
> > >>>> >> >>             {
> > >>>> >> >>                 if (!foundDescription
> > >>>> >> >>                         && tok.getType() ==
> > >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> > >>>> >> >>                 {
> > >>>> >> >>                     description = tok.getText();
> > >>>> >> >>                 }
> > >>>> >> >>                 else
> > >>>> >> >>                 {
> > >>>> >> >>                     // do tags
> > >>>> >> >>                     if (tok.getType() ==
> > >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
> > >>>> >> >>                     {
> > >>>> >> >>                         if (pendingTag != null)
> > >>>> >> >>                         {
> > >>>> >> >>                             addTag(pendingTag);
> > >>>> >> >>                             pendingTag = null;
> > >>>> >> >>                         }
> > >>>> >> >>                         pendingTag = new
> > >>>> >> >> DocTag(tok.getText().substring(1));
> > >>>> >> >>                     }
> > >>>> >> >>                     else if (tok.getType() ==
> > >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> > >>>> >> >>                     {
> > >>>> >> >>
> > >>>>pendingTag.setDescription(tok.getText());
> > >>>> >> >>                         addTag(pendingTag);
> > >>>> >> >>                         pendingTag = null;
> > >>>> >> >>                     }
> > >>>> >> >>                 }
> > >>>> >> >>
> > >>>> >> >>                 foundDescription = true;
> > >>>> >> >>
> > >>>> >> >>                 tok = tokenizer.next();
> > >>>> >> >>             }
> > >>>> >> >>         }
> > >>>> >> >>         catch (Exception e)
> > >>>> >> >>         {
> > >>>> >> >>             e.printStackTrace();
> > >>>> >> >>         }
> > >>>> >> >>     }
> > >>>> >> >>
> > >>>> >> >> Mike
> > >>>> >> >>
> > >>>> >> >>
> > >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com>
> > >>>> wrote:
> > >>>> >> >>
> > >>>> >> >>>
> > >>>> >> >>>
> > >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
> > >>>> teotigraphixllc@gmail.com>
> > >>>> >> >>> wrote:
> > >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
> > >>>> >> >>>ASDocTokenizer?
> > >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
> > >>>>current
> > >>>> >> >>>have?
> > >>>> >> >>> >>
> > >>>> >> >>> >
> > >>>> >> >>> >
> > >>>> >> >>> >It doesn't work on anything, there is an infinite loop in
> the
> > >>>> >>scanner
> > >>>> >> >>> that
> > >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> > >>>> >> >>> >
> > >>>> >> >>> >What is weird is I was using the SAME code base when I wrote
> > >>>>the
> > >>>> >>asdoc
> > >>>> >> >>> >documenter I have 2 years ago and it worked fine.
> > >>>> >> >>>
> > >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
> > >>>>What
> > >>>> >>setup
> > >>>> >> >>>did
> > >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
> > >>>>FlexJS
> > >>>> >>SDK
> > >>>> >> >>>or
> > >>>> >> >>> did it even loop on a simple test case?
> > >>>> >> >>>
> > >>>> >> >>> -Alex
> > >>>> >> >>>
> > >>>> >> >>>
> > >>>> >> >>
> > >>>> >>
> > >>>> >>
> > >>>>
> > >>>>
> > >>>
> > >>
> >
> >
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Josh Tynjala <jo...@gmail.com>.
Agreed! Great stuff, Mike.

- Josh

On Thu, Jun 4, 2015 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:

> Amazing!
>
> On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Well so far I have got the below compiling into .as classes and interfaces
> >using the following externals files;
> >
> >There is a definite order these need to be parsed in, I am still figuring
> >them out. I plan on adding in the asdocs, the version of JS the API was
> >introduced in.
> >
> >Mike
> >
> >html5.js
> >missing.js
> >w3c_css.js
> >w3c_css3d.js
> >w3c_dom1.js
> >w3c_dom2.js
> >w3c_dom3.js
> >w3c_event.js
> >w3c_range.js
> >
> >
> >Attr.as
> >CanvasGradient.as
> >CanvasPattern.as
> >CanvasRenderingContext2D.as
> >CaretPosition.as
> >CDATASection.as
> >CharacterData.as
> >ClientInformation.as
> >ClientRect.as
> >ClientRectList.as
> >Comment.as
> >Counter.as
> >CSSCharsetRule.as
> >CSSFontFaceRule.as
> >CSSImportRule.as
> >CSSInterface.as
> >CSSMatrix.as
> >CSSMediaRule.as
> >CSSPageRule.as
> >CSSPrimitiveValue.as
> >CSSProperties.as
> >CSSRule.as
> >CSSRuleList.as
> >CSSStyleDeclaration.as
> >CSSStyleRule.as
> >CSSStyleSheet.as
> >CSSUnknownRule.as
> >CSSValue.as
> >CSSValueList.as
> >CustomEvent.as
> >Database.as
> >DatabaseCallback.as
> >DataTransfer.as
> >DedicatedWorkerGlobalScope.as
> >Document.as
> >DocumentCSS.as
> >DocumentEvent.as
> >DocumentFragment.as
> >DocumentRange.as
> >DocumentStyle.as
> >DocumentType.as
> >DOMApplicationCache.as
> >DOMConfiguration.as
> >DOMError.as
> >DOMErrorHandler.as
> >DOMException.as
> >DOMImplementation.as
> >DOMImplementationCSS.as
> >DOMImplementationList.as
> >DOMImplementationSource.as
> >DOMLocator.as
> >DOMStringList.as
> >DOMTokenList.as
> >DragEvent.as
> >Element.as
> >ElementCSSInlineStyle.as
> >Entity.as
> >EntityReference.as
> >ErrorEvent.as
> >Event.as
> >EventListener.as
> >EventTarget.as
> >ExceptionCode.as
> >FileList.as
> >FontFace.as
> >FontFaceSet.as
> >HashChangeEvent.as
> >HTMLAnchorElement.as
> >HTMLAppletElement.as
> >HTMLAreaElement.as
> >HTMLAudioElement.as
> >HTMLBaseElement.as
> >HTMLBaseFontElement.as
> >HTMLBodyElement.as
> >HTMLBRElement.as
> >HTMLButtonElement.as
> >HTMLCanvasElement.as
> >HTMLCollection.as
> >HTMLContentElement.as
> >HTMLDetailsElement.as
> >HTMLDialogElement.as
> >HTMLDirectoryElement.as
> >HTMLDivElement.as
> >HTMLDListElement.as
> >HTMLDocument.as
> >HTMLElement.as
> >HTMLEmbedElement.as
> >HTMLFieldSetElement.as
> >HTMLFontElement.as
> >HTMLFormElement.as
> >HTMLFrameElement.as
> >HTMLFrameSetElement.as
> >HTMLHeadElement.as
> >HTMLHeadingElement.as
> >HTMLHRElement.as
> >HTMLHtmlElement.as
> >HTMLIFrameElement.as
> >HTMLImageElement.as
> >HTMLInputElement.as
> >HTMLIsIndexElement.as
> >HTMLLabelElement.as
> >HTMLLegendElement.as
> >HTMLLIElement.as
> >HTMLLinkElement.as
> >HTMLMapElement.as
> >HTMLMediaElement.as
> >HTMLMenuElement.as
> >HTMLMenuItemElement.as
> >HTMLMetaElement.as
> >HTMLModElement.as
> >HTMLObjectElement.as
> >HTMLOListElement.as
> >HTMLOptGroupElement.as
> >HTMLOptionElement.as
> >HTMLOptionsCollection.as
> >HTMLParagraphElement.as
> >HTMLParamElement.as
> >HTMLPictureElement.as
> >HTMLPreElement.as
> >HTMLQuoteElement.as
> >HTMLScriptElement.as
> >HTMLSelectElement.as
> >HTMLShadowElement.as
> >HTMLSourceElement.as
> >HTMLStyleElement.as
> >HTMLTableCaptionElement.as
> >HTMLTableCellElement.as
> >HTMLTableColElement.as
> >HTMLTableElement.as
> >HTMLTableRowElement.as
> >HTMLTableSectionElement.as
> >HTMLTemplateElement.as
> >HTMLTextAreaElement.as
> >HTMLTitleElement.as
> >HTMLUListElement.as
> >HTMLVideoElement.as
> >Image.as
> >ImageData.as
> >KeyboardEvent.as
> >LinkStyle.as
> >MediaError.as
> >MediaList.as
> >MediaQueryList.as
> >MediaQueryListListener.as
> >MessageChannel.as
> >MessageEvent.as
> >MessagePort.as
> >MouseEvent.as
> >MSCSSMatrix.as
> >MutationEvent.as
> >MutationObserver.as
> >MutationRecord.as
> >NamedNodeMap.as
> >NameList.as
> >Node.as
> >NodeFilter.as
> >NodeIterator.as
> >NodeList.as
> >Notation.as
> >openDatabase.as
> >PageTransitionEvent.as
> >PopStateEvent.as
> >postMessage.as
> >ProcessingInstruction.as
> >ProgressEvent.as
> >Range.as
> >RangeException.as
> >Rect.as
> >RelatedEvent.as
> >RGBColor.as
> >Screen.as
> >ShadowRoot.as
> >SharedWorker.as
> >SharedWorkerGlobalScope.as
> >SQLError.as
> >SQLResultSet.as
> >SQLResultSetRowList.as
> >SQLTransaction.as
> >StyleSheet.as
> >StyleSheetList.as
> >Text.as
> >TextMetrics.as
> >TextTrack.as
> >TextTrackCue.as
> >TextTrackCueList.as
> >TextTrackList.as
> >TimeRanges.as
> >TreeWalker.as
> >TypeInfo.as
> >UIEvent.as
> >UserDataHandler.as
> >ValidityState.as
> >ViewCSS.as
> >VTTCue.as
> >WebKitCSSMatrix.as
> >WebSocket.as
> >WebWorker.as
> >Window.as
> >Worker.as
> >WorkerGlobalScope.as
> >WorkerLocation.as
> >XMLHttpRequestEventTarget.as
> >XMLHttpRequestUpload.as
> >
> >
> >
> >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
> ><te...@gmail.com>
> >wrote:
> >
> >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for that
> >> matter my asdoc framework I wrote doesn't(it was just showing I had all
> >> this working in the context of Falcon), we just need the ASDocTokenizer
> >>to
> >> tokenize the comment data given to the ASDocDelegate.
> >>
> >> Mike
> >>
> >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
> >> teotigraphixllc@gmail.com> wrote:
> >>
> >>> The way I did it was, I did exactly what you did, implemented the
> >>> ASDocDelegate and saved the tokes as it parsed all the files.
> >>>
> >>> Then I used the token String like you in the ASDocTokenizer to parse
> >>>the
> >>> loop I showed you above.
> >>>
> >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
> >>> working like how I have it in the code above. I already wrote an API
> >>>for
> >>> easy access to the tags and comment in an ASDocCOmment class that has a
> >>> list of DocTags.
> >>>
> >>> Mike
> >>>
> >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:
> >>>
> >>>> For this exercise though, we don’t care about the output as Velocity
> >>>>or
> >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon
> >>>>you
> >>>> retrieve ASDoc comments via node.getASDocComment() and get an
> >>>> ASDocComment
> >>>> instance.  Do you want the Token to be the root of a mini-tree of
> >>>>parsed
> >>>> nodes?
> >>>>
> >>>> -Alex
> >>>>
> >>>>
> >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com>
> >>>> wrote:
> >>>>
> >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
> >>>> >templates instead of XSL.
> >>>> >
> >>>> >That DocTag is my class.
> >>>> >
> >>>> >Mike
> >>>> >
> >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:
> >>>> >
> >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
> >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
> >>>> >>equivalent
> >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK has
> >>>>an
> >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
> >>>> >> somewhere?   Otherwise I will try to quickly create them.
> >>>> >>
> >>>> >> -Alex
> >>>> >>
> >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <teotigraphixllc@gmail.com
> >
> >>>> >>wrote:
> >>>> >>
> >>>> >> >BTW, the loop always happens at the VERY end of the comment, so
> >>>>when
> >>>> >>you
> >>>> >> >get to the end the(the last call of next() that should return
> >>>>null);
> >>>> >> >
> >>>> >> >tok = tokenizer.next();
> >>>> >> >
> >>>> >> >never returns, it gets stuck trying to exit.
> >>>> >> >
> >>>> >> >Mike
> >>>> >> >
> >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> >>>> >> ><te...@gmail.com>
> >>>> >> >wrote:
> >>>> >> >
> >>>> >> >> I posted about this a couple weeks ago and I tried recompiling
> >>>>with
> >>>> >> >>JFlex
> >>>> >> >> 1.5 I think, the older version and still had the problem.
> >>>> >> >>
> >>>> >> >> Maybe I messed up something but I tried with my same asdoc code
> >>>> when
> >>>> >>I
> >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it work
> >>>>with
> >>>> >>my
> >>>> >> >> version of a documentor.
> >>>> >> >>
> >>>> >> >> I think IIRC, I actually tried a simple test case and it would
> >>>> work.
> >>>> >> >>
> >>>> >> >> I have code that uses the tokenizer;
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>     public void compile()
> >>>> >> >>     {
> >>>> >> >>         if (token == null)
> >>>> >> >>             return;
> >>>> >> >>
> >>>> >> >>         String data = token.getText();
> >>>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
> >>>> >> >>         tokenizer.setReader(new StringReader(data));
> >>>> >> >>         ASDocToken tok = tokenizer.next();
> >>>> >> >>         boolean foundDescription = false;
> >>>> >> >>         DocTag pendingTag = null;
> >>>> >> >>
> >>>> >> >>         try
> >>>> >> >>         {
> >>>> >> >>             while (tok != null)
> >>>> >> >>             {
> >>>> >> >>                 if (!foundDescription
> >>>> >> >>                         && tok.getType() ==
> >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>>> >> >>                 {
> >>>> >> >>                     description = tok.getText();
> >>>> >> >>                 }
> >>>> >> >>                 else
> >>>> >> >>                 {
> >>>> >> >>                     // do tags
> >>>> >> >>                     if (tok.getType() ==
> >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
> >>>> >> >>                     {
> >>>> >> >>                         if (pendingTag != null)
> >>>> >> >>                         {
> >>>> >> >>                             addTag(pendingTag);
> >>>> >> >>                             pendingTag = null;
> >>>> >> >>                         }
> >>>> >> >>                         pendingTag = new
> >>>> >> >> DocTag(tok.getText().substring(1));
> >>>> >> >>                     }
> >>>> >> >>                     else if (tok.getType() ==
> >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>>> >> >>                     {
> >>>> >> >>
> >>>>pendingTag.setDescription(tok.getText());
> >>>> >> >>                         addTag(pendingTag);
> >>>> >> >>                         pendingTag = null;
> >>>> >> >>                     }
> >>>> >> >>                 }
> >>>> >> >>
> >>>> >> >>                 foundDescription = true;
> >>>> >> >>
> >>>> >> >>                 tok = tokenizer.next();
> >>>> >> >>             }
> >>>> >> >>         }
> >>>> >> >>         catch (Exception e)
> >>>> >> >>         {
> >>>> >> >>             e.printStackTrace();
> >>>> >> >>         }
> >>>> >> >>     }
> >>>> >> >>
> >>>> >> >> Mike
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com>
> >>>> wrote:
> >>>> >> >>
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
> >>>> teotigraphixllc@gmail.com>
> >>>> >> >>> wrote:
> >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
> >>>> >> >>>ASDocTokenizer?
> >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
> >>>>current
> >>>> >> >>>have?
> >>>> >> >>> >>
> >>>> >> >>> >
> >>>> >> >>> >
> >>>> >> >>> >It doesn't work on anything, there is an infinite loop in the
> >>>> >>scanner
> >>>> >> >>> that
> >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> >>>> >> >>> >
> >>>> >> >>> >What is weird is I was using the SAME code base when I wrote
> >>>>the
> >>>> >>asdoc
> >>>> >> >>> >documenter I have 2 years ago and it worked fine.
> >>>> >> >>>
> >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
> >>>>What
> >>>> >>setup
> >>>> >> >>>did
> >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
> >>>>FlexJS
> >>>> >>SDK
> >>>> >> >>>or
> >>>> >> >>> did it even loop on a simple test case?
> >>>> >> >>>
> >>>> >> >>> -Alex
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>
> >>>> >>
> >>>> >>
> >>>>
> >>>>
> >>>
> >>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.
You da man!  We’ll see how well I do with the ASDoc lexer.  I am set up to
debug it now.

-Alex

On 6/4/15, 2:21 PM, "Michael Schmalle" <te...@gmail.com> wrote:

>I think I have mastered parsing AST. :) This took me one day to do from
>downloading Rhino and never using it to what you see now. hahah
>
>Mik
>
>On Thu, Jun 4, 2015 at 5:18 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Also amazing!
>>
>> On 6/4/15, 2:14 PM, "Michael Schmalle" <te...@gmail.com>
>>wrote:
>>
>> >Check out the screen shot;
>> >
>> >http://snag.gy/XyytR.jpg
>> >
>> >Inheritance and everything is working. :)
>> >
>> >Mike
>> >
>> >On Thu, Jun 4, 2015 at 5:07 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> Amazing!
>> >>
>> >> On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
>> >>wrote:
>> >>
>> >> >Well so far I have got the below compiling into .as classes and
>> >>interfaces
>> >> >using the following externals files;
>> >> >
>> >> >There is a definite order these need to be parsed in, I am still
>> >>figuring
>> >> >them out. I plan on adding in the asdocs, the version of JS the API
>>was
>> >> >introduced in.
>> >> >
>> >> >Mike
>> >> >
>> >> >html5.js
>> >> >missing.js
>> >> >w3c_css.js
>> >> >w3c_css3d.js
>> >> >w3c_dom1.js
>> >> >w3c_dom2.js
>> >> >w3c_dom3.js
>> >> >w3c_event.js
>> >> >w3c_range.js
>> >> >
>> >> >
>> >> >Attr.as
>> >> >CanvasGradient.as
>> >> >CanvasPattern.as
>> >> >CanvasRenderingContext2D.as
>> >> >CaretPosition.as
>> >> >CDATASection.as
>> >> >CharacterData.as
>> >> >ClientInformation.as
>> >> >ClientRect.as
>> >> >ClientRectList.as
>> >> >Comment.as
>> >> >Counter.as
>> >> >CSSCharsetRule.as
>> >> >CSSFontFaceRule.as
>> >> >CSSImportRule.as
>> >> >CSSInterface.as
>> >> >CSSMatrix.as
>> >> >CSSMediaRule.as
>> >> >CSSPageRule.as
>> >> >CSSPrimitiveValue.as
>> >> >CSSProperties.as
>> >> >CSSRule.as
>> >> >CSSRuleList.as
>> >> >CSSStyleDeclaration.as
>> >> >CSSStyleRule.as
>> >> >CSSStyleSheet.as
>> >> >CSSUnknownRule.as
>> >> >CSSValue.as
>> >> >CSSValueList.as
>> >> >CustomEvent.as
>> >> >Database.as
>> >> >DatabaseCallback.as
>> >> >DataTransfer.as
>> >> >DedicatedWorkerGlobalScope.as
>> >> >Document.as
>> >> >DocumentCSS.as
>> >> >DocumentEvent.as
>> >> >DocumentFragment.as
>> >> >DocumentRange.as
>> >> >DocumentStyle.as
>> >> >DocumentType.as
>> >> >DOMApplicationCache.as
>> >> >DOMConfiguration.as
>> >> >DOMError.as
>> >> >DOMErrorHandler.as
>> >> >DOMException.as
>> >> >DOMImplementation.as
>> >> >DOMImplementationCSS.as
>> >> >DOMImplementationList.as
>> >> >DOMImplementationSource.as
>> >> >DOMLocator.as
>> >> >DOMStringList.as
>> >> >DOMTokenList.as
>> >> >DragEvent.as
>> >> >Element.as
>> >> >ElementCSSInlineStyle.as
>> >> >Entity.as
>> >> >EntityReference.as
>> >> >ErrorEvent.as
>> >> >Event.as
>> >> >EventListener.as
>> >> >EventTarget.as
>> >> >ExceptionCode.as
>> >> >FileList.as
>> >> >FontFace.as
>> >> >FontFaceSet.as
>> >> >HashChangeEvent.as
>> >> >HTMLAnchorElement.as
>> >> >HTMLAppletElement.as
>> >> >HTMLAreaElement.as
>> >> >HTMLAudioElement.as
>> >> >HTMLBaseElement.as
>> >> >HTMLBaseFontElement.as
>> >> >HTMLBodyElement.as
>> >> >HTMLBRElement.as
>> >> >HTMLButtonElement.as
>> >> >HTMLCanvasElement.as
>> >> >HTMLCollection.as
>> >> >HTMLContentElement.as
>> >> >HTMLDetailsElement.as
>> >> >HTMLDialogElement.as
>> >> >HTMLDirectoryElement.as
>> >> >HTMLDivElement.as
>> >> >HTMLDListElement.as
>> >> >HTMLDocument.as
>> >> >HTMLElement.as
>> >> >HTMLEmbedElement.as
>> >> >HTMLFieldSetElement.as
>> >> >HTMLFontElement.as
>> >> >HTMLFormElement.as
>> >> >HTMLFrameElement.as
>> >> >HTMLFrameSetElement.as
>> >> >HTMLHeadElement.as
>> >> >HTMLHeadingElement.as
>> >> >HTMLHRElement.as
>> >> >HTMLHtmlElement.as
>> >> >HTMLIFrameElement.as
>> >> >HTMLImageElement.as
>> >> >HTMLInputElement.as
>> >> >HTMLIsIndexElement.as
>> >> >HTMLLabelElement.as
>> >> >HTMLLegendElement.as
>> >> >HTMLLIElement.as
>> >> >HTMLLinkElement.as
>> >> >HTMLMapElement.as
>> >> >HTMLMediaElement.as
>> >> >HTMLMenuElement.as
>> >> >HTMLMenuItemElement.as
>> >> >HTMLMetaElement.as
>> >> >HTMLModElement.as
>> >> >HTMLObjectElement.as
>> >> >HTMLOListElement.as
>> >> >HTMLOptGroupElement.as
>> >> >HTMLOptionElement.as
>> >> >HTMLOptionsCollection.as
>> >> >HTMLParagraphElement.as
>> >> >HTMLParamElement.as
>> >> >HTMLPictureElement.as
>> >> >HTMLPreElement.as
>> >> >HTMLQuoteElement.as
>> >> >HTMLScriptElement.as
>> >> >HTMLSelectElement.as
>> >> >HTMLShadowElement.as
>> >> >HTMLSourceElement.as
>> >> >HTMLStyleElement.as
>> >> >HTMLTableCaptionElement.as
>> >> >HTMLTableCellElement.as
>> >> >HTMLTableColElement.as
>> >> >HTMLTableElement.as
>> >> >HTMLTableRowElement.as
>> >> >HTMLTableSectionElement.as
>> >> >HTMLTemplateElement.as
>> >> >HTMLTextAreaElement.as
>> >> >HTMLTitleElement.as
>> >> >HTMLUListElement.as
>> >> >HTMLVideoElement.as
>> >> >Image.as
>> >> >ImageData.as
>> >> >KeyboardEvent.as
>> >> >LinkStyle.as
>> >> >MediaError.as
>> >> >MediaList.as
>> >> >MediaQueryList.as
>> >> >MediaQueryListListener.as
>> >> >MessageChannel.as
>> >> >MessageEvent.as
>> >> >MessagePort.as
>> >> >MouseEvent.as
>> >> >MSCSSMatrix.as
>> >> >MutationEvent.as
>> >> >MutationObserver.as
>> >> >MutationRecord.as
>> >> >NamedNodeMap.as
>> >> >NameList.as
>> >> >Node.as
>> >> >NodeFilter.as
>> >> >NodeIterator.as
>> >> >NodeList.as
>> >> >Notation.as
>> >> >openDatabase.as
>> >> >PageTransitionEvent.as
>> >> >PopStateEvent.as
>> >> >postMessage.as
>> >> >ProcessingInstruction.as
>> >> >ProgressEvent.as
>> >> >Range.as
>> >> >RangeException.as
>> >> >Rect.as
>> >> >RelatedEvent.as
>> >> >RGBColor.as
>> >> >Screen.as
>> >> >ShadowRoot.as
>> >> >SharedWorker.as
>> >> >SharedWorkerGlobalScope.as
>> >> >SQLError.as
>> >> >SQLResultSet.as
>> >> >SQLResultSetRowList.as
>> >> >SQLTransaction.as
>> >> >StyleSheet.as
>> >> >StyleSheetList.as
>> >> >Text.as
>> >> >TextMetrics.as
>> >> >TextTrack.as
>> >> >TextTrackCue.as
>> >> >TextTrackCueList.as
>> >> >TextTrackList.as
>> >> >TimeRanges.as
>> >> >TreeWalker.as
>> >> >TypeInfo.as
>> >> >UIEvent.as
>> >> >UserDataHandler.as
>> >> >ValidityState.as
>> >> >ViewCSS.as
>> >> >VTTCue.as
>> >> >WebKitCSSMatrix.as
>> >> >WebSocket.as
>> >> >WebWorker.as
>> >> >Window.as
>> >> >Worker.as
>> >> >WorkerGlobalScope.as
>> >> >WorkerLocation.as
>> >> >XMLHttpRequestEventTarget.as
>> >> >XMLHttpRequestUpload.as
>> >> >
>> >> >
>> >> >
>> >> >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
>> >> ><te...@gmail.com>
>> >> >wrote:
>> >> >
>> >> >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for
>> >>that
>> >> >> matter my asdoc framework I wrote doesn't(it was just showing I
>>had
>> >>all
>> >> >> this working in the context of Falcon), we just need the
>> >>ASDocTokenizer
>> >> >>to
>> >> >> tokenize the comment data given to the ASDocDelegate.
>> >> >>
>> >> >> Mike
>> >> >>
>> >> >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
>> >> >> teotigraphixllc@gmail.com> wrote:
>> >> >>
>> >> >>> The way I did it was, I did exactly what you did, implemented the
>> >> >>> ASDocDelegate and saved the tokes as it parsed all the files.
>> >> >>>
>> >> >>> Then I used the token String like you in the ASDocTokenizer to
>>parse
>> >> >>>the
>> >> >>> loop I showed you above.
>> >> >>>
>> >> >>> I would add the DocTag and stuff if you can get the
>>ASDocTokenizer
>> >> >>> working like how I have it in the code above. I already wrote an
>>API
>> >> >>>for
>> >> >>> easy access to the tags and comment in an ASDocCOmment class that
>> >>has a
>> >> >>> list of DocTags.
>> >> >>>
>> >> >>> Mike
>> >> >>>
>> >> >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com>
>> wrote:
>> >> >>>
>> >> >>>> For this exercise though, we don’t care about the output as
>> >>Velocity
>> >> >>>>or
>> >> >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
>> >>Falcon
>> >> >>>>you
>> >> >>>> retrieve ASDoc comments via node.getASDocComment() and get an
>> >> >>>> ASDocComment
>> >> >>>> instance.  Do you want the Token to be the root of a mini-tree
>>of
>> >> >>>>parsed
>> >> >>>> nodes?
>> >> >>>>
>> >> >>>> -Alex
>> >> >>>>
>> >> >>>>
>> >> >>>> On 6/4/15, 11:47 AM, "Michael Schmalle"
>><teotigraphixllc@gmail.com
>> >
>> >> >>>> wrote:
>> >> >>>>
>> >> >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
>> >>Velocity
>> >> >>>> >templates instead of XSL.
>> >> >>>> >
>> >> >>>> >That DocTag is my class.
>> >> >>>> >
>> >> >>>> >Mike
>> >> >>>> >
>> >> >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com>
>> >>wrote:
>> >> >>>> >
>> >> >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>> >> >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would
>>be
>> >> >>>> >>equivalent
>> >> >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK
>> >>has
>> >> >>>>an
>> >> >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
>> >>around
>> >> >>>> >> somewhere?   Otherwise I will try to quickly create them.
>> >> >>>> >>
>> >> >>>> >> -Alex
>> >> >>>> >>
>> >> >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle"
>> >><teotigraphixllc@gmail.com
>> >> >
>> >> >>>> >>wrote:
>> >> >>>> >>
>> >> >>>> >> >BTW, the loop always happens at the VERY end of the
>>comment, so
>> >> >>>>when
>> >> >>>> >>you
>> >> >>>> >> >get to the end the(the last call of next() that should
>>return
>> >> >>>>null);
>> >> >>>> >> >
>> >> >>>> >> >tok = tokenizer.next();
>> >> >>>> >> >
>> >> >>>> >> >never returns, it gets stuck trying to exit.
>> >> >>>> >> >
>> >> >>>> >> >Mike
>> >> >>>> >> >
>> >> >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>> >> >>>> >> ><te...@gmail.com>
>> >> >>>> >> >wrote:
>> >> >>>> >> >
>> >> >>>> >> >> I posted about this a couple weeks ago and I tried
>> >>recompiling
>> >> >>>>with
>> >> >>>> >> >>JFlex
>> >> >>>> >> >> 1.5 I think, the older version and still had the problem.
>> >> >>>> >> >>
>> >> >>>> >> >> Maybe I messed up something but I tried with my same asdoc
>> >>code
>> >> >>>> when
>> >> >>>> >>I
>> >> >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it
>> >>work
>> >> >>>>with
>> >> >>>> >>my
>> >> >>>> >> >> version of a documentor.
>> >> >>>> >> >>
>> >> >>>> >> >> I think IIRC, I actually tried a simple test case and it
>> >>would
>> >> >>>> work.
>> >> >>>> >> >>
>> >> >>>> >> >> I have code that uses the tokenizer;
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >>     public void compile()
>> >> >>>> >> >>     {
>> >> >>>> >> >>         if (token == null)
>> >> >>>> >> >>             return;
>> >> >>>> >> >>
>> >> >>>> >> >>         String data = token.getText();
>> >> >>>> >> >>         ASDocTokenizer tokenizer = new
>>ASDocTokenizer(false);
>> >> >>>> >> >>         tokenizer.setReader(new StringReader(data));
>> >> >>>> >> >>         ASDocToken tok = tokenizer.next();
>> >> >>>> >> >>         boolean foundDescription = false;
>> >> >>>> >> >>         DocTag pendingTag = null;
>> >> >>>> >> >>
>> >> >>>> >> >>         try
>> >> >>>> >> >>         {
>> >> >>>> >> >>             while (tok != null)
>> >> >>>> >> >>             {
>> >> >>>> >> >>                 if (!foundDescription
>> >> >>>> >> >>                         && tok.getType() ==
>> >> >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >> >>>> >> >>                 {
>> >> >>>> >> >>                     description = tok.getText();
>> >> >>>> >> >>                 }
>> >> >>>> >> >>                 else
>> >> >>>> >> >>                 {
>> >> >>>> >> >>                     // do tags
>> >> >>>> >> >>                     if (tok.getType() ==
>> >> >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>> >> >>>> >> >>                     {
>> >> >>>> >> >>                         if (pendingTag != null)
>> >> >>>> >> >>                         {
>> >> >>>> >> >>                             addTag(pendingTag);
>> >> >>>> >> >>                             pendingTag = null;
>> >> >>>> >> >>                         }
>> >> >>>> >> >>                         pendingTag = new
>> >> >>>> >> >> DocTag(tok.getText().substring(1));
>> >> >>>> >> >>                     }
>> >> >>>> >> >>                     else if (tok.getType() ==
>> >> >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >> >>>> >> >>                     {
>> >> >>>> >> >>
>> >> >>>>pendingTag.setDescription(tok.getText());
>> >> >>>> >> >>                         addTag(pendingTag);
>> >> >>>> >> >>                         pendingTag = null;
>> >> >>>> >> >>                     }
>> >> >>>> >> >>                 }
>> >> >>>> >> >>
>> >> >>>> >> >>                 foundDescription = true;
>> >> >>>> >> >>
>> >> >>>> >> >>                 tok = tokenizer.next();
>> >> >>>> >> >>             }
>> >> >>>> >> >>         }
>> >> >>>> >> >>         catch (Exception e)
>> >> >>>> >> >>         {
>> >> >>>> >> >>             e.printStackTrace();
>> >> >>>> >> >>         }
>> >> >>>> >> >>     }
>> >> >>>> >> >>
>> >> >>>> >> >> Mike
>> >> >>>> >> >>
>> >> >>>> >> >>
>> >> >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui
>><aharui@adobe.com
>> >
>> >> >>>> wrote:
>> >> >>>> >> >>
>> >> >>>> >> >>>
>> >> >>>> >> >>>
>> >> >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
>> >> >>>> teotigraphixllc@gmail.com>
>> >> >>>> >> >>> wrote:
>> >> >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into
>>fixing
>> >> >>>> >> >>>ASDocTokenizer?
>> >> >>>> >> >>> >> Was the problem that it didn’t work on every AS file
>>we
>> >> >>>>current
>> >> >>>> >> >>>have?
>> >> >>>> >> >>> >>
>> >> >>>> >> >>> >
>> >> >>>> >> >>> >
>> >> >>>> >> >>> >It doesn't work on anything, there is an infinite loop
>>in
>> >>the
>> >> >>>> >>scanner
>> >> >>>> >> >>> that
>> >> >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>> >> >>>> >> >>> >
>> >> >>>> >> >>> >What is weird is I was using the SAME code base when I
>> >>wrote
>> >> >>>>the
>> >> >>>> >>asdoc
>> >> >>>> >> >>> >documenter I have 2 years ago and it worked fine.
>> >> >>>> >> >>>
>> >> >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a
>>look.
>> >> >>>>What
>> >> >>>> >>setup
>> >> >>>> >> >>>did
>> >> >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK
>>or
>> >> >>>>FlexJS
>> >> >>>> >>SDK
>> >> >>>> >> >>>or
>> >> >>>> >> >>> did it even loop on a simple test case?
>> >> >>>> >> >>>
>> >> >>>> >> >>> -Alex
>> >> >>>> >> >>>
>> >> >>>> >> >>>
>> >> >>>> >> >>
>> >> >>>> >>
>> >> >>>> >>
>> >> >>>>
>> >> >>>>
>> >> >>>
>> >> >>
>> >>
>> >>
>>
>>


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
I think I have mastered parsing AST. :) This took me one day to do from
downloading Rhino and never using it to what you see now. hahah

Mik

On Thu, Jun 4, 2015 at 5:18 PM, Alex Harui <ah...@adobe.com> wrote:

> Also amazing!
>
> On 6/4/15, 2:14 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Check out the screen shot;
> >
> >http://snag.gy/XyytR.jpg
> >
> >Inheritance and everything is working. :)
> >
> >Mike
> >
> >On Thu, Jun 4, 2015 at 5:07 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Amazing!
> >>
> >> On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
> >>wrote:
> >>
> >> >Well so far I have got the below compiling into .as classes and
> >>interfaces
> >> >using the following externals files;
> >> >
> >> >There is a definite order these need to be parsed in, I am still
> >>figuring
> >> >them out. I plan on adding in the asdocs, the version of JS the API was
> >> >introduced in.
> >> >
> >> >Mike
> >> >
> >> >html5.js
> >> >missing.js
> >> >w3c_css.js
> >> >w3c_css3d.js
> >> >w3c_dom1.js
> >> >w3c_dom2.js
> >> >w3c_dom3.js
> >> >w3c_event.js
> >> >w3c_range.js
> >> >
> >> >
> >> >Attr.as
> >> >CanvasGradient.as
> >> >CanvasPattern.as
> >> >CanvasRenderingContext2D.as
> >> >CaretPosition.as
> >> >CDATASection.as
> >> >CharacterData.as
> >> >ClientInformation.as
> >> >ClientRect.as
> >> >ClientRectList.as
> >> >Comment.as
> >> >Counter.as
> >> >CSSCharsetRule.as
> >> >CSSFontFaceRule.as
> >> >CSSImportRule.as
> >> >CSSInterface.as
> >> >CSSMatrix.as
> >> >CSSMediaRule.as
> >> >CSSPageRule.as
> >> >CSSPrimitiveValue.as
> >> >CSSProperties.as
> >> >CSSRule.as
> >> >CSSRuleList.as
> >> >CSSStyleDeclaration.as
> >> >CSSStyleRule.as
> >> >CSSStyleSheet.as
> >> >CSSUnknownRule.as
> >> >CSSValue.as
> >> >CSSValueList.as
> >> >CustomEvent.as
> >> >Database.as
> >> >DatabaseCallback.as
> >> >DataTransfer.as
> >> >DedicatedWorkerGlobalScope.as
> >> >Document.as
> >> >DocumentCSS.as
> >> >DocumentEvent.as
> >> >DocumentFragment.as
> >> >DocumentRange.as
> >> >DocumentStyle.as
> >> >DocumentType.as
> >> >DOMApplicationCache.as
> >> >DOMConfiguration.as
> >> >DOMError.as
> >> >DOMErrorHandler.as
> >> >DOMException.as
> >> >DOMImplementation.as
> >> >DOMImplementationCSS.as
> >> >DOMImplementationList.as
> >> >DOMImplementationSource.as
> >> >DOMLocator.as
> >> >DOMStringList.as
> >> >DOMTokenList.as
> >> >DragEvent.as
> >> >Element.as
> >> >ElementCSSInlineStyle.as
> >> >Entity.as
> >> >EntityReference.as
> >> >ErrorEvent.as
> >> >Event.as
> >> >EventListener.as
> >> >EventTarget.as
> >> >ExceptionCode.as
> >> >FileList.as
> >> >FontFace.as
> >> >FontFaceSet.as
> >> >HashChangeEvent.as
> >> >HTMLAnchorElement.as
> >> >HTMLAppletElement.as
> >> >HTMLAreaElement.as
> >> >HTMLAudioElement.as
> >> >HTMLBaseElement.as
> >> >HTMLBaseFontElement.as
> >> >HTMLBodyElement.as
> >> >HTMLBRElement.as
> >> >HTMLButtonElement.as
> >> >HTMLCanvasElement.as
> >> >HTMLCollection.as
> >> >HTMLContentElement.as
> >> >HTMLDetailsElement.as
> >> >HTMLDialogElement.as
> >> >HTMLDirectoryElement.as
> >> >HTMLDivElement.as
> >> >HTMLDListElement.as
> >> >HTMLDocument.as
> >> >HTMLElement.as
> >> >HTMLEmbedElement.as
> >> >HTMLFieldSetElement.as
> >> >HTMLFontElement.as
> >> >HTMLFormElement.as
> >> >HTMLFrameElement.as
> >> >HTMLFrameSetElement.as
> >> >HTMLHeadElement.as
> >> >HTMLHeadingElement.as
> >> >HTMLHRElement.as
> >> >HTMLHtmlElement.as
> >> >HTMLIFrameElement.as
> >> >HTMLImageElement.as
> >> >HTMLInputElement.as
> >> >HTMLIsIndexElement.as
> >> >HTMLLabelElement.as
> >> >HTMLLegendElement.as
> >> >HTMLLIElement.as
> >> >HTMLLinkElement.as
> >> >HTMLMapElement.as
> >> >HTMLMediaElement.as
> >> >HTMLMenuElement.as
> >> >HTMLMenuItemElement.as
> >> >HTMLMetaElement.as
> >> >HTMLModElement.as
> >> >HTMLObjectElement.as
> >> >HTMLOListElement.as
> >> >HTMLOptGroupElement.as
> >> >HTMLOptionElement.as
> >> >HTMLOptionsCollection.as
> >> >HTMLParagraphElement.as
> >> >HTMLParamElement.as
> >> >HTMLPictureElement.as
> >> >HTMLPreElement.as
> >> >HTMLQuoteElement.as
> >> >HTMLScriptElement.as
> >> >HTMLSelectElement.as
> >> >HTMLShadowElement.as
> >> >HTMLSourceElement.as
> >> >HTMLStyleElement.as
> >> >HTMLTableCaptionElement.as
> >> >HTMLTableCellElement.as
> >> >HTMLTableColElement.as
> >> >HTMLTableElement.as
> >> >HTMLTableRowElement.as
> >> >HTMLTableSectionElement.as
> >> >HTMLTemplateElement.as
> >> >HTMLTextAreaElement.as
> >> >HTMLTitleElement.as
> >> >HTMLUListElement.as
> >> >HTMLVideoElement.as
> >> >Image.as
> >> >ImageData.as
> >> >KeyboardEvent.as
> >> >LinkStyle.as
> >> >MediaError.as
> >> >MediaList.as
> >> >MediaQueryList.as
> >> >MediaQueryListListener.as
> >> >MessageChannel.as
> >> >MessageEvent.as
> >> >MessagePort.as
> >> >MouseEvent.as
> >> >MSCSSMatrix.as
> >> >MutationEvent.as
> >> >MutationObserver.as
> >> >MutationRecord.as
> >> >NamedNodeMap.as
> >> >NameList.as
> >> >Node.as
> >> >NodeFilter.as
> >> >NodeIterator.as
> >> >NodeList.as
> >> >Notation.as
> >> >openDatabase.as
> >> >PageTransitionEvent.as
> >> >PopStateEvent.as
> >> >postMessage.as
> >> >ProcessingInstruction.as
> >> >ProgressEvent.as
> >> >Range.as
> >> >RangeException.as
> >> >Rect.as
> >> >RelatedEvent.as
> >> >RGBColor.as
> >> >Screen.as
> >> >ShadowRoot.as
> >> >SharedWorker.as
> >> >SharedWorkerGlobalScope.as
> >> >SQLError.as
> >> >SQLResultSet.as
> >> >SQLResultSetRowList.as
> >> >SQLTransaction.as
> >> >StyleSheet.as
> >> >StyleSheetList.as
> >> >Text.as
> >> >TextMetrics.as
> >> >TextTrack.as
> >> >TextTrackCue.as
> >> >TextTrackCueList.as
> >> >TextTrackList.as
> >> >TimeRanges.as
> >> >TreeWalker.as
> >> >TypeInfo.as
> >> >UIEvent.as
> >> >UserDataHandler.as
> >> >ValidityState.as
> >> >ViewCSS.as
> >> >VTTCue.as
> >> >WebKitCSSMatrix.as
> >> >WebSocket.as
> >> >WebWorker.as
> >> >Window.as
> >> >Worker.as
> >> >WorkerGlobalScope.as
> >> >WorkerLocation.as
> >> >XMLHttpRequestEventTarget.as
> >> >XMLHttpRequestUpload.as
> >> >
> >> >
> >> >
> >> >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
> >> ><te...@gmail.com>
> >> >wrote:
> >> >
> >> >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for
> >>that
> >> >> matter my asdoc framework I wrote doesn't(it was just showing I had
> >>all
> >> >> this working in the context of Falcon), we just need the
> >>ASDocTokenizer
> >> >>to
> >> >> tokenize the comment data given to the ASDocDelegate.
> >> >>
> >> >> Mike
> >> >>
> >> >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
> >> >> teotigraphixllc@gmail.com> wrote:
> >> >>
> >> >>> The way I did it was, I did exactly what you did, implemented the
> >> >>> ASDocDelegate and saved the tokes as it parsed all the files.
> >> >>>
> >> >>> Then I used the token String like you in the ASDocTokenizer to parse
> >> >>>the
> >> >>> loop I showed you above.
> >> >>>
> >> >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
> >> >>> working like how I have it in the code above. I already wrote an API
> >> >>>for
> >> >>> easy access to the tags and comment in an ASDocCOmment class that
> >>has a
> >> >>> list of DocTags.
> >> >>>
> >> >>> Mike
> >> >>>
> >> >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com>
> wrote:
> >> >>>
> >> >>>> For this exercise though, we don’t care about the output as
> >>Velocity
> >> >>>>or
> >> >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
> >>Falcon
> >> >>>>you
> >> >>>> retrieve ASDoc comments via node.getASDocComment() and get an
> >> >>>> ASDocComment
> >> >>>> instance.  Do you want the Token to be the root of a mini-tree of
> >> >>>>parsed
> >> >>>> nodes?
> >> >>>>
> >> >>>> -Alex
> >> >>>>
> >> >>>>
> >> >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <teotigraphixllc@gmail.com
> >
> >> >>>> wrote:
> >> >>>>
> >> >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
> >>Velocity
> >> >>>> >templates instead of XSL.
> >> >>>> >
> >> >>>> >That DocTag is my class.
> >> >>>> >
> >> >>>> >Mike
> >> >>>> >
> >> >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com>
> >>wrote:
> >> >>>> >
> >> >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
> >> >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
> >> >>>> >>equivalent
> >> >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK
> >>has
> >> >>>>an
> >> >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
> >>around
> >> >>>> >> somewhere?   Otherwise I will try to quickly create them.
> >> >>>> >>
> >> >>>> >> -Alex
> >> >>>> >>
> >> >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle"
> >><teotigraphixllc@gmail.com
> >> >
> >> >>>> >>wrote:
> >> >>>> >>
> >> >>>> >> >BTW, the loop always happens at the VERY end of the comment, so
> >> >>>>when
> >> >>>> >>you
> >> >>>> >> >get to the end the(the last call of next() that should return
> >> >>>>null);
> >> >>>> >> >
> >> >>>> >> >tok = tokenizer.next();
> >> >>>> >> >
> >> >>>> >> >never returns, it gets stuck trying to exit.
> >> >>>> >> >
> >> >>>> >> >Mike
> >> >>>> >> >
> >> >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> >> >>>> >> ><te...@gmail.com>
> >> >>>> >> >wrote:
> >> >>>> >> >
> >> >>>> >> >> I posted about this a couple weeks ago and I tried
> >>recompiling
> >> >>>>with
> >> >>>> >> >>JFlex
> >> >>>> >> >> 1.5 I think, the older version and still had the problem.
> >> >>>> >> >>
> >> >>>> >> >> Maybe I messed up something but I tried with my same asdoc
> >>code
> >> >>>> when
> >> >>>> >>I
> >> >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it
> >>work
> >> >>>>with
> >> >>>> >>my
> >> >>>> >> >> version of a documentor.
> >> >>>> >> >>
> >> >>>> >> >> I think IIRC, I actually tried a simple test case and it
> >>would
> >> >>>> work.
> >> >>>> >> >>
> >> >>>> >> >> I have code that uses the tokenizer;
> >> >>>> >> >>
> >> >>>> >> >>
> >> >>>> >> >>     public void compile()
> >> >>>> >> >>     {
> >> >>>> >> >>         if (token == null)
> >> >>>> >> >>             return;
> >> >>>> >> >>
> >> >>>> >> >>         String data = token.getText();
> >> >>>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
> >> >>>> >> >>         tokenizer.setReader(new StringReader(data));
> >> >>>> >> >>         ASDocToken tok = tokenizer.next();
> >> >>>> >> >>         boolean foundDescription = false;
> >> >>>> >> >>         DocTag pendingTag = null;
> >> >>>> >> >>
> >> >>>> >> >>         try
> >> >>>> >> >>         {
> >> >>>> >> >>             while (tok != null)
> >> >>>> >> >>             {
> >> >>>> >> >>                 if (!foundDescription
> >> >>>> >> >>                         && tok.getType() ==
> >> >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> >> >>>> >> >>                 {
> >> >>>> >> >>                     description = tok.getText();
> >> >>>> >> >>                 }
> >> >>>> >> >>                 else
> >> >>>> >> >>                 {
> >> >>>> >> >>                     // do tags
> >> >>>> >> >>                     if (tok.getType() ==
> >> >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
> >> >>>> >> >>                     {
> >> >>>> >> >>                         if (pendingTag != null)
> >> >>>> >> >>                         {
> >> >>>> >> >>                             addTag(pendingTag);
> >> >>>> >> >>                             pendingTag = null;
> >> >>>> >> >>                         }
> >> >>>> >> >>                         pendingTag = new
> >> >>>> >> >> DocTag(tok.getText().substring(1));
> >> >>>> >> >>                     }
> >> >>>> >> >>                     else if (tok.getType() ==
> >> >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> >> >>>> >> >>                     {
> >> >>>> >> >>
> >> >>>>pendingTag.setDescription(tok.getText());
> >> >>>> >> >>                         addTag(pendingTag);
> >> >>>> >> >>                         pendingTag = null;
> >> >>>> >> >>                     }
> >> >>>> >> >>                 }
> >> >>>> >> >>
> >> >>>> >> >>                 foundDescription = true;
> >> >>>> >> >>
> >> >>>> >> >>                 tok = tokenizer.next();
> >> >>>> >> >>             }
> >> >>>> >> >>         }
> >> >>>> >> >>         catch (Exception e)
> >> >>>> >> >>         {
> >> >>>> >> >>             e.printStackTrace();
> >> >>>> >> >>         }
> >> >>>> >> >>     }
> >> >>>> >> >>
> >> >>>> >> >> Mike
> >> >>>> >> >>
> >> >>>> >> >>
> >> >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <aharui@adobe.com
> >
> >> >>>> wrote:
> >> >>>> >> >>
> >> >>>> >> >>>
> >> >>>> >> >>>
> >> >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
> >> >>>> teotigraphixllc@gmail.com>
> >> >>>> >> >>> wrote:
> >> >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
> >> >>>> >> >>>ASDocTokenizer?
> >> >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
> >> >>>>current
> >> >>>> >> >>>have?
> >> >>>> >> >>> >>
> >> >>>> >> >>> >
> >> >>>> >> >>> >
> >> >>>> >> >>> >It doesn't work on anything, there is an infinite loop in
> >>the
> >> >>>> >>scanner
> >> >>>> >> >>> that
> >> >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> >> >>>> >> >>> >
> >> >>>> >> >>> >What is weird is I was using the SAME code base when I
> >>wrote
> >> >>>>the
> >> >>>> >>asdoc
> >> >>>> >> >>> >documenter I have 2 years ago and it worked fine.
> >> >>>> >> >>>
> >> >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
> >> >>>>What
> >> >>>> >>setup
> >> >>>> >> >>>did
> >> >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
> >> >>>>FlexJS
> >> >>>> >>SDK
> >> >>>> >> >>>or
> >> >>>> >> >>> did it even loop on a simple test case?
> >> >>>> >> >>>
> >> >>>> >> >>> -Alex
> >> >>>> >> >>>
> >> >>>> >> >>>
> >> >>>> >> >>
> >> >>>> >>
> >> >>>> >>
> >> >>>>
> >> >>>>
> >> >>>
> >> >>
> >>
> >>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.
Also amazing!

On 6/4/15, 2:14 PM, "Michael Schmalle" <te...@gmail.com> wrote:

>Check out the screen shot;
>
>http://snag.gy/XyytR.jpg
>
>Inheritance and everything is working. :)
>
>Mike
>
>On Thu, Jun 4, 2015 at 5:07 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Amazing!
>>
>> On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com>
>>wrote:
>>
>> >Well so far I have got the below compiling into .as classes and
>>interfaces
>> >using the following externals files;
>> >
>> >There is a definite order these need to be parsed in, I am still
>>figuring
>> >them out. I plan on adding in the asdocs, the version of JS the API was
>> >introduced in.
>> >
>> >Mike
>> >
>> >html5.js
>> >missing.js
>> >w3c_css.js
>> >w3c_css3d.js
>> >w3c_dom1.js
>> >w3c_dom2.js
>> >w3c_dom3.js
>> >w3c_event.js
>> >w3c_range.js
>> >
>> >
>> >Attr.as
>> >CanvasGradient.as
>> >CanvasPattern.as
>> >CanvasRenderingContext2D.as
>> >CaretPosition.as
>> >CDATASection.as
>> >CharacterData.as
>> >ClientInformation.as
>> >ClientRect.as
>> >ClientRectList.as
>> >Comment.as
>> >Counter.as
>> >CSSCharsetRule.as
>> >CSSFontFaceRule.as
>> >CSSImportRule.as
>> >CSSInterface.as
>> >CSSMatrix.as
>> >CSSMediaRule.as
>> >CSSPageRule.as
>> >CSSPrimitiveValue.as
>> >CSSProperties.as
>> >CSSRule.as
>> >CSSRuleList.as
>> >CSSStyleDeclaration.as
>> >CSSStyleRule.as
>> >CSSStyleSheet.as
>> >CSSUnknownRule.as
>> >CSSValue.as
>> >CSSValueList.as
>> >CustomEvent.as
>> >Database.as
>> >DatabaseCallback.as
>> >DataTransfer.as
>> >DedicatedWorkerGlobalScope.as
>> >Document.as
>> >DocumentCSS.as
>> >DocumentEvent.as
>> >DocumentFragment.as
>> >DocumentRange.as
>> >DocumentStyle.as
>> >DocumentType.as
>> >DOMApplicationCache.as
>> >DOMConfiguration.as
>> >DOMError.as
>> >DOMErrorHandler.as
>> >DOMException.as
>> >DOMImplementation.as
>> >DOMImplementationCSS.as
>> >DOMImplementationList.as
>> >DOMImplementationSource.as
>> >DOMLocator.as
>> >DOMStringList.as
>> >DOMTokenList.as
>> >DragEvent.as
>> >Element.as
>> >ElementCSSInlineStyle.as
>> >Entity.as
>> >EntityReference.as
>> >ErrorEvent.as
>> >Event.as
>> >EventListener.as
>> >EventTarget.as
>> >ExceptionCode.as
>> >FileList.as
>> >FontFace.as
>> >FontFaceSet.as
>> >HashChangeEvent.as
>> >HTMLAnchorElement.as
>> >HTMLAppletElement.as
>> >HTMLAreaElement.as
>> >HTMLAudioElement.as
>> >HTMLBaseElement.as
>> >HTMLBaseFontElement.as
>> >HTMLBodyElement.as
>> >HTMLBRElement.as
>> >HTMLButtonElement.as
>> >HTMLCanvasElement.as
>> >HTMLCollection.as
>> >HTMLContentElement.as
>> >HTMLDetailsElement.as
>> >HTMLDialogElement.as
>> >HTMLDirectoryElement.as
>> >HTMLDivElement.as
>> >HTMLDListElement.as
>> >HTMLDocument.as
>> >HTMLElement.as
>> >HTMLEmbedElement.as
>> >HTMLFieldSetElement.as
>> >HTMLFontElement.as
>> >HTMLFormElement.as
>> >HTMLFrameElement.as
>> >HTMLFrameSetElement.as
>> >HTMLHeadElement.as
>> >HTMLHeadingElement.as
>> >HTMLHRElement.as
>> >HTMLHtmlElement.as
>> >HTMLIFrameElement.as
>> >HTMLImageElement.as
>> >HTMLInputElement.as
>> >HTMLIsIndexElement.as
>> >HTMLLabelElement.as
>> >HTMLLegendElement.as
>> >HTMLLIElement.as
>> >HTMLLinkElement.as
>> >HTMLMapElement.as
>> >HTMLMediaElement.as
>> >HTMLMenuElement.as
>> >HTMLMenuItemElement.as
>> >HTMLMetaElement.as
>> >HTMLModElement.as
>> >HTMLObjectElement.as
>> >HTMLOListElement.as
>> >HTMLOptGroupElement.as
>> >HTMLOptionElement.as
>> >HTMLOptionsCollection.as
>> >HTMLParagraphElement.as
>> >HTMLParamElement.as
>> >HTMLPictureElement.as
>> >HTMLPreElement.as
>> >HTMLQuoteElement.as
>> >HTMLScriptElement.as
>> >HTMLSelectElement.as
>> >HTMLShadowElement.as
>> >HTMLSourceElement.as
>> >HTMLStyleElement.as
>> >HTMLTableCaptionElement.as
>> >HTMLTableCellElement.as
>> >HTMLTableColElement.as
>> >HTMLTableElement.as
>> >HTMLTableRowElement.as
>> >HTMLTableSectionElement.as
>> >HTMLTemplateElement.as
>> >HTMLTextAreaElement.as
>> >HTMLTitleElement.as
>> >HTMLUListElement.as
>> >HTMLVideoElement.as
>> >Image.as
>> >ImageData.as
>> >KeyboardEvent.as
>> >LinkStyle.as
>> >MediaError.as
>> >MediaList.as
>> >MediaQueryList.as
>> >MediaQueryListListener.as
>> >MessageChannel.as
>> >MessageEvent.as
>> >MessagePort.as
>> >MouseEvent.as
>> >MSCSSMatrix.as
>> >MutationEvent.as
>> >MutationObserver.as
>> >MutationRecord.as
>> >NamedNodeMap.as
>> >NameList.as
>> >Node.as
>> >NodeFilter.as
>> >NodeIterator.as
>> >NodeList.as
>> >Notation.as
>> >openDatabase.as
>> >PageTransitionEvent.as
>> >PopStateEvent.as
>> >postMessage.as
>> >ProcessingInstruction.as
>> >ProgressEvent.as
>> >Range.as
>> >RangeException.as
>> >Rect.as
>> >RelatedEvent.as
>> >RGBColor.as
>> >Screen.as
>> >ShadowRoot.as
>> >SharedWorker.as
>> >SharedWorkerGlobalScope.as
>> >SQLError.as
>> >SQLResultSet.as
>> >SQLResultSetRowList.as
>> >SQLTransaction.as
>> >StyleSheet.as
>> >StyleSheetList.as
>> >Text.as
>> >TextMetrics.as
>> >TextTrack.as
>> >TextTrackCue.as
>> >TextTrackCueList.as
>> >TextTrackList.as
>> >TimeRanges.as
>> >TreeWalker.as
>> >TypeInfo.as
>> >UIEvent.as
>> >UserDataHandler.as
>> >ValidityState.as
>> >ViewCSS.as
>> >VTTCue.as
>> >WebKitCSSMatrix.as
>> >WebSocket.as
>> >WebWorker.as
>> >Window.as
>> >Worker.as
>> >WorkerGlobalScope.as
>> >WorkerLocation.as
>> >XMLHttpRequestEventTarget.as
>> >XMLHttpRequestUpload.as
>> >
>> >
>> >
>> >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
>> ><te...@gmail.com>
>> >wrote:
>> >
>> >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for
>>that
>> >> matter my asdoc framework I wrote doesn't(it was just showing I had
>>all
>> >> this working in the context of Falcon), we just need the
>>ASDocTokenizer
>> >>to
>> >> tokenize the comment data given to the ASDocDelegate.
>> >>
>> >> Mike
>> >>
>> >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
>> >> teotigraphixllc@gmail.com> wrote:
>> >>
>> >>> The way I did it was, I did exactly what you did, implemented the
>> >>> ASDocDelegate and saved the tokes as it parsed all the files.
>> >>>
>> >>> Then I used the token String like you in the ASDocTokenizer to parse
>> >>>the
>> >>> loop I showed you above.
>> >>>
>> >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
>> >>> working like how I have it in the code above. I already wrote an API
>> >>>for
>> >>> easy access to the tags and comment in an ASDocCOmment class that
>>has a
>> >>> list of DocTags.
>> >>>
>> >>> Mike
>> >>>
>> >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:
>> >>>
>> >>>> For this exercise though, we don’t care about the output as
>>Velocity
>> >>>>or
>> >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
>>Falcon
>> >>>>you
>> >>>> retrieve ASDoc comments via node.getASDocComment() and get an
>> >>>> ASDocComment
>> >>>> instance.  Do you want the Token to be the root of a mini-tree of
>> >>>>parsed
>> >>>> nodes?
>> >>>>
>> >>>> -Alex
>> >>>>
>> >>>>
>> >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com>
>> >>>> wrote:
>> >>>>
>> >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
>>Velocity
>> >>>> >templates instead of XSL.
>> >>>> >
>> >>>> >That DocTag is my class.
>> >>>> >
>> >>>> >Mike
>> >>>> >
>> >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com>
>>wrote:
>> >>>> >
>> >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>> >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
>> >>>> >>equivalent
>> >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK
>>has
>> >>>>an
>> >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
>>around
>> >>>> >> somewhere?   Otherwise I will try to quickly create them.
>> >>>> >>
>> >>>> >> -Alex
>> >>>> >>
>> >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle"
>><teotigraphixllc@gmail.com
>> >
>> >>>> >>wrote:
>> >>>> >>
>> >>>> >> >BTW, the loop always happens at the VERY end of the comment, so
>> >>>>when
>> >>>> >>you
>> >>>> >> >get to the end the(the last call of next() that should return
>> >>>>null);
>> >>>> >> >
>> >>>> >> >tok = tokenizer.next();
>> >>>> >> >
>> >>>> >> >never returns, it gets stuck trying to exit.
>> >>>> >> >
>> >>>> >> >Mike
>> >>>> >> >
>> >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>> >>>> >> ><te...@gmail.com>
>> >>>> >> >wrote:
>> >>>> >> >
>> >>>> >> >> I posted about this a couple weeks ago and I tried
>>recompiling
>> >>>>with
>> >>>> >> >>JFlex
>> >>>> >> >> 1.5 I think, the older version and still had the problem.
>> >>>> >> >>
>> >>>> >> >> Maybe I messed up something but I tried with my same asdoc
>>code
>> >>>> when
>> >>>> >>I
>> >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it
>>work
>> >>>>with
>> >>>> >>my
>> >>>> >> >> version of a documentor.
>> >>>> >> >>
>> >>>> >> >> I think IIRC, I actually tried a simple test case and it
>>would
>> >>>> work.
>> >>>> >> >>
>> >>>> >> >> I have code that uses the tokenizer;
>> >>>> >> >>
>> >>>> >> >>
>> >>>> >> >>     public void compile()
>> >>>> >> >>     {
>> >>>> >> >>         if (token == null)
>> >>>> >> >>             return;
>> >>>> >> >>
>> >>>> >> >>         String data = token.getText();
>> >>>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>> >>>> >> >>         tokenizer.setReader(new StringReader(data));
>> >>>> >> >>         ASDocToken tok = tokenizer.next();
>> >>>> >> >>         boolean foundDescription = false;
>> >>>> >> >>         DocTag pendingTag = null;
>> >>>> >> >>
>> >>>> >> >>         try
>> >>>> >> >>         {
>> >>>> >> >>             while (tok != null)
>> >>>> >> >>             {
>> >>>> >> >>                 if (!foundDescription
>> >>>> >> >>                         && tok.getType() ==
>> >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >>>> >> >>                 {
>> >>>> >> >>                     description = tok.getText();
>> >>>> >> >>                 }
>> >>>> >> >>                 else
>> >>>> >> >>                 {
>> >>>> >> >>                     // do tags
>> >>>> >> >>                     if (tok.getType() ==
>> >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>> >>>> >> >>                     {
>> >>>> >> >>                         if (pendingTag != null)
>> >>>> >> >>                         {
>> >>>> >> >>                             addTag(pendingTag);
>> >>>> >> >>                             pendingTag = null;
>> >>>> >> >>                         }
>> >>>> >> >>                         pendingTag = new
>> >>>> >> >> DocTag(tok.getText().substring(1));
>> >>>> >> >>                     }
>> >>>> >> >>                     else if (tok.getType() ==
>> >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >>>> >> >>                     {
>> >>>> >> >>
>> >>>>pendingTag.setDescription(tok.getText());
>> >>>> >> >>                         addTag(pendingTag);
>> >>>> >> >>                         pendingTag = null;
>> >>>> >> >>                     }
>> >>>> >> >>                 }
>> >>>> >> >>
>> >>>> >> >>                 foundDescription = true;
>> >>>> >> >>
>> >>>> >> >>                 tok = tokenizer.next();
>> >>>> >> >>             }
>> >>>> >> >>         }
>> >>>> >> >>         catch (Exception e)
>> >>>> >> >>         {
>> >>>> >> >>             e.printStackTrace();
>> >>>> >> >>         }
>> >>>> >> >>     }
>> >>>> >> >>
>> >>>> >> >> Mike
>> >>>> >> >>
>> >>>> >> >>
>> >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com>
>> >>>> wrote:
>> >>>> >> >>
>> >>>> >> >>>
>> >>>> >> >>>
>> >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
>> >>>> teotigraphixllc@gmail.com>
>> >>>> >> >>> wrote:
>> >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
>> >>>> >> >>>ASDocTokenizer?
>> >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
>> >>>>current
>> >>>> >> >>>have?
>> >>>> >> >>> >>
>> >>>> >> >>> >
>> >>>> >> >>> >
>> >>>> >> >>> >It doesn't work on anything, there is an infinite loop in
>>the
>> >>>> >>scanner
>> >>>> >> >>> that
>> >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>> >>>> >> >>> >
>> >>>> >> >>> >What is weird is I was using the SAME code base when I
>>wrote
>> >>>>the
>> >>>> >>asdoc
>> >>>> >> >>> >documenter I have 2 years ago and it worked fine.
>> >>>> >> >>>
>> >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
>> >>>>What
>> >>>> >>setup
>> >>>> >> >>>did
>> >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
>> >>>>FlexJS
>> >>>> >>SDK
>> >>>> >> >>>or
>> >>>> >> >>> did it even loop on a simple test case?
>> >>>> >> >>>
>> >>>> >> >>> -Alex
>> >>>> >> >>>
>> >>>> >> >>>
>> >>>> >> >>
>> >>>> >>
>> >>>> >>
>> >>>>
>> >>>>
>> >>>
>> >>
>>
>>


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
Check out the screen shot;

http://snag.gy/XyytR.jpg

Inheritance and everything is working. :)

Mike

On Thu, Jun 4, 2015 at 5:07 PM, Alex Harui <ah...@adobe.com> wrote:

> Amazing!
>
> On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Well so far I have got the below compiling into .as classes and interfaces
> >using the following externals files;
> >
> >There is a definite order these need to be parsed in, I am still figuring
> >them out. I plan on adding in the asdocs, the version of JS the API was
> >introduced in.
> >
> >Mike
> >
> >html5.js
> >missing.js
> >w3c_css.js
> >w3c_css3d.js
> >w3c_dom1.js
> >w3c_dom2.js
> >w3c_dom3.js
> >w3c_event.js
> >w3c_range.js
> >
> >
> >Attr.as
> >CanvasGradient.as
> >CanvasPattern.as
> >CanvasRenderingContext2D.as
> >CaretPosition.as
> >CDATASection.as
> >CharacterData.as
> >ClientInformation.as
> >ClientRect.as
> >ClientRectList.as
> >Comment.as
> >Counter.as
> >CSSCharsetRule.as
> >CSSFontFaceRule.as
> >CSSImportRule.as
> >CSSInterface.as
> >CSSMatrix.as
> >CSSMediaRule.as
> >CSSPageRule.as
> >CSSPrimitiveValue.as
> >CSSProperties.as
> >CSSRule.as
> >CSSRuleList.as
> >CSSStyleDeclaration.as
> >CSSStyleRule.as
> >CSSStyleSheet.as
> >CSSUnknownRule.as
> >CSSValue.as
> >CSSValueList.as
> >CustomEvent.as
> >Database.as
> >DatabaseCallback.as
> >DataTransfer.as
> >DedicatedWorkerGlobalScope.as
> >Document.as
> >DocumentCSS.as
> >DocumentEvent.as
> >DocumentFragment.as
> >DocumentRange.as
> >DocumentStyle.as
> >DocumentType.as
> >DOMApplicationCache.as
> >DOMConfiguration.as
> >DOMError.as
> >DOMErrorHandler.as
> >DOMException.as
> >DOMImplementation.as
> >DOMImplementationCSS.as
> >DOMImplementationList.as
> >DOMImplementationSource.as
> >DOMLocator.as
> >DOMStringList.as
> >DOMTokenList.as
> >DragEvent.as
> >Element.as
> >ElementCSSInlineStyle.as
> >Entity.as
> >EntityReference.as
> >ErrorEvent.as
> >Event.as
> >EventListener.as
> >EventTarget.as
> >ExceptionCode.as
> >FileList.as
> >FontFace.as
> >FontFaceSet.as
> >HashChangeEvent.as
> >HTMLAnchorElement.as
> >HTMLAppletElement.as
> >HTMLAreaElement.as
> >HTMLAudioElement.as
> >HTMLBaseElement.as
> >HTMLBaseFontElement.as
> >HTMLBodyElement.as
> >HTMLBRElement.as
> >HTMLButtonElement.as
> >HTMLCanvasElement.as
> >HTMLCollection.as
> >HTMLContentElement.as
> >HTMLDetailsElement.as
> >HTMLDialogElement.as
> >HTMLDirectoryElement.as
> >HTMLDivElement.as
> >HTMLDListElement.as
> >HTMLDocument.as
> >HTMLElement.as
> >HTMLEmbedElement.as
> >HTMLFieldSetElement.as
> >HTMLFontElement.as
> >HTMLFormElement.as
> >HTMLFrameElement.as
> >HTMLFrameSetElement.as
> >HTMLHeadElement.as
> >HTMLHeadingElement.as
> >HTMLHRElement.as
> >HTMLHtmlElement.as
> >HTMLIFrameElement.as
> >HTMLImageElement.as
> >HTMLInputElement.as
> >HTMLIsIndexElement.as
> >HTMLLabelElement.as
> >HTMLLegendElement.as
> >HTMLLIElement.as
> >HTMLLinkElement.as
> >HTMLMapElement.as
> >HTMLMediaElement.as
> >HTMLMenuElement.as
> >HTMLMenuItemElement.as
> >HTMLMetaElement.as
> >HTMLModElement.as
> >HTMLObjectElement.as
> >HTMLOListElement.as
> >HTMLOptGroupElement.as
> >HTMLOptionElement.as
> >HTMLOptionsCollection.as
> >HTMLParagraphElement.as
> >HTMLParamElement.as
> >HTMLPictureElement.as
> >HTMLPreElement.as
> >HTMLQuoteElement.as
> >HTMLScriptElement.as
> >HTMLSelectElement.as
> >HTMLShadowElement.as
> >HTMLSourceElement.as
> >HTMLStyleElement.as
> >HTMLTableCaptionElement.as
> >HTMLTableCellElement.as
> >HTMLTableColElement.as
> >HTMLTableElement.as
> >HTMLTableRowElement.as
> >HTMLTableSectionElement.as
> >HTMLTemplateElement.as
> >HTMLTextAreaElement.as
> >HTMLTitleElement.as
> >HTMLUListElement.as
> >HTMLVideoElement.as
> >Image.as
> >ImageData.as
> >KeyboardEvent.as
> >LinkStyle.as
> >MediaError.as
> >MediaList.as
> >MediaQueryList.as
> >MediaQueryListListener.as
> >MessageChannel.as
> >MessageEvent.as
> >MessagePort.as
> >MouseEvent.as
> >MSCSSMatrix.as
> >MutationEvent.as
> >MutationObserver.as
> >MutationRecord.as
> >NamedNodeMap.as
> >NameList.as
> >Node.as
> >NodeFilter.as
> >NodeIterator.as
> >NodeList.as
> >Notation.as
> >openDatabase.as
> >PageTransitionEvent.as
> >PopStateEvent.as
> >postMessage.as
> >ProcessingInstruction.as
> >ProgressEvent.as
> >Range.as
> >RangeException.as
> >Rect.as
> >RelatedEvent.as
> >RGBColor.as
> >Screen.as
> >ShadowRoot.as
> >SharedWorker.as
> >SharedWorkerGlobalScope.as
> >SQLError.as
> >SQLResultSet.as
> >SQLResultSetRowList.as
> >SQLTransaction.as
> >StyleSheet.as
> >StyleSheetList.as
> >Text.as
> >TextMetrics.as
> >TextTrack.as
> >TextTrackCue.as
> >TextTrackCueList.as
> >TextTrackList.as
> >TimeRanges.as
> >TreeWalker.as
> >TypeInfo.as
> >UIEvent.as
> >UserDataHandler.as
> >ValidityState.as
> >ViewCSS.as
> >VTTCue.as
> >WebKitCSSMatrix.as
> >WebSocket.as
> >WebWorker.as
> >Window.as
> >Worker.as
> >WorkerGlobalScope.as
> >WorkerLocation.as
> >XMLHttpRequestEventTarget.as
> >XMLHttpRequestUpload.as
> >
> >
> >
> >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
> ><te...@gmail.com>
> >wrote:
> >
> >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for that
> >> matter my asdoc framework I wrote doesn't(it was just showing I had all
> >> this working in the context of Falcon), we just need the ASDocTokenizer
> >>to
> >> tokenize the comment data given to the ASDocDelegate.
> >>
> >> Mike
> >>
> >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
> >> teotigraphixllc@gmail.com> wrote:
> >>
> >>> The way I did it was, I did exactly what you did, implemented the
> >>> ASDocDelegate and saved the tokes as it parsed all the files.
> >>>
> >>> Then I used the token String like you in the ASDocTokenizer to parse
> >>>the
> >>> loop I showed you above.
> >>>
> >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
> >>> working like how I have it in the code above. I already wrote an API
> >>>for
> >>> easy access to the tags and comment in an ASDocCOmment class that has a
> >>> list of DocTags.
> >>>
> >>> Mike
> >>>
> >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:
> >>>
> >>>> For this exercise though, we don’t care about the output as Velocity
> >>>>or
> >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon
> >>>>you
> >>>> retrieve ASDoc comments via node.getASDocComment() and get an
> >>>> ASDocComment
> >>>> instance.  Do you want the Token to be the root of a mini-tree of
> >>>>parsed
> >>>> nodes?
> >>>>
> >>>> -Alex
> >>>>
> >>>>
> >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com>
> >>>> wrote:
> >>>>
> >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
> >>>> >templates instead of XSL.
> >>>> >
> >>>> >That DocTag is my class.
> >>>> >
> >>>> >Mike
> >>>> >
> >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:
> >>>> >
> >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
> >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
> >>>> >>equivalent
> >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK has
> >>>>an
> >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
> >>>> >> somewhere?   Otherwise I will try to quickly create them.
> >>>> >>
> >>>> >> -Alex
> >>>> >>
> >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <teotigraphixllc@gmail.com
> >
> >>>> >>wrote:
> >>>> >>
> >>>> >> >BTW, the loop always happens at the VERY end of the comment, so
> >>>>when
> >>>> >>you
> >>>> >> >get to the end the(the last call of next() that should return
> >>>>null);
> >>>> >> >
> >>>> >> >tok = tokenizer.next();
> >>>> >> >
> >>>> >> >never returns, it gets stuck trying to exit.
> >>>> >> >
> >>>> >> >Mike
> >>>> >> >
> >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> >>>> >> ><te...@gmail.com>
> >>>> >> >wrote:
> >>>> >> >
> >>>> >> >> I posted about this a couple weeks ago and I tried recompiling
> >>>>with
> >>>> >> >>JFlex
> >>>> >> >> 1.5 I think, the older version and still had the problem.
> >>>> >> >>
> >>>> >> >> Maybe I messed up something but I tried with my same asdoc code
> >>>> when
> >>>> >>I
> >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it work
> >>>>with
> >>>> >>my
> >>>> >> >> version of a documentor.
> >>>> >> >>
> >>>> >> >> I think IIRC, I actually tried a simple test case and it would
> >>>> work.
> >>>> >> >>
> >>>> >> >> I have code that uses the tokenizer;
> >>>> >> >>
> >>>> >> >>
> >>>> >> >>     public void compile()
> >>>> >> >>     {
> >>>> >> >>         if (token == null)
> >>>> >> >>             return;
> >>>> >> >>
> >>>> >> >>         String data = token.getText();
> >>>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
> >>>> >> >>         tokenizer.setReader(new StringReader(data));
> >>>> >> >>         ASDocToken tok = tokenizer.next();
> >>>> >> >>         boolean foundDescription = false;
> >>>> >> >>         DocTag pendingTag = null;
> >>>> >> >>
> >>>> >> >>         try
> >>>> >> >>         {
> >>>> >> >>             while (tok != null)
> >>>> >> >>             {
> >>>> >> >>                 if (!foundDescription
> >>>> >> >>                         && tok.getType() ==
> >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>>> >> >>                 {
> >>>> >> >>                     description = tok.getText();
> >>>> >> >>                 }
> >>>> >> >>                 else
> >>>> >> >>                 {
> >>>> >> >>                     // do tags
> >>>> >> >>                     if (tok.getType() ==
> >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
> >>>> >> >>                     {
> >>>> >> >>                         if (pendingTag != null)
> >>>> >> >>                         {
> >>>> >> >>                             addTag(pendingTag);
> >>>> >> >>                             pendingTag = null;
> >>>> >> >>                         }
> >>>> >> >>                         pendingTag = new
> >>>> >> >> DocTag(tok.getText().substring(1));
> >>>> >> >>                     }
> >>>> >> >>                     else if (tok.getType() ==
> >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>>> >> >>                     {
> >>>> >> >>
> >>>>pendingTag.setDescription(tok.getText());
> >>>> >> >>                         addTag(pendingTag);
> >>>> >> >>                         pendingTag = null;
> >>>> >> >>                     }
> >>>> >> >>                 }
> >>>> >> >>
> >>>> >> >>                 foundDescription = true;
> >>>> >> >>
> >>>> >> >>                 tok = tokenizer.next();
> >>>> >> >>             }
> >>>> >> >>         }
> >>>> >> >>         catch (Exception e)
> >>>> >> >>         {
> >>>> >> >>             e.printStackTrace();
> >>>> >> >>         }
> >>>> >> >>     }
> >>>> >> >>
> >>>> >> >> Mike
> >>>> >> >>
> >>>> >> >>
> >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com>
> >>>> wrote:
> >>>> >> >>
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
> >>>> teotigraphixllc@gmail.com>
> >>>> >> >>> wrote:
> >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
> >>>> >> >>>ASDocTokenizer?
> >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
> >>>>current
> >>>> >> >>>have?
> >>>> >> >>> >>
> >>>> >> >>> >
> >>>> >> >>> >
> >>>> >> >>> >It doesn't work on anything, there is an infinite loop in the
> >>>> >>scanner
> >>>> >> >>> that
> >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> >>>> >> >>> >
> >>>> >> >>> >What is weird is I was using the SAME code base when I wrote
> >>>>the
> >>>> >>asdoc
> >>>> >> >>> >documenter I have 2 years ago and it worked fine.
> >>>> >> >>>
> >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
> >>>>What
> >>>> >>setup
> >>>> >> >>>did
> >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
> >>>>FlexJS
> >>>> >>SDK
> >>>> >> >>>or
> >>>> >> >>> did it even loop on a simple test case?
> >>>> >> >>>
> >>>> >> >>> -Alex
> >>>> >> >>>
> >>>> >> >>>
> >>>> >> >>
> >>>> >>
> >>>> >>
> >>>>
> >>>>
> >>>
> >>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.
Amazing!

On 6/4/15, 2:04 PM, "Michael Schmalle" <te...@gmail.com> wrote:

>Well so far I have got the below compiling into .as classes and interfaces
>using the following externals files;
>
>There is a definite order these need to be parsed in, I am still figuring
>them out. I plan on adding in the asdocs, the version of JS the API was
>introduced in.
>
>Mike
>
>html5.js
>missing.js
>w3c_css.js
>w3c_css3d.js
>w3c_dom1.js
>w3c_dom2.js
>w3c_dom3.js
>w3c_event.js
>w3c_range.js
>
>
>Attr.as
>CanvasGradient.as
>CanvasPattern.as
>CanvasRenderingContext2D.as
>CaretPosition.as
>CDATASection.as
>CharacterData.as
>ClientInformation.as
>ClientRect.as
>ClientRectList.as
>Comment.as
>Counter.as
>CSSCharsetRule.as
>CSSFontFaceRule.as
>CSSImportRule.as
>CSSInterface.as
>CSSMatrix.as
>CSSMediaRule.as
>CSSPageRule.as
>CSSPrimitiveValue.as
>CSSProperties.as
>CSSRule.as
>CSSRuleList.as
>CSSStyleDeclaration.as
>CSSStyleRule.as
>CSSStyleSheet.as
>CSSUnknownRule.as
>CSSValue.as
>CSSValueList.as
>CustomEvent.as
>Database.as
>DatabaseCallback.as
>DataTransfer.as
>DedicatedWorkerGlobalScope.as
>Document.as
>DocumentCSS.as
>DocumentEvent.as
>DocumentFragment.as
>DocumentRange.as
>DocumentStyle.as
>DocumentType.as
>DOMApplicationCache.as
>DOMConfiguration.as
>DOMError.as
>DOMErrorHandler.as
>DOMException.as
>DOMImplementation.as
>DOMImplementationCSS.as
>DOMImplementationList.as
>DOMImplementationSource.as
>DOMLocator.as
>DOMStringList.as
>DOMTokenList.as
>DragEvent.as
>Element.as
>ElementCSSInlineStyle.as
>Entity.as
>EntityReference.as
>ErrorEvent.as
>Event.as
>EventListener.as
>EventTarget.as
>ExceptionCode.as
>FileList.as
>FontFace.as
>FontFaceSet.as
>HashChangeEvent.as
>HTMLAnchorElement.as
>HTMLAppletElement.as
>HTMLAreaElement.as
>HTMLAudioElement.as
>HTMLBaseElement.as
>HTMLBaseFontElement.as
>HTMLBodyElement.as
>HTMLBRElement.as
>HTMLButtonElement.as
>HTMLCanvasElement.as
>HTMLCollection.as
>HTMLContentElement.as
>HTMLDetailsElement.as
>HTMLDialogElement.as
>HTMLDirectoryElement.as
>HTMLDivElement.as
>HTMLDListElement.as
>HTMLDocument.as
>HTMLElement.as
>HTMLEmbedElement.as
>HTMLFieldSetElement.as
>HTMLFontElement.as
>HTMLFormElement.as
>HTMLFrameElement.as
>HTMLFrameSetElement.as
>HTMLHeadElement.as
>HTMLHeadingElement.as
>HTMLHRElement.as
>HTMLHtmlElement.as
>HTMLIFrameElement.as
>HTMLImageElement.as
>HTMLInputElement.as
>HTMLIsIndexElement.as
>HTMLLabelElement.as
>HTMLLegendElement.as
>HTMLLIElement.as
>HTMLLinkElement.as
>HTMLMapElement.as
>HTMLMediaElement.as
>HTMLMenuElement.as
>HTMLMenuItemElement.as
>HTMLMetaElement.as
>HTMLModElement.as
>HTMLObjectElement.as
>HTMLOListElement.as
>HTMLOptGroupElement.as
>HTMLOptionElement.as
>HTMLOptionsCollection.as
>HTMLParagraphElement.as
>HTMLParamElement.as
>HTMLPictureElement.as
>HTMLPreElement.as
>HTMLQuoteElement.as
>HTMLScriptElement.as
>HTMLSelectElement.as
>HTMLShadowElement.as
>HTMLSourceElement.as
>HTMLStyleElement.as
>HTMLTableCaptionElement.as
>HTMLTableCellElement.as
>HTMLTableColElement.as
>HTMLTableElement.as
>HTMLTableRowElement.as
>HTMLTableSectionElement.as
>HTMLTemplateElement.as
>HTMLTextAreaElement.as
>HTMLTitleElement.as
>HTMLUListElement.as
>HTMLVideoElement.as
>Image.as
>ImageData.as
>KeyboardEvent.as
>LinkStyle.as
>MediaError.as
>MediaList.as
>MediaQueryList.as
>MediaQueryListListener.as
>MessageChannel.as
>MessageEvent.as
>MessagePort.as
>MouseEvent.as
>MSCSSMatrix.as
>MutationEvent.as
>MutationObserver.as
>MutationRecord.as
>NamedNodeMap.as
>NameList.as
>Node.as
>NodeFilter.as
>NodeIterator.as
>NodeList.as
>Notation.as
>openDatabase.as
>PageTransitionEvent.as
>PopStateEvent.as
>postMessage.as
>ProcessingInstruction.as
>ProgressEvent.as
>Range.as
>RangeException.as
>Rect.as
>RelatedEvent.as
>RGBColor.as
>Screen.as
>ShadowRoot.as
>SharedWorker.as
>SharedWorkerGlobalScope.as
>SQLError.as
>SQLResultSet.as
>SQLResultSetRowList.as
>SQLTransaction.as
>StyleSheet.as
>StyleSheetList.as
>Text.as
>TextMetrics.as
>TextTrack.as
>TextTrackCue.as
>TextTrackCueList.as
>TextTrackList.as
>TimeRanges.as
>TreeWalker.as
>TypeInfo.as
>UIEvent.as
>UserDataHandler.as
>ValidityState.as
>ViewCSS.as
>VTTCue.as
>WebKitCSSMatrix.as
>WebSocket.as
>WebWorker.as
>Window.as
>Worker.as
>WorkerGlobalScope.as
>WorkerLocation.as
>XMLHttpRequestEventTarget.as
>XMLHttpRequestUpload.as
>
>
>
>On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
><te...@gmail.com>
>wrote:
>
>> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for that
>> matter my asdoc framework I wrote doesn't(it was just showing I had all
>> this working in the context of Falcon), we just need the ASDocTokenizer
>>to
>> tokenize the comment data given to the ASDocDelegate.
>>
>> Mike
>>
>> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
>> teotigraphixllc@gmail.com> wrote:
>>
>>> The way I did it was, I did exactly what you did, implemented the
>>> ASDocDelegate and saved the tokes as it parsed all the files.
>>>
>>> Then I used the token String like you in the ASDocTokenizer to parse
>>>the
>>> loop I showed you above.
>>>
>>> I would add the DocTag and stuff if you can get the ASDocTokenizer
>>> working like how I have it in the code above. I already wrote an API
>>>for
>>> easy access to the tags and comment in an ASDocCOmment class that has a
>>> list of DocTags.
>>>
>>> Mike
>>>
>>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:
>>>
>>>> For this exercise though, we don’t care about the output as Velocity
>>>>or
>>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon
>>>>you
>>>> retrieve ASDoc comments via node.getASDocComment() and get an
>>>> ASDocComment
>>>> instance.  Do you want the Token to be the root of a mini-tree of
>>>>parsed
>>>> nodes?
>>>>
>>>> -Alex
>>>>
>>>>
>>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com>
>>>> wrote:
>>>>
>>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
>>>> >templates instead of XSL.
>>>> >
>>>> >That DocTag is my class.
>>>> >
>>>> >Mike
>>>> >
>>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:
>>>> >
>>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
>>>> >>equivalent
>>>> >> to MXMLC.java and have a main() method.  The current Flex SDK has
>>>>an
>>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
>>>> >> somewhere?   Otherwise I will try to quickly create them.
>>>> >>
>>>> >> -Alex
>>>> >>
>>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <te...@gmail.com>
>>>> >>wrote:
>>>> >>
>>>> >> >BTW, the loop always happens at the VERY end of the comment, so
>>>>when
>>>> >>you
>>>> >> >get to the end the(the last call of next() that should return
>>>>null);
>>>> >> >
>>>> >> >tok = tokenizer.next();
>>>> >> >
>>>> >> >never returns, it gets stuck trying to exit.
>>>> >> >
>>>> >> >Mike
>>>> >> >
>>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>>>> >> ><te...@gmail.com>
>>>> >> >wrote:
>>>> >> >
>>>> >> >> I posted about this a couple weeks ago and I tried recompiling
>>>>with
>>>> >> >>JFlex
>>>> >> >> 1.5 I think, the older version and still had the problem.
>>>> >> >>
>>>> >> >> Maybe I messed up something but I tried with my same asdoc code
>>>> when
>>>> >>I
>>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it work
>>>>with
>>>> >>my
>>>> >> >> version of a documentor.
>>>> >> >>
>>>> >> >> I think IIRC, I actually tried a simple test case and it would
>>>> work.
>>>> >> >>
>>>> >> >> I have code that uses the tokenizer;
>>>> >> >>
>>>> >> >>
>>>> >> >>     public void compile()
>>>> >> >>     {
>>>> >> >>         if (token == null)
>>>> >> >>             return;
>>>> >> >>
>>>> >> >>         String data = token.getText();
>>>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>>>> >> >>         tokenizer.setReader(new StringReader(data));
>>>> >> >>         ASDocToken tok = tokenizer.next();
>>>> >> >>         boolean foundDescription = false;
>>>> >> >>         DocTag pendingTag = null;
>>>> >> >>
>>>> >> >>         try
>>>> >> >>         {
>>>> >> >>             while (tok != null)
>>>> >> >>             {
>>>> >> >>                 if (!foundDescription
>>>> >> >>                         && tok.getType() ==
>>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>>>> >> >>                 {
>>>> >> >>                     description = tok.getText();
>>>> >> >>                 }
>>>> >> >>                 else
>>>> >> >>                 {
>>>> >> >>                     // do tags
>>>> >> >>                     if (tok.getType() ==
>>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>>>> >> >>                     {
>>>> >> >>                         if (pendingTag != null)
>>>> >> >>                         {
>>>> >> >>                             addTag(pendingTag);
>>>> >> >>                             pendingTag = null;
>>>> >> >>                         }
>>>> >> >>                         pendingTag = new
>>>> >> >> DocTag(tok.getText().substring(1));
>>>> >> >>                     }
>>>> >> >>                     else if (tok.getType() ==
>>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>>>> >> >>                     {
>>>> >> >>         
>>>>pendingTag.setDescription(tok.getText());
>>>> >> >>                         addTag(pendingTag);
>>>> >> >>                         pendingTag = null;
>>>> >> >>                     }
>>>> >> >>                 }
>>>> >> >>
>>>> >> >>                 foundDescription = true;
>>>> >> >>
>>>> >> >>                 tok = tokenizer.next();
>>>> >> >>             }
>>>> >> >>         }
>>>> >> >>         catch (Exception e)
>>>> >> >>         {
>>>> >> >>             e.printStackTrace();
>>>> >> >>         }
>>>> >> >>     }
>>>> >> >>
>>>> >> >> Mike
>>>> >> >>
>>>> >> >>
>>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com>
>>>> wrote:
>>>> >> >>
>>>> >> >>>
>>>> >> >>>
>>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
>>>> teotigraphixllc@gmail.com>
>>>> >> >>> wrote:
>>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
>>>> >> >>>ASDocTokenizer?
>>>> >> >>> >> Was the problem that it didn’t work on every AS file we
>>>>current
>>>> >> >>>have?
>>>> >> >>> >>
>>>> >> >>> >
>>>> >> >>> >
>>>> >> >>> >It doesn't work on anything, there is an infinite loop in the
>>>> >>scanner
>>>> >> >>> that
>>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>>>> >> >>> >
>>>> >> >>> >What is weird is I was using the SAME code base when I wrote
>>>>the
>>>> >>asdoc
>>>> >> >>> >documenter I have 2 years ago and it worked fine.
>>>> >> >>>
>>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
>>>>What
>>>> >>setup
>>>> >> >>>did
>>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
>>>>FlexJS
>>>> >>SDK
>>>> >> >>>or
>>>> >> >>> did it even loop on a simple test case?
>>>> >> >>>
>>>> >> >>> -Alex
>>>> >> >>>
>>>> >> >>>
>>>> >> >>
>>>> >>
>>>> >>
>>>>
>>>>
>>>
>>


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
Well so far I have got the below compiling into .as classes and interfaces
using the following externals files;

There is a definite order these need to be parsed in, I am still figuring
them out. I plan on adding in the asdocs, the version of JS the API was
introduced in.

Mike

html5.js
missing.js
w3c_css.js
w3c_css3d.js
w3c_dom1.js
w3c_dom2.js
w3c_dom3.js
w3c_event.js
w3c_range.js


Attr.as
CanvasGradient.as
CanvasPattern.as
CanvasRenderingContext2D.as
CaretPosition.as
CDATASection.as
CharacterData.as
ClientInformation.as
ClientRect.as
ClientRectList.as
Comment.as
Counter.as
CSSCharsetRule.as
CSSFontFaceRule.as
CSSImportRule.as
CSSInterface.as
CSSMatrix.as
CSSMediaRule.as
CSSPageRule.as
CSSPrimitiveValue.as
CSSProperties.as
CSSRule.as
CSSRuleList.as
CSSStyleDeclaration.as
CSSStyleRule.as
CSSStyleSheet.as
CSSUnknownRule.as
CSSValue.as
CSSValueList.as
CustomEvent.as
Database.as
DatabaseCallback.as
DataTransfer.as
DedicatedWorkerGlobalScope.as
Document.as
DocumentCSS.as
DocumentEvent.as
DocumentFragment.as
DocumentRange.as
DocumentStyle.as
DocumentType.as
DOMApplicationCache.as
DOMConfiguration.as
DOMError.as
DOMErrorHandler.as
DOMException.as
DOMImplementation.as
DOMImplementationCSS.as
DOMImplementationList.as
DOMImplementationSource.as
DOMLocator.as
DOMStringList.as
DOMTokenList.as
DragEvent.as
Element.as
ElementCSSInlineStyle.as
Entity.as
EntityReference.as
ErrorEvent.as
Event.as
EventListener.as
EventTarget.as
ExceptionCode.as
FileList.as
FontFace.as
FontFaceSet.as
HashChangeEvent.as
HTMLAnchorElement.as
HTMLAppletElement.as
HTMLAreaElement.as
HTMLAudioElement.as
HTMLBaseElement.as
HTMLBaseFontElement.as
HTMLBodyElement.as
HTMLBRElement.as
HTMLButtonElement.as
HTMLCanvasElement.as
HTMLCollection.as
HTMLContentElement.as
HTMLDetailsElement.as
HTMLDialogElement.as
HTMLDirectoryElement.as
HTMLDivElement.as
HTMLDListElement.as
HTMLDocument.as
HTMLElement.as
HTMLEmbedElement.as
HTMLFieldSetElement.as
HTMLFontElement.as
HTMLFormElement.as
HTMLFrameElement.as
HTMLFrameSetElement.as
HTMLHeadElement.as
HTMLHeadingElement.as
HTMLHRElement.as
HTMLHtmlElement.as
HTMLIFrameElement.as
HTMLImageElement.as
HTMLInputElement.as
HTMLIsIndexElement.as
HTMLLabelElement.as
HTMLLegendElement.as
HTMLLIElement.as
HTMLLinkElement.as
HTMLMapElement.as
HTMLMediaElement.as
HTMLMenuElement.as
HTMLMenuItemElement.as
HTMLMetaElement.as
HTMLModElement.as
HTMLObjectElement.as
HTMLOListElement.as
HTMLOptGroupElement.as
HTMLOptionElement.as
HTMLOptionsCollection.as
HTMLParagraphElement.as
HTMLParamElement.as
HTMLPictureElement.as
HTMLPreElement.as
HTMLQuoteElement.as
HTMLScriptElement.as
HTMLSelectElement.as
HTMLShadowElement.as
HTMLSourceElement.as
HTMLStyleElement.as
HTMLTableCaptionElement.as
HTMLTableCellElement.as
HTMLTableColElement.as
HTMLTableElement.as
HTMLTableRowElement.as
HTMLTableSectionElement.as
HTMLTemplateElement.as
HTMLTextAreaElement.as
HTMLTitleElement.as
HTMLUListElement.as
HTMLVideoElement.as
Image.as
ImageData.as
KeyboardEvent.as
LinkStyle.as
MediaError.as
MediaList.as
MediaQueryList.as
MediaQueryListListener.as
MessageChannel.as
MessageEvent.as
MessagePort.as
MouseEvent.as
MSCSSMatrix.as
MutationEvent.as
MutationObserver.as
MutationRecord.as
NamedNodeMap.as
NameList.as
Node.as
NodeFilter.as
NodeIterator.as
NodeList.as
Notation.as
openDatabase.as
PageTransitionEvent.as
PopStateEvent.as
postMessage.as
ProcessingInstruction.as
ProgressEvent.as
Range.as
RangeException.as
Rect.as
RelatedEvent.as
RGBColor.as
Screen.as
ShadowRoot.as
SharedWorker.as
SharedWorkerGlobalScope.as
SQLError.as
SQLResultSet.as
SQLResultSetRowList.as
SQLTransaction.as
StyleSheet.as
StyleSheetList.as
Text.as
TextMetrics.as
TextTrack.as
TextTrackCue.as
TextTrackCueList.as
TextTrackList.as
TimeRanges.as
TreeWalker.as
TypeInfo.as
UIEvent.as
UserDataHandler.as
ValidityState.as
ViewCSS.as
VTTCue.as
WebKitCSSMatrix.as
WebSocket.as
WebWorker.as
Window.as
Worker.as
WorkerGlobalScope.as
WorkerLocation.as
XMLHttpRequestEventTarget.as
XMLHttpRequestUpload.as



On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle <te...@gmail.com>
wrote:

> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for that
> matter my asdoc framework I wrote doesn't(it was just showing I had all
> this working in the context of Falcon), we just need the ASDocTokenizer to
> tokenize the comment data given to the ASDocDelegate.
>
> Mike
>
> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
> teotigraphixllc@gmail.com> wrote:
>
>> The way I did it was, I did exactly what you did, implemented the
>> ASDocDelegate and saved the tokes as it parsed all the files.
>>
>> Then I used the token String like you in the ASDocTokenizer to parse the
>> loop I showed you above.
>>
>> I would add the DocTag and stuff if you can get the ASDocTokenizer
>> working like how I have it in the code above. I already wrote an API for
>> easy access to the tags and comment in an ASDocCOmment class that has a
>> list of DocTags.
>>
>> Mike
>>
>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>>> For this exercise though, we don’t care about the output as Velocity or
>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon you
>>> retrieve ASDoc comments via node.getASDocComment() and get an
>>> ASDocComment
>>> instance.  Do you want the Token to be the root of a mini-tree of parsed
>>> nodes?
>>>
>>> -Alex
>>>
>>>
>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com>
>>> wrote:
>>>
>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
>>> >templates instead of XSL.
>>> >
>>> >That DocTag is my class.
>>> >
>>> >Mike
>>> >
>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:
>>> >
>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
>>> >>equivalent
>>> >> to MXMLC.java and have a main() method.  The current Flex SDK has an
>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
>>> >> somewhere?   Otherwise I will try to quickly create them.
>>> >>
>>> >> -Alex
>>> >>
>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <te...@gmail.com>
>>> >>wrote:
>>> >>
>>> >> >BTW, the loop always happens at the VERY end of the comment, so when
>>> >>you
>>> >> >get to the end the(the last call of next() that should return null);
>>> >> >
>>> >> >tok = tokenizer.next();
>>> >> >
>>> >> >never returns, it gets stuck trying to exit.
>>> >> >
>>> >> >Mike
>>> >> >
>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>>> >> ><te...@gmail.com>
>>> >> >wrote:
>>> >> >
>>> >> >> I posted about this a couple weeks ago and I tried recompiling with
>>> >> >>JFlex
>>> >> >> 1.5 I think, the older version and still had the problem.
>>> >> >>
>>> >> >> Maybe I messed up something but I tried with my same asdoc code
>>> when
>>> >>I
>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it work with
>>> >>my
>>> >> >> version of a documentor.
>>> >> >>
>>> >> >> I think IIRC, I actually tried a simple test case and it would
>>> work.
>>> >> >>
>>> >> >> I have code that uses the tokenizer;
>>> >> >>
>>> >> >>
>>> >> >>     public void compile()
>>> >> >>     {
>>> >> >>         if (token == null)
>>> >> >>             return;
>>> >> >>
>>> >> >>         String data = token.getText();
>>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>>> >> >>         tokenizer.setReader(new StringReader(data));
>>> >> >>         ASDocToken tok = tokenizer.next();
>>> >> >>         boolean foundDescription = false;
>>> >> >>         DocTag pendingTag = null;
>>> >> >>
>>> >> >>         try
>>> >> >>         {
>>> >> >>             while (tok != null)
>>> >> >>             {
>>> >> >>                 if (!foundDescription
>>> >> >>                         && tok.getType() ==
>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>>> >> >>                 {
>>> >> >>                     description = tok.getText();
>>> >> >>                 }
>>> >> >>                 else
>>> >> >>                 {
>>> >> >>                     // do tags
>>> >> >>                     if (tok.getType() ==
>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>>> >> >>                     {
>>> >> >>                         if (pendingTag != null)
>>> >> >>                         {
>>> >> >>                             addTag(pendingTag);
>>> >> >>                             pendingTag = null;
>>> >> >>                         }
>>> >> >>                         pendingTag = new
>>> >> >> DocTag(tok.getText().substring(1));
>>> >> >>                     }
>>> >> >>                     else if (tok.getType() ==
>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>>> >> >>                     {
>>> >> >>                         pendingTag.setDescription(tok.getText());
>>> >> >>                         addTag(pendingTag);
>>> >> >>                         pendingTag = null;
>>> >> >>                     }
>>> >> >>                 }
>>> >> >>
>>> >> >>                 foundDescription = true;
>>> >> >>
>>> >> >>                 tok = tokenizer.next();
>>> >> >>             }
>>> >> >>         }
>>> >> >>         catch (Exception e)
>>> >> >>         {
>>> >> >>             e.printStackTrace();
>>> >> >>         }
>>> >> >>     }
>>> >> >>
>>> >> >> Mike
>>> >> >>
>>> >> >>
>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com>
>>> wrote:
>>> >> >>
>>> >> >>>
>>> >> >>>
>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
>>> teotigraphixllc@gmail.com>
>>> >> >>> wrote:
>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
>>> >> >>>ASDocTokenizer?
>>> >> >>> >> Was the problem that it didn’t work on every AS file we current
>>> >> >>>have?
>>> >> >>> >>
>>> >> >>> >
>>> >> >>> >
>>> >> >>> >It doesn't work on anything, there is an infinite loop in the
>>> >>scanner
>>> >> >>> that
>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>>> >> >>> >
>>> >> >>> >What is weird is I was using the SAME code base when I wrote the
>>> >>asdoc
>>> >> >>> >documenter I have 2 years ago and it worked fine.
>>> >> >>>
>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What
>>> >>setup
>>> >> >>>did
>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or FlexJS
>>> >>SDK
>>> >> >>>or
>>> >> >>> did it even loop on a simple test case?
>>> >> >>>
>>> >> >>> -Alex
>>> >> >>>
>>> >> >>>
>>> >> >>
>>> >>
>>> >>
>>>
>>>
>>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
Yeah sorry to confuse you, the Velocity stuff doesn't matter, for that
matter my asdoc framework I wrote doesn't(it was just showing I had all
this working in the context of Falcon), we just need the ASDocTokenizer to
tokenize the comment data given to the ASDocDelegate.

Mike

On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <te...@gmail.com>
wrote:

> The way I did it was, I did exactly what you did, implemented the
> ASDocDelegate and saved the tokes as it parsed all the files.
>
> Then I used the token String like you in the ASDocTokenizer to parse the
> loop I showed you above.
>
> I would add the DocTag and stuff if you can get the ASDocTokenizer working
> like how I have it in the code above. I already wrote an API for easy
> access to the tags and comment in an ASDocCOmment class that has a list of
> DocTags.
>
> Mike
>
> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> For this exercise though, we don’t care about the output as Velocity or
>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon you
>> retrieve ASDoc comments via node.getASDocComment() and get an ASDocComment
>> instance.  Do you want the Token to be the root of a mini-tree of parsed
>> nodes?
>>
>> -Alex
>>
>>
>> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com>
>> wrote:
>>
>> >I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
>> >templates instead of XSL.
>> >
>> >That DocTag is my class.
>> >
>> >Mike
>> >
>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
>> >>equivalent
>> >> to MXMLC.java and have a main() method.  The current Flex SDK has an
>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
>> >> somewhere?   Otherwise I will try to quickly create them.
>> >>
>> >> -Alex
>> >>
>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <te...@gmail.com>
>> >>wrote:
>> >>
>> >> >BTW, the loop always happens at the VERY end of the comment, so when
>> >>you
>> >> >get to the end the(the last call of next() that should return null);
>> >> >
>> >> >tok = tokenizer.next();
>> >> >
>> >> >never returns, it gets stuck trying to exit.
>> >> >
>> >> >Mike
>> >> >
>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>> >> ><te...@gmail.com>
>> >> >wrote:
>> >> >
>> >> >> I posted about this a couple weeks ago and I tried recompiling with
>> >> >>JFlex
>> >> >> 1.5 I think, the older version and still had the problem.
>> >> >>
>> >> >> Maybe I messed up something but I tried with my same asdoc code when
>> >>I
>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it work with
>> >>my
>> >> >> version of a documentor.
>> >> >>
>> >> >> I think IIRC, I actually tried a simple test case and it would work.
>> >> >>
>> >> >> I have code that uses the tokenizer;
>> >> >>
>> >> >>
>> >> >>     public void compile()
>> >> >>     {
>> >> >>         if (token == null)
>> >> >>             return;
>> >> >>
>> >> >>         String data = token.getText();
>> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>> >> >>         tokenizer.setReader(new StringReader(data));
>> >> >>         ASDocToken tok = tokenizer.next();
>> >> >>         boolean foundDescription = false;
>> >> >>         DocTag pendingTag = null;
>> >> >>
>> >> >>         try
>> >> >>         {
>> >> >>             while (tok != null)
>> >> >>             {
>> >> >>                 if (!foundDescription
>> >> >>                         && tok.getType() ==
>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >> >>                 {
>> >> >>                     description = tok.getText();
>> >> >>                 }
>> >> >>                 else
>> >> >>                 {
>> >> >>                     // do tags
>> >> >>                     if (tok.getType() ==
>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>> >> >>                     {
>> >> >>                         if (pendingTag != null)
>> >> >>                         {
>> >> >>                             addTag(pendingTag);
>> >> >>                             pendingTag = null;
>> >> >>                         }
>> >> >>                         pendingTag = new
>> >> >> DocTag(tok.getText().substring(1));
>> >> >>                     }
>> >> >>                     else if (tok.getType() ==
>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >> >>                     {
>> >> >>                         pendingTag.setDescription(tok.getText());
>> >> >>                         addTag(pendingTag);
>> >> >>                         pendingTag = null;
>> >> >>                     }
>> >> >>                 }
>> >> >>
>> >> >>                 foundDescription = true;
>> >> >>
>> >> >>                 tok = tokenizer.next();
>> >> >>             }
>> >> >>         }
>> >> >>         catch (Exception e)
>> >> >>         {
>> >> >>             e.printStackTrace();
>> >> >>         }
>> >> >>     }
>> >> >>
>> >> >> Mike
>> >> >>
>> >> >>
>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com>
>> wrote:
>> >> >>
>> >> >>>
>> >> >>>
>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <teotigraphixllc@gmail.com
>> >
>> >> >>> wrote:
>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
>> >> >>>ASDocTokenizer?
>> >> >>> >> Was the problem that it didn’t work on every AS file we current
>> >> >>>have?
>> >> >>> >>
>> >> >>> >
>> >> >>> >
>> >> >>> >It doesn't work on anything, there is an infinite loop in the
>> >>scanner
>> >> >>> that
>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>> >> >>> >
>> >> >>> >What is weird is I was using the SAME code base when I wrote the
>> >>asdoc
>> >> >>> >documenter I have 2 years ago and it worked fine.
>> >> >>>
>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What
>> >>setup
>> >> >>>did
>> >> >>> you have for trying it?  Did you run it on the Flex SDK or FlexJS
>> >>SDK
>> >> >>>or
>> >> >>> did it even loop on a simple test case?
>> >> >>>
>> >> >>> -Alex
>> >> >>>
>> >> >>>
>> >> >>
>> >>
>> >>
>>
>>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
The way I did it was, I did exactly what you did, implemented the
ASDocDelegate and saved the tokes as it parsed all the files.

Then I used the token String like you in the ASDocTokenizer to parse the
loop I showed you above.

I would add the DocTag and stuff if you can get the ASDocTokenizer working
like how I have it in the code above. I already wrote an API for easy
access to the tags and comment in an ASDocCOmment class that has a list of
DocTags.

Mike

On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <ah...@adobe.com> wrote:

> For this exercise though, we don’t care about the output as Velocity or
> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon you
> retrieve ASDoc comments via node.getASDocComment() and get an ASDocComment
> instance.  Do you want the Token to be the root of a mini-tree of parsed
> nodes?
>
> -Alex
>
>
> On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
> >templates instead of XSL.
> >
> >That DocTag is my class.
> >
> >Mike
> >
> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
> >>equivalent
> >> to MXMLC.java and have a main() method.  The current Flex SDK has an
> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
> >> somewhere?   Otherwise I will try to quickly create them.
> >>
> >> -Alex
> >>
> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <te...@gmail.com>
> >>wrote:
> >>
> >> >BTW, the loop always happens at the VERY end of the comment, so when
> >>you
> >> >get to the end the(the last call of next() that should return null);
> >> >
> >> >tok = tokenizer.next();
> >> >
> >> >never returns, it gets stuck trying to exit.
> >> >
> >> >Mike
> >> >
> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> >> ><te...@gmail.com>
> >> >wrote:
> >> >
> >> >> I posted about this a couple weeks ago and I tried recompiling with
> >> >>JFlex
> >> >> 1.5 I think, the older version and still had the problem.
> >> >>
> >> >> Maybe I messed up something but I tried with my same asdoc code when
> >>I
> >> >> fixed the build for the FlexJS asdocs. I wanted to see it work with
> >>my
> >> >> version of a documentor.
> >> >>
> >> >> I think IIRC, I actually tried a simple test case and it would work.
> >> >>
> >> >> I have code that uses the tokenizer;
> >> >>
> >> >>
> >> >>     public void compile()
> >> >>     {
> >> >>         if (token == null)
> >> >>             return;
> >> >>
> >> >>         String data = token.getText();
> >> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
> >> >>         tokenizer.setReader(new StringReader(data));
> >> >>         ASDocToken tok = tokenizer.next();
> >> >>         boolean foundDescription = false;
> >> >>         DocTag pendingTag = null;
> >> >>
> >> >>         try
> >> >>         {
> >> >>             while (tok != null)
> >> >>             {
> >> >>                 if (!foundDescription
> >> >>                         && tok.getType() ==
> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> >> >>                 {
> >> >>                     description = tok.getText();
> >> >>                 }
> >> >>                 else
> >> >>                 {
> >> >>                     // do tags
> >> >>                     if (tok.getType() ==
> >>ASTokenTypes.TOKEN_ASDOC_TAG)
> >> >>                     {
> >> >>                         if (pendingTag != null)
> >> >>                         {
> >> >>                             addTag(pendingTag);
> >> >>                             pendingTag = null;
> >> >>                         }
> >> >>                         pendingTag = new
> >> >> DocTag(tok.getText().substring(1));
> >> >>                     }
> >> >>                     else if (tok.getType() ==
> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> >> >>                     {
> >> >>                         pendingTag.setDescription(tok.getText());
> >> >>                         addTag(pendingTag);
> >> >>                         pendingTag = null;
> >> >>                     }
> >> >>                 }
> >> >>
> >> >>                 foundDescription = true;
> >> >>
> >> >>                 tok = tokenizer.next();
> >> >>             }
> >> >>         }
> >> >>         catch (Exception e)
> >> >>         {
> >> >>             e.printStackTrace();
> >> >>         }
> >> >>     }
> >> >>
> >> >> Mike
> >> >>
> >> >>
> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com> wrote:
> >> >>
> >> >>>
> >> >>>
> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com>
> >> >>> wrote:
> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
> >> >>>ASDocTokenizer?
> >> >>> >> Was the problem that it didn’t work on every AS file we current
> >> >>>have?
> >> >>> >>
> >> >>> >
> >> >>> >
> >> >>> >It doesn't work on anything, there is an infinite loop in the
> >>scanner
> >> >>> that
> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> >> >>> >
> >> >>> >What is weird is I was using the SAME code base when I wrote the
> >>asdoc
> >> >>> >documenter I have 2 years ago and it worked fine.
> >> >>>
> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What
> >>setup
> >> >>>did
> >> >>> you have for trying it?  Did you run it on the Flex SDK or FlexJS
> >>SDK
> >> >>>or
> >> >>> did it even loop on a simple test case?
> >> >>>
> >> >>> -Alex
> >> >>>
> >> >>>
> >> >>
> >>
> >>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.
For this exercise though, we don’t care about the output as Velocity or
XSL right?  All you want is ASDocTokens in the AST?  IIRC, in Falcon you
retrieve ASDoc comments via node.getASDocComment() and get an ASDocComment
instance.  Do you want the Token to be the root of a mini-tree of parsed
nodes?

-Alex


On 6/4/15, 11:47 AM, "Michael Schmalle" <te...@gmail.com> wrote:

>I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
>templates instead of XSL.
>
>That DocTag is my class.
>
>Mike
>
>On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> I don’t see any signs of ASDoc support in flex-falcon.  I see
>> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
>>equivalent
>> to MXMLC.java and have a main() method.  The current Flex SDK has an
>> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
>> somewhere?   Otherwise I will try to quickly create them.
>>
>> -Alex
>>
>> On 6/4/15, 11:36 AM, "Michael Schmalle" <te...@gmail.com>
>>wrote:
>>
>> >BTW, the loop always happens at the VERY end of the comment, so when
>>you
>> >get to the end the(the last call of next() that should return null);
>> >
>> >tok = tokenizer.next();
>> >
>> >never returns, it gets stuck trying to exit.
>> >
>> >Mike
>> >
>> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>> ><te...@gmail.com>
>> >wrote:
>> >
>> >> I posted about this a couple weeks ago and I tried recompiling with
>> >>JFlex
>> >> 1.5 I think, the older version and still had the problem.
>> >>
>> >> Maybe I messed up something but I tried with my same asdoc code when
>>I
>> >> fixed the build for the FlexJS asdocs. I wanted to see it work with
>>my
>> >> version of a documentor.
>> >>
>> >> I think IIRC, I actually tried a simple test case and it would work.
>> >>
>> >> I have code that uses the tokenizer;
>> >>
>> >>
>> >>     public void compile()
>> >>     {
>> >>         if (token == null)
>> >>             return;
>> >>
>> >>         String data = token.getText();
>> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>> >>         tokenizer.setReader(new StringReader(data));
>> >>         ASDocToken tok = tokenizer.next();
>> >>         boolean foundDescription = false;
>> >>         DocTag pendingTag = null;
>> >>
>> >>         try
>> >>         {
>> >>             while (tok != null)
>> >>             {
>> >>                 if (!foundDescription
>> >>                         && tok.getType() ==
>> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >>                 {
>> >>                     description = tok.getText();
>> >>                 }
>> >>                 else
>> >>                 {
>> >>                     // do tags
>> >>                     if (tok.getType() ==
>>ASTokenTypes.TOKEN_ASDOC_TAG)
>> >>                     {
>> >>                         if (pendingTag != null)
>> >>                         {
>> >>                             addTag(pendingTag);
>> >>                             pendingTag = null;
>> >>                         }
>> >>                         pendingTag = new
>> >> DocTag(tok.getText().substring(1));
>> >>                     }
>> >>                     else if (tok.getType() ==
>> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>> >>                     {
>> >>                         pendingTag.setDescription(tok.getText());
>> >>                         addTag(pendingTag);
>> >>                         pendingTag = null;
>> >>                     }
>> >>                 }
>> >>
>> >>                 foundDescription = true;
>> >>
>> >>                 tok = tokenizer.next();
>> >>             }
>> >>         }
>> >>         catch (Exception e)
>> >>         {
>> >>             e.printStackTrace();
>> >>         }
>> >>     }
>> >>
>> >> Mike
>> >>
>> >>
>> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com> wrote:
>> >>
>> >>>
>> >>>
>> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com>
>> >>> wrote:
>> >>> >>Hmm.  Maybe I should spend some time looking into fixing
>> >>>ASDocTokenizer?
>> >>> >> Was the problem that it didn’t work on every AS file we current
>> >>>have?
>> >>> >>
>> >>> >
>> >>> >
>> >>> >It doesn't work on anything, there is an infinite loop in the
>>scanner
>> >>> that
>> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>> >>> >
>> >>> >What is weird is I was using the SAME code base when I wrote the
>>asdoc
>> >>> >documenter I have 2 years ago and it worked fine.
>> >>>
>> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What
>>setup
>> >>>did
>> >>> you have for trying it?  Did you run it on the Flex SDK or FlexJS
>>SDK
>> >>>or
>> >>> did it even loop on a simple test case?
>> >>>
>> >>> -Alex
>> >>>
>> >>>
>> >>
>>
>>


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
I actually wrote a WHOLE NEW asdoc program that uses Apache Velocity
templates instead of XSL.

That DocTag is my class.

Mike

On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <ah...@adobe.com> wrote:

> I don’t see any signs of ASDoc support in flex-falcon.  I see
> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be equivalent
> to MXMLC.java and have a main() method.  The current Flex SDK has an
> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
> somewhere?   Otherwise I will try to quickly create them.
>
> -Alex
>
> On 6/4/15, 11:36 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >BTW, the loop always happens at the VERY end of the comment, so when you
> >get to the end the(the last call of next() that should return null);
> >
> >tok = tokenizer.next();
> >
> >never returns, it gets stuck trying to exit.
> >
> >Mike
> >
> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
> ><te...@gmail.com>
> >wrote:
> >
> >> I posted about this a couple weeks ago and I tried recompiling with
> >>JFlex
> >> 1.5 I think, the older version and still had the problem.
> >>
> >> Maybe I messed up something but I tried with my same asdoc code when I
> >> fixed the build for the FlexJS asdocs. I wanted to see it work with my
> >> version of a documentor.
> >>
> >> I think IIRC, I actually tried a simple test case and it would work.
> >>
> >> I have code that uses the tokenizer;
> >>
> >>
> >>     public void compile()
> >>     {
> >>         if (token == null)
> >>             return;
> >>
> >>         String data = token.getText();
> >>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
> >>         tokenizer.setReader(new StringReader(data));
> >>         ASDocToken tok = tokenizer.next();
> >>         boolean foundDescription = false;
> >>         DocTag pendingTag = null;
> >>
> >>         try
> >>         {
> >>             while (tok != null)
> >>             {
> >>                 if (!foundDescription
> >>                         && tok.getType() ==
> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>                 {
> >>                     description = tok.getText();
> >>                 }
> >>                 else
> >>                 {
> >>                     // do tags
> >>                     if (tok.getType() == ASTokenTypes.TOKEN_ASDOC_TAG)
> >>                     {
> >>                         if (pendingTag != null)
> >>                         {
> >>                             addTag(pendingTag);
> >>                             pendingTag = null;
> >>                         }
> >>                         pendingTag = new
> >> DocTag(tok.getText().substring(1));
> >>                     }
> >>                     else if (tok.getType() ==
> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
> >>                     {
> >>                         pendingTag.setDescription(tok.getText());
> >>                         addTag(pendingTag);
> >>                         pendingTag = null;
> >>                     }
> >>                 }
> >>
> >>                 foundDescription = true;
> >>
> >>                 tok = tokenizer.next();
> >>             }
> >>         }
> >>         catch (Exception e)
> >>         {
> >>             e.printStackTrace();
> >>         }
> >>     }
> >>
> >> Mike
> >>
> >>
> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com> wrote:
> >>
> >>>
> >>>
> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com>
> >>> wrote:
> >>> >>Hmm.  Maybe I should spend some time looking into fixing
> >>>ASDocTokenizer?
> >>> >> Was the problem that it didn’t work on every AS file we current
> >>>have?
> >>> >>
> >>> >
> >>> >
> >>> >It doesn't work on anything, there is an infinite loop in the scanner
> >>> that
> >>> >is created by JFlex, the RawASDocTokenizer is broken.
> >>> >
> >>> >What is weird is I was using the SAME code base when I wrote the asdoc
> >>> >documenter I have 2 years ago and it worked fine.
> >>>
> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What setup
> >>>did
> >>> you have for trying it?  Did you run it on the Flex SDK or FlexJS SDK
> >>>or
> >>> did it even loop on a simple test case?
> >>>
> >>> -Alex
> >>>
> >>>
> >>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.
I don’t see any signs of ASDoc support in flex-falcon.  I see
ASDocTokenizer and ASDocToken, but no ASDOC.java that would be equivalent
to MXMLC.java and have a main() method.  The current Flex SDK has an
ASDoc.jar.  Shouldn’t we have these pieces? Do you have them around
somewhere?   Otherwise I will try to quickly create them.

-Alex

On 6/4/15, 11:36 AM, "Michael Schmalle" <te...@gmail.com> wrote:

>BTW, the loop always happens at the VERY end of the comment, so when you
>get to the end the(the last call of next() that should return null);
>
>tok = tokenizer.next();
>
>never returns, it gets stuck trying to exit.
>
>Mike
>
>On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
><te...@gmail.com>
>wrote:
>
>> I posted about this a couple weeks ago and I tried recompiling with
>>JFlex
>> 1.5 I think, the older version and still had the problem.
>>
>> Maybe I messed up something but I tried with my same asdoc code when I
>> fixed the build for the FlexJS asdocs. I wanted to see it work with my
>> version of a documentor.
>>
>> I think IIRC, I actually tried a simple test case and it would work.
>>
>> I have code that uses the tokenizer;
>>
>>
>>     public void compile()
>>     {
>>         if (token == null)
>>             return;
>>
>>         String data = token.getText();
>>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>>         tokenizer.setReader(new StringReader(data));
>>         ASDocToken tok = tokenizer.next();
>>         boolean foundDescription = false;
>>         DocTag pendingTag = null;
>>
>>         try
>>         {
>>             while (tok != null)
>>             {
>>                 if (!foundDescription
>>                         && tok.getType() ==
>>ASTokenTypes.TOKEN_ASDOC_TEXT)
>>                 {
>>                     description = tok.getText();
>>                 }
>>                 else
>>                 {
>>                     // do tags
>>                     if (tok.getType() == ASTokenTypes.TOKEN_ASDOC_TAG)
>>                     {
>>                         if (pendingTag != null)
>>                         {
>>                             addTag(pendingTag);
>>                             pendingTag = null;
>>                         }
>>                         pendingTag = new
>> DocTag(tok.getText().substring(1));
>>                     }
>>                     else if (tok.getType() ==
>> ASTokenTypes.TOKEN_ASDOC_TEXT)
>>                     {
>>                         pendingTag.setDescription(tok.getText());
>>                         addTag(pendingTag);
>>                         pendingTag = null;
>>                     }
>>                 }
>>
>>                 foundDescription = true;
>>
>>                 tok = tokenizer.next();
>>             }
>>         }
>>         catch (Exception e)
>>         {
>>             e.printStackTrace();
>>         }
>>     }
>>
>> Mike
>>
>>
>> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>>>
>>>
>>> On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com>
>>> wrote:
>>> >>Hmm.  Maybe I should spend some time looking into fixing
>>>ASDocTokenizer?
>>> >> Was the problem that it didn’t work on every AS file we current
>>>have?
>>> >>
>>> >
>>> >
>>> >It doesn't work on anything, there is an infinite loop in the scanner
>>> that
>>> >is created by JFlex, the RawASDocTokenizer is broken.
>>> >
>>> >What is weird is I was using the SAME code base when I wrote the asdoc
>>> >documenter I have 2 years ago and it worked fine.
>>>
>>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What setup
>>>did
>>> you have for trying it?  Did you run it on the Flex SDK or FlexJS SDK
>>>or
>>> did it even loop on a simple test case?
>>>
>>> -Alex
>>>
>>>
>>


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
BTW, the loop always happens at the VERY end of the comment, so when you
get to the end the(the last call of next() that should return null);

tok = tokenizer.next();

never returns, it gets stuck trying to exit.

Mike

On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle <te...@gmail.com>
wrote:

> I posted about this a couple weeks ago and I tried recompiling with JFlex
> 1.5 I think, the older version and still had the problem.
>
> Maybe I messed up something but I tried with my same asdoc code when I
> fixed the build for the FlexJS asdocs. I wanted to see it work with my
> version of a documentor.
>
> I think IIRC, I actually tried a simple test case and it would work.
>
> I have code that uses the tokenizer;
>
>
>     public void compile()
>     {
>         if (token == null)
>             return;
>
>         String data = token.getText();
>         ASDocTokenizer tokenizer = new ASDocTokenizer(false);
>         tokenizer.setReader(new StringReader(data));
>         ASDocToken tok = tokenizer.next();
>         boolean foundDescription = false;
>         DocTag pendingTag = null;
>
>         try
>         {
>             while (tok != null)
>             {
>                 if (!foundDescription
>                         && tok.getType() == ASTokenTypes.TOKEN_ASDOC_TEXT)
>                 {
>                     description = tok.getText();
>                 }
>                 else
>                 {
>                     // do tags
>                     if (tok.getType() == ASTokenTypes.TOKEN_ASDOC_TAG)
>                     {
>                         if (pendingTag != null)
>                         {
>                             addTag(pendingTag);
>                             pendingTag = null;
>                         }
>                         pendingTag = new
> DocTag(tok.getText().substring(1));
>                     }
>                     else if (tok.getType() ==
> ASTokenTypes.TOKEN_ASDOC_TEXT)
>                     {
>                         pendingTag.setDescription(tok.getText());
>                         addTag(pendingTag);
>                         pendingTag = null;
>                     }
>                 }
>
>                 foundDescription = true;
>
>                 tok = tokenizer.next();
>             }
>         }
>         catch (Exception e)
>         {
>             e.printStackTrace();
>         }
>     }
>
> Mike
>
>
> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com> wrote:
>
>>
>>
>> On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com>
>> wrote:
>> >>Hmm.  Maybe I should spend some time looking into fixing ASDocTokenizer?
>> >> Was the problem that it didn’t work on every AS file we current have?
>> >>
>> >
>> >
>> >It doesn't work on anything, there is an infinite loop in the scanner
>> that
>> >is created by JFlex, the RawASDocTokenizer is broken.
>> >
>> >What is weird is I was using the SAME code base when I wrote the asdoc
>> >documenter I have 2 years ago and it worked fine.
>>
>> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What setup did
>> you have for trying it?  Did you run it on the Flex SDK or FlexJS SDK or
>> did it even loop on a simple test case?
>>
>> -Alex
>>
>>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
I posted about this a couple weeks ago and I tried recompiling with JFlex
1.5 I think, the older version and still had the problem.

Maybe I messed up something but I tried with my same asdoc code when I
fixed the build for the FlexJS asdocs. I wanted to see it work with my
version of a documentor.

I think IIRC, I actually tried a simple test case and it would work.

I have code that uses the tokenizer;


    public void compile()
    {
        if (token == null)
            return;

        String data = token.getText();
        ASDocTokenizer tokenizer = new ASDocTokenizer(false);
        tokenizer.setReader(new StringReader(data));
        ASDocToken tok = tokenizer.next();
        boolean foundDescription = false;
        DocTag pendingTag = null;

        try
        {
            while (tok != null)
            {
                if (!foundDescription
                        && tok.getType() == ASTokenTypes.TOKEN_ASDOC_TEXT)
                {
                    description = tok.getText();
                }
                else
                {
                    // do tags
                    if (tok.getType() == ASTokenTypes.TOKEN_ASDOC_TAG)
                    {
                        if (pendingTag != null)
                        {
                            addTag(pendingTag);
                            pendingTag = null;
                        }
                        pendingTag = new DocTag(tok.getText().substring(1));
                    }
                    else if (tok.getType() == ASTokenTypes.TOKEN_ASDOC_TEXT)
                    {
                        pendingTag.setDescription(tok.getText());
                        addTag(pendingTag);
                        pendingTag = null;
                    }
                }

                foundDescription = true;

                tok = tokenizer.next();
            }
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
    }

Mike


On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com> wrote:
> >>Hmm.  Maybe I should spend some time looking into fixing ASDocTokenizer?
> >> Was the problem that it didn’t work on every AS file we current have?
> >>
> >
> >
> >It doesn't work on anything, there is an infinite loop in the scanner that
> >is created by JFlex, the RawASDocTokenizer is broken.
> >
> >What is weird is I was using the SAME code base when I wrote the asdoc
> >documenter I have 2 years ago and it worked fine.
>
> We upgraded the version of JFlex, IIRC.  I’ll take a look.  What setup did
> you have for trying it?  Did you run it on the Flex SDK or FlexJS SDK or
> did it even loop on a simple test case?
>
> -Alex
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.

On 6/4/15, 11:23 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>>Hmm.  Maybe I should spend some time looking into fixing ASDocTokenizer?
>> Was the problem that it didn’t work on every AS file we current have?
>>
>
>
>It doesn't work on anything, there is an infinite loop in the scanner that
>is created by JFlex, the RawASDocTokenizer is broken.
>
>What is weird is I was using the SAME code base when I wrote the asdoc
>documenter I have 2 years ago and it worked fine.

We upgraded the version of JFlex, IIRC.  I’ll take a look.  What setup did
you have for trying it?  Did you run it on the Flex SDK or FlexJS SDK or
did it even loop on a simple test case?

-Alex


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
On Thu, Jun 4, 2015 at 2:11 PM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 6/4/15, 10:31 AM, "Michael Schmalle" <te...@gmail.com> wrote:
> >>If you mean the AS package for the classes in these SWCs, I have to admit
> >> I was a bit surprised to see in the AS output example that Document in a
> >> “dom” package.  I would think these two SWCs would not have their
> >>classes
> >> in any AS package (IOW, “package {“).  Aren’t classes like Document
> >> effectively global just like Math?
> >>
> >>
> >Ok, yeah that was ME, what about naming collisions? If they are in a
> >package during AS dev, there is no possible naming collisions with real AS
> >classes that might be local or root. If we put them in a package, the
> >compiler can boil them down to global during compile, this was the
> >JavaScript tags job.
> >
>
> Do you mean a collision with some customer’s Document class in the
> top-level package?  Wouldn’t that collision eventually cause something to
> break when the customer tries to run the output JS?  Seems like getting
> AmbiguousReference would be a good thing.
>
>


DUH! It's the simple things I miss.





> >
> >
> >> >2. I am using Rhino and QDox(hack for getting an easy parser for the
> >> >jsdocs), so I guess a download jar entry is going to have to be added
> >>to
> >> >the build script? I am not good at ant.
> >>
> >> Rhino 1.74 or later is MPL.  If we don’t need an earlier version then
> >>yes
> >> we can download it and Qdox (which is AL).  Just check in code that uses
> >> these jars (but not the jars) and I’ll get the build scripts to download
> >> them.
> >>
> >>
> >I am using the Rhino source code right now but the license says;
> >
> > * This Source Code Form is subject to the terms of the Mozilla Public
> > * License, v. 2.0. If a copy of the MPL was not distributed with this
> > * file, You can obtain one at http://mozilla.org/MPL/2.0/.
>
> Apache prefers to work with MPL from jars so I’ll pull a Rhino jar from
> somewhere.
>
>

OK



> >>
> >> >4. I think I am going to utilize that JavaScript metadata tag for
> >>these so
> >> >it's easy to resolve stuff during compile.
> >>
> >> I guess that’s ok with me.  Why do you not want to introduce new
> >>metadata
> >> keywords and/or use asdoc similar to how goog is using jsdoc?  I’d worry
> >> about a JavaScript metadata statement getting longer and longer as we
> >>add
> >> more attributes to it.  Having each attribute be a keyword or
> >>asdoc/jsdoc
> >> tag seems like it would be more manageable?
> >>
> >
> >
> >Yeah, I can do it through comments, but right now the damn ASDocTokenizer
> >is broken, so I don't have an nice clean way to parse the doc comments.
>
> Hmm.  Maybe I should spend some time looking into fixing ASDocTokenizer?
> Was the problem that it didn’t work on every AS file we current have?
>


It doesn't work on anything, there is an infinite loop in the scanner that
is created by JFlex, the RawASDocTokenizer is broken.

What is weird is I was using the SAME code base when I wrote the asdoc
documenter I have 2 years ago and it worked fine.

Mike




>
> -Alex
>
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.

On 6/4/15, 10:31 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>>If you mean the AS package for the classes in these SWCs, I have to admit
>> I was a bit surprised to see in the AS output example that Document in a
>> “dom” package.  I would think these two SWCs would not have their
>>classes
>> in any AS package (IOW, “package {“).  Aren’t classes like Document
>> effectively global just like Math?
>>
>>
>Ok, yeah that was ME, what about naming collisions? If they are in a
>package during AS dev, there is no possible naming collisions with real AS
>classes that might be local or root. If we put them in a package, the
>compiler can boil them down to global during compile, this was the
>JavaScript tags job.
>

Do you mean a collision with some customer’s Document class in the
top-level package?  Wouldn’t that collision eventually cause something to
break when the customer tries to run the output JS?  Seems like getting
AmbiguousReference would be a good thing.

>
>
>> >2. I am using Rhino and QDox(hack for getting an easy parser for the
>> >jsdocs), so I guess a download jar entry is going to have to be added
>>to
>> >the build script? I am not good at ant.
>>
>> Rhino 1.74 or later is MPL.  If we don’t need an earlier version then
>>yes
>> we can download it and Qdox (which is AL).  Just check in code that uses
>> these jars (but not the jars) and I’ll get the build scripts to download
>> them.
>>
>>
>I am using the Rhino source code right now but the license says;
>
> * This Source Code Form is subject to the terms of the Mozilla Public
> * License, v. 2.0. If a copy of the MPL was not distributed with this
> * file, You can obtain one at http://mozilla.org/MPL/2.0/.

Apache prefers to work with MPL from jars so I’ll pull a Rhino jar from
somewhere.

>>
>> >4. I think I am going to utilize that JavaScript metadata tag for
>>these so
>> >it's easy to resolve stuff during compile.
>>
>> I guess that’s ok with me.  Why do you not want to introduce new
>>metadata
>> keywords and/or use asdoc similar to how goog is using jsdoc?  I’d worry
>> about a JavaScript metadata statement getting longer and longer as we
>>add
>> more attributes to it.  Having each attribute be a keyword or
>>asdoc/jsdoc
>> tag seems like it would be more manageable?
>>
>
>
>Yeah, I can do it through comments, but right now the damn ASDocTokenizer
>is broken, so I don't have an nice clean way to parse the doc comments.

Hmm.  Maybe I should spend some time looking into fixing ASDocTokenizer?
Was the problem that it didn’t work on every AS file we current have?

-Alex



Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
On Thu, Jun 4, 2015 at 1:20 PM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 6/4/15, 9:53 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Yeah to be honest my main concern was these SWCs. When I started testing
> >the emitter for DOM stuff like I showed the other day, I couldn't
> >"believe"
> >in it because I was using the Randori stuff.
> >
> >Now with this, the first step is actually real and under the project's
> >control, all of it.
> >
> >1. I'm going to use packages, what should the package be for the DOM.swc
> >and JS.swc(was builtin.swc)?
>
> If you mean the AS package for the classes in these SWCs, I have to admit
> I was a bit surprised to see in the AS output example that Document in a
> “dom” package.  I would think these two SWCs would not have their classes
> in any AS package (IOW, “package {“).  Aren’t classes like Document
> effectively global just like Math?
>
>
Ok, yeah that was ME, what about naming collisions? If they are in a
package during AS dev, there is no possible naming collisions with real AS
classes that might be local or root. If we put them in a package, the
compiler can boil them down to global during compile, this was the
JavaScript tags job.



> >2. I am using Rhino and QDox(hack for getting an easy parser for the
> >jsdocs), so I guess a download jar entry is going to have to be added to
> >the build script? I am not good at ant.
>
> Rhino 1.74 or later is MPL.  If we don’t need an earlier version then yes
> we can download it and Qdox (which is AL).  Just check in code that uses
> these jars (but not the jars) and I’ll get the build scripts to download
> them.
>
>
I am using the Rhino source code right now but the license says;

 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.

QDox is Apache 2.

https://github.com/paul-hammant/qdox



>
> >3. How is the source files going to be handled for the extern files?
> >Download them during build and then run the tool?
>
> IMO, yes.  But we might bundle them in the source release package.
>


Ok, I will leave that up to you.



>
> >4. I think I am going to utilize that JavaScript metadata tag for these so
> >it's easy to resolve stuff during compile.
>
> I guess that’s ok with me.  Why do you not want to introduce new metadata
> keywords and/or use asdoc similar to how goog is using jsdoc?  I’d worry
> about a JavaScript metadata statement getting longer and longer as we add
> more attributes to it.  Having each attribute be a keyword or asdoc/jsdoc
> tag seems like it would be more manageable?
>


Yeah, I can do it through comments, but right now the damn ASDocTokenizer
is broken, so I don't have an nice clean way to parse the doc comments.

So what should I do? I really don't want to write a tokenizer by hand, a
waste of time. That is why I am using QDox, faking a Java class and adding
the comment, parse it voila, nice API to get the comment and tags.

Right now the whole 4 files parse and render takes less then a second with
also using QDox.

Mike



>
> -Alex
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.

On 6/4/15, 9:53 AM, "Michael Schmalle" <te...@gmail.com> wrote:

>Yeah to be honest my main concern was these SWCs. When I started testing
>the emitter for DOM stuff like I showed the other day, I couldn't
>"believe"
>in it because I was using the Randori stuff.
>
>Now with this, the first step is actually real and under the project's
>control, all of it.
>
>1. I'm going to use packages, what should the package be for the DOM.swc
>and JS.swc(was builtin.swc)?

If you mean the AS package for the classes in these SWCs, I have to admit
I was a bit surprised to see in the AS output example that Document in a
“dom” package.  I would think these two SWCs would not have their classes
in any AS package (IOW, “package {“).  Aren’t classes like Document
effectively global just like Math?

>2. I am using Rhino and QDox(hack for getting an easy parser for the
>jsdocs), so I guess a download jar entry is going to have to be added to
>the build script? I am not good at ant.

Rhino 1.74 or later is MPL.  If we don’t need an earlier version then yes
we can download it and Qdox (which is AL).  Just check in code that uses
these jars (but not the jars) and I’ll get the build scripts to download
them.


>3. How is the source files going to be handled for the extern files?
>Download them during build and then run the tool?

IMO, yes.  But we might bundle them in the source release package.

>4. I think I am going to utilize that JavaScript metadata tag for these so
>it's easy to resolve stuff during compile.

I guess that’s ok with me.  Why do you not want to introduce new metadata
keywords and/or use asdoc similar to how goog is using jsdoc?  I’d worry
about a JavaScript metadata statement getting longer and longer as we add
more attributes to it.  Having each attribute be a keyword or asdoc/jsdoc
tag seems like it would be more manageable?

-Alex


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
Yeah to be honest my main concern was these SWCs. When I started testing
the emitter for DOM stuff like I showed the other day, I couldn't "believe"
in it because I was using the Randori stuff.

Now with this, the first step is actually real and under the project's
control, all of it.

1. I'm going to use packages, what should the package be for the DOM.swc
and JS.swc(was builtin.swc)?
2. I am using Rhino and QDox(hack for getting an easy parser for the
jsdocs), so I guess a download jar entry is going to have to be added to
the build script? I am not good at ant.
3. How is the source files going to be handled for the extern files?
Download them during build and then run the tool?
4. I think I am going to utilize that JavaScript metadata tag for these so
it's easy to resolve stuff during compile.

Mike

On Thu, Jun 4, 2015 at 12:45 PM, Alex Harui <ah...@adobe.com> wrote:

> This is great!  Now we can generate those SWCs.  I’ll go worry about
> something else now.
>
> Thanks,
> -Alex
>
> On 6/4/15, 9:25 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >BTW, if you are looking at the generated AS, there are some errors int he
> >arguments that I have already fixed. :) Like Number, Number, Number etc.
> >
> >Mike
> >
> >On Thu, Jun 4, 2015 at 12:23 PM, Michael Schmalle
> ><teotigraphixllc@gmail.com
> >> wrote:
> >
> >>
> >>
> >> On Thu, Jun 4, 2015 at 12:19 PM, Alex Harui <ah...@adobe.com> wrote:
> >>
> >>> Awesome!
> >>>
> >>> So we can forget d.ts files and IDL files, right?  Plus at least
> >>> w3c_dom1.js is Apache Licensed.
> >>>
> >>
> >> The way I set up the parser/emitter is we can merge things using the
> >>same
> >> model but parsing different files. For instance;
> >>
> >> w3c_events.js
> >> w3c_dom1.js
> >> w3c_dom2.js
> >> w3c_dom3.js
> >>
> >> and more all go together so I am now creating the whole bunch at once.
> >>
> >> For now, yeah I see no reason for IDL, these externs are the IDL. And
> >> d.ts, yeah for now I don't have the time to even think about trying to
> >>get
> >> that format to convert.
> >>
> >>
> >>
> >>> I was actually going to spend some time today on the JS primitives swc
> >>> (Number, String, Array).  Have you seen any externs file for those?  I
> >>> doubt it exists.
> >>>
> >>>
> >> Josh responded to this.
> >>
> >>
> >>
> >>> -Alex
> >>>
> >>> On 6/4/15, 8:12 AM, "Michael Schmalle" <te...@gmail.com>
> >>>wrote:
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.
This is great!  Now we can generate those SWCs.  I’ll go worry about
something else now.

Thanks,
-Alex

On 6/4/15, 9:25 AM, "Michael Schmalle" <te...@gmail.com> wrote:

>BTW, if you are looking at the generated AS, there are some errors int he
>arguments that I have already fixed. :) Like Number, Number, Number etc.
>
>Mike
>
>On Thu, Jun 4, 2015 at 12:23 PM, Michael Schmalle
><teotigraphixllc@gmail.com
>> wrote:
>
>>
>>
>> On Thu, Jun 4, 2015 at 12:19 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>>> Awesome!
>>>
>>> So we can forget d.ts files and IDL files, right?  Plus at least
>>> w3c_dom1.js is Apache Licensed.
>>>
>>
>> The way I set up the parser/emitter is we can merge things using the
>>same
>> model but parsing different files. For instance;
>>
>> w3c_events.js
>> w3c_dom1.js
>> w3c_dom2.js
>> w3c_dom3.js
>>
>> and more all go together so I am now creating the whole bunch at once.
>>
>> For now, yeah I see no reason for IDL, these externs are the IDL. And
>> d.ts, yeah for now I don't have the time to even think about trying to
>>get
>> that format to convert.
>>
>>
>>
>>> I was actually going to spend some time today on the JS primitives swc
>>> (Number, String, Array).  Have you seen any externs file for those?  I
>>> doubt it exists.
>>>
>>>
>> Josh responded to this.
>>
>>
>>
>>> -Alex
>>>
>>> On 6/4/15, 8:12 AM, "Michael Schmalle" <te...@gmail.com>
>>>wrote:
>>>
>>> >Hey,
>>> >
>>> >Well I am a gluten for punishment but, I love parsers and
>>>translations so
>>> >without further ado;
>>> >
>>> >From this source file;
>>> >
>>> >
>>> 
>>>https://github.com/google/closure-compiler/blob/master/externs/w3c_dom1.
>>>js
>>> >
>>> >I am creating the following ActionScript, long but worth looking at.
>>>:)
>>> >
>>> >I found a lot of extern files, so this is how we do it in the start.
>>>We
>>> >could even defined externs ourselves, the benefit is, one file of a
>>>bunch
>>> >of javascript classes translates into a bunch of ActionScript files.
>>> >
>>> >This is grabbing docs and analyzing types. More to test but I am using
>>> the
>>> >Rhino parser and AST, made my own walker and wrote the logic to
>>>assemble
>>> >class, field and method definitions while the root AST is walked.
>>> >
>>> >So now, if you want a creatjs API, just follow GCC extern file
>>>template
>>> >and
>>> >you will have it.
>>> >
>>> >Mike
>>> >
>>> >--------------------------------------------------------------------
>>> >ActionScript output, will be individual files
>>> >--------------------------------------------------------------------
>>> >
>>> >
>>> >
>>> >package dom {
>>> >
>>> >public Document extends Node {
>>> >
>>> >    native public function Document();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-implementation
>>> >     */
>>> >    native public var implementation:DOMImplementation;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-doctype
>>> >     */
>>> >    native public var doctype:DocumentType;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-documentElement
>>> >     */
>>> >    native public var documentElement:Element;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createComment
>>> >     */
>>> >    native public function createComment(data:String):Comment;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >A6C9094
>>> >     */
>>> >    native public function
>>>getElementsByTagName(tagname:String):NodeList;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createEntityReference
>>> >     */
>>> >    native public function
>>> >createEntityReference(name:String):EntityReference;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createAttribute
>>> >     */
>>> >    native public function createAttribute(name:String):Attr;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createTextNode
>>> >     */
>>> >    native public function createTextNode(data:Object):Text;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createCDATASection
>>> >     */
>>> >    native public function
>>>createCDATASection(data:String):CDATASection;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createProcessingInstruction
>>> >     */
>>> >    native public function createProcessingInstruction(target:String,
>>> >data:String):ProcessingInstruction;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createElement
>>> >     * @see
>>> >
>>> 
>>>http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-i
>>>nt
>>> >erface-to-instantiate
>>> >     */
>>> >    native public function createElement(tagName:String,
>>> >opt_typeExtension:String = null):Element;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-createDocumentFragment
>>> >     */
>>> >    native public function createDocumentFragment():DocumentFragment;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public CharacterData extends Node {
>>> >
>>> >    native public function CharacterData();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >7D61178C
>>> >     */
>>> >    native public var length:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >72AB8359
>>> >     */
>>> >    native public var data:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >E5CBA7FB
>>> >     */
>>> >    native public function replaceData(offset:Number, count:Number,
>>> >arg:Number):void;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >7C603781
>>> >     */
>>> >    native public function deleteData(offset:Number,
>>>count:Number):void;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >6531BCCF
>>> >     */
>>> >    native public function substringData(offset:Number,
>>> >count:Number):String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >3EDB695F
>>> >     */
>>> >    native public function insertData(offset:Number, arg:Number):void;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >32791A2F
>>> >     */
>>> >    native public function appendData(arg:String):void;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public DocumentFragment extends Node {
>>> >
>>> >    native public function DocumentFragment();
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Attr extends Node {
>>> >
>>> >    native public function Attr();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >862529273
>>> >     */
>>> >    native public var specified:Boolean;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1112119403
>>> >     */
>>> >    native public var name:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >221662474
>>> >     */
>>> >    native public var value:String;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Comment extends CharacterData {
>>> >
>>> >    native public function Comment();
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Notation extends Node {
>>> >
>>> >    native public function Notation();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >54F2B4D0
>>> >     */
>>> >    native public var publicId:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >E8AAB1D0
>>> >     */
>>> >    native public var systemId:String;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public NamedNodeMap {
>>> >
>>> >    native public function NamedNodeMap();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >6D0FB19E
>>> >     */
>>> >    native public var length:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1074577549
>>> >     */
>>> >    native public function getNamedItem(name:String):Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >349467F9
>>> >     */
>>> >    native public function item(index:Number):Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1025163788
>>> >     */
>>> >    native public function setNamedItem(arg:Node):Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >D58B193
>>> >     */
>>> >    native public function removeNamedItem(name:String):Node;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public CDATASection extends Text {
>>> >
>>> >    native public function CDATASection();
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Text extends CharacterData {
>>> >
>>> >    native public function Text();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >38853C1D
>>> >     */
>>> >    native public function splitText(offset:Number):Text;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Node implements EventTarget {
>>> >
>>> >    native public function Node();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var TEXT_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var ENTITY_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var DOCUMENT_TYPE_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var NOTATION_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var CDATA_SECTION_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var DOCUMENT_FRAGMENT_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var COMMENT_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var PROCESSING_INSTRUCTION_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var XPATH_NAMESPACE_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var ELEMENT_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var ENTITY_REFERENCE_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var ATTRIBUTE_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1950641247
>>> >     */
>>> >    native public static var DOCUMENT_NODE:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-previousSibling
>>> >     */
>>> >    native public var previousSibling:Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-parentNode
>>> >     */
>>> >    native public var parentNode:Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-nodeValue
>>> >     */
>>> >    native public var nodeValue:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-nodeName
>>> >     */
>>> >    native public var nodeName:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-firstChild
>>> >     */
>>> >    native public var firstChild:Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-childNodes
>>> >     */
>>> >    native public var childNodes:NodeList;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-attributes
>>> >     */
>>> >    native public var attributes:NamedNodeMap;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-nodeType
>>> >     */
>>> >    native public var nodeType:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-ownerDocument
>>> >     */
>>> >    native public var ownerDocument:Document;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-nextSibling
>>> >     */
>>> >    native public var nextSibling:Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-lastChild
>>> >     */
>>> >    native public var lastChild:Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-removeChild
>>> >     */
>>> >    native public function removeChild(oldChild:Node):Node;
>>> >
>>> >    /**
>>> >     */
>>> >    native public override function addEventListener(type:Boolean,
>>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>>> >
>>> >    /**
>>> >     */
>>> >    native public override function dispatchEvent(evt:Object):Object;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-insertBefore
>>> >     */
>>> >    native public function insertBefore(newChild:Node,
>>> >refChild:Node):Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-hasChildNodes
>>> >     */
>>> >    native public function hasChildNodes():Boolean;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-appendChild
>>> >     */
>>> >    native public function appendChild(newChild:Node):Node;
>>> >
>>> >    /**
>>> >     */
>>> >    native public override function removeEventListener(type:Boolean,
>>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-replaceChild
>>> >     */
>>> >    native public function replaceChild(newChild:Node,
>>> >oldChild:Node):Node;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-cloneNode
>>> >     */
>>> >    native public function cloneNode(deep:Boolean):Node;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public DOMException {
>>> >
>>> >    native public function DOMException();
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public DOMImplementation {
>>> >
>>> >    native public function DOMImplementation();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >5CED94D7
>>> >     */
>>> >    native public function hasFeature(feature:String,
>>> >version:String):Boolean;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public ProcessingInstruction extends Node {
>>> >
>>> >    native public function ProcessingInstruction();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1478689192
>>> >     */
>>> >    native public var target:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >837822393
>>> >     */
>>> >    native public var data:String;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public DocumentType extends Node {
>>> >
>>> >    native public function DocumentType();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >D46829EF
>>> >     */
>>> >    native public var notations:NamedNodeMap;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1844763134
>>> >     */
>>> >    native public var name:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1788794630
>>> >     */
>>> >    native public var entities:NamedNodeMap;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public ExceptionCode {
>>> >
>>> >    native public function ExceptionCode();
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Window implements EventTarget {
>>> >
>>> >    native public function Window();
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmousewheel:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onunload:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onerror:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onhashchange:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onpopstate:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onresize:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onblur:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmouseup:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onpaint:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onclose:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var Window:Object;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onbeforeunload:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmousemove:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oncontextmenu:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var ondblclick:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmouseout:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onkeyup:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onfocus:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onkeydown:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onkeypress:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onsubmit:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onchange:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onabort:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onreset:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmouseover:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onselect:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onload:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onwheel:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onscroll:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onclick:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var ondragdrop:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmousedown:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public override function addEventListener(type:Boolean,
>>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>>> >
>>> >    /**
>>> >     */
>>> >    native public override function dispatchEvent(evt:Object):Object;
>>> >
>>> >    /**
>>> >     */
>>> >    native public override function removeEventListener(type:Boolean,
>>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public EntityReference extends Node {
>>> >
>>> >    native public function EntityReference();
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public NodeList {
>>> >
>>> >    native public function NodeList();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >203510337
>>> >     */
>>> >    native public var length:Number;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >844377136
>>> >     */
>>> >    native public function item(index:Number):Node;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Element extends Node {
>>> >
>>> >    native public function Element();
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmousewheel:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oncompositionstart:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onunload:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onerror:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onresize:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmouseup:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onblur:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onbeforeinput:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmousemove:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onbeforeunload:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oncontextmenu:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onfocusout:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var ondblclick:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmouseout:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onkeyup:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oncompositionend:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onfocus:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onkeydown:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onkeypress:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onsubmit:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onchange:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onabort:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onreset:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmouseover:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oninput:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oncompositionupdate:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onselect:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oncut:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var ontextinput:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onload:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onwheel:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onpaste:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onscroll:Function;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#a
>>>tt
>>> >ribute-tagName
>>> >     */
>>> >    native public var tagName:String;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onclick:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onmousedown:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var oncopy:Function;
>>> >
>>> >    /**
>>> >     */
>>> >    native public var onfocusin:Function;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-removeAttributeNode
>>> >     */
>>> >    native public function removeAttributeNode(oldAttr:Attr):Attr;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >1938918D
>>> >     */
>>> >    native public function
>>>getElementsByTagName(tagname:String):NodeList;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-getAttributeNode
>>> >     */
>>> >    native public function getAttributeNode(name:String):Attr;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-setAttributeNode
>>> >     */
>>> >    native public function setAttributeNode(newAttr:Attr):Attr;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-removeAttribute
>>> >     */
>>> >    native public function removeAttribute(name:String):void;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-setAttribute
>>> >     */
>>> >    native public function setAttribute(name:String,
>>>value:String):void;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#m
>>>et
>>> >hod-getAttribute
>>> >     * @see 
>>>http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
>>> >     */
>>> >    native public function getAttribute(name:String, opt_flags:String
>>>=
>>> >null):String;
>>> >
>>> >}
>>> >}
>>> >
>>> >package dom {
>>> >
>>> >public Entity extends Node {
>>> >
>>> >    native public function Entity();
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >D7303025
>>> >     */
>>> >    native public var publicId:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >D7C29F3E
>>> >     */
>>> >    native public var systemId:String;
>>> >
>>> >    /**
>>> >     * @see
>>> >
>>> 
>>>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#I
>>>D-
>>> >6ABAEB38
>>> >     */
>>> >    native public var notationName:String;
>>> >
>>> >}
>>> >}
>>>
>>>
>>


Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
BTW, if you are looking at the generated AS, there are some errors int he
arguments that I have already fixed. :) Like Number, Number, Number etc.

Mike

On Thu, Jun 4, 2015 at 12:23 PM, Michael Schmalle <teotigraphixllc@gmail.com
> wrote:

>
>
> On Thu, Jun 4, 2015 at 12:19 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Awesome!
>>
>> So we can forget d.ts files and IDL files, right?  Plus at least
>> w3c_dom1.js is Apache Licensed.
>>
>
> The way I set up the parser/emitter is we can merge things using the same
> model but parsing different files. For instance;
>
> w3c_events.js
> w3c_dom1.js
> w3c_dom2.js
> w3c_dom3.js
>
> and more all go together so I am now creating the whole bunch at once.
>
> For now, yeah I see no reason for IDL, these externs are the IDL. And
> d.ts, yeah for now I don't have the time to even think about trying to get
> that format to convert.
>
>
>
>> I was actually going to spend some time today on the JS primitives swc
>> (Number, String, Array).  Have you seen any externs file for those?  I
>> doubt it exists.
>>
>>
> Josh responded to this.
>
>
>
>> -Alex
>>
>> On 6/4/15, 8:12 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>>
>> >Hey,
>> >
>> >Well I am a gluten for punishment but, I love parsers and translations so
>> >without further ado;
>> >
>> >From this source file;
>> >
>> >
>> https://github.com/google/closure-compiler/blob/master/externs/w3c_dom1.js
>> >
>> >I am creating the following ActionScript, long but worth looking at. :)
>> >
>> >I found a lot of extern files, so this is how we do it in the start. We
>> >could even defined externs ourselves, the benefit is, one file of a bunch
>> >of javascript classes translates into a bunch of ActionScript files.
>> >
>> >This is grabbing docs and analyzing types. More to test but I am using
>> the
>> >Rhino parser and AST, made my own walker and wrote the logic to assemble
>> >class, field and method definitions while the root AST is walked.
>> >
>> >So now, if you want a creatjs API, just follow GCC extern file template
>> >and
>> >you will have it.
>> >
>> >Mike
>> >
>> >--------------------------------------------------------------------
>> >ActionScript output, will be individual files
>> >--------------------------------------------------------------------
>> >
>> >
>> >
>> >package dom {
>> >
>> >public Document extends Node {
>> >
>> >    native public function Document();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-implementation
>> >     */
>> >    native public var implementation:DOMImplementation;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-doctype
>> >     */
>> >    native public var doctype:DocumentType;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-documentElement
>> >     */
>> >    native public var documentElement:Element;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createComment
>> >     */
>> >    native public function createComment(data:String):Comment;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >A6C9094
>> >     */
>> >    native public function getElementsByTagName(tagname:String):NodeList;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createEntityReference
>> >     */
>> >    native public function
>> >createEntityReference(name:String):EntityReference;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createAttribute
>> >     */
>> >    native public function createAttribute(name:String):Attr;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createTextNode
>> >     */
>> >    native public function createTextNode(data:Object):Text;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createCDATASection
>> >     */
>> >    native public function createCDATASection(data:String):CDATASection;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createProcessingInstruction
>> >     */
>> >    native public function createProcessingInstruction(target:String,
>> >data:String):ProcessingInstruction;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createElement
>> >     * @see
>> >
>> http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-int
>> >erface-to-instantiate
>> >     */
>> >    native public function createElement(tagName:String,
>> >opt_typeExtension:String = null):Element;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-createDocumentFragment
>> >     */
>> >    native public function createDocumentFragment():DocumentFragment;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public CharacterData extends Node {
>> >
>> >    native public function CharacterData();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >7D61178C
>> >     */
>> >    native public var length:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >72AB8359
>> >     */
>> >    native public var data:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >E5CBA7FB
>> >     */
>> >    native public function replaceData(offset:Number, count:Number,
>> >arg:Number):void;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >7C603781
>> >     */
>> >    native public function deleteData(offset:Number, count:Number):void;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >6531BCCF
>> >     */
>> >    native public function substringData(offset:Number,
>> >count:Number):String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >3EDB695F
>> >     */
>> >    native public function insertData(offset:Number, arg:Number):void;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >32791A2F
>> >     */
>> >    native public function appendData(arg:String):void;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public DocumentFragment extends Node {
>> >
>> >    native public function DocumentFragment();
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Attr extends Node {
>> >
>> >    native public function Attr();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >862529273
>> >     */
>> >    native public var specified:Boolean;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1112119403
>> >     */
>> >    native public var name:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >221662474
>> >     */
>> >    native public var value:String;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Comment extends CharacterData {
>> >
>> >    native public function Comment();
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Notation extends Node {
>> >
>> >    native public function Notation();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >54F2B4D0
>> >     */
>> >    native public var publicId:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >E8AAB1D0
>> >     */
>> >    native public var systemId:String;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public NamedNodeMap {
>> >
>> >    native public function NamedNodeMap();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >6D0FB19E
>> >     */
>> >    native public var length:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1074577549
>> >     */
>> >    native public function getNamedItem(name:String):Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >349467F9
>> >     */
>> >    native public function item(index:Number):Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1025163788
>> >     */
>> >    native public function setNamedItem(arg:Node):Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >D58B193
>> >     */
>> >    native public function removeNamedItem(name:String):Node;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public CDATASection extends Text {
>> >
>> >    native public function CDATASection();
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Text extends CharacterData {
>> >
>> >    native public function Text();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >38853C1D
>> >     */
>> >    native public function splitText(offset:Number):Text;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Node implements EventTarget {
>> >
>> >    native public function Node();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var TEXT_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var ENTITY_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var DOCUMENT_TYPE_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var NOTATION_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var CDATA_SECTION_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var DOCUMENT_FRAGMENT_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var COMMENT_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var PROCESSING_INSTRUCTION_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var XPATH_NAMESPACE_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var ELEMENT_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var ENTITY_REFERENCE_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var ATTRIBUTE_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1950641247
>> >     */
>> >    native public static var DOCUMENT_NODE:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-previousSibling
>> >     */
>> >    native public var previousSibling:Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-parentNode
>> >     */
>> >    native public var parentNode:Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-nodeValue
>> >     */
>> >    native public var nodeValue:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-nodeName
>> >     */
>> >    native public var nodeName:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-firstChild
>> >     */
>> >    native public var firstChild:Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-childNodes
>> >     */
>> >    native public var childNodes:NodeList;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-attributes
>> >     */
>> >    native public var attributes:NamedNodeMap;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-nodeType
>> >     */
>> >    native public var nodeType:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-ownerDocument
>> >     */
>> >    native public var ownerDocument:Document;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-nextSibling
>> >     */
>> >    native public var nextSibling:Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-lastChild
>> >     */
>> >    native public var lastChild:Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-removeChild
>> >     */
>> >    native public function removeChild(oldChild:Node):Node;
>> >
>> >    /**
>> >     */
>> >    native public override function addEventListener(type:Boolean,
>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>> >
>> >    /**
>> >     */
>> >    native public override function dispatchEvent(evt:Object):Object;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-insertBefore
>> >     */
>> >    native public function insertBefore(newChild:Node,
>> >refChild:Node):Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-hasChildNodes
>> >     */
>> >    native public function hasChildNodes():Boolean;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-appendChild
>> >     */
>> >    native public function appendChild(newChild:Node):Node;
>> >
>> >    /**
>> >     */
>> >    native public override function removeEventListener(type:Boolean,
>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-replaceChild
>> >     */
>> >    native public function replaceChild(newChild:Node,
>> >oldChild:Node):Node;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-cloneNode
>> >     */
>> >    native public function cloneNode(deep:Boolean):Node;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public DOMException {
>> >
>> >    native public function DOMException();
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public DOMImplementation {
>> >
>> >    native public function DOMImplementation();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >5CED94D7
>> >     */
>> >    native public function hasFeature(feature:String,
>> >version:String):Boolean;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public ProcessingInstruction extends Node {
>> >
>> >    native public function ProcessingInstruction();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1478689192
>> >     */
>> >    native public var target:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >837822393
>> >     */
>> >    native public var data:String;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public DocumentType extends Node {
>> >
>> >    native public function DocumentType();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >D46829EF
>> >     */
>> >    native public var notations:NamedNodeMap;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1844763134
>> >     */
>> >    native public var name:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1788794630
>> >     */
>> >    native public var entities:NamedNodeMap;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public ExceptionCode {
>> >
>> >    native public function ExceptionCode();
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Window implements EventTarget {
>> >
>> >    native public function Window();
>> >
>> >    /**
>> >     */
>> >    native public var onmousewheel:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onunload:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onerror:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onhashchange:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onpopstate:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onresize:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onblur:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmouseup:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onpaint:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onclose:Function;
>> >
>> >    /**
>> >     */
>> >    native public var Window:Object;
>> >
>> >    /**
>> >     */
>> >    native public var onbeforeunload:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmousemove:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oncontextmenu:Function;
>> >
>> >    /**
>> >     */
>> >    native public var ondblclick:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmouseout:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onkeyup:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onfocus:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onkeydown:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onkeypress:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onsubmit:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onchange:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onabort:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onreset:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmouseover:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onselect:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onload:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onwheel:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onscroll:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onclick:Function;
>> >
>> >    /**
>> >     */
>> >    native public var ondragdrop:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmousedown:Function;
>> >
>> >    /**
>> >     */
>> >    native public override function addEventListener(type:Boolean,
>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>> >
>> >    /**
>> >     */
>> >    native public override function dispatchEvent(evt:Object):Object;
>> >
>> >    /**
>> >     */
>> >    native public override function removeEventListener(type:Boolean,
>> >listener:Boolean, opt_useCapture:Boolean = null):Object;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public EntityReference extends Node {
>> >
>> >    native public function EntityReference();
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public NodeList {
>> >
>> >    native public function NodeList();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >203510337
>> >     */
>> >    native public var length:Number;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >844377136
>> >     */
>> >    native public function item(index:Number):Node;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Element extends Node {
>> >
>> >    native public function Element();
>> >
>> >    /**
>> >     */
>> >    native public var onmousewheel:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oncompositionstart:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onunload:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onerror:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onresize:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmouseup:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onblur:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onbeforeinput:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmousemove:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onbeforeunload:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oncontextmenu:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onfocusout:Function;
>> >
>> >    /**
>> >     */
>> >    native public var ondblclick:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmouseout:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onkeyup:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oncompositionend:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onfocus:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onkeydown:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onkeypress:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onsubmit:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onchange:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onabort:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onreset:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmouseover:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oninput:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oncompositionupdate:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onselect:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oncut:Function;
>> >
>> >    /**
>> >     */
>> >    native public var ontextinput:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onload:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onwheel:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onpaste:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onscroll:Function;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>> >ribute-tagName
>> >     */
>> >    native public var tagName:String;
>> >
>> >    /**
>> >     */
>> >    native public var onclick:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onmousedown:Function;
>> >
>> >    /**
>> >     */
>> >    native public var oncopy:Function;
>> >
>> >    /**
>> >     */
>> >    native public var onfocusin:Function;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-removeAttributeNode
>> >     */
>> >    native public function removeAttributeNode(oldAttr:Attr):Attr;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >1938918D
>> >     */
>> >    native public function getElementsByTagName(tagname:String):NodeList;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-getAttributeNode
>> >     */
>> >    native public function getAttributeNode(name:String):Attr;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-setAttributeNode
>> >     */
>> >    native public function setAttributeNode(newAttr:Attr):Attr;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-removeAttribute
>> >     */
>> >    native public function removeAttribute(name:String):void;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-setAttribute
>> >     */
>> >    native public function setAttribute(name:String, value:String):void;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>> >hod-getAttribute
>> >     * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
>> >     */
>> >    native public function getAttribute(name:String, opt_flags:String =
>> >null):String;
>> >
>> >}
>> >}
>> >
>> >package dom {
>> >
>> >public Entity extends Node {
>> >
>> >    native public function Entity();
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >D7303025
>> >     */
>> >    native public var publicId:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >D7C29F3E
>> >     */
>> >    native public var systemId:String;
>> >
>> >    /**
>> >     * @see
>> >
>> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>> >6ABAEB38
>> >     */
>> >    native public var notationName:String;
>> >
>> >}
>> >}
>>
>>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Michael Schmalle <te...@gmail.com>.
On Thu, Jun 4, 2015 at 12:19 PM, Alex Harui <ah...@adobe.com> wrote:

> Awesome!
>
> So we can forget d.ts files and IDL files, right?  Plus at least
> w3c_dom1.js is Apache Licensed.
>

The way I set up the parser/emitter is we can merge things using the same
model but parsing different files. For instance;

w3c_events.js
w3c_dom1.js
w3c_dom2.js
w3c_dom3.js

and more all go together so I am now creating the whole bunch at once.

For now, yeah I see no reason for IDL, these externs are the IDL. And d.ts,
yeah for now I don't have the time to even think about trying to get that
format to convert.



> I was actually going to spend some time today on the JS primitives swc
> (Number, String, Array).  Have you seen any externs file for those?  I
> doubt it exists.
>
>
Josh responded to this.



> -Alex
>
> On 6/4/15, 8:12 AM, "Michael Schmalle" <te...@gmail.com> wrote:
>
> >Hey,
> >
> >Well I am a gluten for punishment but, I love parsers and translations so
> >without further ado;
> >
> >From this source file;
> >
> >
> https://github.com/google/closure-compiler/blob/master/externs/w3c_dom1.js
> >
> >I am creating the following ActionScript, long but worth looking at. :)
> >
> >I found a lot of extern files, so this is how we do it in the start. We
> >could even defined externs ourselves, the benefit is, one file of a bunch
> >of javascript classes translates into a bunch of ActionScript files.
> >
> >This is grabbing docs and analyzing types. More to test but I am using the
> >Rhino parser and AST, made my own walker and wrote the logic to assemble
> >class, field and method definitions while the root AST is walked.
> >
> >So now, if you want a creatjs API, just follow GCC extern file template
> >and
> >you will have it.
> >
> >Mike
> >
> >--------------------------------------------------------------------
> >ActionScript output, will be individual files
> >--------------------------------------------------------------------
> >
> >
> >
> >package dom {
> >
> >public Document extends Node {
> >
> >    native public function Document();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-implementation
> >     */
> >    native public var implementation:DOMImplementation;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-doctype
> >     */
> >    native public var doctype:DocumentType;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-documentElement
> >     */
> >    native public var documentElement:Element;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createComment
> >     */
> >    native public function createComment(data:String):Comment;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >A6C9094
> >     */
> >    native public function getElementsByTagName(tagname:String):NodeList;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createEntityReference
> >     */
> >    native public function
> >createEntityReference(name:String):EntityReference;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createAttribute
> >     */
> >    native public function createAttribute(name:String):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createTextNode
> >     */
> >    native public function createTextNode(data:Object):Text;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createCDATASection
> >     */
> >    native public function createCDATASection(data:String):CDATASection;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createProcessingInstruction
> >     */
> >    native public function createProcessingInstruction(target:String,
> >data:String):ProcessingInstruction;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createElement
> >     * @see
> >
> http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-int
> >erface-to-instantiate
> >     */
> >    native public function createElement(tagName:String,
> >opt_typeExtension:String = null):Element;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-createDocumentFragment
> >     */
> >    native public function createDocumentFragment():DocumentFragment;
> >
> >}
> >}
> >
> >package dom {
> >
> >public CharacterData extends Node {
> >
> >    native public function CharacterData();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >7D61178C
> >     */
> >    native public var length:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >72AB8359
> >     */
> >    native public var data:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >E5CBA7FB
> >     */
> >    native public function replaceData(offset:Number, count:Number,
> >arg:Number):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >7C603781
> >     */
> >    native public function deleteData(offset:Number, count:Number):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >6531BCCF
> >     */
> >    native public function substringData(offset:Number,
> >count:Number):String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >3EDB695F
> >     */
> >    native public function insertData(offset:Number, arg:Number):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >32791A2F
> >     */
> >    native public function appendData(arg:String):void;
> >
> >}
> >}
> >
> >package dom {
> >
> >public DocumentFragment extends Node {
> >
> >    native public function DocumentFragment();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Attr extends Node {
> >
> >    native public function Attr();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >862529273
> >     */
> >    native public var specified:Boolean;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1112119403
> >     */
> >    native public var name:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >221662474
> >     */
> >    native public var value:String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Comment extends CharacterData {
> >
> >    native public function Comment();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Notation extends Node {
> >
> >    native public function Notation();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >54F2B4D0
> >     */
> >    native public var publicId:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >E8AAB1D0
> >     */
> >    native public var systemId:String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public NamedNodeMap {
> >
> >    native public function NamedNodeMap();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >6D0FB19E
> >     */
> >    native public var length:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1074577549
> >     */
> >    native public function getNamedItem(name:String):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >349467F9
> >     */
> >    native public function item(index:Number):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1025163788
> >     */
> >    native public function setNamedItem(arg:Node):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D58B193
> >     */
> >    native public function removeNamedItem(name:String):Node;
> >
> >}
> >}
> >
> >package dom {
> >
> >public CDATASection extends Text {
> >
> >    native public function CDATASection();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Text extends CharacterData {
> >
> >    native public function Text();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >38853C1D
> >     */
> >    native public function splitText(offset:Number):Text;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Node implements EventTarget {
> >
> >    native public function Node();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var TEXT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ENTITY_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var DOCUMENT_TYPE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var NOTATION_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var CDATA_SECTION_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var DOCUMENT_FRAGMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var COMMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var PROCESSING_INSTRUCTION_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var XPATH_NAMESPACE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ELEMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ENTITY_REFERENCE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var ATTRIBUTE_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1950641247
> >     */
> >    native public static var DOCUMENT_NODE:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-previousSibling
> >     */
> >    native public var previousSibling:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-parentNode
> >     */
> >    native public var parentNode:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nodeValue
> >     */
> >    native public var nodeValue:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nodeName
> >     */
> >    native public var nodeName:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-firstChild
> >     */
> >    native public var firstChild:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-childNodes
> >     */
> >    native public var childNodes:NodeList;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-attributes
> >     */
> >    native public var attributes:NamedNodeMap;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nodeType
> >     */
> >    native public var nodeType:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-ownerDocument
> >     */
> >    native public var ownerDocument:Document;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-nextSibling
> >     */
> >    native public var nextSibling:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-lastChild
> >     */
> >    native public var lastChild:Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-removeChild
> >     */
> >    native public function removeChild(oldChild:Node):Node;
> >
> >    /**
> >     */
> >    native public override function addEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >    /**
> >     */
> >    native public override function dispatchEvent(evt:Object):Object;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-insertBefore
> >     */
> >    native public function insertBefore(newChild:Node,
> >refChild:Node):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-hasChildNodes
> >     */
> >    native public function hasChildNodes():Boolean;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-appendChild
> >     */
> >    native public function appendChild(newChild:Node):Node;
> >
> >    /**
> >     */
> >    native public override function removeEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-replaceChild
> >     */
> >    native public function replaceChild(newChild:Node,
> >oldChild:Node):Node;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-cloneNode
> >     */
> >    native public function cloneNode(deep:Boolean):Node;
> >
> >}
> >}
> >
> >package dom {
> >
> >public DOMException {
> >
> >    native public function DOMException();
> >
> >}
> >}
> >
> >package dom {
> >
> >public DOMImplementation {
> >
> >    native public function DOMImplementation();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >5CED94D7
> >     */
> >    native public function hasFeature(feature:String,
> >version:String):Boolean;
> >
> >}
> >}
> >
> >package dom {
> >
> >public ProcessingInstruction extends Node {
> >
> >    native public function ProcessingInstruction();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1478689192
> >     */
> >    native public var target:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >837822393
> >     */
> >    native public var data:String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public DocumentType extends Node {
> >
> >    native public function DocumentType();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D46829EF
> >     */
> >    native public var notations:NamedNodeMap;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1844763134
> >     */
> >    native public var name:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1788794630
> >     */
> >    native public var entities:NamedNodeMap;
> >
> >}
> >}
> >
> >package dom {
> >
> >public ExceptionCode {
> >
> >    native public function ExceptionCode();
> >
> >}
> >}
> >
> >package dom {
> >
> >public Window implements EventTarget {
> >
> >    native public function Window();
> >
> >    /**
> >     */
> >    native public var onmousewheel:Function;
> >
> >    /**
> >     */
> >    native public var onunload:Function;
> >
> >    /**
> >     */
> >    native public var onerror:Function;
> >
> >    /**
> >     */
> >    native public var onhashchange:Function;
> >
> >    /**
> >     */
> >    native public var onpopstate:Function;
> >
> >    /**
> >     */
> >    native public var onresize:Function;
> >
> >    /**
> >     */
> >    native public var onblur:Function;
> >
> >    /**
> >     */
> >    native public var onmouseup:Function;
> >
> >    /**
> >     */
> >    native public var onpaint:Function;
> >
> >    /**
> >     */
> >    native public var onclose:Function;
> >
> >    /**
> >     */
> >    native public var Window:Object;
> >
> >    /**
> >     */
> >    native public var onbeforeunload:Function;
> >
> >    /**
> >     */
> >    native public var onmousemove:Function;
> >
> >    /**
> >     */
> >    native public var oncontextmenu:Function;
> >
> >    /**
> >     */
> >    native public var ondblclick:Function;
> >
> >    /**
> >     */
> >    native public var onmouseout:Function;
> >
> >    /**
> >     */
> >    native public var onkeyup:Function;
> >
> >    /**
> >     */
> >    native public var onfocus:Function;
> >
> >    /**
> >     */
> >    native public var onkeydown:Function;
> >
> >    /**
> >     */
> >    native public var onkeypress:Function;
> >
> >    /**
> >     */
> >    native public var onsubmit:Function;
> >
> >    /**
> >     */
> >    native public var onchange:Function;
> >
> >    /**
> >     */
> >    native public var onabort:Function;
> >
> >    /**
> >     */
> >    native public var onreset:Function;
> >
> >    /**
> >     */
> >    native public var onmouseover:Function;
> >
> >    /**
> >     */
> >    native public var onselect:Function;
> >
> >    /**
> >     */
> >    native public var onload:Function;
> >
> >    /**
> >     */
> >    native public var onwheel:Function;
> >
> >    /**
> >     */
> >    native public var onscroll:Function;
> >
> >    /**
> >     */
> >    native public var onclick:Function;
> >
> >    /**
> >     */
> >    native public var ondragdrop:Function;
> >
> >    /**
> >     */
> >    native public var onmousedown:Function;
> >
> >    /**
> >     */
> >    native public override function addEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >    /**
> >     */
> >    native public override function dispatchEvent(evt:Object):Object;
> >
> >    /**
> >     */
> >    native public override function removeEventListener(type:Boolean,
> >listener:Boolean, opt_useCapture:Boolean = null):Object;
> >
> >}
> >}
> >
> >package dom {
> >
> >public EntityReference extends Node {
> >
> >    native public function EntityReference();
> >
> >}
> >}
> >
> >package dom {
> >
> >public NodeList {
> >
> >    native public function NodeList();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >203510337
> >     */
> >    native public var length:Number;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >844377136
> >     */
> >    native public function item(index:Number):Node;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Element extends Node {
> >
> >    native public function Element();
> >
> >    /**
> >     */
> >    native public var onmousewheel:Function;
> >
> >    /**
> >     */
> >    native public var oncompositionstart:Function;
> >
> >    /**
> >     */
> >    native public var onunload:Function;
> >
> >    /**
> >     */
> >    native public var onerror:Function;
> >
> >    /**
> >     */
> >    native public var onresize:Function;
> >
> >    /**
> >     */
> >    native public var onmouseup:Function;
> >
> >    /**
> >     */
> >    native public var onblur:Function;
> >
> >    /**
> >     */
> >    native public var onbeforeinput:Function;
> >
> >    /**
> >     */
> >    native public var onmousemove:Function;
> >
> >    /**
> >     */
> >    native public var onbeforeunload:Function;
> >
> >    /**
> >     */
> >    native public var oncontextmenu:Function;
> >
> >    /**
> >     */
> >    native public var onfocusout:Function;
> >
> >    /**
> >     */
> >    native public var ondblclick:Function;
> >
> >    /**
> >     */
> >    native public var onmouseout:Function;
> >
> >    /**
> >     */
> >    native public var onkeyup:Function;
> >
> >    /**
> >     */
> >    native public var oncompositionend:Function;
> >
> >    /**
> >     */
> >    native public var onfocus:Function;
> >
> >    /**
> >     */
> >    native public var onkeydown:Function;
> >
> >    /**
> >     */
> >    native public var onkeypress:Function;
> >
> >    /**
> >     */
> >    native public var onsubmit:Function;
> >
> >    /**
> >     */
> >    native public var onchange:Function;
> >
> >    /**
> >     */
> >    native public var onabort:Function;
> >
> >    /**
> >     */
> >    native public var onreset:Function;
> >
> >    /**
> >     */
> >    native public var onmouseover:Function;
> >
> >    /**
> >     */
> >    native public var oninput:Function;
> >
> >    /**
> >     */
> >    native public var oncompositionupdate:Function;
> >
> >    /**
> >     */
> >    native public var onselect:Function;
> >
> >    /**
> >     */
> >    native public var oncut:Function;
> >
> >    /**
> >     */
> >    native public var ontextinput:Function;
> >
> >    /**
> >     */
> >    native public var onload:Function;
> >
> >    /**
> >     */
> >    native public var onwheel:Function;
> >
> >    /**
> >     */
> >    native public var onpaste:Function;
> >
> >    /**
> >     */
> >    native public var onscroll:Function;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
> >ribute-tagName
> >     */
> >    native public var tagName:String;
> >
> >    /**
> >     */
> >    native public var onclick:Function;
> >
> >    /**
> >     */
> >    native public var onmousedown:Function;
> >
> >    /**
> >     */
> >    native public var oncopy:Function;
> >
> >    /**
> >     */
> >    native public var onfocusin:Function;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-removeAttributeNode
> >     */
> >    native public function removeAttributeNode(oldAttr:Attr):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >1938918D
> >     */
> >    native public function getElementsByTagName(tagname:String):NodeList;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-getAttributeNode
> >     */
> >    native public function getAttributeNode(name:String):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-setAttributeNode
> >     */
> >    native public function setAttributeNode(newAttr:Attr):Attr;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-removeAttribute
> >     */
> >    native public function removeAttribute(name:String):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-setAttribute
> >     */
> >    native public function setAttribute(name:String, value:String):void;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
> >hod-getAttribute
> >     * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
> >     */
> >    native public function getAttribute(name:String, opt_flags:String =
> >null):String;
> >
> >}
> >}
> >
> >package dom {
> >
> >public Entity extends Node {
> >
> >    native public function Entity();
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D7303025
> >     */
> >    native public var publicId:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >D7C29F3E
> >     */
> >    native public var systemId:String;
> >
> >    /**
> >     * @see
> >
> http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
> >6ABAEB38
> >     */
> >    native public var notationName:String;
> >
> >}
> >}
>
>

Re: [FalconJX] Parse JavaScript extern files to create ActionScript API

Posted by Alex Harui <ah...@adobe.com>.
Awesome!

So we can forget d.ts files and IDL files, right?  Plus at least
w3c_dom1.js is Apache Licensed.

I was actually going to spend some time today on the JS primitives swc
(Number, String, Array).  Have you seen any externs file for those?  I
doubt it exists.

-Alex

On 6/4/15, 8:12 AM, "Michael Schmalle" <te...@gmail.com> wrote:

>Hey,
>
>Well I am a gluten for punishment but, I love parsers and translations so
>without further ado;
>
>From this source file;
>
>https://github.com/google/closure-compiler/blob/master/externs/w3c_dom1.js
>
>I am creating the following ActionScript, long but worth looking at. :)
>
>I found a lot of extern files, so this is how we do it in the start. We
>could even defined externs ourselves, the benefit is, one file of a bunch
>of javascript classes translates into a bunch of ActionScript files.
>
>This is grabbing docs and analyzing types. More to test but I am using the
>Rhino parser and AST, made my own walker and wrote the logic to assemble
>class, field and method definitions while the root AST is walked.
>
>So now, if you want a creatjs API, just follow GCC extern file template
>and
>you will have it.
>
>Mike
>
>--------------------------------------------------------------------
>ActionScript output, will be individual files
>--------------------------------------------------------------------
>
>
>
>package dom {
>
>public Document extends Node {
>
>    native public function Document();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-implementation
>     */
>    native public var implementation:DOMImplementation;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-doctype
>     */
>    native public var doctype:DocumentType;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-documentElement
>     */
>    native public var documentElement:Element;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createComment
>     */
>    native public function createComment(data:String):Comment;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>A6C9094
>     */
>    native public function getElementsByTagName(tagname:String):NodeList;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createEntityReference
>     */
>    native public function
>createEntityReference(name:String):EntityReference;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createAttribute
>     */
>    native public function createAttribute(name:String):Attr;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createTextNode
>     */
>    native public function createTextNode(data:Object):Text;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createCDATASection
>     */
>    native public function createCDATASection(data:String):CDATASection;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createProcessingInstruction
>     */
>    native public function createProcessingInstruction(target:String,
>data:String):ProcessingInstruction;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createElement
>     * @see
>http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-int
>erface-to-instantiate
>     */
>    native public function createElement(tagName:String,
>opt_typeExtension:String = null):Element;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-createDocumentFragment
>     */
>    native public function createDocumentFragment():DocumentFragment;
>
>}
>}
>
>package dom {
>
>public CharacterData extends Node {
>
>    native public function CharacterData();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>7D61178C
>     */
>    native public var length:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>72AB8359
>     */
>    native public var data:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>E5CBA7FB
>     */
>    native public function replaceData(offset:Number, count:Number,
>arg:Number):void;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>7C603781
>     */
>    native public function deleteData(offset:Number, count:Number):void;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>6531BCCF
>     */
>    native public function substringData(offset:Number,
>count:Number):String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>3EDB695F
>     */
>    native public function insertData(offset:Number, arg:Number):void;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>32791A2F
>     */
>    native public function appendData(arg:String):void;
>
>}
>}
>
>package dom {
>
>public DocumentFragment extends Node {
>
>    native public function DocumentFragment();
>
>}
>}
>
>package dom {
>
>public Attr extends Node {
>
>    native public function Attr();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>862529273
>     */
>    native public var specified:Boolean;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1112119403
>     */
>    native public var name:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>221662474
>     */
>    native public var value:String;
>
>}
>}
>
>package dom {
>
>public Comment extends CharacterData {
>
>    native public function Comment();
>
>}
>}
>
>package dom {
>
>public Notation extends Node {
>
>    native public function Notation();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>54F2B4D0
>     */
>    native public var publicId:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>E8AAB1D0
>     */
>    native public var systemId:String;
>
>}
>}
>
>package dom {
>
>public NamedNodeMap {
>
>    native public function NamedNodeMap();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>6D0FB19E
>     */
>    native public var length:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1074577549
>     */
>    native public function getNamedItem(name:String):Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>349467F9
>     */
>    native public function item(index:Number):Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1025163788
>     */
>    native public function setNamedItem(arg:Node):Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>D58B193
>     */
>    native public function removeNamedItem(name:String):Node;
>
>}
>}
>
>package dom {
>
>public CDATASection extends Text {
>
>    native public function CDATASection();
>
>}
>}
>
>package dom {
>
>public Text extends CharacterData {
>
>    native public function Text();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>38853C1D
>     */
>    native public function splitText(offset:Number):Text;
>
>}
>}
>
>package dom {
>
>public Node implements EventTarget {
>
>    native public function Node();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var TEXT_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var ENTITY_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var DOCUMENT_TYPE_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var NOTATION_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var CDATA_SECTION_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var DOCUMENT_FRAGMENT_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var COMMENT_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var PROCESSING_INSTRUCTION_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var XPATH_NAMESPACE_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var ELEMENT_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var ENTITY_REFERENCE_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var ATTRIBUTE_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1950641247
>     */
>    native public static var DOCUMENT_NODE:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-previousSibling
>     */
>    native public var previousSibling:Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-parentNode
>     */
>    native public var parentNode:Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-nodeValue
>     */
>    native public var nodeValue:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-nodeName
>     */
>    native public var nodeName:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-firstChild
>     */
>    native public var firstChild:Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-childNodes
>     */
>    native public var childNodes:NodeList;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-attributes
>     */
>    native public var attributes:NamedNodeMap;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-nodeType
>     */
>    native public var nodeType:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-ownerDocument
>     */
>    native public var ownerDocument:Document;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-nextSibling
>     */
>    native public var nextSibling:Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-lastChild
>     */
>    native public var lastChild:Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-removeChild
>     */
>    native public function removeChild(oldChild:Node):Node;
>
>    /**
>     */
>    native public override function addEventListener(type:Boolean,
>listener:Boolean, opt_useCapture:Boolean = null):Object;
>
>    /**
>     */
>    native public override function dispatchEvent(evt:Object):Object;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-insertBefore
>     */
>    native public function insertBefore(newChild:Node,
>refChild:Node):Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-hasChildNodes
>     */
>    native public function hasChildNodes():Boolean;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-appendChild
>     */
>    native public function appendChild(newChild:Node):Node;
>
>    /**
>     */
>    native public override function removeEventListener(type:Boolean,
>listener:Boolean, opt_useCapture:Boolean = null):Object;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-replaceChild
>     */
>    native public function replaceChild(newChild:Node,
>oldChild:Node):Node;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-cloneNode
>     */
>    native public function cloneNode(deep:Boolean):Node;
>
>}
>}
>
>package dom {
>
>public DOMException {
>
>    native public function DOMException();
>
>}
>}
>
>package dom {
>
>public DOMImplementation {
>
>    native public function DOMImplementation();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>5CED94D7
>     */
>    native public function hasFeature(feature:String,
>version:String):Boolean;
>
>}
>}
>
>package dom {
>
>public ProcessingInstruction extends Node {
>
>    native public function ProcessingInstruction();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1478689192
>     */
>    native public var target:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>837822393
>     */
>    native public var data:String;
>
>}
>}
>
>package dom {
>
>public DocumentType extends Node {
>
>    native public function DocumentType();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>D46829EF
>     */
>    native public var notations:NamedNodeMap;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1844763134
>     */
>    native public var name:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1788794630
>     */
>    native public var entities:NamedNodeMap;
>
>}
>}
>
>package dom {
>
>public ExceptionCode {
>
>    native public function ExceptionCode();
>
>}
>}
>
>package dom {
>
>public Window implements EventTarget {
>
>    native public function Window();
>
>    /**
>     */
>    native public var onmousewheel:Function;
>
>    /**
>     */
>    native public var onunload:Function;
>
>    /**
>     */
>    native public var onerror:Function;
>
>    /**
>     */
>    native public var onhashchange:Function;
>
>    /**
>     */
>    native public var onpopstate:Function;
>
>    /**
>     */
>    native public var onresize:Function;
>
>    /**
>     */
>    native public var onblur:Function;
>
>    /**
>     */
>    native public var onmouseup:Function;
>
>    /**
>     */
>    native public var onpaint:Function;
>
>    /**
>     */
>    native public var onclose:Function;
>
>    /**
>     */
>    native public var Window:Object;
>
>    /**
>     */
>    native public var onbeforeunload:Function;
>
>    /**
>     */
>    native public var onmousemove:Function;
>
>    /**
>     */
>    native public var oncontextmenu:Function;
>
>    /**
>     */
>    native public var ondblclick:Function;
>
>    /**
>     */
>    native public var onmouseout:Function;
>
>    /**
>     */
>    native public var onkeyup:Function;
>
>    /**
>     */
>    native public var onfocus:Function;
>
>    /**
>     */
>    native public var onkeydown:Function;
>
>    /**
>     */
>    native public var onkeypress:Function;
>
>    /**
>     */
>    native public var onsubmit:Function;
>
>    /**
>     */
>    native public var onchange:Function;
>
>    /**
>     */
>    native public var onabort:Function;
>
>    /**
>     */
>    native public var onreset:Function;
>
>    /**
>     */
>    native public var onmouseover:Function;
>
>    /**
>     */
>    native public var onselect:Function;
>
>    /**
>     */
>    native public var onload:Function;
>
>    /**
>     */
>    native public var onwheel:Function;
>
>    /**
>     */
>    native public var onscroll:Function;
>
>    /**
>     */
>    native public var onclick:Function;
>
>    /**
>     */
>    native public var ondragdrop:Function;
>
>    /**
>     */
>    native public var onmousedown:Function;
>
>    /**
>     */
>    native public override function addEventListener(type:Boolean,
>listener:Boolean, opt_useCapture:Boolean = null):Object;
>
>    /**
>     */
>    native public override function dispatchEvent(evt:Object):Object;
>
>    /**
>     */
>    native public override function removeEventListener(type:Boolean,
>listener:Boolean, opt_useCapture:Boolean = null):Object;
>
>}
>}
>
>package dom {
>
>public EntityReference extends Node {
>
>    native public function EntityReference();
>
>}
>}
>
>package dom {
>
>public NodeList {
>
>    native public function NodeList();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>203510337
>     */
>    native public var length:Number;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>844377136
>     */
>    native public function item(index:Number):Node;
>
>}
>}
>
>package dom {
>
>public Element extends Node {
>
>    native public function Element();
>
>    /**
>     */
>    native public var onmousewheel:Function;
>
>    /**
>     */
>    native public var oncompositionstart:Function;
>
>    /**
>     */
>    native public var onunload:Function;
>
>    /**
>     */
>    native public var onerror:Function;
>
>    /**
>     */
>    native public var onresize:Function;
>
>    /**
>     */
>    native public var onmouseup:Function;
>
>    /**
>     */
>    native public var onblur:Function;
>
>    /**
>     */
>    native public var onbeforeinput:Function;
>
>    /**
>     */
>    native public var onmousemove:Function;
>
>    /**
>     */
>    native public var onbeforeunload:Function;
>
>    /**
>     */
>    native public var oncontextmenu:Function;
>
>    /**
>     */
>    native public var onfocusout:Function;
>
>    /**
>     */
>    native public var ondblclick:Function;
>
>    /**
>     */
>    native public var onmouseout:Function;
>
>    /**
>     */
>    native public var onkeyup:Function;
>
>    /**
>     */
>    native public var oncompositionend:Function;
>
>    /**
>     */
>    native public var onfocus:Function;
>
>    /**
>     */
>    native public var onkeydown:Function;
>
>    /**
>     */
>    native public var onkeypress:Function;
>
>    /**
>     */
>    native public var onsubmit:Function;
>
>    /**
>     */
>    native public var onchange:Function;
>
>    /**
>     */
>    native public var onabort:Function;
>
>    /**
>     */
>    native public var onreset:Function;
>
>    /**
>     */
>    native public var onmouseover:Function;
>
>    /**
>     */
>    native public var oninput:Function;
>
>    /**
>     */
>    native public var oncompositionupdate:Function;
>
>    /**
>     */
>    native public var onselect:Function;
>
>    /**
>     */
>    native public var oncut:Function;
>
>    /**
>     */
>    native public var ontextinput:Function;
>
>    /**
>     */
>    native public var onload:Function;
>
>    /**
>     */
>    native public var onwheel:Function;
>
>    /**
>     */
>    native public var onpaste:Function;
>
>    /**
>     */
>    native public var onscroll:Function;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#att
>ribute-tagName
>     */
>    native public var tagName:String;
>
>    /**
>     */
>    native public var onclick:Function;
>
>    /**
>     */
>    native public var onmousedown:Function;
>
>    /**
>     */
>    native public var oncopy:Function;
>
>    /**
>     */
>    native public var onfocusin:Function;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-removeAttributeNode
>     */
>    native public function removeAttributeNode(oldAttr:Attr):Attr;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>1938918D
>     */
>    native public function getElementsByTagName(tagname:String):NodeList;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-getAttributeNode
>     */
>    native public function getAttributeNode(name:String):Attr;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-setAttributeNode
>     */
>    native public function setAttributeNode(newAttr:Attr):Attr;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-removeAttribute
>     */
>    native public function removeAttribute(name:String):void;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-setAttribute
>     */
>    native public function setAttribute(name:String, value:String):void;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#met
>hod-getAttribute
>     * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
>     */
>    native public function getAttribute(name:String, opt_flags:String =
>null):String;
>
>}
>}
>
>package dom {
>
>public Entity extends Node {
>
>    native public function Entity();
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>D7303025
>     */
>    native public var publicId:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>D7C29F3E
>     */
>    native public var systemId:String;
>
>    /**
>     * @see
>http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-
>6ABAEB38
>     */
>    native public var notationName:String;
>
>}
>}