[PetitParser/PetitSmalltalk] many test are failing so...

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

[PetitParser/PetitSmalltalk] many test are failing so...

vonbecmann
hi all,
 Many test on PetitSmalltalk were failing so i tried to fix them.
 someone should review the changes, there are many, and it's my
first time with petitparser.
 see attached file.

Steps:
- evaluate
Gofer it
smalltalkhubUser: 'Pharo' project: 'MetaRepoForPharo40';
configurationOf: 'PetitParser';
loadBleedingEdge.

- and merge attached file
Name: PetitSmalltalk-BernardoContreras.84
Author: BernardoContreras
Time: 13 March 2015, 9:24:08.132253 pm
UUID: fc0534b1-3411-485c-87bc-0afa4eaab84d
Ancestors: PetitSmalltalk-TudorGirba.83

PPSmalltalkClassesTests>>#verifyClass:selector:
compare the keywordsPositions instead of the selectorParts

add PPSmalltalkGrammarTests>>#testPragma17
PPSmalltalkGrammarTests>>#testPragma18
PPSmalltalkParserTests>>#testPragma17
PPSmalltalkParserTests>>#testPragma18
tests pragmas with a keyword message.

add PPSmalltalkParser>>#buildSelector:
builds a selector from a array of RB tokens

for every given test add the keywordsPositions assertion.
i think it's needed because the PPSmalltalkClassesTests check the positions.

remove RBValueToken>>#inputValue (noone calls it?)


HTH,
--
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

PetitSmalltalk-BernardoContreras.84.mcz (48K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PetitParser/PetitSmalltalk] many test are failing so...

Tudor Girba-2
Hi,

Great work!

These last broken tests were quite tricky because of the not obvious keyworkdsPositions setup. Nice.

While I fixed the previous tests, I added an empty body in the methodDeclaration

"protocol: grammar"
methodDeclaration
^ super methodDeclaration
==> [ :nodes | 
(RBMethodNode
selector: (self buildSelector: nodes first)
keywordsPositions: (nodes first collect: [ :each | each start ])
arguments: nodes second)
body: (RBSequenceNode statements: #());
yourself ]

Could you check if this is the correct way to initialize the RBMethodNode?

Cheers,
Doru


On Sat, Mar 14, 2015 at 1:31 AM, Bernardo Ezequiel Contreras <[hidden email]> wrote:
hi all,
 Many test on PetitSmalltalk were failing so i tried to fix them.
 someone should review the changes, there are many, and it's my
first time with petitparser.
 see attached file.

Steps:
- evaluate
Gofer it
smalltalkhubUser: 'Pharo' project: 'MetaRepoForPharo40';
configurationOf: 'PetitParser';
loadBleedingEdge.

- and merge attached file
Name: PetitSmalltalk-BernardoContreras.84
Author: BernardoContreras
Time: 13 March 2015, 9:24:08.132253 pm
UUID: fc0534b1-3411-485c-87bc-0afa4eaab84d
Ancestors: PetitSmalltalk-TudorGirba.83

PPSmalltalkClassesTests>>#verifyClass:selector:
compare the keywordsPositions instead of the selectorParts

add PPSmalltalkGrammarTests>>#testPragma17
PPSmalltalkGrammarTests>>#testPragma18
PPSmalltalkParserTests>>#testPragma17
PPSmalltalkParserTests>>#testPragma18
tests pragmas with a keyword message.

add PPSmalltalkParser>>#buildSelector:
builds a selector from a array of RB tokens

for every given test add the keywordsPositions assertion.
i think it's needed because the PPSmalltalkClassesTests check the positions.

remove RBValueToken>>#inputValue (noone calls it?)


HTH,
--
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




--

"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/PetitSmalltalk] many test are failing so...

Tudor Girba-2
Btw, I copied your mcz into the PetitParser repository and the Moose build is back to stable :).

Next time, you should commit in the repo. If you are not in the team, let me know and I will add you.

Cheers,
Doru

On Sat, Mar 14, 2015 at 7:56 AM, Tudor Girba <[hidden email]> wrote:
Hi,

Great work!

These last broken tests were quite tricky because of the not obvious keyworkdsPositions setup. Nice.

While I fixed the previous tests, I added an empty body in the methodDeclaration

"protocol: grammar"
methodDeclaration
^ super methodDeclaration
==> [ :nodes | 
(RBMethodNode
selector: (self buildSelector: nodes first)
keywordsPositions: (nodes first collect: [ :each | each start ])
arguments: nodes second)
body: (RBSequenceNode statements: #());
yourself ]

Could you check if this is the correct way to initialize the RBMethodNode?

Cheers,
Doru


On Sat, Mar 14, 2015 at 1:31 AM, Bernardo Ezequiel Contreras <[hidden email]> wrote:
hi all,
 Many test on PetitSmalltalk were failing so i tried to fix them.
 someone should review the changes, there are many, and it's my
first time with petitparser.
 see attached file.

Steps:
- evaluate
Gofer it
smalltalkhubUser: 'Pharo' project: 'MetaRepoForPharo40';
configurationOf: 'PetitParser';
loadBleedingEdge.

- and merge attached file
Name: PetitSmalltalk-BernardoContreras.84
Author: BernardoContreras
Time: 13 March 2015, 9:24:08.132253 pm
UUID: fc0534b1-3411-485c-87bc-0afa4eaab84d
Ancestors: PetitSmalltalk-TudorGirba.83

PPSmalltalkClassesTests>>#verifyClass:selector:
compare the keywordsPositions instead of the selectorParts

add PPSmalltalkGrammarTests>>#testPragma17
PPSmalltalkGrammarTests>>#testPragma18
PPSmalltalkParserTests>>#testPragma17
PPSmalltalkParserTests>>#testPragma18
tests pragmas with a keyword message.

add PPSmalltalkParser>>#buildSelector:
builds a selector from a array of RB tokens

for every given test add the keywordsPositions assertion.
i think it's needed because the PPSmalltalkClassesTests check the positions.

remove RBValueToken>>#inputValue (noone calls it?)


HTH,
--
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




--

"Every thing has its own flow"



--

"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/PetitSmalltalk] many test are failing so...

vonbecmann
In reply to this post by Tudor Girba-2
> Could you check if this is the correct way to initialize the RBMethodNode?
>

Let me see what i can do about it.



--
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
Reply | Threaded
Open this post in threaded view
|

Re: [PetitParser/PetitSmalltalk] many test are failing so...

vonbecmann
Seems it wasn't need it

On Sat, Mar 14, 2015 at 7:17 PM, Bernardo Ezequiel Contreras
<[hidden email]> wrote:

>> Could you check if this is the correct way to initialize the RBMethodNode?
>>
>
> Let me see what i can do about it.
>
>
>
> --
> Bernardo E.C.
>
> Sent from a cheap desktop computer in South America.



--
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