Skip to content

feature request: greedy_alt (fictional name) #806

@crlf0710

Description

@crlf0710

Hello, great work for nom!

I'm been repeatedly met with a problem, though. The alt combinator return the first succeeded result. so i have to carefully arrange the sub-parsers in a "reverse-dictionary order" to make the result correct what i wanted.

I wonder if we can make a special version of alt so it run all the sub-parsers and return the first version that ate the most data. That'll be slower, but it can be much more convenient.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions