Hi,
As Jan pointed out, you should use “not” instead of “negate and”.
Cheers,
Doru
> On Aug 10, 2017, at 5:22 AM, Sean P. DeNigris wrote:
>
> Peter Kenny wrote
>> You may need to post-process the parse to get what you
>> want.
>
> Good point. I omitted several ` ==> #second` in several place
Peter Kenny wrote
> You may need to post-process the parse to get what you
> want.
Good point. I omitted several ` ==> #second` in several places for
readability on the list, but we should mention that for posterity. Also, duh
`gen negate and` should be `gen not`!
-
Cheers,
Sean
--
View thi
plementaries.
HTH
Peter
-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Sean P. DeNigris
Sent: 09 August 2017 03:41
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] PetitParser: Parse X as long as it's not Y
Peter Kenny wrote
&g
Peter Kenny wrote
> This seems to be what the PPAndParser is designed for.
Thanks for the pointer, Peter! I finally figured it out based on your
example. To get more concrete, I'm trying to parse a name, where the end of
the input might be an optional middle name, followed by an optional
generati
usion.
Peter
-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
PBKResearch
Sent: 06 August 2017 13:28
To: 'Any question about pharo is welcome'
Subject: Re: [Pharo-users] PetitParser: Parse X as long as it's not Y
Sean
This seems
Sean P. DeNigris
Sent: 05 August 2017 21:26
To: pharo-users@lists.pharo.org
Subject: [Pharo-users] PetitParser: Parse X as long as it's not Y
How do I tell Petit Parser to parse a string of certain allowable characters
as long as the final result isn't a particular string? E.g. consume
Hi, not sure if I understand your requirement, but you can try:
Y not, chars star
Is this what you need?
Cheers Jan
On Sun, Aug 6, 2017, 04:47 Sean P. DeNigris wrote:
> vonbecmann wrote
> > did you try with negate?
>
> That is the standard trick with PP, but the problem here is that I'm tryin
vonbecmann wrote
> did you try with negate?
That is the standard trick with PP, but the problem here is that I'm trying
to say, not just "anything which is not Y", but "any string of these
characters as long is it doesn't also match Y"
-
Cheers,
Sean
--
View this message in context:
http:/
did you try with negate?
comment
^ ($" asParser , $" asParser negate star , $" asParser) flatten
On Sat, Aug 5, 2017 at 5:26 PM, Sean P. DeNigris
wrote:
> How do I tell Petit Parser to parse a string of certain allowable
> characters
> as long as the final result isn't a particular string? E.
How do I tell Petit Parser to parse a string of certain allowable characters
as long as the final result isn't a particular string? E.g. consume an
identifier as long as it's not 'Baz' or 'Bar'
Thanks
-
Cheers,
Sean
--
View this message in context:
http://forum.world.st/PetitParser-Parse-X
10 matches
Mail list logo