The HTML 5 spec has IDL fragments (specifically Web IDL) to define various types/interfaces for the DOM. We've been trying to edit our metadata by hand and add APIs as we go, but we should ideally actually generate it from the spec itself. This is a fairly large undertaking and would involve:
- Grabbing the single-page HTML file containing the spec at http://dev.w3.org/html5/spec/single-page.html
- Extracting out the IDL fragments (find "pre.idl" elements and grab their text) - possibly save to one idl for or to separate ild files we can then...
- Parsing the IDL fragments into an AST
- This involves updating our grammar and scanner to match the definition from spec (http://dev.w3.org/2006/webapi/WebIDL)
- The IDL parser also needs to have AST node classes defined and hooked into the grammar - right now it just parses into Symbols.
- Traversing the IDL AST to spit out metadata in our XML format. Merge the resulting stuff with our existing info on examples/browser support/etc.