Flit's Parser

Flit parses its textual DSL using a grammar developed with Irony. You'll need both Flit and Irony (a compatible dll comes with all Flit distributions) in order to regenerate your fluent interface. Here is an example of a Flit source file, colour coded to help explain the different components:

DSL Components.png

If we weren't aiming for full compatibility with Dot, we could do away with having to wrap everything in digraph g{...} . However, we want to be able to generate diagrams straight from our DSL files, so this is a necessary bit of noise. Flit assumes there's exactly one Graph per file.

What's more important to Flit is the States and Transitions. These can be seperated by whitespace or semicolons. States and Transitions can have attributes (comma seperated key=value pairs inside square brackets), and the only attribute that Flit really cares about is the label. Dot uses the label to, well, label the graph items in the diagram, which means it's a great place to put information that's pertinent to Flit, such as the name of the class you want a state to generate.

Continue reading: the Object Model

Last edited Oct 18, 2009 at 8:56 PM by robfe, version 5


No comments yet.