pub enum Regex<B: Builder> {
EmptySet,
EmptyString,
Symbol(B::Symbol),
Concat(Box<Self>, Box<Self>),
Closure(Box<Self>),
Or(Box<Self>, Box<Self>),
And(Box<Self>, Box<Self>),
Complement(Box<Self>),
}
Expand description
Data type describing regular expressions.
Variants§
EmptySet
The empty set ∅
EmptyString
The empty string ε
Symbol(B::Symbol)
A symbol s
Concat(Box<Self>, Box<Self>)
Concatenation R S
Closure(Box<Self>)
Closure R*
Or(Box<Self>, Box<Self>)
Disjunction R | S
And(Box<Self>, Box<Self>)
Conjunction R & R
Complement(Box<Self>)
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.
Trait Implementations§
impl<B: Eq + Builder> Eq for Regex<B>
impl<B: Builder> StructuralPartialEq for Regex<B>
Auto Trait Implementations§
impl<B> Freeze for Regex<B>
impl<B> RefUnwindSafe for Regex<B>
impl<B> Send for Regex<B>
impl<B> Sync for Regex<B>
impl<B> Unpin for Regex<B>
impl<B> UnwindSafe for Regex<B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, T> IntoClosure<S> for Twhere
S: Alphabet,
T: IntoClosure<ApproximatelySimilarCanonical<S>>,
impl<S, T> IntoClosure<S> for Twhere
S: Alphabet,
T: IntoClosure<ApproximatelySimilarCanonical<S>>,
fn c(self) -> Regex<ApproximatelySimilarCanonical<S>>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more