package ocamlregextkit
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=8edee54b513ce6320296e1f6723a4359a80c4fa759d2cd6c91594dd8a6b1c2a0
sha512=f2a00da2dd7d6aa9b212b2dd252f2b09c407375884d19bc94512ea258281cee783b3716460f02ce550f779f7f19ddbf7dfec70577f3b93abae7ccfe0f9e29477
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 dunemake clean
Removes dune's build directorymake doc
Generates documentation for the toolkit