[−][src]Struct regex_dfa_gen::dfa::Dfa
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]
fn nodes(&self) -> Nodes<'a, (usize, Option<usize>)>
[src]
fn edges(&'a self) -> Edges<'a, (usize, usize, CharRange, bool)>
[src]
fn source(&self, e: &(usize, usize, CharRange, bool)) -> (usize, Option<usize>)
[src]
fn target(&self, e: &(usize, usize, CharRange, bool)) -> (usize, Option<usize>)
[src]
impl<'a> Labeller<'a, (usize, Option<usize>), (usize, usize, Range<char>, bool)> for Dfa
[src]
fn graph_id(&'a self) -> Id<'a>
[src]
fn node_id(&'a self, n: &(usize, Option<usize>)) -> Id<'a>
[src]
fn node_label<'b>(&'b self, n: &(usize, Option<usize>)) -> LabelText<'b>
[src]
fn edge_label<'b>(
&'b self,
(_, _, ch, _): &(usize, usize, CharRange, bool)
) -> LabelText<'b>
[src]
&'b self,
(_, _, ch, _): &(usize, usize, CharRange, bool)
) -> LabelText<'b>
fn edge_color<'b>(
&'b self,
(_, _, _, is_greedy): &(usize, usize, CharRange, bool)
) -> Option<LabelText<'b>>
[src]
&'b self,
(_, _, _, is_greedy): &(usize, usize, CharRange, bool)
) -> Option<LabelText<'b>>
fn node_shape(&'a self, _node: &N) -> Option<LabelText<'a>>
[src]
fn node_style(&'a self, _n: &N) -> Style
[src]
fn node_color(&'a self, _node: &N) -> Option<LabelText<'a>>
[src]
fn edge_end_arrow(&'a self, _e: &E) -> Arrow
[src]
fn edge_start_arrow(&'a self, _e: &E) -> Arrow
[src]
fn edge_style(&'a self, _e: &E) -> Style
[src]
fn kind(&self) -> Kind
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,