Maybe finished NFAs
This commit is contained in:
parent
bb641e26f1
commit
887e2d63c7
3 changed files with 45 additions and 2 deletions
2
DFA.fs
2
DFA.fs
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue