Am 27.04.2011 um 09:28 schrieb Tudor Girba:
Hi,
This is almost the way to go :). There already is a predefined operator that does the consuming: negate.
So you would have: $" asParser negate star flatten
Thanks, that's what I was searching for. Works great.
Norbert
On 27 Apr 2011, at 09:09, Norbert Hartl wrote:
I'm trying to parse a negated character with petit parser. I'm trying to parse
[^"]*
but the only thing I came up with is
($" asParser not, #any asParser) star flatten
Is there a better way to parse it or is this just the way to go? The not consuming not parser is indeed useful if I need a combination of negation but the straight forward thing I try to solve looks cumbersome.
thanks,
Norbert
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Not knowing how to do something is not an argument for how it cannot be done."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev