gregex 0.5.0

Regex solver utilizing NFA
Documentation

Gregex crates.io Build Passing

Gregex is a regular expression solver which utilizes Non-deterministic Finite Automata (NFA) to simulate the input strings.

Usage

extern crate gregex;
use gregex::*;
fn main() {
    let tree = concatenate!(production!(terminal('a')), terminal('b'), terminal('c'));
    let regex = regex(&tree);
    assert!(regex.simulate("abc"));
    assert!(!regex.simulate("a"));
    assert!(regex.simulate("aaabc"));
}

Theory

The project uses Glushkov's construction algorithm for creating the NFA.

The pipeline can be summarised as below