I've gotten Soffit to the point where it can now produce interesting graphs, like this one:
The rule set that produces this graph is:
{
"version" : "0.1",
"start" : "ROOT [color=maroon]",
"X [color=maroon]" : "X[color=maroon]; Y[color=brown]; X--Y",
"Y [color=brown]" : [ "Y [color=brown]; Z[color=green]; Y--Z",
"Y [color=brown]; Z[color=brown]; Y--Z",
"Y [color=forestgreen]; Z1[color=green]; Z2[color=green]; Y--Z1; Y--Z2;" ]
}
As you can see, the tags in this grammar are graphviz attributes, which are just copied into the output directly!
The numbers are the order in which new nodes were added to the graph.
I am thinking of adding an option to do a separate rewrite step, where you apply one grammar and then another, so that the first grammar can be written with "natural" tags like "root", "internal", "leaf" and then be rewritten in one pass to be display labels and attributes.
Getting closer to a release. All this is on github and available to play with right now, but to-do's include:
My #procjam project: Soffit
Soffit progress report #2
Soffit non-progress report #3
Hooray for unit tests
Soffit progress report #5
graphviz clusters suck
Graph rewrite examples, generated by Soffit