-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1bdc0f
commit a4d2b53
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,28 @@ | ||
use crate::{nfa::CELL, state::State}; | ||
use std::{cell::RefCell, collections::HashMap, rc::Rc}; | ||
use uuid::Uuid; | ||
|
||
#[derive(Clone, Debug)] | ||
pub struct DFA { | ||
pub in_state: Rc<RefCell<State>>, | ||
pub out_state: Rc<RefCell<State>>, | ||
} | ||
|
||
impl DFA { | ||
pub fn new() -> DFA { | ||
DFA { | ||
in_state: Rc::new(RefCell::new(State::new(false))), | ||
out_state: Rc::new(RefCell::new(State::new(true))), | ||
} | ||
} | ||
|
||
pub fn get_transition_table(nfa_table: HashMap<Uuid, Vec<CELL>>) -> HashMap<Uuid, Vec<CELL>> { | ||
let ans: HashMap<Uuid, Vec<CELL>> = HashMap::new(); | ||
return ans; | ||
} | ||
|
||
pub fn test(_string: &str) -> bool { | ||
return false; | ||
} | ||
pub fn get_accepting_states() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mod dfa; | ||
mod nfa; | ||
mod state; | ||
|
||
|