pub type Regex<S> = Regex<Default<S>>;
Expand description
Regular expressions over symbols of the given alphabet.
Aliased Type§
pub enum Regex<S> {
EmptySet,
EmptyString,
Symbol(<ApproximatelySimilarCanonical<S> as Builder>::Symbol),
Concat(Box<Regex<ApproximatelySimilarCanonical<S>>>, Box<Regex<ApproximatelySimilarCanonical<S>>>),
Closure(Box<Regex<ApproximatelySimilarCanonical<S>>>),
Or(Box<Regex<ApproximatelySimilarCanonical<S>>>, Box<Regex<ApproximatelySimilarCanonical<S>>>),
And(Box<Regex<ApproximatelySimilarCanonical<S>>>, Box<Regex<ApproximatelySimilarCanonical<S>>>),
Complement(Box<Regex<ApproximatelySimilarCanonical<S>>>),
}
Variants§
EmptySet
The empty set ∅
EmptyString
The empty string ε
Symbol(<ApproximatelySimilarCanonical<S> as Builder>::Symbol)
A symbol s
Concat(Box<Regex<ApproximatelySimilarCanonical<S>>>, Box<Regex<ApproximatelySimilarCanonical<S>>>)
Concatenation R S
Closure(Box<Regex<ApproximatelySimilarCanonical<S>>>)
Closure R*
Or(Box<Regex<ApproximatelySimilarCanonical<S>>>, Box<Regex<ApproximatelySimilarCanonical<S>>>)
Disjunction R | S
And(Box<Regex<ApproximatelySimilarCanonical<S>>>, Box<Regex<ApproximatelySimilarCanonical<S>>>)
Conjunction R & R
Complement(Box<Regex<ApproximatelySimilarCanonical<S>>>)
Complement ¬R
Implementations
Source§impl<S: Alphabet> Regex<ApproximatelySimilarCanonical<S>>
impl<S: Alphabet> Regex<ApproximatelySimilarCanonical<S>>
Sourcepub fn to_automaton(&self) -> FiniteAutomaton<S>
pub fn to_automaton(&self) -> FiniteAutomaton<S>
Returns a finite automaton for this regular expression.
Source§impl<B: Builder> Regex<B>
impl<B: Builder> Regex<B>
pub fn empty_set() -> Self
pub fn empty_string() -> Self
pub fn symbol(value: B::Symbol) -> Self
pub fn closure(inner: Self) -> Self
pub fn concat(left: Self, right: Self) -> Self
pub fn or(left: Self, right: Self) -> Self
pub fn and(left: Self, right: Self) -> Self
pub fn complement(inner: Self) -> Self
Source§impl<B: Builder> Regex<B>
impl<B: Builder> Regex<B>
Sourcepub fn derive_iter<I>(&self, symbols: impl IntoIterator<Item = I>) -> Regex<B>
pub fn derive_iter<I>(&self, symbols: impl IntoIterator<Item = I>) -> Regex<B>
Returns the derivative of this regular expression w.r.t. the given symbols.