PetitParser: Different behavior when a parsing is finished

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

PetitParser: Different behavior when a parsing is finished

Damien Cassou
Hi,

Stéph and I are trying to revive Coral. There is a unit test that
fails:

    self assert: (CLIParameterParser boolean) fail: #('falsely').

    CLIParameterParser class>>boolean
        | trueToken falseToken | trueToken := (self
        caseInsensitiveKeywords: #('true' 'yes')) end ==> [:token
        | true].  falseToken := (self caseInsensitiveKeywords:
        #('false' 'no')) end ==> [:token | false].  ^ self new
            setParser: (PPElementParser on: trueToken / falseToken
            message: 'boolean expected'); name: 'bool'

    CLIParameterParser class>>caseInsensitiveKeywords: aCollection
        ^ (PPChoiceParser withAll: (aCollection collect: [ :each |
        each asParser caseInsensitive ])) token


I don't know if this test used to pass but I guess it did. I think
the problem is in the new work around "contexts".

Can somebody please help?

--
Damien Cassou http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

Damien Cassou
On Tue, Feb 10, 2015 at 2:33 PM, Damien Cassou <[hidden email]> wrote:
> Can somebody please help?


it looks like this problem has been fixed in a recent commit. Would it
be possible to push get a new stable version with that fix in?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

kurs.jan
Hey,

I tried to figure out, what was the problem, but I failed to see it. What is the commit that fixed the problem?

If I run:

ConfigurationOfCoral loadDevelopment.

(CLIParameterParser boolean) parse: 'falsely'.


I get a Failure, which is what I expect. If I run all the tests, the only failing one is #testSimpleClassDefWithPackage.

Cheers,
Jan

On 10 February 2015 at 14:39, Damien Cassou <[hidden email]> wrote:
On Tue, Feb 10, 2015 at 2:33 PM, Damien Cassou <[hidden email]> wrote:
> Can somebody please help?


it looks like this problem has been fixed in a recent commit. Would it
be possible to push get a new stable version with that fix in?

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

vonbecmann
> I tried to figure out, what was the problem, but I failed to see it. What is
> the commit that fixed the problem?

CLIParsingTest>>#testBool.
CLIParsingTest>>#testOptionLong.
CLIParsingTest>>#testOptionShort.

for this tests to succeed you need a stable version with this package:

Name: PetitParser-JanKurs.267
Author: JanKurs
Time: 12 January 2015, 2:55:31.864538 pm
UUID: 740a4b6d-4dbc-494b-8c17-becf6f9cd8a9
Ancestors: PetitParser-JanKurs.266

PetitParser does not return nil, if the furthest failure is not registered.


at least, i don't know much about the other packages that are included
in PetitParser.

In order to reproduce this you have to take a pharo30 image and do

Gofer it
smalltalkhubUser: 'PharoExtras' project: 'Coral';
configurationOf: 'Coral';
load.

(Smalltalk at: #ConfigurationOfCoral) loadDevelopment.

then you run coral tests and see the three failing tests, after that
you load the mentioned package
and run the tests again, they will succeed.

HTH,
Bernardo
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

Stephan Eggermont-3
In reply to this post by Damien Cassou
I've updated the configuration to use #development of PetitParser.
Then I run into the problem that PetitSmalltalk is broken.

Can the same version of PetitSmalltalk work on both Pharo3 & 4?
It looks like the compiler API changed.

Stephan

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

Tudor Girba-2
Hi,

On Fri, Mar 20, 2015 at 11:43 AM, stephan <[hidden email]> wrote:
I've updated the configuration to use #development of PetitParser.
Then I run into the problem that PetitSmalltalk is broken.

Can the same version of PetitSmalltalk work on both Pharo3 & 4?
It looks like the compiler API changed.

No, it's not possible. PetitSmalltalk was fixed recently to work with the latest changes from Pharo 4.

Doru
 

Stephan


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

Stephan Eggermont-3


On 20-03-15 12:06, Tudor Girba wrote:
Hi,

On Fri, Mar 20, 2015 at 11:43 AM, stephan <[hidden email]> wrote:
I've updated the configuration to use #development of PetitParser.
Then I run into the problem that PetitSmalltalk is broken.

Can the same version of PetitSmalltalk work on both Pharo3 & 4?
It looks like the compiler API changed.

No, it's not possible. PetitSmalltalk was fixed recently to work with the latest changes from Pharo 4.


https://ci.inria.fr/moose/job/PetitSmalltalk/

Stephan

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

Tudor Girba-2
Development should be based on Pharo 4.0. I changed it.

Doru

On Fri, Mar 20, 2015 at 2:55 PM, stephan <[hidden email]> wrote:


On 20-03-15 12:06, Tudor Girba wrote:
Hi,

On Fri, Mar 20, 2015 at 11:43 AM, stephan <[hidden email]> wrote:
I've updated the configuration to use #development of PetitParser.
Then I run into the problem that PetitSmalltalk is broken.

Can the same version of PetitSmalltalk work on both Pharo3 & 4?
It looks like the compiler API changed.

No, it's not possible. PetitSmalltalk was fixed recently to work with the latest changes from Pharo 4.


https://ci.inria.fr/moose/job/PetitSmalltalk/

Stephan

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: PetitParser: Different behavior when a parsing is finished

vonbecmann
Stephan,
   Coral needs to depend on a new stable version of PetitParser, if
someone dares to do it.
   The last change in the ConfigurationOfCoral didn't work.

But this new stable version needs this package:

Name: PetitParser-JanKurs.267
Author: JanKurs
Time: 12 January 2015, 2:55:31.864538 pm
UUID: 740a4b6d-4dbc-494b-8c17-becf6f9cd8a9
Ancestors: PetitParser-JanKurs.266

PetitParser does not return nil, if the furthest failure is not registered.

Is it possible to do it? or reasonable?

thanks,


On Fri, Mar 20, 2015 at 11:19 AM, Tudor Girba <[hidden email]> wrote:

> Development should be based on Pharo 4.0. I changed it.
>
> Doru
>
> On Fri, Mar 20, 2015 at 2:55 PM, stephan <[hidden email]> wrote:
>>
>>
>>
>> On 20-03-15 12:06, Tudor Girba wrote:
>>
>> Hi,
>>
>> On Fri, Mar 20, 2015 at 11:43 AM, stephan <[hidden email]> wrote:
>>>
>>> I've updated the configuration to use #development of PetitParser.
>>> Then I run into the problem that PetitSmalltalk is broken.
>>>
>>> Can the same version of PetitSmalltalk work on both Pharo3 & 4?
>>> It looks like the compiler API changed.
>>
>>
>> No, it's not possible. PetitSmalltalk was fixed recently to work with the
>> latest changes from Pharo 4.
>>
>>
>> https://ci.inria.fr/moose/job/PetitSmalltalk/
>>
>> Stephan
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Bernardo E.C.

Sent from a cheap desktop computer in South America.
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev