17 lines
No EOL
331 B
FSharp
17 lines
No EOL
331 B
FSharp
module NFA
|
|
|
|
open System
|
|
|
|
type State = { name: String }
|
|
|
|
/// A non-deterministic finite automaton
|
|
type NFA = {
|
|
sigma: Char list
|
|
states: State list
|
|
delta: State -> Char -> State list
|
|
beginState: State
|
|
acceptingStates: State list
|
|
}
|
|
|
|
let processChar (nfa: NFA) (state: State) (char: Char) =
|
|
nfa.delta state char |