Expand description
Types and routines specific to lazy DFAs.
This module is the home of hybrid::dfa::DFA
.
This module also contains a hybrid::dfa::Builder
and a
hybrid::dfa::Config
for configuring and building a lazy DFA.
Structsยง
- Builder
- A builder for constructing a lazy deterministic finite automaton from regular expressions.
- Cache
- A cache represents a partially computed DFA.
- Config
- The configuration used for building a lazy DFA.
- DFA
- A hybrid NFA/DFA (also called a โlazy DFAโ) for regex searching.
- Lazy ๐
- A type that groups methods that require the base NFA/DFA and writable access to the cache.
- LazyRef ๐
- A type that groups methods that require the base NFA/DFA and read-only access to the cache.
- Overlapping
State - Represents the current state of an overlapping search.
- Search
Progress ๐ - Keeps track of the progress of the current search.
Enumsยง
- State
Saver ๐ - A simple type that encapsulates the saving of a state ID through a cache clearing.
Constantsยง
- MIN_
STATES ๐ - The minimum number of states that a lazy DFAโs cache size must support.
- SENTINEL_
STATES ๐ - The number of โsentinelโ states that get added to every lazy DFA.
Functionsยง
- minimum_
cache_ ๐capacity - Based on the minimum number of states required for a useful lazy DFA cache, this returns a heuristic minimum number of bytes of heap space required.
- minimum_
lazy_ ๐state_ id - Based on the minimum number of states required for a useful lazy DFA cache, this returns the minimum lazy state ID that must be representable.
- skip_
empty_ ๐utf8_ splits_ overlapping - Runs the given overlapping
search
function (forwards or backwards) until a match is found whose offset does not split a codepoint.
Type Aliasesยง
- State
Map ๐ - A map from states to state identifiers. When using std, we use a standard hashmap, since itโs a bit faster for this use case. (Other maps, like oneโs based on FNV, have not yet been benchmarked.)