Prematurely announcing ES-Lab (was: quasi-literal strawman)
andy at chubot.org
Sat Dec 26 22:05:52 PST 2009
> Funny you should mention that. At ES-Lab <http://code.google.com/p/es-lab/>, Tom Van Cutsem and I have been defining a JsonML-based representation of ES5 ASTs. Now seems as good a time as any to announce it. See <http://code.google.com/p/es-lab/wiki/JsonMLASTFormat>. A playground for seeing what ASTs are produced from parsing ES5 source texts is at <http://es-lab.googlecode.com/svn/trunk/site/esparser/index.html>. A half-written ES5 meta-interpreter driven by these ASTs is at <http://code.google.com/p/es-lab/source/browse/trunk/src/eval/eval.js>.
Possibly related: I have made Brendan Eich's Narcissus
meta-interpreter into a CommonJS module, and it can be run on Narwhal.
Since I think ES5 adds no new syntax over ES3.1, this should be an ES5
Here is an example of the JSON parse tree generated from
json-template.js (a template language in 800-ish lines of code)
Yes, it's big. So I understand why people are using more compact
array-based JSON formats.
There are some notes about the status in the README. The idea was to
rough, but working, so if anyone wants to use it let me know.
More information about the es-discuss