Friday, March 16, 2012

Parser Complete

Hey,

I'm pleased to announce the alpha version of the parser!  The parser can take any GWT canvas and convert it into HTML, the formatting of which can be adjusted to as desired.  Additionally, it can take HTML and make inferences to make it valid HTML (this is important because GWT outputs non-standards-compliant HTML).

Currently, the parser can be customized to output/not output newlines and pipe characters (for viewing alignment) and whether tags are capitalized/not.  I didn't really know what other options to add, but it should be trivial to add them.

The thing is pretty robust, in that it will take any HTML you could possibly throw at it.  It will even detect some problems (e.g., "<div class=a=b>") and let you know about them.  I can't yet give it my (imaginary) gold seal of approval, but it's definitely solid enough for alpha.

Anyway, this concludes my original goal of getting the parser working.  The parser is fully integrated into Web_Final, and is ready for use.  All changes have been committed.

TODO:
1. parser does not attempt to find redundant or useless code (e.g., "<div></div>" . . . I (think?) is useless).
2. Do we, or do we not want HTML to GWT conversion?  Depending on the answer to 1., this may be as simple as removing the useless code and then feeding the generated HTML back into a canvas object.  But I honestly haven't looked into it.

Thanks,
Ian

No comments:

Post a Comment