Name Description Size
accel.rs 19992
automaton.rs 91648
dense.rs ! Types and routines specific to dense DFAs. This module is the home of [`dense::DFA`](DFA). This module also contains a [`dense::Builder`](Builder) and a [`dense::Config`](Config) for building and configuring a dense DFA. 214495
determinize.rs 25696
minimize.rs 18026
mod.rs 15978
onepass.rs ! A DFA that can return spans for matching capturing groups. This module is the home of a [one-pass DFA](DFA). This module also contains a [`Builder`] and a [`Config`] for building and configuring a one-pass DFA. 132942
regex.rs ! A DFA-backed `Regex`. This module provides [`Regex`], which is defined generically over the [`Automaton`] trait. A `Regex` implements convenience routines you might have come to expect, such as finding the start/end of a match and iterating over all non-overlapping matches. This `Regex` type is limited in its capabilities to what a DFA can provide. Therefore, APIs involving capturing groups, for example, are not provided. Internally, a `Regex` is composed of two DFAs. One is a "forward" DFA that finds the end offset of a match, where as the other is a "reverse" DFA that find the start offset of a match. See the [parent module](crate::dfa) for examples. 33481
remapper.rs 9958
search.rs 24954
sparse.rs ! Types and routines specific to sparse DFAs. This module is the home of [`sparse::DFA`](DFA). Unlike the [`dense`](super::dense) module, this module does not contain a builder or configuration specific for sparse DFAs. Instead, the intended way to build a sparse DFA is either by using a default configuration with its constructor [`sparse::DFA::new`](DFA::new), or by first configuring the construction of a dense DFA with [`dense::Builder`](super::dense::Builder) and then calling [`dense::DFA::to_sparse`](super::dense::DFA::to_sparse). For example, this configures a sparse DFA to do an overlapping search: ``` use regex_automata::{ dfa::{Automaton, OverlappingState, dense}, HalfMatch, Input, MatchKind, }; let dense_re = dense::Builder::new() .configure(dense::Config::new().match_kind(MatchKind::All)) .build(r"Samwise|Sam")?; let sparse_re = dense_re.to_sparse()?; // Setup our haystack and initial start state. let input = Input::new("Samwise"); let mut state = OverlappingState::start(); // First, 'Sam' will match. sparse_re.try_search_overlapping_fwd(&input, &mut state)?; assert_eq!(Some(HalfMatch::must(0, 3)), state.get_match()); // And now 'Samwise' will match. sparse_re.try_search_overlapping_fwd(&input, &mut state)?; assert_eq!(Some(HalfMatch::must(0, 7)), state.get_match()); # Ok::<(), Box<dyn std::error::Error>>(()) ``` 103249
special.rs 20850
start.rs 2696