A simple parser generator written in javascript