Implement parsing library #8
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
Parsermodule boundaries with interface fileHappy for any input on this direction