Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Alexandre Bergel
Excellent! Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > On Jul 30, 2015, at 12:40 PM, Marcus Denker wrote: > > Yes, we checked. This explains the strange “too large” rectangle :-)

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Mark Rizun
Great, everybody is happy ;) Thanks Alex ! 30 лип. 2015 5:40 пп "Marcus Denker" пише: > > > On 30 Jul 2015, at 17:26, Alexandre Bergel > wrote: > > > > Hi Mark, > > > > I have introduced a class RTIdentityGroup. > > > > You can do: > > > > -=-=-= -=-=-= -=-=-= -=-=-= > > ast := RBParser p

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Marcus Denker
> On 30 Jul 2015, at 17:26, Alexandre Bergel wrote: > > Hi Mark, > > I have introduced a class RTIdentityGroup. > > You can do: > > -=-=-= -=-=-= -=-=-= -=-=-= > ast := RBParser parseExpression: 'self foo. self foo'. > builder := RTMondrian new. > builder shape ellipse siz

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Alexandre Bergel
Hi Mark, I have introduced a class RTIdentityGroup. You can do: -=-=-= -=-=-= -=-=-= -=-=-= ast := RBParser parseExpression: 'self foo. self foo'. builder := RTMondrian new. builder shape ellipse size: 15. nodes := builder nodes: ast allChildren. builder

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Alexandre Bergel
Frankly, I often find weird to override #= Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > On Jul 30, 2015, at 11:41 AM, Peter Uhnák wrote: > > I think it's because somewhere in roassal

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Marcus Denker
> On 30 Jul 2015, at 16:47, Mark Rizun wrote: > > Pretty much; there is test for equality > > RTGroup>>elementFromModel: anObject > ^ self detect: [ :el | el model = anObject ] ifNone: [ nil ] > > and equality is more often than not wanted. > > So solution might be to tell Mondrian that y

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Mark Rizun
> > Pretty much; there is test for equality > > RTGroup>>elementFromModel: anObject > ^ self detect: [ :el | el model = anObject ] ifNone: [ nil ] > > and equality is more often than not wanted. > > So solution might be to tell Mondrian that you want to compare by identity > and not equality? >

Re: [Pharo-users] AST visualization with Roassal

2015-07-30 Thread Peter Uhnák
> > I think it's because somewhere in roassal > objects (in this case ast nodes) are compared by value. Pretty much; there is test for equality RTGroup>>elementFromModel: anObject ^ self detect: [ :el | el model = anObject ] ifNone: [ nil ] and equality is more often than not wanted. So so

[Pharo-users] AST visualization with Roassal

2015-07-30 Thread Mark Rizun
Hi, everyone! First of all, using Roassal is fun and effective :) But while working on AST visualization I found that sometimes Roassal builds wrong tree layout (or maybe I'm just doing something wrong). For instance, try two following scripts in playground: * #1 | ast bu