Maybe finished NFAs

This commit is contained in:
joachimschmidt557 2019-02-20 18:49:45 +01:00
parent bb641e26f1
commit 887e2d63c7
3 changed files with 45 additions and 2 deletions

2
DFA.fs
View file

@ -49,7 +49,7 @@ let processChar (dfa: DFA) (state: State) (char: Char) =
let rec processCharArray (dfa: DFA) (state: State) (charArr: Char list) =
match charArr with
| [] -> state
| _ -> processCharArray dfa (processChar dfa state charArr.Head) charArr.Tail
| head :: tail -> processCharArray dfa (processChar dfa state head) tail
let acceptsWord (dfa: DFA) (word: String) =
dfa.acceptingStates