spooq wrote: I might go with Javascript-Pure-Perl - see below. The following is just wrap-ups. > http://lxr.mozilla.org/mozilla/source/js/src/js.c > Have a look around line 2315. Interesting, but I don't get It. The IT object ... exists at debug time, and traces all its calls? > Not sure exactly how you want to improve on lex? Regexp is itself also a "little language". However, to get to the language, we don't need to write a .regex file, compile it with special compilers, produce a .c file, compile this, link into it, bind to it, yack yack yack, and so on just to use it. So, I envision Ruby lines like Lex.new.e(' LetterE -> E | e'). Instead of externally compiling the little language, we just host it. That is not important for the current project... > > Can I add a parser to the Syntax library? It only does Ruby, XML, and > > YAML so far... > > I don't see how that's better than grabbing the Javascript grammar off > the web in BNF : In theory, I only need a dirt-simple way to spot-check the source; I'm not writing a JavaScript interpreter. But it could be better if it doesn't force me to externally compile the lexer. > http://corion.net/perl-dev/Javascript-PurePerl.html does javascript to > xml Righteous! The project already uses XML (and unit tests with assert_xpath), so that will fit right in! Thanks! I honestly would never have thought to try Perl... -- Phlip