2009/4/17 Michael P Mossey <m...@alumni.caltech.edu>: > 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.
Maybe you can use a combination of 'many', 'noneOf' or 'manyTill' ? Cheers, Thu _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe