Skip to main content

vyre_std/pattern/
mod.rs

1//! Pattern matching operations.
2//!
3//! The pattern family holds the vyre-std DFA assembly pipeline:
4//!
5//! ```text
6//! regex_to_nfa → Nfa → nfa_to_dfa → Dfa → dfa_minimize → Dfa → dfa_pack → PackedDfa
7//! ```
8//!
9//! Aho-Corasick construction for literal-pattern sets is a planned
10//! companion primitive; see
11//! `coordination/L.1.4-aho_corasick_build-rewrite-deferred.md` for the
12//! rewrite owed against the new `pattern::types` abstractions.
13
14/// Shared types used by every stage of the DFA assembly pipeline.
15pub mod types;
16
17/// Thompson-construction regex → NFA compiler.
18pub mod regex_to_nfa;
19
20/// Subset-construction NFA → DFA converter.
21pub mod nfa_to_dfa;
22
23/// Hopcroft's DFA minimization.
24pub mod dfa_minimize;
25
26/// Transition-table packing for GPU dispatch.
27pub mod dfa_pack;
28
29/// Composite entry point: patterns → packed GPU DFA in one call.
30pub mod dfa_assemble;
31
32/// Content-addressed DFA compilation cache (skip the pipeline on repeat calls).
33pub mod cache;
34
35pub use dfa_assemble::{dfa_assemble, AssembleOptions, Pattern};
36pub use dfa_minimize::dfa_minimize;
37pub use dfa_pack::{dfa_pack, dfa_unpack};
38pub use nfa_to_dfa::nfa_to_dfa;
39pub use regex_to_nfa::regex_to_nfa;
40pub use types::{
41    Dfa, DfaPackFormat, Nfa, NfaEdge, NfaStateId, PackedDfa, PatternError, INVALID_STATE,
42};