[Haskell-beginners] Writing a Parser with attoparsec that reads from a list of tokens

Henk-Jan van Tuyl hjgtuyl at chello.nl
Fri Mar 27 15:08:45 UTC 2015


On Fri, 27 Mar 2015 13:31:03 +0100, Norbert Melzer <timmelzer at gmail.com>  
wrote:

> Hi there!
>
> I want to write some small toy language using attoparsec.
>
> So I thought, first step tokenize. Let attoparsec consume the input  
> stream
> and produce a list of tokens.
> Second step, parse tokens and produce the AST.
>
> Using parsec this would be possible easily and is documented. But I want  
> to
> use attoparsec for this task, because I am interested in attoparsecs
> capability to have the input in chunks.

You can use the list of reverse dependencies for attoparsec
   http://packdeps.haskellers.com/reverse/attoparsec
to find usage examples.

Regards,
Henk-Jan van Tuyl


-- 
Folding at home
What if you could share your unused computer power to help find a cure? In  
just 5 minutes you can join the world's biggest networked computer and get  
us closer sooner. Watch the video.
http://folding.stanford.edu/


http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--


More information about the Beginners mailing list