Skip to content

formality-core parse should permit customizable "commit" point #159

Open

Description

If you have a grammar like this...

Expr = Expr . `await`
         | Place 

Place = Id $*Projections

Projections = `.` FieldId

...then a.await will be parsed as a parse error by Place. The reason is that it parses a as an Id (correctly) but when it sees the . it commits to that being followed by a projection. Right now the rule is that we commit if we consumed anything but whitespace. We should let users define the "commit" point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions