PPRepeatingParser is indeed how the 'plus' method is implemented for example. The problem is that, by specifying #letter asParser I accept any kind of letter, thus #letter asParser plus accepts any number of any kind of letters.
The problem is that I need to accept only multiple occurrences of the same letter :)
I could do something like:
$a asParser plus / $b asParser plus / ...
but that's not really nice code :)
Anyway, thanks for the help!
On Feb 3, 2011, at 1:38 PM, Fabrizio Perin wrote:
Hi, I did never use it but i found in PetitParser-Parsers this parser PPRepeatingParser that maybe can solve your problem.
Cheers,
Fabrizio
On 3 Feb 2011, at 13:09, sback wrote:
To be more precise, I cannot use
#letter plus
because this would imply that I can both parse:
'aa', which is correct; but also: 'ab', which is not correct.
I need a way to specify that I want the same letter, or character, to be repeated.
Thank you, Alberto -- View this message in context: http://moose-dev.97923.n3.nabble.com/PetitParser-same-character-multiple-tim... Sent from the moose-dev mailing list archive at Nabble.com. _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev