Crate ere_core

Crate ere_core 

Source
Expand description

This crate provides the core functionality to the ere crate.

Modules§

config
dfa_u8
Implements a statically-built DFA over u8s. Executing a DFA is much faster than running an NFA due to dealing with only a single thread. However, since the upper bound of a DFA’s size is exponential in the number of NFA states, we may need to cancel static construction if the DFA becomes too large.
fixed_offset
This is a highly-efficient implementation for regexes where capture groups always have the same offset and the same length (in bytes). This also means the text has a fixed length.
flat_lockstep_nfa
Implements an nfa-like regex engine for over chars. The engine keeps all threads in lockstep (all threads are at the same input index), and the NFA’s epsilon transitions are flattened to a single epsilon transition between symbols (including handling anchors and capture tags).
flat_lockstep_nfa_u8
Implements an nfa-like regex engine for over u8s. The engine keeps all threads in lockstep (all threads are at the same input index), and the NFA’s epsilon transitions are flattened to a single epsilon transition between symbols (including handling anchors and capture tags).
nfa_static
Implements a version of WorkingNFA that can be serialized statically into a binary.
one_pass_u8
This implements an engine for one-pass regexes.
parse_tree
Implements the ERE parser and primitive types (like Atom).
simplified_tree
Implements a simplified intermediate representation of a regular expression.
visualization
Implements visualization features for NFAs. Typically not used outside debug.
working_nfa
Implements the primary compile-time intermediate WorkingNFA structure for optimization.
working_u8_dfa
Working datastructure for a tagged DFA over u8s. Primarily intended for use at compile time, converted from [crate::U8NFA].
working_u8_nfa
Implements u8-based version of crate::working_nfa.

Structs§

Regex
A regular expression (specifically, a POSIX ERE).

Functions§

__compile_regex
Tries to pick the best engine.
__compile_regex_engine_dfa_u8
Always uses the dfa_u8 engine
__compile_regex_engine_fixed_offset
Always uses the fixed_offset
__compile_regex_engine_flat_lockstep_nfa
Always uses the flat_lockstep_nfa engine
__compile_regex_engine_flat_lockstep_nfa_u8
Always uses the flat_lockstep_nfa_u8 engine
__compile_regex_engine_one_pass_u8
Always uses the one_pass_u8
__construct_regex
Intended to be used in macros only.