[Haskell-cafe] Parsec beginners problem

Dougal Stanton ithika at gmail.com
Fri Apr 27 10:20:46 EDT 2007

On 27/04/07, Jim Burton <jim at sdf-eu.org> wrote:
> 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).


More information about the Haskell-Cafe mailing list