[Haskell-cafe] Tokenizing and Parsec

Günther Schmidt gue.schmidt at web.de
Mon Jan 11 19:35:10 EST 2010


Hi all,

I've used Parsec to "tokenize" data from a text file. It was actually 
quite easy, everything is correctly identified.

So now I have a list/stream of self defined "Tokens" and now I'm stuck. 
Because now I need to write my own parsec-token-parsers to parse this 
token stream in a context-sensitive way.

Uhm, how do I that then?

Günther

a Token is something like:

data Token = ZE String
            | OPS
            | OPSShort String
            | OPSLong String
            | Other String
            | ZECd String
              deriving Show




More information about the Haskell-Cafe mailing list