From 1e73247d9c90d2cde48e4faa1970a0ecb7f26e38 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Thu, 30 Nov 2023 17:46:31 +0200 Subject: Finished most of implementation of regex to nfa --- src/main.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index bfe2050..e39b386 100755 --- a/src/main.rs +++ b/src/main.rs @@ -4,16 +4,14 @@ use nfa::*; use regex::*; fn main() { - let input = "abcdefglmno"; + let input = "a*b"; let token = Regex::new(String::from(input)); println!("{input}\n{:#?}", token); let mut nfa = NFA::new(); nfa.regex_to_nfa(token); - nfa.add_state(); - println!("NFA: {:#?}", nfa); - let inp = "abcdefglmno"; - let output = nfa.simulate(String::from(inp)); - println!("{inp} was = {output}") + // let inp = "abcdefglmno"; + // let output = nfa.simulate(String::from(inp)); + // println!("{inp} was = {output}") } -- cgit v1.2.3