Skip to content

Conversation

@joshcbrown
Copy link
Contributor

We're using parser-combinator-y methods already to allow parsing across module boundaries. It would be nice to consolidate this with a combinator library that can keep track of global source position and abstract away the nitty-gritty details of current methods.

My main consideration here is that I want the library to be opt-in, such that if it feels too heavyweight you can just code a parser directly. A corollary of this is that migrating existing logic should be really easy (though some changes will definitely be necessary).

So far, I've laid the foundation and implemented a POC parser for SExp. The logic is pleasingly simple compared to the current parser.

The main things to do from here are:

  • Improve error messages from parser. Annotate source in error a la Rust, Elm etc.
  • Settle on new parsing signature, make method to lift existing code into new signature
  • Solidify Parser module boundaries with interface file

Happy for any input on this direction

@joshcbrown joshcbrown marked this pull request as draft September 29, 2025 00:17
@liamoc liamoc marked this pull request as ready for review October 7, 2025 03:14
@joshcbrown joshcbrown marked this pull request as draft October 7, 2025 03:14
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 this pull request may close these issues.

1 participant