pub type Terminal<'a> = &'a [u8];Expand description
A Terminal, represented as a byte array.
Trait Implementations§
Source§impl<'a> Label<'a> for Terminal<'a>
impl<'a> Label<'a> for Terminal<'a>
Source§fn first_set(
&self,
_: &GLLState<'a>,
) -> ImplementationResult<'a, Vec<(Vec<GLLBlockLabel<'a>>, Option<Terminal<'a>>)>>
fn first_set( &self, _: &GLLState<'a>, ) -> ImplementationResult<'a, Vec<(Vec<GLLBlockLabel<'a>>, Option<Terminal<'a>>)>>
Returns the first-follow set of the label. Read more
Source§fn _first(
&self,
state: &mut GLLState<'a>,
_: &mut HashSet<Rc<str>>,
) -> GLLResult<'a, bool>
fn _first( &self, state: &mut GLLState<'a>, _: &mut HashSet<Rc<str>>, ) -> GLLResult<'a, bool>
Internal method for
Label::first to do the recursive step. Read moreSource§fn code(&self, _: &mut GLLState<'a>) -> GLLResult<'a, ()>
fn code(&self, _: &mut GLLState<'a>) -> GLLResult<'a, ()>
Any code to run when encountering this label. Read more
Source§fn is_terminal(&self) -> bool
fn is_terminal(&self) -> bool
Is this label a terminal? Read more
Source§fn _is_nullable(
&self,
_: &GLLState<'a>,
_: &mut HashSet<Rc<str>>,
) -> ImplementationResult<'a, bool>
fn _is_nullable( &self, _: &GLLState<'a>, _: &mut HashSet<Rc<str>>, ) -> ImplementationResult<'a, bool>
Internal method for
Label::is_nullable to do the recursive step. Read moreSource§fn str_parts(&self) -> Vec<&str>
fn str_parts(&self) -> Vec<&str>
The chunk represented by
Label::to_string, but split by symbol into a vector.Source§fn attr_rep_map(&self) -> (Vec<&str>, Vec<&str>)
fn attr_rep_map(&self) -> (Vec<&str>, Vec<&str>)
A tuple of string representations for any associated attributes. Read more
Source§fn _weight(
&self,
_state: &GLLState<'a>,
) -> Option<ImplementationResult<'a, Value<'a>>>
fn _weight( &self, _state: &GLLState<'a>, ) -> Option<ImplementationResult<'a, Value<'a>>>
Optionally return the weight of this label. Read more
Source§fn first(&self, state: &mut GLLState<'a>) -> GLLResult<'a, bool>
fn first(&self, state: &mut GLLState<'a>) -> GLLResult<'a, bool>
Check if the next token in the current state is accepted by this label’s first-follow set. Read more
Source§fn is_nullable(&self, state: &GLLState<'a>) -> ImplementationResult<'a, bool>
fn is_nullable(&self, state: &GLLState<'a>) -> ImplementationResult<'a, bool>
Could this label resolve to epsilon? Read more