Hi Seo, On Wed, May 03, 2006 at 09:32 +0900, Sanghyeon Seo wrote:
2006/5/3, Armin Rigo <arigo@tunes.org>:
Let's consider Javascript (the same argument applies to any interpreted language): to write an interpreter, some people focus on the task of compiling, say, Javascript source code to get an AST; this is only part of the job, and it should be the shortest part -- ideally, finding an existing parser would be best, otherwise plugging one together with existing tools shouldn't take too long for a regular language like Javascript.
Sadly, parsing Javascript is unnecessarily difficult because of optional semicolon insertion. Best to look at existing parsers.
IMO for a SoC project it would be ok to have a stricter parser. Having javascript programs running on top of PyPy (JsPy or whatever :) being able to run unmodified on other javascript interpreters would be interesting enough. And such an approach would still have the advantages that Armin points out. best, holger