parsnip
Version 0 revision 0 uploaded by EdwardKmett.
Package meta
- Synopsis
- A fast, minimal parser
- Description
A fast, minimal parser.
parsnip
parses null-terminated input strings with an absolute minimum of internal state. It copies the input to a c string and works its way through hand-over-hand with just anAddr#
as the internal state.It uses
reflection
-like tricks to lift the input ByteString into a constraint that is then passed to just the combinators that need access to it to compute position, snip out slices of the original, or ask the number of bytes remaining, but none of the monadic combinators nor simple satisfy or eof predicates need access to this information.Because of the null-termination, we can't assume that we can handle binary inputs, but this works well for text-based source languages.
- Author
- Edward Kmett
- Bug reports
- n/a
- Category
- Graphics
- Copyright
- Copyright (c) 2019-2021 Edward Kmett
- Homepage
- https://github.com/ekmett/codex/tree/master/parsnip#readme
- Maintainer
- Edward Kmett <ekmett@gmail.com>
- Package URL
- n/a
- Stability
- experimental