Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
exarkun opened this issue Jan 24, 2023 · 0 comments · May be fixed by #7
Open

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

exarkun opened this issue Jan 24, 2023 · 0 comments · May be fixed by #7

Comments

@exarkun
Copy link
Member

exarkun commented Jan 24, 2023

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.

@exarkun exarkun linked a pull request Jan 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant