#[non_exhaustive]pub enum Parser<I: Clone + Ord> {
Immediate(Graph<I>),
Postponed,
PostponedReference(*const Self),
Or(Box<Self>, Box<Self>),
ShrEps(Box<Self>, Box<Self>),
ShrNonEps(Box<Self>, (I, Option<&'static str>, Box<Self>)),
Repeat(Box<Self>),
}Expand description
Unevaluated binary operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Immediate(Graph<I>)
NFA already made.
Postponed
NFA promised.
PostponedReference(*const Self)
NFA promised.
Or(Box<Self>, Box<Self>)
Either one NFA or another, in parallel.
ShrEps(Box<Self>, Box<Self>)
One then an epsilon transition to another.
ShrNonEps(Box<Self>, (I, Option<&'static str>, Box<Self>))
One then a non-epsilon transition (on a particular token) to another.
Repeat(Box<Self>)
Repeat an NFA.
Implementations§
Source§impl<I: Clone + Ord> Lazy<I>
impl<I: Clone + Ord> Lazy<I>
Sourcepub fn finally(&mut self, value: Self)
pub fn finally(&mut self, value: Self)
Define a postponed value.
§Panics
If this value was already defined or if the definition is still postponed.
Trait Implementations§
Source§impl<I: Ord + Clone + Ord> Ord for Lazy<I>
impl<I: Ord + Clone + Ord> Ord for Lazy<I>
Source§impl<I: PartialOrd + Clone + Ord> PartialOrd for Lazy<I>
impl<I: PartialOrd + Clone + Ord> PartialOrd for Lazy<I>
impl<I: Eq + Clone + Ord> Eq for Lazy<I>
impl<I: Clone + Ord> StructuralPartialEq for Lazy<I>
Auto Trait Implementations§
impl<I> Freeze for Lazy<I>where
I: Freeze,
impl<I> RefUnwindSafe for Lazy<I>where
I: RefUnwindSafe,
impl<I> !Send for Lazy<I>
impl<I> !Sync for Lazy<I>
impl<I> Unpin for Lazy<I>where
I: Unpin,
impl<I> UnwindSafe for Lazy<I>where
I: UnwindSafe + RefUnwindSafe,
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