Description
Here are some things I would like to see in v7 of this package.
The target design space for this package should be similar to MegaParsec: intended for users who prefer correctness and feature-completeness to speed. Anyone who wants speed in a V8 runtime environment will use the built-in Regex.
Text.Parsing.Parser
purescript-parsing/src/Text/Parsing/Parser.purs
Lines 52 to 53 in d085e37
Change the definition of ParseState
so that we can have cursor-based state in parsers, and so that line-column state is optional.
Tracking the newline-based line and column position is an important feature but it’s expensive and rarely-used. I would like to try to make that optional.
- I'd like to switch to a cursor-based state for
String
parsers, instead of a state which tracks “the remaining input”.
Do we need the Boolean
“consumed flag” in the ParseState
? As far as I can tell this is set but never tested. Nothing cares what the “consumed flag” value is?
- Make the
Position
zero-based. Position line and column should start at zero #94
data ParseState s state = ParseState s state
Text.Parsing.Parser.Combinators
- Add combinators
manyTill
,many1Till_
manyTill_ combinator #108
Text.Parsing.Parser.String
- UTF-16 correctness. We should always handle UTF-16 surrogate paris correctly, and that means always treating token as
CodePoint
instead ofCodeUnit
. CodePoints uncons? Deprecate drop? #109 - Delete the
StringLike
typeclass. Has anyone ever created an instance of this class for a type other thanString
? - Add combinator
match
match combinator #107
Text.Parsing.Parser.DataView
- Add
DataView
parsing to this package? Merge this repo into purescript-parsing? rowtype-yoga/purescript-parsing-dataview#10
Module names
- Remove the
Text.
prefix from all module names.