[Pharo-dev] Syntax Visualisation in the C# infrastructure

Clément Bera bera.clement at gmail.com
Sun Apr 6 23:41:47 EDT 2014


Well there is one screen shot at the bottom of this post:
http://clementbera.wordpress.com/2014/01/22/the-sista-chronicles-iii-an-intermediate-representation-for-optimizations/

And multiple in this post:
http://clementbera.wordpress.com/2014/02/13/the-sista-chronicles-iv-inlining-message-sends/


2014-04-06 15:46 GMT-07:00 Alexandre Bergel <alexandre.bergel at me.com>:

> Do you have screenshots? I can advertise your work on our Facebook website.
>
> Alexandre
>
>
> On Apr 5, 2014, at 11:38 PM, Clément Bera <bera.clement at gmail.com> wrote:
>
> > Yeah I use Roassal + Mondrian to visualize my intermediate
> representations in the compiler and doing it for the AST is really simple
> (like 5 min of work).
> >
> > In addition the GTInspector view on trees/graph is really nice.
> >
> > So basically we have all the tools they provide.
> >
> >
> > 2014-04-05 17:56 GMT-07:00 Alexandre Bergel <alexandre.bergel at me.com>:
> > I am not sure to what syntax visualization is useful for, but indeed,
> this is easy in Roassal
> >
> > Assuming a class MyVisitor, that simples collect the nodes of the AST.
> >
> > -=-=-=-=-=-=-=-=-=-=
> > | ast visitor g |
> > "We get the nodes from the AST"
> > ast := RBParser parseMethod:
> (ArrayTest>>#testReplaceFromToWithStartingAt) getSource.
> > visitor := MyVisitor new.
> > ast acceptVisitor: visitor.
> >
> > "Visualization"
> > g := RTGraphBuilder new.
> > g node
> >       if: #isMessage shape: (RTEllipse new size: 10; color: Color red )
> + (RTLabel new text: #selector);
> >       if: #isReturn shape: (RTEllipse new size: 10; color: Color red );
> >       if: #isBlock shape: (RTBox new size: 10; color: Color blue );
> >       shape: (RTEllipse new size: 10; color: Color gray ).
> > g layout use: RTTreeLayout new.
> > g edge connectTo: #parent.
> >
> > g addAll: visitor nodes.
> >
> > g applyLayout.
> > g view
> > -=-=-=-=-=-=-=-=-=-=
> >
> >
> > <Screen Shot 2014-04-05 at 9.56.35 PM.png>
> > Cheers,
> > Alexandre
> >
> >
> > On Apr 4, 2014, at 4:34 AM, Goubier Thierry <thierry.goubier at cea.fr>
> wrote:
> >
> >> It seems that Microsoft has opened interesting parts of the C#
> compilation infrastructure, including syntax visualisation.
> >>
> >>
> http://roslyn.codeplex.com/wikipage?title=Syntax%20Visualizer&referringTitle=Home
> >>
> >> Ideas for Opal+Roassal2 ?
> >>
> >> Thierry
> >> --
> >> Thierry Goubier
> >> CEA list
> >> Laboratoire des Fondations des Systèmes Temps Réel Embarqués
> >> 91191 Gif sur Yvette Cedex
> >> France
> >> Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
> >>
> >
> > --
> > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> > Alexandre Bergel  http://www.bergel.eu
> > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >
> >
> >
> >
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20140406/3787b8fe/attachment-0002.html>


More information about the Pharo-dev mailing list