File:  [CSRG BSD Unix] / 43BSD / contrib / icon / book / 16 / lgraph.icn
Revision 1.1: download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
CVS tags: MAIN, HEAD
Initial revision

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.