dmajda/pegjs — pull request #158 by Acubed (2013-01-29 22:24:00+00:00)
Title: Add a three-stage bootstrap

This adds a proper three-stage build process for the lib/parser.js file. This is how compilers generally build themselves, first by building the new generator from an old one, then building a new second stage one from the first stage, then building a third stage and ensuring it is identical to the second stage build.

This process will ensure in the future that no bugs will creep their way down the compiled versions even after they've been removed from the source code.

This commit also leaves open the option of removing lib/parser.js from the repository entirely. I opted not to, because doing so would require finding a working build of pegjs somewhere (even if an old version). Normally I would opt to leave out compiled code, but seeing as this saves a significant amount of work I don't see a problem with leaving it in.