
MsGenny language tutorial
MsGenny was designed to make writing sequence charts in text even simpler than it already is in MscGen.
Basics
a sends a signal to b
The most simple sequence chart is the one where an entity a sends a signal to an entity b
a -> b;
As you can see this creates two entities (a and b), both with a lifeline, and an arrow from the first to the second lifeline.
Adding labels
To add a label to your signal, put it behind a colon, like so:
a -> b: "ping";
Note: when your description doesn't contain a , or a ; it is possible to leave the quotes out of the label, so in this case a -> b: ping; would have achieved exactly the same effect.
b replies to a
Adding extra parts to the conversation works along the same lines
a -> b: ping;
b >> a: heard ya!;
Notes
To add a note to a chart use the special note arc type. Notes are similar to arcs in that they start on a lifeline and end on one.
a -> b: ping;
b >> a: heard ya!;
a note a: we're not done yet ...;
Multiline text
The mscgen_js render engine automatically breaks long lines into multiple lines.
However, you can break a long label in pieces manually by putting the (c-style) escape code \n on the spots you want to split the label. This works for all labels.
a note b: This is a note consisting of\ntwo lines of text;
b => c : Breaking text in two\nalso works for arcs;
Ignore this
In your program lines starting with # or // are ignored, as is everything between / c-style block comments /
# This line is ignored
a =>> b: what's happening here?; /* don't know */
// ignored line