1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#![feature(io)]

use std::fmt::Display;

pub mod dfa;
pub mod nfa;

pub use nfa::{NFA, Transition};
pub use dfa::DFA;

pub trait Automaton {
    type State;
    type Alphabet;

    fn run(&self, Vec<Self::Alphabet>) -> Option<Self::State>;
    fn output_graphviz(&self, filename: &str) where Self::State: Display, Self::Alphabet: Display;
}