Rewrite right-recursive rules into left-recursive ones. Rotate the parse forest to undo that rewrite.
It remains to be seen if all right-recursive rules can be rewritten in a simple way.
I'm sure Joop Leo's optimization is no longer possible. The recognizer went too far from a certain kind of approach. That is, it takes an integrated approach, instead of a Buildtree approach with linked items as described in Elizabeth Scott's paper[1]. Anyway, here are descriptions of Leo's optimization:
Rewrite right-recursive rules into left-recursive ones. Rotate the parse forest to undo that rewrite.
It remains to be seen if all right-recursive rules can be rewritten in a simple way.
I'm sure Joop Leo's optimization is no longer possible. The recognizer went too far from a certain kind of approach. That is, it takes an integrated approach, instead of a Buildtree approach with linked items as described in Elizabeth Scott's paper[1]. Anyway, here are descriptions of Leo's optimization:
This complexity improvement is currently the most important one possible.
[1]: Elizabeth Scott. SPPF-Style Parsing From Earley Recognizers