Skip to main content

RegexBuilder

Struct RegexBuilder 

Source
pub struct RegexBuilder {
    pub lookahead_context_max: u32,
    /* private fields */
}

Fields§

§lookahead_context_max: u32

maximum lookahead context distance before returning AnchorLimit.

Implementations§

Source§

impl RegexBuilder

Source

pub fn new() -> RegexBuilder

Source

pub fn solver_ref(&self) -> &Solver

Source

pub fn solver(&mut self) -> &mut Solver

Source

pub fn get_tregex(&self, inst: TRegexId) -> &TRegex<TSetId>

Source

pub fn get_nulls( &mut self, pending_rel: u32, mask: Nullability, acc: &mut BTreeSet<NullState>, node_id: NodeId, )

Source

pub fn der( &mut self, node_id: NodeId, mask: Nullability, ) -> Result<TRegexId, AlgebraError>

Source

pub fn num_nodes(&self) -> u32

Source

pub fn get_kind(&self, node_id: NodeId) -> Kind

Source

pub fn strip_lb(&mut self, node_id: NodeId) -> Result<NodeId, AlgebraError>

Source

pub fn reverse(&mut self, node_id: NodeId) -> Result<NodeId, AlgebraError>

Source

pub fn mk_compl(&mut self, body: NodeId) -> NodeId

Source

pub fn mk_concat(&mut self, head: NodeId, tail: NodeId) -> NodeId

Source

pub fn mk_lookbehind(&mut self, lb_body: NodeId, lb_prev: NodeId) -> NodeId

Source

pub fn mk_lookahead( &mut self, la_body: NodeId, la_tail: NodeId, rel: u32, ) -> NodeId

Source

pub fn mk_neg_lookahead(&mut self, body: NodeId, rel: u32) -> NodeId

Source

pub fn mk_neg_lookbehind(&mut self, body: NodeId) -> NodeId

Source

pub fn mk_union(&mut self, left: NodeId, right: NodeId) -> NodeId

Source

pub fn mk_plus(&mut self, body_id: NodeId) -> NodeId

Source

pub fn mk_repeat(&mut self, body_id: NodeId, lower: u32, upper: u32) -> NodeId

Source

pub fn mk_opt(&mut self, body_id: NodeId) -> NodeId

Source

pub fn mk_star(&mut self, body_id: NodeId) -> NodeId

Source

pub fn nullability_emptystring(&self, node_id: NodeId) -> Nullability

it’s cheaper to check this once as an edge-case than to compute a 4th nullability bit for every node

Source

pub fn nullability(&self, node_id: NodeId) -> Nullability

Source

pub fn pp(&self, node_id: NodeId) -> String

pretty-print a node for debugging.

Source

pub fn mk_u8(&mut self, char: u8) -> NodeId

Source

pub fn mk_range_u8(&mut self, start: u8, end_inclusive: u8) -> NodeId

Source

pub fn extract_literal_prefix(&self, node: NodeId) -> Vec<u8>

extract the leading literal byte sequence from a node tree. walks concat chains of single-byte predicates.

Source

pub fn mk_string(&mut self, raw_str: &str) -> NodeId

Source

pub fn mk_unions( &mut self, nodes: impl DoubleEndedIterator<Item = NodeId>, ) -> NodeId

Source

pub fn mk_inters( &mut self, nodes: impl DoubleEndedIterator<Item = NodeId>, ) -> NodeId

Source

pub fn mk_concats( &mut self, nodes: impl DoubleEndedIterator<Item = NodeId>, ) -> NodeId

Source§

impl RegexBuilder

Source

pub fn subsumes( &mut self, larger_lang: NodeId, smaller_lang: NodeId, ) -> Option<bool>

check if larger_lang subsumes smaller_lang (i.e. L(smaller) ⊆ L(larger)).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.