dfajit 0.1.1

JIT compilation of DFA transition tables to native x86_64 jump tables
Documentation
1
2
3
4
5
6
7
8
9
10
use dfajit::JitDfa;
use matchkit::Match;

#[test]
fn test_missing_failure_transitions() {
    let jit = JitDfa::from_patterns(&[b"foo"]).unwrap_or_else(|_| panic!("failed to build DFA"));
    let mut matches = vec![Match::from_parts(0, 0, 0); 10];
    let count = jit.scan(b"ffoo", &mut matches);
    assert_eq!(count, 1);
}