Trait antlr_rust::error_listener::ErrorListener[][src]

pub trait ErrorListener<'a, T: Recognizer<'a>> {
    fn syntax_error(
        &self,
        _recognizer: &T,
        _offending_symbol: Option<&<T::TF as TokenFactory<'a>>::Inner>,
        _line: isize,
        _column: isize,
        _msg: &str,
        _error: Option<&ANTLRError>
    ) { ... }
fn report_ambiguity(
        &self,
        _recognizer: &T,
        _dfa: &DFA,
        _start_index: isize,
        _stop_index: isize,
        _exact: bool,
        _ambig_alts: &BitSet,
        _configs: &ATNConfigSet
    ) { ... }
fn report_attempting_full_context(
        &self,
        _recognizer: &T,
        _dfa: &DFA,
        _start_index: isize,
        _stop_index: isize,
        _conflicting_alts: &BitSet,
        _configs: &ATNConfigSet
    ) { ... }
fn report_context_sensitivity(
        &self,
        _recognizer: &T,
        _dfa: &DFA,
        _start_index: isize,
        _stop_index: isize,
        _prediction: isize,
        _configs: &ATNConfigSet
    ) { ... } }
Expand description

Describes interface for listening on parser/lexer errors. Should only listen for errors, for processing/recovering from errors use ErrorStrategy

Provided methods

Called when parser/lexer encounter hard error.

The _error is not None for all syntax errors except when we discover mismatched token errors that we can recover from in-line, without returning from the surrounding rule (via the single token insertion and deletion mechanism)

This method is called by the parser when a full-context prediction results in an ambiguity.

This method is called when an SLL conflict occurs and the parser is about to use the full context information to make an LL decision.

This method is called by the parser when a full-context prediction has a unique result.

Implementors