Overview

Return to Contents

Packrat is a parser combinator library that can handle left recursive ambiguous grammars, and does so in polynomial time and space. It gets its name from packrat parsing, an algorithm which involves memoizing all intermediate parsing results in order to avoid exponential time complexity. The library includes both parser combinators and simpler lexer combinators.