# -*- tcl -*- tcl.tk//DSL diagram//EN//1.0
## DSL for uml sequences. Draft.

source [file join [file dirname [file normalize [info script]]] dsl_umlsequence.inc]

set actorstep [10 mm]

## ====================================================================

actor repl    REPL
actor off     officer
actor act     officer/actor
actor pri     private
actor para    parameter
actor vt      "validation type"

action repl
action off
action act
skip   pri
skip   para
skip   vt

call-down repl off complete(line)
call-down off  act parse-line(buffer)

action repl
action off
action act
skip   pri
skip   para
skip   vt

return-up act off state

action repl
skip-> off
skip   act
skip   pri
skip   para
skip   vt

action repl
action off
skip   act
skip   pri
skip   para
skip   vt

label off  complete-words(state)

action repl
action off
skip   act
action pri
action para
action vt

call-down off  pri  complete-words(state)
call-down pri  para complete-words(state)
call-down para vt   complete(p,word)

action repl
action off
skip   act
action pri
action para
action vt

return-up vt   para completions
return-up para pri  completions
return-up pri  off  completions
return-up off  repl completions

stop repl
stop off
stop act
stop pri
stop para
stop vt

# close timelines

line \
    from [$repl by [10 mm] w] \
    to   [$vt   by [10 mm] e]
