Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Fast, applicative, streaming regular expressions for Haskell

This repository contains a set of libraries for constructing functions on regular languages.

The core type, Data.Regex.Poly.RE s a, is function from a regular language over s to a. RE's are composed in the applicative style. Primitives include what you would expect from a regular expression library, plus some uncommon but useful ones, such as complement and intersect.

A slow but easy to use API is implemented using regular expression derivatives. A fast but memory-hungry API is implemented using DFA's. An in-progress API will use an NFA-like "virtual machine" [1] for a balance of speed, memory efficiency, and convenience.

I'm working on implementing a memory-efficient streaming approach to matching. Work towards that goal can be found in ./regl-conduit.

See ./regl-demo for some examples.

Credit

Some ideas and modules are borrowed from cacay/regexp.

Further ideas are borrowed from regex-applicative.

Some combinators are taken from attoparsec and parsers.

References

[1] https://swtch.com/~rsc/regexp/regexp2.html

About

Fast, applicative, streaming regular expressions for Haskell

Resources

License

Releases

No releases published

Packages

No packages published