Type type = types.next();
String type_name = buildTypeName(type);
Iterator<Alternative> alts = type.alternativeIterator();
while (alts.hasNext()) {
Alternative alt = alts.next();
String decl = buildConstructorDecl(type, alt);
hprintln(decl + ";");
printDocHead("Constructs a " + alt.getId() + " of type "
+ type_name, "Like all ATerm types, " + type_name
+ "s are maximally shared.");
printDocArgs("arg", "a child of the new " + alt.getId(), type,
alt);
printDocReturn("A pointer to a " + alt.getId()
+ ", either newly constructed or shared");
printDocTail();
printFoldOpen(decl.toString());
println(decl + " {");