mirror of
https://github.com/ubf/ubf.git
synced 2026-04-18 10:46:04 +00:00
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
+NAME("test").
|
|
|
|
+VSN("ubf1.0").
|
|
|
|
+TYPES
|
|
|
|
info() = info;
|
|
description() = description;
|
|
services() = services;
|
|
contract() = contract;
|
|
serviceList() = [string()];
|
|
|
|
password() = string();
|
|
file() = string();
|
|
noSuchFile() = {error, noSuchFile};
|
|
doubleInt() = [int()];
|
|
upCase() = string();
|
|
logon() = {logon, password()};
|
|
ls() = ls;
|
|
files() = {files, [string()]} "request a list of file";
|
|
callback() = {callback, void()};
|
|
getFile() = {get, file()};
|
|
okFile() = {ok, binary()};
|
|
stop() = stop;
|
|
yes() = yes;
|
|
ack() = ack;
|
|
error() = error;
|
|
ok() = ok;
|
|
intList() = [int()];
|
|
testAmbiguities() = testAmbiguities;
|
|
callbackOnItsWay() = callbackOnItsWay.
|
|
|
|
+STATE start
|
|
logon() => ok() & active
|
|
| error() & stop.
|
|
|
|
+STATE active
|
|
ls() => files() & active;
|
|
callback() => callbackOnItsWay() & active;
|
|
getFile() => okFile() & active
|
|
| noSuchFile() & stop;
|
|
stop() => void() & stop;
|
|
testAmbiguities() => yes() & funny;
|
|
EVENT => callback().
|
|
|
|
+STATE funny
|
|
string() => upCase() & funny;
|
|
intList() => doubleInt() & funny;
|
|
stop() => ack() & start.
|
|
|
|
+ANYSTATE
|
|
info() => string();
|
|
description() => string();
|
|
services() => serviceList();
|
|
contract() => term().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|