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
Cheers,
Doru
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(a)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."