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@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@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@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...
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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.