[Haskell-beginners] Attoparsec and multiline comments
daniel.is.fischer at googlemail.com
Thu Sep 15 10:04:19 CEST 2011
On Thursday 15 September 2011, 06:03:44, Alexander.Vladislav.Popov wrote:
> Dear haskellers,
> Help me to parse multiline comments (like /* ... */ or even like /*- ...
> -*/) using attoparsec.
The docs for manyTill at
have the example
simpleComment = string "<!--" *> manyTill anyChar (try (string "-->"))
modifying the comment delimiters is trivial, modifying it to parse nested
comments would be nontrivial, but still not too difficult, I think.
More information about the Beginners