Re: [Pharo-users] is PetitParser eager by default?

2017-01-21 Thread stepharong
tx On Sat, 21 Jan 2017 18:09:32 +0100, Tudor Girba wrote: Hi, The inspector shows the PPFailure, and the Debug View presentation of PPFailure shows you the paths the parser tried. star produces a PPPossessiveRepeatingParser, and selecting it shows that it

Re: [Pharo-users] is PetitParser eager by default?

2017-01-21 Thread Tudor Girba
Hi, The inspector shows the PPFailure, and the Debug View presentation of PPFailure shows you the paths the parser tried. star produces a PPPossessiveRepeatingParser, and selecting it shows that it matched all three characters: they are selected in the bottom pane which shows the input

Re: [Pharo-users] is PetitParser eager by default?

2017-01-21 Thread stepharong
Hi doru where do we see it? Stef On Fri, 20 Jan 2017 16:57:51 +0100, Tudor Girba wrote: Hi, When you have questions like these, you can also use the built-in debugging facilities. For example, in your case, you can see that the #any parser consumed everything

Re: [Pharo-users] is PetitParser eager by default?

2017-01-20 Thread Peter Uhnak
On Fri, Jan 20, 2017 at 04:57:51PM +0100, Tudor Girba wrote: > Hi, > > When you have questions like these, you can also use the built-in debugging > facilities. For example, in your case, you can see that the #any parser > consumed everything like this: Ah, thanks. I was looking for this in

Re: [Pharo-users] is PetitParser eager by default?

2017-01-20 Thread Tudor Girba
Hi, When you have questions like these, you can also use the built-in debugging facilities. For example, in your case, you can see that the #any parser consumed everything like this: Cheers, Doru > On Jan 20, 2017, at 4:38 PM, Norbert Hartl wrote: > > >> Am

Re: [Pharo-users] is PetitParser eager by default?

2017-01-20 Thread Norbert Hartl
> Am 20.01.2017 um 15:24 schrieb Peter Uhnak : > > Is PetitParser eager by default? > > I've used PetitParser countless times so I am really baffled why this doesn't > work > > str := 'a0b'. > #any asParser star, #digit asParser, #any asParser star parse: str. > > ->

Re: [Pharo-users] is PetitParser eager by default?

2017-01-20 Thread Guillaume Larcheveque
Yes, the #any asParser star consume all your stream. for your example you can do: str := 'a0b'. #digit asParser negate star, #digit asParser, #any asParser star parse: str. 2017-01-20 15:24 GMT+01:00 Peter Uhnak : > Is PetitParser eager by default? > > I've used PetitParser

[Pharo-users] is PetitParser eager by default?

2017-01-20 Thread Peter Uhnak
Is PetitParser eager by default? I've used PetitParser countless times so I am really baffled why this doesn't work str := 'a0b'. #any asParser star, #digit asParser, #any asParser star parse: str. -> PPFailure (input expected at: 3) Thanks, Peter