pub struct DcgRule {
pub lhs: PrologTerm,
pub rhs: Vec<DcgRhs>,
pub guards: Vec<PrologTerm>,
pub comment: Option<String>,
}Expand description
A DCG (Definite Clause Grammar) rule: lhs --> rhs.
Fields§
§lhs: PrologTermLeft-hand side nonterminal.
rhs: Vec<DcgRhs>Right-hand side: sequence of nonterminals, terminals [token], and pushback notation.
guards: Vec<PrologTerm>Optional Prolog goals in {...}.
comment: Option<String>Optional comment.
Implementations§
Trait Implementations§
impl StructuralPartialEq for DcgRule
Auto Trait Implementations§
impl Freeze for DcgRule
impl RefUnwindSafe for DcgRule
impl Send for DcgRule
impl Sync for DcgRule
impl Unpin for DcgRule
impl UnsafeUnpin for DcgRule
impl UnwindSafe for DcgRule
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