pub struct ParserRuntimeOptions<'a> {
pub init_action_rules: &'a [usize],
pub action_indices: &'a [(usize, usize)],
pub track_alt_numbers: bool,
pub predicates: &'a [(usize, usize, ParserPredicate)],
pub semantics: Option<&'a ParserSemantics>,
pub rule_args: &'a [ParserRuleArg],
pub member_actions: &'a [ParserMemberAction],
pub return_actions: &'a [ParserReturnAction],
pub unknown_predicate_policy: UnknownSemanticPolicy,
/* private fields */
}Expand description
Optional generated-runtime metadata for metadata-driven parser execution.
Fields§
§init_action_rules: &'a [usize]Rule indexes whose @init actions should run at rule entry or be
returned for legacy replay when no semantic hook handles them.
action_indices: &'a [(usize, usize)]Stable parser-action indexes keyed by authored ATN source state.
A non-empty table selects committed interpreted execution: mapped actions run at their grammar position instead of being replayed after the complete rule has been recognized.
track_alt_numbers: boolWhether generated parse-tree contexts should retain alternative numbers.
predicates: &'a [(usize, usize, ParserPredicate)]Semantic predicate table keyed by serialized (rule_index, pred_index).
semantics: Option<&'a ParserSemantics>SemIR predicate/action table emitted by newer generated parsers.
rule_args: &'a [ParserRuleArg]Rule-call integer argument table keyed by ATN source state.
member_actions: &'a [ParserMemberAction]Integer member mutations keyed by ATN action source state.
return_actions: &'a [ParserReturnAction]Integer return assignments keyed by ATN action source state.
unknown_predicate_policy: UnknownSemanticPolicyHow to evaluate semantic predicate coordinates absent from
predicates.
Trait Implementations§
Source§impl<'a> Clone for ParserRuntimeOptions<'a>
impl<'a> Clone for ParserRuntimeOptions<'a>
Source§fn clone(&self) -> ParserRuntimeOptions<'a>
fn clone(&self) -> ParserRuntimeOptions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more