lrtable::statetable

Struct Conflicts

Source
pub struct Conflicts<StorageT> { /* private fields */ }

Implementations§

Source§

impl<StorageT: 'static + Hash + PrimInt + Unsigned> Conflicts<StorageT>
where usize: AsPrimitive<StorageT>,

Source

pub fn rr_conflicts( &self, ) -> impl Iterator<Item = &(TIdx<StorageT>, PIdx<StorageT>, PIdx<StorageT>, StIdx<StorageT>)>

Return an iterator over all reduce/reduce conflicts.

Source

pub fn sr_conflicts( &self, ) -> impl Iterator<Item = &(TIdx<StorageT>, PIdx<StorageT>, StIdx<StorageT>)>

Return an iterator over all shift/reduce conflicts.

Source

pub fn rr_len(&self) -> usize

How many reduce/reduce conflicts are there?

Source

pub fn sr_len(&self) -> usize

How many shift/reduce conflicts are there?

Source

pub fn pp(&self, grm: &YaccGrammar<StorageT>) -> String

👎Deprecated since 0.10.1: Please use pp_rr() and pp_sr() instead

Returns a pretty-printed version of the conflicts.

Source

pub fn pp_rr(&self, grm: &YaccGrammar<StorageT>) -> String

Returns a pretty-printed version of the reduce/reduce conflicts.

Source

pub fn pp_sr(&self, grm: &YaccGrammar<StorageT>) -> String

Returns a pretty-printed version of the shift/reduce conflicts.

Trait Implementations§

Source§

impl<'__de, StorageT, __Context> BorrowDecode<'__de, __Context> for Conflicts<StorageT>
where StorageT: BorrowDecode<'__de, __Context>,

Source§

fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given BorrowDecode.
Source§

impl<StorageT: Debug> Debug for Conflicts<StorageT>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<StorageT, __Context> Decode<__Context> for Conflicts<StorageT>
where StorageT: Decode<__Context>,

Source§

fn decode<__D: Decoder<Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>

Attempt to decode this type with the given Decode.
Source§

impl<StorageT> Encode for Conflicts<StorageT>
where StorageT: Encode,

Source§

fn encode<__E: Encoder>(&self, encoder: &mut __E) -> Result<(), EncodeError>

Encode a given type.

Auto Trait Implementations§

§

impl<StorageT> Freeze for Conflicts<StorageT>

§

impl<StorageT> RefUnwindSafe for Conflicts<StorageT>
where StorageT: RefUnwindSafe,

§

impl<StorageT> Send for Conflicts<StorageT>
where StorageT: Send,

§

impl<StorageT> Sync for Conflicts<StorageT>
where StorageT: Sync,

§

impl<StorageT> Unpin for Conflicts<StorageT>
where StorageT: Unpin,

§

impl<StorageT> UnwindSafe for Conflicts<StorageT>
where StorageT: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.