[Haskell-cafe] Parsec: non-greedy 'between'

2011-09-11 Thread Scott Lawrence
Hey all, Trying to match C-style comments, I have: between (string /*) (string */) $ many anyChar Which doesn't work, because it is equivalent (ignoring returned values) to do {string /*; many anyChar; string */} If the termination criterion was a single character, then I could use noneOf

Re: [Haskell-cafe] Parsec: non-greedy 'between'

2011-09-11 Thread Alexander Solla
On Sun, Sep 11, 2011 at 1:38 PM, Scott Lawrence byt...@gmail.com wrote: Hey all, Trying to match C-style comments, I have: between (string /*) (string */) $ many anyChar Which doesn't work, because it is equivalent (ignoring returned values) to do {string /*; many anyChar; string */}

Re: [Haskell-cafe] Parsec: non-greedy 'between'

2011-09-11 Thread Scott Lawrence
On 09/11/11 16:45, Alexander Solla wrote: Use manyTill. Ah, but of course. Thanks again! -- Scott Lawrence signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Parsec: non-greedy 'between'

2011-09-11 Thread Daniel Fischer
On Sunday 11 September 2011, 22:38:30, Scott Lawrence wrote: Hey all, Trying to match C-style comments, I have: between (string /*) (string */) $ many anyChar Which doesn't work, because it is equivalent (ignoring returned values) to do {string /*; many anyChar; string */} If