9 node [shape=box, fontsize=10, fontname="Helvetica", height=.2];
10 edge [labelfontsize=8, labelfontname="Helvetica"]
16 for line in sys.stdin:
20 elif mode == "MODULE":
21 moduleid, module = line.split(' ',1);
22 connectorid = type = peerid = None
23 modules[moduleid] = (module, []);
26 connectorid, type = line.split(' ',1);
27 elts = type.rsplit(' ',1);
28 if elts[-1].startswith('0x'):
32 modules[moduleid][1].append((connectorid, type, peerid))
33 connectors[connectorid] = moduleid
35 for moduleid, (type, cs) in modules.iteritems():
36 type = type.split('<',1)[0]
37 type = type.rsplit('::',1)[-1]
38 sys.stdout.write('"%s" [label="%s (%s)"]\n' % (moduleid, type, moduleid))
42 for moduleid, (type, cs) in modules.iteritems():
43 for connectorid, type, peerid in cs:
46 opts.append("arrowtail=odot");
48 opts.append('headlabel="%s"' % peerid)
49 opts.append('taillabel="%s"' % connectorid)
53 if "Output" in type and peerid is not None:
54 sys.stdout.write('"%s" -> "%s"%s\n' % (moduleid, connectors[peerid],opts))
56 sys.stdout.write('anon%d [label="", shape=point, height=.05];\n' % anonid)
58 sys.stdout.write('"%s" -> anon%d%s;\n' % (moduleid, anonid, opts))
60 sys.stdout.write('anon%d -> "%s"%s;\n' % (anonid, moduleid, opts))
63 sys.stdout.write("}\n")