scanner: Fast non-backtracking incremental combinator parsing for bytestrings

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

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


[Skip to Readme]

Properties

Versions 0.1, 0.2, 0.3, 0.3, 0.3.1
Change log changelog.md
Dependencies base (<5), bytestring [details]
License BSD-3-Clause
Copyright (c) Yuras Shumovich 2016
Author Yuras Shumovich
Maintainer shumovichy@gmail.com
Category Parsing
Home page https://github.com/Yuras/scanner
Source repo head: git clone git@github.com:Yuras/scanner.git
Uploaded by YurasShumovich at 2018-08-13T10:21:36Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for scanner-0.3

[back to package description]

scanner

Fast non-backtracking incremental combinator parsing for bytestrings

Build Status

On hackage: http://hackage.haskell.org/package/scanner

On stackage: https://www.stackage.org/package/scanner

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: https://github.com/Yuras/scanner/tree/master/examples/Redis

Benchmark results:

Bechmark results

But if you really really really need backtracking, then you can just inject attoparsec parser into a scanner: http://hackage.haskell.org/package/scanner-attoparsec