Implement bead 7.8.2: Build the per-search matcher from GrepArgs. Compile PATTERN into either a literal Aho-Corasick automaton (-F mode, default) or a regex::Regex (-E mode). Apply -i (case-insensitive) and -w (word-boundary) wrappers. Provide a uniform Matcher::find_iter(text) -> Iter<MatchRange> API used by the per-span matcher. Key changes: - Add aho-corasick dependency for fast literal matching - Create grep/matcher.rs with MatchRange and Matcher enum - Reorganize grep.rs -> grep/mod.rs for proper module structure - Implement literal mode with Aho-Corasick automaton - Implement regex mode with regex::Regex - Support case-insensitive matching in both modes - Support word-boundary matching (\b anchors for regex, post-match check for literal) - Comprehensive unit tests for all modes and edge cases Closes: pdftract-ixzbg |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| build.rs | ||
| Cargo.toml | ||
| pdftract-cli.cdx.json | ||