pub struct Language { /* private fields */ }Expand description
A pattern compiled to a term and a lazily built automaton.
Implementations§
Source§impl Language
impl Language
Sourcepub fn compile(
p: &Pattern,
alphabet: Option<Alphabet>,
mode: Mode,
limits: &Limits,
) -> Result<Language, RexactError>
pub fn compile( p: &Pattern, alphabet: Option<Alphabet>, mode: Mode, limits: &Limits, ) -> Result<Language, RexactError>
Compile a parsed pattern. alphabet defaults per dialect.
Sourcepub fn from_parts(
store: TermStore,
root: TermId,
alphabet: Alphabet,
limits: &Limits,
) -> Result<Language, RexactError>
pub fn from_parts( store: TermStore, root: TermId, alphabet: Alphabet, limits: &Limits, ) -> Result<Language, RexactError>
Wrap an existing term (used by the analyses and by tests).
Sourcepub fn matches(&mut self, input: &str) -> Result<bool, RexactError>
pub fn matches(&mut self, input: &str) -> Result<bool, RexactError>
Full-match test on text, encoded per the alphabet mode.
Sourcepub fn matches_units(&mut self, input: &[u32]) -> Result<bool, RexactError>
pub fn matches_units(&mut self, input: &[u32]) -> Result<bool, RexactError>
Full-match test on symbols.
Sourcepub fn minimal(&mut self) -> Result<MinDfa, RexactError>
pub fn minimal(&mut self) -> Result<MinDfa, RexactError>
Minimal complete automaton in canonical form.
Sourcepub fn fingerprint(&mut self) -> Result<String, RexactError>
pub fn fingerprint(&mut self) -> Result<String, RexactError>
Language fingerprint: equal for equal languages in the same alphabet.
Auto Trait Implementations§
impl Forget for Language
impl Freeze for Language
impl RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl UnsafeUnpin for Language
impl UnwindSafe for Language
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