AndrasKovacs / AndrasKovacs/flatparse
Include batteries
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 178
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
The idea is to have a TH-configurable interface that covers a lot of needed features in PL parsing. The inputs could be the following:
- Identifier parsing: first character, rest of characters.
- Whitespace characters.
- Comments, line/multiline, nestedness.
- List of keywords.
- Type of errors, rendering possibly custom or configurable.
Output:
- Identifier parser, keyword parser, whitespace parser, token combinator.
- Functions for error handling.
switchfunction that automatically handles keyword/identifier disambiguation and tokenization. For example, if I switch on "let", I don't want to manually cover the case where we actually have an identifier that has "let" as prefix. This should be handled at compile time, by using the user-provided functions for identifier/keyword parsing. The source spans of switched things should be also made accessible in a concise way.
There could be two flavors of batteries, one for Basic without indentation tracking an another for Stateful with it. There should be at least a larger PL benchmark too that uses our batteries. That could also serve as tutorial.
I'm interested in suggestions about what kind of features could be included in the batteries.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. First inspect the existing parser API and determine how the proposed Basic and Stateful batteries would fit; completion would require an agreed feature scope, implementations for the listed parsing and error-handling capabilities, and a PL benchmark or tutorial.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100