<br><br><div class="gmail_quote">2010/8/6 Dean Herington <span dir="ltr">&lt;<a href="mailto:heringtonlacey@mindspring.com">heringtonlacey@mindspring.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">At 11:42 PM +0200 8/5/10, C Gosch wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
does anyone here know their way around in Parsec?<br>
I&#39;m trying to parse a file which contains some binary parts too.<br>
I have been using Parsec 3.0.1 to parse the first ASCII part, but all the parsers are<br>
returning Char type tokens, so it would not work with the binary parts ..<br>
is there any way to do this?<br>
I am using Text.Parsec.ByteString.Lazy.<br>
<br>
Note that I&#39;m new to Haskell and Parsec, and doing this within a small project that<br>
I basically do to get a grip on Haskell (and Parsec, because it appears to be really nifty and I want to learn more about it).<br>
<br>
Thanks for any hints,<br>
Christian<br>
</blockquote>
<br></div></div>
Parsing binary parts of a file is not inherently a problem.  A parser can return any type; different parsers in your application will likely return different types.<br>
<br>
If you include some code we&#39;ll be able to help you more specifically.<br><font color="#888888">
<br>
Dean<br></font></blockquote><div><br>You&#39;re right, I probably used the wrong words .. I meant that apparently the tokens Parsec uses are of type Char, and I would actually at some point<br>like to continue parsing, but using different tokens. Sorry if I still got it wrong, I&#39;m new :)  I can post some code later, as I don&#39;t have it here right now.<br>
</div></div><br>Cheers,<br>Christian<br>