+ if "special" in attr:
+ if not "init" in attr:
+ print "Node type %s has an attribute with a \"special\" entry but without \"init\"" % nodename
+ sys.exit(1)
+
+ if attrs_with_special != 0:
+ print "Node type %s has more than one attribute with a \"special\" entry" % nodename
+ sys.exit(1)
+
+ attrs_with_special += 1
+
+ if "prefix" in attr["special"]:
+ specialname = attr["special"]["prefix"] + nodename
+ elif "suffix" in attr["special"]:
+ specialname = nodename + attr["special"]["suffix"]
+ else:
+ print "Unknown special constructor type for node type %s" %nodename
+ sys.exit(1)
+
+ specialconstrs.append(
+ dict(
+ constrname = specialname,
+ attrname = attr["name"],
+ value = attr["special"]["init"]
+ )
+ )
+ elif "init" in attr:
+ initargs.append(attr["name"])
+ else:
+ arguments.append(attr["name"])