[Haskell-cafe] Parsec question

John Goerzen jgoerzen at complete.org
Fri Nov 19 09:28:07 EST 2004


Hi,

I'm porting a parser over from an OCamllex/Ocamlyacc version and I'm
using Parsec for both the tokenizer and the resulting token stream parser.

I have both of them working fine, but now my question is: how do I
combine them?  I can't quite figure out how to say "take the output from
this GenParser Char () Tok and use it as the input for this
GenParser Tok () ParserOutput".

Well, I have figured out an ugly way involving manually starting up both
parsers, but it makes position calculations very complex.  I suspect I'm
missing something.

Ideas?





More information about the Haskell-Cafe mailing list