You might be able to copy the parser out of the Google Closure Compiler. <a href="http://code.google.com/closure/compiler/" rel="nofollow">http://code.google.com/closure/compiler/</a> you can be sure it works, and is stable. I think though it uses Rhino under the hood, so you could look at that too. <a href="http://www.mozilla.org/rhino/" rel="nofollow">http://www.mozilla.org/rhino/</a>