11.19.07
JStify progress update
The development of JStify has been somewhat chaotic but the situation seems to be improving.
It took me a few weeks to adapt the SML/NJ-based parser of the Reference Implementation to OCaml and a few days to realize that it would quickly prove too hard to customize and maintain. It then took me another two weeks to convince myself that the specifications of JavaScript 2 were basically incompatible with Yacc, Menhir or Dypgen, due to a number of factors and to dump again all that code. After another two weeks, the recursive descent parser looks close to completion. I have managed to implement all the nasty tricks in the official grammar of JavaScript 2, despite the inconsistencies between Release 0 and Release 0 and within each release, between the .txt file, the .xls document and the actual implementation.
I’m currently debugging it and trying to understand why it keeps attempting to parse after the end of the file.
Camlp4 has proved slightly less useful than expected for this task, as I’ve managed to do everything I needed with a few regexps, higher order functions and the lazy module. On the other hand, the ability to combine OCaml stream parsers and build stream parser operators is quite comfortable.
In the meantime, I’ve also learnt how to write plug-ins for ocamlbuild and I’ve dumped the Makefile-based system for something more modern.
For the moment, I believe I can hold my personal deadline of end-of-November for the first full prototype of the parser.