changeset 62:f5f904ab0f46

A dot graph now only works on entry nodes.
author Janus Dam Nielsen <janus.nielsen@alexandra.dk>
date Wed, 27 May 2009 11:51:17 +0200
parents 088168175adb
children b60bb8512736
files pysmcl/graph.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/graph.py	Tue May 26 18:14:12 2009 +0200
+++ b/pysmcl/graph.py	Wed May 27 11:51:17 2009 +0200
@@ -3,8 +3,8 @@
 class Node:
     count = 0
 
-    def __init__(self, msg = ""):
-        self.out=[]
+    def __init__(self, out, msg = ""):
+        self.out = out
         Node.count += 1
         self.nr = str(Node.count)
         self.msg = msg
@@ -12,17 +12,17 @@
 
 class Graph:
 
-    def __init__(self, entry, ex):
+    def __init__(self, entry):
         self.entry = entry
-        self.ex = ex
+#         self.ex = ex
 
     def to_dot(self):
         taken = set()
         print "digraph G {"
         print "  in -> %s" % self.entry.nr
         print '  in [shape = plaintext, label=""]'
-        print "  %s -> out" % self.ex.nr
-        print '  out [shape = plaintext, label=""]'
+#         print "  %s -> out" % self.ex.nr
+#         print '  out [shape = plaintext, label=""]'
         stack = [self.entry]
         while(True):
             while(True):