package ocamlregextkit

  1. Overview
  2. Docs
A regular expression toolkit for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

ocamlregextkit-1.0.1.tbz
sha256=15cedecc15b217ef7074b0265ce5e8d1a42beb374579d8f3e494185906307ddd
sha512=3e1c50bb0c2b2db77ce3d2aa4f59c66624db5a751e0552415554cb764ba161d005f2b516211e58287fec0daa745fadc936bfd89459a910e5cecdcd31fe96d589

Description

Provides data structures and algorithms for Regular Expressions, Deterministic Finite Automata, and Non-Deterministic Finite Automata

README

A Regular Expression Toolkit

OCamlregextkit is a library providing simple interface to operations on regular expressions, NFAs, and DFAs.

Written in OCaml, using the Dune build system.

Installation

Requires

  • OCaml v4.14.0 or greater

  • Dune v3.4 or greater

See OCaml docs for installation instructions.

Documentation

Find documentation for the toolkit here

Note: all modules are packaged into a single module Regextkit

Demo

For demonstration purposes, demo is a program built using the toolkit which accepts two regular expressions on the command line, and either verifies that they are equivalent or prints a word that matches one expression but not the other.

Build the Library

make

Build the demo

cd demo
make

Run the demo

dune exec ./demo.exe "<regex>" "<regex>"

To test the demo, run

make test

This will run a set of test cases, which checks correctness of basic parsing, equivalence, and difference of two regular expressions.

Testing

The testing directory contains code to profile and run timing tests for equivalence and minimisation of DFAs.

Run make profile or make test to compile and execute the respective function.

Make Targets

  • make Builds the library with dune

  • make clean Removes dune's build directory

  • make doc Generates documentation for the toolkit

Dependencies (2)

  1. dune >= "3.4"
  2. ocaml >= "4.14"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None