[][src]Struct regex_dfa_gen::dfa::Dfa

pub struct Dfa {
    pub states: Vec<DfaState>,
}

Fields

states: Vec<DfaState>

Implementations

impl Dfa[src]

pub fn render_to<W: Write>(&self, w: &mut W) -> Result<()>[src]

get the dot file.

use regex_dfa_gen::ast::AstNode;
use regex_dfa_gen::nfa::Nfa;
use regex_dfa_gen::dfa::{ DfaBuilder, Dfa };
use std::fs::File;
 
let ast : AstNode = r"([A-Z]*|A[a-z]*?)H".parse::<AstNode>().unwrap();
let nfa = Nfa::from_ast(&ast);
let dfa = DfaBuilder::from_nfa(&nfa).to_dfa();
 
let mut f = File::create("dfa.dot").unwrap();
dfa.render_to(&mut f).expect("msg");

pub fn from_nfa(nfa: &Nfa) -> Dfa[src]

pub fn replace(self, pair: HashMap<usize, usize>) -> Dfa[src]

pub fn opt(self) -> Dfa[src]

Trait Implementations

impl<'a> GraphWalk<'a, (usize, Option<usize>), (usize, usize, Range<char>, bool)> for Dfa[src]

impl<'a> Labeller<'a, (usize, Option<usize>), (usize, usize, Range<char>, bool)> for Dfa[src]

Auto Trait Implementations

impl RefUnwindSafe for Dfa

impl Send for Dfa

impl Sync for Dfa

impl Unpin for Dfa

impl UnwindSafe for Dfa

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.