<div dir="ltr">The thing is you can write parsers for tokens, then write parsers that consume those tokens by exclusively using the token parsers as the building blocks rather than the raw steam, all using the same combinators and mechanisms. This is much more flexible.<br><div><br></div><div>Ben</div></div><br><div class="gmail_quote">On Fri, 27 Mar 2015 at 15:08 Henk-Jan van Tuyl <<a href="mailto:hjgtuyl@chello.nl">hjgtuyl@chello.nl</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 27 Mar 2015 13:31:03 +0100, Norbert Melzer <<a href="mailto:timmelzer@gmail.com" target="_blank">timmelzer@gmail.com</a>><br>
wrote:<br>
<br>
> Hi there!<br>
><br>
> I want to write some small toy language using attoparsec.<br>
><br>
> So I thought, first step tokenize. Let attoparsec consume the input<br>
> stream<br>
> and produce a list of tokens.<br>
> Second step, parse tokens and produce the AST.<br>
><br>
> Using parsec this would be possible easily and is documented. But I want<br>
> to<br>
> use attoparsec for this task, because I am interested in attoparsecs<br>
> capability to have the input in chunks.<br>
<br>
You can use the list of reverse dependencies for attoparsec<br>
<a href="http://packdeps.haskellers.com/reverse/attoparsec" target="_blank">http://packdeps.haskellers.<u></u>com/reverse/attoparsec</a><br>
to find usage examples.<br>
<br>
Regards,<br>
Henk-Jan van Tuyl<br>
<br>
<br>
--<br>
Folding@home<br>
What if you could share your unused computer power to help find a cure? In<br>
just 5 minutes you can join the world's biggest networked computer and get<br>
us closer sooner. Watch the video.<br>
<a href="http://folding.stanford.edu/" target="_blank">http://folding.stanford.edu/</a><br>
<br>
<br>
<a href="http://Van.Tuyl.eu/" target="_blank">http://Van.Tuyl.eu/</a><br>
<a href="http://members.chello.nl/hjgtuyl/tourdemonad.html" target="_blank">http://members.chello.nl/<u></u>hjgtuyl/tourdemonad.html</a><br>
Haskell programming<br>
--<br>
______________________________<u></u>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" target="_blank">http://mail.haskell.org/cgi-<u></u>bin/mailman/listinfo/beginners</a><br>
</blockquote></div>