aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 14919f2aac3c1f0d4c1f1e825e43c4fe3a1579f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod nfa;
mod regex;
use nfa::*;
use regex::*;

fn test(regex: &str, input: &str) -> bool {
    let regex = Regex::new(regex);
    println!("{:#?}", regex);
    let nfa = NFA::from(regex);
    nfa.matches(input)
}

fn main() {
    dbg!(test("aa*", "aa   "));
}