-
Notifications
You must be signed in to change notification settings - Fork 51
v7 proposals #118
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
Comments
@paf31 introduces What kind of representations? The only thing I can think of is something like |
We should combine parsing and string-parsers #69 |
Here's a parsing monad. Here's a CPS purescript parsing monad Adapted from https://github.com/jonascarpay/alloy/blob/master/src/Parser/Parsec.hs Adapted from Parsec. |
I would want this library to be as full-featured as possible, and to have these properties (which we mostly already have):
Node.js only supports UTF-16 Little-Endian https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings |
The purescript-string-parsers
A better design would be to
purescript-contrib/purescript-string-parsers#48 We could use this Or actually the |
Actually, maybe there is no performance improvement to be had with a cursor-based parser state? |
Instructions for how to parse a Also support the opposite case, with a |
More package properties
|
purescript-parsing/src/Text/Parsing/Parser.purs Lines 104 to 110 in 297ad9e
I think the purpose of the
https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/parsec-paper-letter.pdf p.11 Except the way that I read this |
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.
String
parsers, instead of a state which tracks “the remaining input”.Do we need the
Boolean
“consumed flag” in theParseState
? As far as I can tell this is set but never tested. Nothing cares what the “consumed flag” value is?Position
zero-based. Position line and column should start at zero #94Text.Parsing.Parser.Combinators
manyTill
,many1Till_
manyTill_ combinator #108Text.Parsing.Parser.String
CodePoint
instead ofCodeUnit
. CodePoints uncons? Deprecate drop? #109StringLike
typeclass. Has anyone ever created an instance of this class for a type other thanString
?match
match combinator #107Text.Parsing.Parser.DataView
DataView
parsing to this package? Merge this repo into purescript-parsing? rowtype-yoga/purescript-parsing-dataview#10Module names
Text.
prefix from all module names.The text was updated successfully, but these errors were encountered: