Skip to content

Solve backtracking #17

Open
Open
@marcelocantos

Description

@marcelocantos

Given the well-defined grammar a -> b+; b -> "x" ":" "x"+ ";"?, the parser will match valid input x:x;x:x but won't match also-valid input x:xx:x. This is because "x"+ greedily slurps up all the xs and the parser doesn't have any look-ahead to see whether an x has a : after it and should therefore be left to the next b to pick up.

This requires an LL(2) grammar, so we will probably have to bite the LL(k) or LL(*) bullet soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Low priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions