if "Some Test" then
  -->[true] "Some Action"
  --> "Another Action"
  -right-> (*)
else
  ->[false] "Something else"
  -->[Ending process] (*)
endif

if (Graphviz installed?) then (yes)
  :process all\ndiagrams;
else (no)
  :process only
  __sequence__ and __activity__ diagrams;
endif

if (color?) is (<color:red>red) then
:print red;
else
:print not red;

if (counter?) equals (5) then
:print 5;
else
:print not 5;

start
if (condition A) then (yes)
  :Text 1;
elseif (condition B) then (yes)
  :Text 2;
  stop
(no) elseif (condition C) then (yes)
  :Text 3;
(no) elseif (condition D) then (yes)
  :Text 4;
else (nothing)
  :Text else;
endif
stop

switch (test?)
case ( condition A )
  :Text 1;
case ( condition B )
  :Text 2;
case ( condition C )
  :Text 3;
case ( condition D )
  :Text 4;
case ( condition E )
  :Text 5;
endswitch

repeat
  :read data;
  :generate diagrams;
repeat while (more data?) is (yes)
->no;

repeat while (Something went wrong with long text?) is (yes) not (no)
->//merged step//;

----------------------------------------------------

[
	["keyword", "if"],
	["string", "\"Some Test\""],
	["keyword", "then"],

	["arrow", ["-->"]],
	["punctuation", "["],
	"true",
	["punctuation", "]"],
	["string", "\"Some Action\""],

	["arrow", ["-->"]],
	["string", "\"Another Action\""],

	["arrow", ["-right->"]],
	["punctuation", "("],
	"*",
	["punctuation", ")"],

	["keyword", "else"],

	["arrow", ["->"]],
	["punctuation", "["],
	"false",
	["punctuation", "]"],
	["string", "\"Something else\""],

	["arrow", ["-->"]],
	["punctuation", "["],
	"Ending process",
	["punctuation", "]"],
	["punctuation", "("],
	"*",
	["punctuation", ")"],

	["keyword", "endif"],

	["keyword", "if"],
	["punctuation", "("],
	"Graphviz installed?",
	["punctuation", ")"],
	["keyword", "then"],
	["punctuation", "("],
	"yes",
	["punctuation", ")"],

	["punctuation", ":"],
	"process all\\ndiagrams",
	["punctuation", ";"],

	["keyword", "else"],
	["punctuation", "("],
	"no",
	["punctuation", ")"],

	["punctuation", ":"],
	"process only\r\n  __sequence__ and __activity__ diagrams",
	["punctuation", ";"],

	["keyword", "endif"],

	["keyword", "if"],
	["punctuation", "("],
	"color?",
	["punctuation", ")"],
	["keyword", "is"],
	["punctuation", "("],
	"<color",
	["punctuation", ":"],
	"red>red",
	["punctuation", ")"],
	["keyword", "then"],

	["punctuation", ":"],
	"print red",
	["punctuation", ";"],

	["keyword", "else"],

	["punctuation", ":"],
	"print not red",
	["punctuation", ";"],

	["keyword", "if"],
	["punctuation", "("],
	"counter?",
	["punctuation", ")"],
	["keyword", "equals"],
	["punctuation", "("],
	"5",
	["punctuation", ")"],
	["keyword", "then"],

	["punctuation", ":"],
	"print 5",
	["punctuation", ";"],

	["keyword", "else"],

	["punctuation", ":"],
	"print not 5",
	["punctuation", ";"],

	["keyword", "start"],

	["keyword", "if"],
	["punctuation", "("],
	"condition A",
	["punctuation", ")"],
	["keyword", "then"],
	["punctuation", "("],
	"yes",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 1",
	["punctuation", ";"],

	["keyword", "elseif"],
	["punctuation", "("],
	"condition B",
	["punctuation", ")"],
	["keyword", "then"],
	["punctuation", "("],
	"yes",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 2",
	["punctuation", ";"],

	["keyword", "stop"],

	["punctuation", "("],
	"no",
	["punctuation", ")"],
	["keyword", "elseif"],
	["punctuation", "("],
	"condition C",
	["punctuation", ")"],
	["keyword", "then"],
	["punctuation", "("],
	"yes",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 3",
	["punctuation", ";"],

	["punctuation", "("],
	"no",
	["punctuation", ")"],
	["keyword", "elseif"],
	["punctuation", "("],
	"condition D",
	["punctuation", ")"],
	["keyword", "then"],
	["punctuation", "("],
	"yes",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 4",
	["punctuation", ";"],

	["keyword", "else"],
	["punctuation", "("],
	"nothing",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text else",
	["punctuation", ";"],

	["keyword", "endif"],

	["keyword", "stop"],

	["keyword", "switch"],
	["punctuation", "("],
	"test?",
	["punctuation", ")"],

	["keyword", "case"],
	["punctuation", "("],
	" condition A ",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 1",
	["punctuation", ";"],

	["keyword", "case"],
	["punctuation", "("],
	" condition B ",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 2",
	["punctuation", ";"],

	["keyword", "case"],
	["punctuation", "("],
	" condition C ",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 3",
	["punctuation", ";"],

	["keyword", "case"],
	["punctuation", "("],
	" condition D ",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 4",
	["punctuation", ";"],

	["keyword", "case"],
	["punctuation", "("],
	" condition E ",
	["punctuation", ")"],

	["punctuation", ":"],
	"Text 5",
	["punctuation", ";"],

	["keyword", "endswitch"],

	["keyword", "repeat"],

	["punctuation", ":"],
	"read data",
	["punctuation", ";"],

	["punctuation", ":"],
	"generate diagrams",
	["punctuation", ";"],

	["keyword", "repeat"],
	["keyword", "while"],
	["punctuation", "("],
	"more data?",
	["punctuation", ")"],
	["keyword", "is"],
	["punctuation", "("],
	"yes",
	["punctuation", ")"],

	["arrow", ["->"]],
	"no",
	["punctuation", ";"],

	["keyword", "repeat"],
	["keyword", "while"],
	["punctuation", "("],
	"Something went wrong with long text?",
	["punctuation", ")"],
	["keyword", "is"],
	["punctuation", "("],
	"yes",
	["punctuation", ")"],
	["keyword", "not"],
	["punctuation", "("],
	"no",
	["punctuation", ")"],

	["arrow", ["->"]],
	"//merged step//",
	["punctuation", ";"]
]
