Struct ExprSet
pub struct ExprSet { /* private fields */ }
Implementations§
§impl ExprSet
impl ExprSet
pub fn new(alphabet_size: usize) -> ExprSet
pub fn set_pp(&mut self, pp: PrettyPrinter)
pub fn pp(&self) -> &PrettyPrinter
pub fn cost(&self) -> u64
pub fn expr_to_string(&self, id: ExprRef) -> String
pub fn expr_to_string_with_info(&self, id: ExprRef) -> String
pub fn alphabet_size(&self) -> usize
pub fn alphabet_words(&self) -> usize
pub fn len(&self) -> usize
pub fn num_bytes(&self) -> usize
pub fn get(&self, id: ExprRef) -> Expr<'_>
pub fn is_valid(&self, id: ExprRef) -> bool
pub fn lookahead_len(&self, e: ExprRef) -> Option<usize>
pub fn possible_lookahead_len(&self, e: ExprRef) -> usize
pub fn get_flags(&self, id: ExprRef) -> ExprFlags
pub fn get_tag(&self, id: ExprRef) -> ExprTag
pub fn get_args(&self, id: ExprRef) -> &[ExprRef]
pub fn is_nullable(&self, id: ExprRef) -> bool
pub fn is_positive(&self, id: ExprRef) -> bool
pub fn simple_map<V>(
&mut self,
r: ExprRef,
process: impl FnMut(&mut ExprSet, Vec<V>, ExprRef) -> V,
) -> Vwhere
V: Clone,
pub fn map<K, V>( &mut self, r: ExprRef, cache: &mut HashMap<K, V>, concat_nullable_check: bool, mk_key: impl Fn(ExprRef) -> K, process: impl FnMut(&mut ExprSet, Vec<V>, ExprRef) -> V, ) -> V
§impl ExprSet
impl ExprSet
pub fn byte_set_from_byte(&self, b: u8) -> Vec<u32>
pub fn mk_byte(&mut self, b: u8) -> ExprRef
pub fn mk_byte_set(&mut self, s: &[u32]) -> ExprRef
pub fn mk_prefixes(&mut self, e: ExprRef) -> ExprRef
pub fn mk_repeat(&mut self, e: ExprRef, min: u32, max: u32) -> ExprRef
pub fn mk_or(&mut self, args: Vec<ExprRef>) -> ExprRef
pub fn mk_byte_set_not(&mut self, x: ExprRef) -> ExprRef
pub fn mk_byte_set_or(&mut self, args: &[ExprRef]) -> ExprRef
pub fn mk_byte_set_neg_or(&mut self, args: &[ExprRef]) -> ExprRef
pub fn mk_byte_set_and(&mut self, aa: ExprRef, bb: ExprRef) -> ExprRef
pub fn mk_byte_set_sub(&mut self, aa: ExprRef, bb: ExprRef) -> ExprRef
pub fn mk_and(&mut self, args: Vec<ExprRef>) -> ExprRef
pub fn mk_concat(&mut self, args: Vec<ExprRef>) -> ExprRef
pub fn mk_byte_literal(&mut self, s: &[u8]) -> ExprRef
pub fn mk_literal(&mut self, s: &str) -> ExprRef
pub fn mk_not(&mut self, e: ExprRef) -> ExprRef
pub fn mk_lookahead(&mut self, e: ExprRef, offset: u32) -> ExprRef
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExprSet
impl RefUnwindSafe for ExprSet
impl Send for ExprSet
impl Sync for ExprSet
impl Unpin for ExprSet
impl UnwindSafe for ExprSet
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
Converts
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> ⓘ
Converts
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