parsec-3.1.0 with custom token datatype

Posted by Tener on Stack Overflow See other posts from Stack Overflow or by Tener
Published on 2010-03-18T21:58:49Z Indexed on 2010/03/18 22:01 UTC
Read the original article Hit count: 486

Filed under:
|
|

parsec-3.1.0 ( http://hackage.haskell.org/package/parsec-3.1.0 ) works with any token type. However there are combinators like Text.Parsec.Char.satisfy that are only defined for Char datatype. There doesn't seem to be any more general counterpart available.

Should I define my own versions or did I miss something?

Perhaps there are different parser libraries in Haskell that allows:

  • custom token types
  • custom parser state (I need to parse stateful format - Wavefront OBJ)

© Stack Overflow or respective owner

Related posts about haskell

Related posts about parsec