Skip to content

Parse right-recursive rules in linear time #5

@pczarn

Description

@pczarn

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions