Settings

Theme

Regex engine in Rust (Thompson NFA and bounded lazy DFA cache)

github.com

2 points by akgitrepos 6 days ago · 1 comment

Reader

akgitreposOP 6 days ago

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?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection