Skip to content

Re-implement the parser using a parser combinator library #6

@exarkun

Description

@exarkun

The ad hoc parser currently in use includes a lot of redundancy and is difficult to reason about. For example, it uses int(s) in many places where it means "a positive integer". This could be fixed by replacing all uses of int with some API which addresses the problem of negative and 0 values being accepted but leaves all of the redundancy so similar future changes again have to fix N different call sites.

A parser combinator library makes it easy to avoid this kind of duplication.

Additionally, parser combinators are familiar to at least some people. The completely custom parser currently in use is familiar to approximately no one.

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