The scanner package

[Tags:benchmark, bsd3, library, test]

Parser combinator library designed to be fast. It doesn't support backtracking.

[Skip to Readme]


Versions 0.1, 0.2
Change log
Dependencies base (<5), bytestring [details]
License BSD3
Copyright (c) Yuras Shumovich 2016
Author Yuras Shumovich
Stability Unknown
Category Parsing
Home page
Source repository head: git clone
Uploaded Sun Apr 3 17:52:54 UTC 2016 by YurasShumovich
Distributions LTSHaskell:0.2, NixOS:0.2, Stackage:0.2, Tumbleweed:0.2
Downloads 154 total (18 in the last 30 days)
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for scanner

Readme for scanner-0.2


Fast non-backtracking incremental combinator parsing for bytestrings

Build Status

On hackage:

It is often convinient to use backtracking to parse some sophisticated input. Unfortunately it kills performance, so usually you should avoid backtracking.

Often (actually always, but it could be too hard sometimes) you can implement your parser without any backtracking. It that case all the bookkeeping usuall parser combinators do becomes unnecessary. The scanner library is designed for such cases. It is often 2 times faster then attoparsec.

As an example, please checkout redis protocol parser included into the repo, both using attoparsec and scanner libraries:

Benchmark results:

Bechmark results

But if you really really really need backtracking, then you can just inject attoparsec parser into a scanner: