Lately, in my spare time, I’ve been working on a pure-JavaScript packrat parser combinator. It supports left recursion, thanks to insights gleaned from this paper, and it’s usably fast (for a toy parser). Anyway, check it out. Eventually I plan to “compile” grammars written in standard EBNF syntax into native parsing expression grammars, though I don’t plan to implement backtracking, so the choice semantics will be those of a packrat parser.
I’ll explain the name in a later post.

Leave a comment