Hi guys,
I've noticed a different behavior relating the RBParseTreeSearcher between Pharo and Squeak, using AST-Core-lr.33, the following code: | rbMethodNode | rbMethodNode := RBParser parseMethod: 'test [ ]'. ( RBParseTreeSearcher new matches: '`{:node | node isVariable }' do:[: aNode : answer | answer add: aNode; yourself ] ) executeTree: rbMethodNode initialAnswer: Set new. gives an empty Set in Pharo-Core (#11072) and a Set(RBSequenceNode()) in Squeak 3.10.2 Does anybody know if I should use a different AST-Core version for Squeak? An alternative repository maybe? Hernán _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Did you run the tests, especially RBParserTest? They do all pass on Pharo.
Does Squeak implement #isVariable on Object? Lukas 2009/12/6 Hernán Morales Durand <[hidden email]>: > Hi guys, > I've noticed a different behavior relating the RBParseTreeSearcher > between Pharo and Squeak, using AST-Core-lr.33, the following code: > > | rbMethodNode | > rbMethodNode := RBParser parseMethod: 'test [ ]'. > ( RBParseTreeSearcher new > matches: '`{:node | node isVariable }' > do:[: aNode : answer | answer add: aNode; yourself ] ) > executeTree: rbMethodNode initialAnswer: Set new. > > gives an empty Set in Pharo-Core (#11072) and a Set(RBSequenceNode()) > in Squeak 3.10.2 > Does anybody know if I should use a different AST-Core version for > Squeak? An alternative repository maybe? > > Hernán > > -- Lukas Renggli http://www.lukas-renggli.ch 2009/12/6 Hernán Morales Durand <[hidden email]>: > Hi guys, > I've noticed a different behavior relating the RBParseTreeSearcher > between Pharo and Squeak, using AST-Core-lr.33, the following code: > > | rbMethodNode | > rbMethodNode := RBParser parseMethod: 'test [ ]'. > ( RBParseTreeSearcher new > matches: '`{:node | node isVariable }' > do:[: aNode : answer | answer add: aNode; yourself ] ) > executeTree: rbMethodNode initialAnswer: Set new. > > gives an empty Set in Pharo-Core (#11072) and a Set(RBSequenceNode()) > in Squeak 3.10.2 > Does anybody know if I should use a different AST-Core version for > Squeak? An alternative repository maybe? > > Hernán > > -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Hi Lukas
2009/12/6 Lukas Renggli <[hidden email]>: > Did you run the tests, especially RBParserTest? They do all pass on Pharo. > I couldn't do a clean load the Refactoring-Tests package in Squeak 3.10.2, there is a Syntax Error testLiteralArray | tree collection | tree := RBParser parseExpression: '#( a #b #''c'' . + - 1 -2 3.4 #true true #false false #nil nil "comment" ''string'' #[ 1 2 3 ] #(1 2 3))'. collection := OrderedCollection new. collection add: #a; add: #b; add: #c; add: #'.'; add: #+; add: #-; add: 1; add: -2; add: 3.4; add: #true; add: true; add: #false; add: false; add: #nil; add: nil; add: 'string'; add: #[Nothing more expected ->1 2 3]; add: #(1 2 3). tree value with: collection do: [ :token :value | self assert: token value = value ] I removed that one to complete the loading, there are 8 failures and 5 errors, most of them in RBSmallintTest and two in RBParserTest: RBParserTest>>testBestNodeFor RBParserTest>>testIntervals but it seems to be unrelated with the #isVariable problem. In Pharo-Core #11072 I have just one failure in #testRemoveSameMethodButSendsSuper, let me know if you cannot reproduce it. > Does Squeak implement #isVariable on Object? > No, it doesn't at least in the official image. Cheers, Hernán > Lukas > > 2009/12/6 Hernán Morales Durand <[hidden email]>: >> Hi guys, >> I've noticed a different behavior relating the RBParseTreeSearcher >> between Pharo and Squeak, using AST-Core-lr.33, the following code: >> >> | rbMethodNode | >> rbMethodNode := RBParser parseMethod: 'test [ ]'. >> ( RBParseTreeSearcher new >> matches: '`{:node | node isVariable }' >> do:[: aNode : answer | answer add: aNode; yourself ] ) >> executeTree: rbMethodNode initialAnswer: Set new. >> >> gives an empty Set in Pharo-Core (#11072) and a Set(RBSequenceNode()) >> in Squeak 3.10.2 >> Does anybody know if I should use a different AST-Core version for >> Squeak? An alternative repository maybe? >> >> Hernán >> >> > > > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > > > 2009/12/6 Hernán Morales Durand <[hidden email]>: >> Hi guys, >> I've noticed a different behavior relating the RBParseTreeSearcher >> between Pharo and Squeak, using AST-Core-lr.33, the following code: >> >> | rbMethodNode | >> rbMethodNode := RBParser parseMethod: 'test [ ]'. >> ( RBParseTreeSearcher new >> matches: '`{:node | node isVariable }' >> do:[: aNode : answer | answer add: aNode; yourself ] ) >> executeTree: rbMethodNode initialAnswer: Set new. >> >> gives an empty Set in Pharo-Core (#11072) and a Set(RBSequenceNode()) >> in Squeak 3.10.2 >> Does anybody know if I should use a different AST-Core version for >> Squeak? An alternative repository maybe? >> >> Hernán >> >> > > > > -- > Lukas Renggli > http://www.lukas-renggli.ch > > _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |