Friday, July 8, 2011

Graphical Syntax View for Xtext

I demoed it so often that I almost forgot blogging about it: In Xtext 2.0 you can now visualize the syntax of your DSLs grammar in a live railroad diagram view. The view supports navigation between the editor and the view and you can export your diagrams to a file. We even have a special representation for unordered groups. Watch this screencast to see it in action:



The syntax graph is implemented in plain Draw2d using a custom layout algorithm. It is technically not related to the generic graphical view I presented in my previous blogpost.

4 comments:

Meinte Boersma said...

Nice, but I think you'd usually end up using the equivalent visualization from ANTLRWorks anyway, because that allows you to analyze ambiguities.

Unknown said...

@Meinte AnltWorks opearates on a different level of abstraction (the generated Antlr grammar) than the Xtext syntax view. Furthermore, it is not integrated into Eclipse and synchronizes with the grammar editor. It's just a question of time until ambiguity analysis will be added to the grammar editor and integrated into the view.

Unknown said...

It is open source?

Unknown said...

Sure, it's part of Xtext 2.0 and higher.