There was a person who began rewriting this using reason [1]. Sadly, he never got to complete it.
I began tinkering with F# recently and found that ML languages are perfect for parsing. Is there a version of this in F# or ocaml?
[1] https://medium.com/@javierwchavarri/building-the-super-tiny-...