Facktorial / HaskellDFASample

Sample implementation of a DFA and an NFA in Haskell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation of a DFA and an NFA in pure Haskell

Sample code for both is available at dfa_sample.hs and nfa_sample.hs, respectively.

To play with the samples:

gchi dfa_sample.hs

Then, in GHCi:

GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Main             ( dfa.hs, interpreted )
Ok, modules loaded: Main.
*Main> check mydfa "abababababa"
Left (Q3,"Bad final state")

About

Sample implementation of a DFA and an NFA in Haskell.

License:Apache License 2.0


Languages

Language:Haskell 100.0%