package ocamlregextkit

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

Install

Dune Dependency

Authors

Maintainers

Sources

ocamlregextkit-1.0.2.tbz
sha256=801dd74f3ac269a33015d0c56b4a400fbfec15a68637775caacde1f377d802f2
sha512=7ac6ba274f2420f5066b722ee1d3d6e1ba8f967c91fdbc5b8d92c54b5753f6166b398b687de47328a30f4c822eff8167fef11e8f3b26d04d96f07f7f32238f97

README.md.html

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

OCaml

Innovation. Community. Security.