1
# Copyright (c) AT&T Corp. 1994, 1995.
2
# This code is licensed by AT&T Corp. For the
3
# terms and conditions of the license, see
4
# http://www.research.att.com/orgs/ssr/book/reuse
8
printf("strict digraph typeref {\n");
9
printf(" node [shape=record];\n");
12
(NF == 1) { # starts a new node in the node file
13
Name[n_names++] = name = $1;
17
(NF == 2) { # enters a field in the node file
18
if (($2 == "v") || (PROCS && ($2 == "p"))) {
19
Field[name,n_fields] = $2 ": " $1;
20
Field[name,$1] = n_fields;
25
(NF == 6) { # an entry in the edge file. example:
26
# v BinaryNode left t - Tree
28
if ((kind == "v") || (PROCS && (kind == "p"))) {
29
if (($2 != "-") && ($2 != $3))
30
from = "\"" $2 "\".f0_1_" Field[$2,$3];
31
else from = "\"" $3 "\"";
33
if (($5 != "-") && ($5 != $6))
34
to = "\"" $5 "\".f0_1_" Field[$5,$6];
35
else to = "\"" $6 "\"";
37
printf("\t%s -> %s;\n",from, to);
44
printf("\t\"%s\" [label=\"{%s{",name,name);
45
for (j = 0; Field[name,j] != ""; j++) {
46
if (j > 0) printf("|");
47
printf("%s",Field[name,j]);