rusty_lr_core 3.39.1

core library for rusty_lr
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub trait TerminalClass: Copy {
    type Term;

    const ERROR: Self;
    const EOF: Self;

    /// Gets the pretty name of this terminal class.
    fn as_str(&self) -> &'static str;

    /// Converts this terminal class to a usize
    fn to_usize(&self) -> usize;

    fn from_term(term: &Self::Term) -> Self;

    fn precedence(&self) -> crate::parser::Precedence;
}