Skip to content

Change “consume” to “commit” #205

Open
@jamesdbrock

Description

@jamesdbrock

I want to change the term “consume” everywhere to “commit.”

The term “consume” is inherited from the early days of Parsec ( Parsec: Direct Style Monadic Parser Combinators For The Real World section 3 Restricting Lookahead ), but it is very confusing. The term “commit” much better conveys the meaning of “fail the parse right here instead of trying the alternative parse.”

In addition, we should talk explicitly about “backtracking” in the documentation. We always allow arbitrary backtracking, so the entire input stream is always held in memory.

Maybe primitive parsers should never commit (and should always backtrack, as they do now)? Maybe an alt branch should only be commited by explicitly calling the commit function? That would be a very breaking change.

The term for moving forward in the input stream is “advance,” as in Parsing.Combinators.advance.

Metadata

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