diff options
Diffstat (limited to 'chain/src/item/mod.rs')
-rw-r--r-- | chain/src/item/mod.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chain/src/item/mod.rs b/chain/src/item/mod.rs index f8e0aa0..5efa710 100644 --- a/chain/src/item/mod.rs +++ b/chain/src/item/mod.rs @@ -21,11 +21,15 @@ use core::borrow::Borrow; /// A virtual segment represents an expansion from a non-terminal by a /// terminal. We do not directly add this segment when we encounter /// this expansion at the start because this expansion might contain -/// multiple derivations some of which will not be used. +/// multiple derivations some of which might not be used. /// /// If we add the expansion immediately when we encounter it, we have /// to later discern and delete those unwanted derivations. This is -/// asking for trouble, in my experiences. +/// asking for trouble, as I learned from experiences. +/// +/// # Empty +/// +/// Also this might be empty if it represents the root node. #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default)] pub enum PaVi { /// An edge from a node, as the n-th child. @@ -35,8 +39,8 @@ pub enum PaVi { /// /// # Tuple elements /// - /// The contained tuple is of the form (nt, t, node), which means - /// a virtually added node at the `node` representing the + /// The contained tuple is of the form `(nt, t, node)` , which + /// means a virtually added node at the `node` representing the /// expansion from the non-terminal `nt` by the terminal `t`. Virtual(usize, usize, usize), /// This is an empty segment that represents the root node. This |