[][src]Trait rustomaton::automaton::Buildable

pub trait Buildable<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> {
    fn unite(self, other: Self) -> Self;
fn concatenate(self, other: Self) -> Self;
fn kleene(self) -> Self;
fn at_most(self, num: usize) -> Self;
fn at_least(self, num: usize) -> Self;
fn repeat<R: RangeBounds<usize>>(self, r: R) -> Self; }

An interface to regroup functions used to build Automata.

Required methods

fn unite(self, other: Self) -> Self

Returns the automaton that accepts a word if and only if it is accepted by self or by other.

fn concatenate(self, other: Self) -> Self

Returns the automaton that accepts a word if and only if it is the concatenation of a word accepted by self and of a word accepted by other.

fn kleene(self) -> Self

Returns the automaton that accepts a word if and only if it is the concatenation of a finite number of words accepted by self (possibly 0).

fn at_most(self, num: usize) -> Self

Returns the automaton that accepts a word if and only if it is the concatenation of at most num words accepted by self.

fn at_least(self, num: usize) -> Self

Returns the automaton that accepts a word if and only if it is the concatenation of at least num words accepted by self.

fn repeat<R: RangeBounds<usize>>(self, r: R) -> Self

Returns the automaton that accepts a word if and only if it is the concatenation of a number in the range r of words accepted by self.

Loading content...

Implementors

impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Buildable<V> for DFA<V>[src]

impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Buildable<V> for NFA<V>[src]

impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Buildable<V> for Regex<V>[src]

Loading content...