[Haskell-cafe] Parsec question

Michael P Mossey mpm at alumni.caltech.edu
Thu Apr 16 23:29:58 EDT 2009


I want to write a parser that can read a file with this format: the file has 
sections which are demarcated by keywords. Keywords always begin with two 
forward slashes and consist of letters, digits, and underscore. The text can be 
anything, including special characters. For instance:


//keyword some text
and more text //another_keyword and) some { more text
//ya_keyword $$
-- text


I'm not sure how to write a parser that considers anything but a double slash to 
be a valid part of the text.

Thanks,
Mike



More information about the Haskell-Cafe mailing list