Gregex is a regular expression solver which utilizes Non-deterministic Finite Automata (NFA) to simulate the input strings.
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"));
}
The project uses Glushkov's construction algorithm for creating the NFA.