Testing: The following Lint has a sctrict parser http://www.javascriptlint.com/online_lint.php This one does not http://www.jslint.com/ --- Language reference https://developer.mozilla.org/en/JavaScript/Reference http://msdn.microsoft.com/en-us/library/ttyab5c8.aspx --- Look at http://dean.edwards.name/download/#packer http://code.google.com/p/minify/ Examples of parsers JSon parser in Parsec http://snippets.dzone.com/posts/show/3660 GOLD Parser, using the Javascript.grm from http://www.devincook.com/GOLDParser/grammars/index.htm http://oss.org.cn/ossdocs/web/js/js20/formal/parser-grammar.html ------------------------- - Generate output using standard pretty print library, so it can be used with various backends - Sort out semicolon insertion, as per http://oss.org.cn/ossdocs/web/js/js20/rationale/syntax.html Also: http://inimino.org/~inimino/blog/javascript_semicolons Grammatical Semicolon Insertion Semicolons before a closing } and the end of the program are optional in both JavaScript 1.5 and 2.0. In addition, the JavaScript 2.0 parser allows semicolons to be omitted before the else of an if-else statement and before the while of a do-while statement. Line-Break Semicolon Insertion If the first through the nth tokens of a JavaScript program form are grammatically valid but the first through the n+1st tokens are not and there is a line break between the nth tokens and the n+1st tokens, then the parser tries to parse the program again after inserting a VirtualSemicolon token between the nth and the n+1st tokens. - remove un-needed semicolons in pretty printer - put in tests for all cases of elementList -- Look at "in" keyword, as used : if (x in list) {} ------------ Integrating language-haskell. ----------------------------- Baseline before starting, on my laptop (intel Core2 Duo SU7300) $ time ./dist/build/runtests/runtests real 0m1.625s user 0m1.616s sys 0m0.016s Baseline 2010-12-20, after getting all tests to pass at last real 0m0.209s user 0m0.196s sys 0m0.004s After working in unicode, in language-javascript-0.0.3 [2010-12-28] real 0m0.236s user 0m0.224s sys 0m0.012s EOF