procedure lgraph(sgraph)
local nodes, ndescr, nlist, a, name, i
nodes := table() # table of nodes
sgraph ?
while ndescr := tab(many(~';')) do {
move(1)
ndescr ? { # process one node
a := [] # new list goes in table
nodes[tab(upto(':'))] := a
move(1)
# add value and names
while put(a,tab(many(~','))) do
move(1)
}
}
every name := !nodes do # change names to lists
every i := 2 to *name do
name[i] := nodes[name[i]]
return nodes
end