pub struct FeatureParseOptions {
pub grammar_name: Option<String>,
pub global_concept_space: Option<Value>,
pub start_rule: Option<String>,
pub max_depth: Option<usize>,
pub step_limit: Option<usize>,
pub memo_limit: Option<usize>,
pub memory_limit: Option<usize>,
pub reject_ambiguity: Option<bool>,
pub accept_recovery: Option<bool>,
pub error_recovery: Option<bool>,
pub max_repairs: Option<usize>,
pub decorators: DecoratorSet,
}Expand description
The limits and policies of a parse. Every field left None keeps the
value the parser was compiled with, and then the default.
Fields§
§grammar_name: Option<String>Explicit root grammar identity for a stored qualified invocation.
global_concept_space: Option<Value>Existing checked global concept space, including definitions and origins.
start_rule: Option<String>The rule to parse from instead of the grammar’s start rule.
max_depth: Option<usize>The bound on nested rule calls (default 1000).
step_limit: Option<usize>The bound on evaluation steps (default 100000 + 1000 * input length,
twice that with error recovery).
memo_limit: Option<usize>The bound on memoized rule calls (default 1000000).
memory_limit: Option<usize>The memory budget of the whole parse, its runs, repair rounds and
embedded languages included, in memo cells: one per rule call recorded
and one per result such a call keeps, counted and never released.
Fixed lexical cache cells also count while retained; those optional
entries may be discarded to free space (default 2000000). A parse
whose rule cells need more is rejected with memoryBudget.
reject_ambiguity: Option<bool>Whether a reported ambiguity rejects the input (default false).
accept_recovery: Option<bool>Whether a tree with ERROR or MISSING nodes is accepted (default false).
error_recovery: Option<bool>Whether a failed parse is repaired into a tree with ERROR or MISSING nodes instead of rejected without a tree (default false).
max_repairs: Option<usize>The bound on repair points of automatic recovery (default 32).
decorators: DecoratorSetDecorators of the grammar-rule level, applied to the grammar a
parser is compiled from, and of the executor and recovery levels,
applied to every tree (see decorate_syntax_tree). An empty set
keeps the decorators the parser was compiled with.
Trait Implementations§
Source§impl Clone for FeatureParseOptions
impl Clone for FeatureParseOptions
Source§impl Debug for FeatureParseOptions
impl Debug for FeatureParseOptions
Source§impl Default for FeatureParseOptions
impl Default for FeatureParseOptions
impl Eq for FeatureParseOptions
Source§impl PartialEq for FeatureParseOptions
impl PartialEq for FeatureParseOptions
impl StructuralPartialEq for FeatureParseOptions
Auto Trait Implementations§
impl Freeze for FeatureParseOptions
impl RefUnwindSafe for FeatureParseOptions
impl Send for FeatureParseOptions
impl Sync for FeatureParseOptions
impl Unpin for FeatureParseOptions
impl UnsafeUnpin for FeatureParseOptions
impl UnwindSafe for FeatureParseOptions
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more