pub enum DcgRhs {
NonTerminal(PrologTerm),
Terminals(Vec<PrologTerm>),
Epsilon,
Goal(Vec<PrologTerm>),
Disjunction(Vec<DcgRhs>, Vec<DcgRhs>),
Seq(Vec<DcgRhs>),
}Expand description
Right-hand side element of a DCG rule.
Variants§
NonTerminal(PrologTerm)
A nonterminal call.
Terminals(Vec<PrologTerm>)
A terminal list [a, b, c].
Epsilon
An epsilon (empty string) — written [].
Goal(Vec<PrologTerm>)
A Prolog goal {Goal1, Goal2}.
Disjunction(Vec<DcgRhs>, Vec<DcgRhs>)
A disjunction (A | B).
Seq(Vec<DcgRhs>)
A pushback notation A, B sequence.
Trait Implementations§
impl StructuralPartialEq for DcgRhs
Auto Trait Implementations§
impl Freeze for DcgRhs
impl RefUnwindSafe for DcgRhs
impl Send for DcgRhs
impl Sync for DcgRhs
impl Unpin for DcgRhs
impl UnsafeUnpin for DcgRhs
impl UnwindSafe for DcgRhs
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