Possibly related issues:
Suggestions from @dragostis :
Ideally, the optimizer should be able to detect all exponential cases and have replacement rules for them. Maybe someone could take a look at egg and implement a simplified version of the grammar there so peephole optimizations can be more easily written?
plus more context on why packrat parsing wasn't used: #684 (comment)
Possibly related issues:
Suggestions from @dragostis :
plus more context on why packrat parsing wasn't used: #684 (comment)