From: Phlip Date: 2007-01-02T21:40:10+09:00 Subject: Re: how to lex javascript for an assert_js system? spooq wrote: > Parsing with regexps makes baby Jesus cry. Javascript itself can be > quite flexible, so it may be possible to do enough with a standard > interpreter's run-time. Alternatively, have a look at the Mozilla > projects repository for a real interpreter you could hack on. This question is for an academic paper, so it has even more ridiculous constraints on the amount of fun I can have. (And why hasn't the industry invented a Lex in a Bottle, using Regexp-like strings and a BNF notation?) Can I add a parser to the Syntax library? It only does Ruby, XML, and YAML so far... And, yes, JavaScript was designed to be parsed, unlike some other languages... -- Phlip