diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-11-30 17:46:31 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-11-30 17:46:31 +0200 |
| commit | 1e73247d9c90d2cde48e4faa1970a0ecb7f26e38 (patch) | |
| tree | 0c7444aec5420a6ca8f8fc990d381c3d759d340a /src/main.rs | |
| parent | 49ea3c72602e9935d785f41d00ed79be32f1c218 (diff) | |
| download | rex-1e73247d9c90d2cde48e4faa1970a0ecb7f26e38.tar.xz rex-1e73247d9c90d2cde48e4faa1970a0ecb7f26e38.zip | |
Finished most of implementation of regex to nfa
Diffstat (limited to 'src/main.rs')
| -rwxr-xr-x | src/main.rs | 10 |
1 files changed, 4 insertions, 6 deletions
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}") } |
