|
@@ -20,8 +20,6 @@ class BootstrapVisitor(PrimitivesVisitor):
|
|
|
return "%s_%s" % (self.prepend_name, name) if isinstance(name, int) else name
|
|
|
|
|
|
def dump(self):
|
|
|
- link_id = 0
|
|
|
-
|
|
|
if self.main:
|
|
|
call = self.value(Action("call"))
|
|
|
access = self.value(Action("access"))
|
|
@@ -49,11 +47,7 @@ class BootstrapVisitor(PrimitivesVisitor):
|
|
|
|
|
|
source = self.rename(source)
|
|
|
target = self.rename(target)
|
|
|
- link_id += 1
|
|
|
- output.append("Dict _%s(%s, %s, %s)\n" % (link_id, source, value, target))
|
|
|
- #output.append("Edge _%s_0(%s, %s)\n" % (linkname, source, target))
|
|
|
- #output.append("Node _%s_2(%s)\n" % (linkname, value))
|
|
|
- #output.append("Edge _%s_1(_%s_0, _%s_2)\n" % (linkname, linkname, linkname))
|
|
|
+ output.append("Dict (%s, %s, %s)\n" % (source, value, target))
|
|
|
elif t == "E":
|
|
|
name, source, target = data
|
|
|
source = source if self.first != source else "initial_IP"
|
|
@@ -63,24 +57,3 @@ class BootstrapVisitor(PrimitivesVisitor):
|
|
|
target = self.rename(target)
|
|
|
output.append("Edge _%s(_%s, _%s)\n" % (name, source, target))
|
|
|
return ''.join(output)
|
|
|
-
|
|
|
- """
|
|
|
- def visit_definition(self, tree):
|
|
|
- for a in tree.get_children("ID"):
|
|
|
- name = a.get_tail()[0]
|
|
|
- return PrimitivesVisitor.visit_definition(self, tree)
|
|
|
-
|
|
|
- def visit_vardecl(self, tree):
|
|
|
- if len(tree.get_tail()) > 2:
|
|
|
- for a in tree.get_children("ID"):
|
|
|
- name = a.get_tail()[0]
|
|
|
- return PrimitivesVisitor.visit_vardecl(self, tree)
|
|
|
- else:
|
|
|
- return PrimitivesVisitor.visit_vardecl(self, tree)
|
|
|
-
|
|
|
- def visit_funcdecl(self, tree):
|
|
|
- for a in tree.get_children("func_name"):
|
|
|
- for b in a.get_children("ID"):
|
|
|
- name = b.get_tail()[0]
|
|
|
- return PrimitivesVisitor.visit_funcdecl(self, tree)
|
|
|
- """
|