Pidgin syntax is very simple. There are two basic ways of relating the entities (things/boxes) in your diagrams. They are generally not used at the same time but you can mix and match the two types in a single diagram too if you want to.
Objectis not the same as
object. (NB: I am probably going to change this soon.)
Entity), concatenated words (
my_entity). You can also use speech marks if you want to use multiple words or punctuation marks, e.g.
"My Entity", and
"IsTrue?"which can be handy in flowcharts. .
objectsis different to
#as the first character on the line. You can also add comments to the diagram itself by using the
commentverb specifying first the relationship entity or flowchart step you're commenting, like this:
Object comment "Some comment". You can use
\nto make the comment break onto a new line if it's long.
Relationships are described with:
ThingOne relationship ThingTwo, or
ThingOne relationship cardinality ThingTwo
"Cardinality" just means how many, so you can optionally say things like this. E.g.
User has a Car
Car has many Wheel
Car has one SteeringWheel
Wheel has optional FancyHub
There are 10 main relationship verbs and each has their own style of arrow which can have a different tail, head and colour:
|is||no decorator||arrow (solid)||red|
|sees||no decorator||arrow (solid)||green|
|extends||no decorator||arrow (solid)||green|
|updates||no decorator||arrow (solid)||blue|
|from||arrow (solid)||no decorator||red|
|uses||diamond (outline)||arrow (solid)||blue|
|controls||diamond (outline)||arrow (solid)||blue|
|contains||diamond (solid)||arrow (solid)||blue|
|inherits||arrow (solid)||no decorator||red|
There are 4 main cardinalities which change the style of the relationship arrow(s):
Flowcharts can be described very simply and quickly:
StepOne then StepTwo, or
StepOne then Decision (Nb: pidgin doesn't really distinguisgh between decisions and steps; a decision is just another type of step).
You can specify any condition following a decision like this:
Decision [optional condition] then StepWhatever
There are 2 words that pidgin considers to be flow actions:
|then||no decorator||arrow (solid)||blue|
|next||no decorator||arrow (solid)||blue|