
27 Apr
2007
27 Apr
'07
10:20 a.m.
On 27/04/07, Jim Burton
I have a couple of questions about my first use of Parsec, which is trying to read morse code symbols from a string. I have a map of symbols:
import qualified Data.Map as M
morsemap = M.fromList [('A', ".-") ... , ('Z', "--..")]
a string to parse, like
test = "...---..-....-"
This may be relevant or not, but I thought morse required a delimiting character between letters, because otherwise the message was ambiguous? I seem to recall somewhere that Parsec didn't handle non-deterministic parsings very well (or at all). D.