diff --git a/specifications/Makefile b/specifications/Makefile new file mode 100644 index 0000000..9ec42fb --- /dev/null +++ b/specifications/Makefile @@ -0,0 +1,7 @@ +all: commands.png + +clean: + rm -f commands.png + +commands.png: commands.gv + dot -Tpng -ocommands.png commands.gv diff --git a/specifications/commands.gv b/specifications/commands.gv new file mode 100644 index 0000000..597ec11 --- /dev/null +++ b/specifications/commands.gv @@ -0,0 +1,24 @@ +digraph finite_state_machine { + rankdir=LR; + node [shape = doublecircle, fixedsize = true, width = 1.2, height = 1.2]; standard; + node [shape = circle]; + standard -> standard [ label = "any key" ]; + standard -> "command\nmode" [ label = "hotkey" ]; + "command\nmode" -> standard [ label = "single key command" ]; + "command\nmode" -> standard [ label = "invalid key" ]; + + "command\nmode" -> "macro\ncommand" [ label = "m" ]; + "macro\ncommand" -> "macro\ndefinition" [ label = "macro key" ]; + "macro\ndefinition" -> "macro\ndefinition" [ label = "any key" ]; + "macro\ndefinition" -> standard [ label = "hotkey" ]; + + "command\nmode" -> "macro\ndelete" [ label = "M" ]; + "macro\ndelete" -> standard [ label = "macro key" ]; + + "command\nmode" -> "complex\ncommand" [ label = "multi key command" ]; + "complex\ncommand" -> "complex\ncommand" [ label = "any key" ]; + "complex\ncommand" -> standard [ label = "hotkey" ]; + "complex\ncommand" -> standard [ label = "invalid key" ]; +} + +