Open mroman42 opened 9 years ago
YAML seems quite similar to this, except for the transition function definition, which might be implemented as a list of triples. There is a Haskell YAML parser that might save us some work.
Maybe something similar to:
dfa
alpha: [a,b,c]
states: [A,B,C]
transitions:
- A: {a:A, b:B, c:B}
- B: {a:B, c:C}
- C: {a:C}
But I don't see how we can extend this format to NFA automata.
I don't know if this is possible but we could write it like this:
nfa
alpha: [a,b,c]
states: [A,B,C]
transitions:
- A: {a:[A,B], b:[B], c:[B,C]}
- B: {a:[A,B,C], c:[]}
- C: {a:[C]}
We should decide a standard format for reading and writing automatas. Something like:
(Maybe
alpha
andstates
are not necessary)