2 points | by akgitrepos 4 hours ago ago
1 comments
Built a small regex engine in Rust and would love feedback from people who’ve implemented/search-optimized regex before.
- Thompson NFA core (no recursive backtracking engine) - Bounded lazy transition cache for repeated scans - v1 supports: literals, ., concat, |, * + ?, grouping, classes/ranges, \d \w \s \t \n, ^ $ - APIs: compile, is_match, find_first, find_all - Contract-style conformance tests + microbenchmarks included
Repo: https://github.com/akgitrepos/regex-engine-rust
Curious where you’d take it next: captures first, Unicode semantics, or deeper DFA optimization?
Built a small regex engine in Rust and would love feedback from people who’ve implemented/search-optimized regex before.
- Thompson NFA core (no recursive backtracking engine) - Bounded lazy transition cache for repeated scans - v1 supports: literals, ., concat, |, * + ?, grouping, classes/ranges, \d \w \s \t \n, ^ $ - APIs: compile, is_match, find_first, find_all - Contract-style conformance tests + microbenchmarks included
Repo: https://github.com/akgitrepos/regex-engine-rust
Curious where you’d take it next: captures first, Unicode semantics, or deeper DFA optimization?