Skip to main content

Recognizer

Trait Recognizer 

Source
pub trait Recognizer {
    // Required methods
    fn data(&self) -> &RecognizerData;
    fn data_mut(&mut self) -> &mut RecognizerData;

    // Provided methods
    fn grammar_file_name(&self) -> &str { ... }
    fn rule_names(&self) -> &[String] { ... }
    fn channel_names(&self) -> &[String] { ... }
    fn mode_names(&self) -> &[String] { ... }
    fn vocabulary(&self) -> &Vocabulary { ... }
    fn state(&self) -> isize { ... }
    fn set_state(&mut self, state: isize) { ... }
    fn sempred(&mut self, _rule_index: usize, _pred_index: usize) -> bool { ... }
    fn action(&mut self, _rule_index: usize, _action_index: usize) { ... }
}

Required Methods§

Source

fn data(&self) -> &RecognizerData

Source

fn data_mut(&mut self) -> &mut RecognizerData

Provided Methods§

Source

fn grammar_file_name(&self) -> &str

Source

fn rule_names(&self) -> &[String]

Source

fn channel_names(&self) -> &[String]

Source

fn mode_names(&self) -> &[String]

Source

fn vocabulary(&self) -> &Vocabulary

Source

fn state(&self) -> isize

Source

fn set_state(&mut self, state: isize)

Source

fn sempred(&mut self, _rule_index: usize, _pred_index: usize) -> bool

Source

fn action(&mut self, _rule_index: usize, _action_index: usize)

Implementors§

Source§

impl<I, F> Recognizer for BaseLexer<I, F>
where I: CharStream, F: TokenFactory,

Source§

impl<S> Recognizer for BaseParser<S>
where S: TokenSource,