pub trait Parser: Recognizer {
// Required methods
fn build_parse_trees(&self) -> bool;
fn set_build_parse_trees(&mut self, build: bool);
// Provided methods
fn report_diagnostic_errors(&self) -> bool { ... }
fn set_report_diagnostic_errors(&mut self, _report: bool) { ... }
fn prediction_mode(&self) -> PredictionMode { ... }
fn set_prediction_mode(&mut self, _mode: PredictionMode) { ... }
}Required Methods§
Sourcefn build_parse_trees(&self) -> bool
fn build_parse_trees(&self) -> bool
Reports whether generated parser rules should build parse-tree nodes while recognizing input.
Sourcefn set_build_parse_trees(&mut self, build: bool)
fn set_build_parse_trees(&mut self, build: bool)
Enables or disables parse-tree construction for subsequent rule calls.
Provided Methods§
Sourcefn report_diagnostic_errors(&self) -> bool
fn report_diagnostic_errors(&self) -> bool
Reports whether prediction diagnostic-listener messages are emitted during parser ATN recognition.
Sourcefn set_report_diagnostic_errors(&mut self, _report: bool)
fn set_report_diagnostic_errors(&mut self, _report: bool)
Enables or disables ANTLR-style prediction diagnostics for subsequent rule calls.
Sourcefn prediction_mode(&self) -> PredictionMode
fn prediction_mode(&self) -> PredictionMode
Reports the prediction strategy used when selecting among alternatives.
Sourcefn set_prediction_mode(&mut self, _mode: PredictionMode)
fn set_prediction_mode(&mut self, _mode: PredictionMode)
Sets the prediction strategy for subsequent rule calls.