* @throws ErrorSyntax if the signature has two or more multiplicities
* @throws ErrorType if you attempt to extend the builtin sigs NONE, SIGINT, SEQIDX, or STRING
*/
public PrimSig (String label, PrimSig parent, Attr... attributes) throws Err {
super(((parent!=null && parent.isEnum!=null) ? parent.type : null), label, Util.append(attributes, Attr.SUBSIG));
if (parent==SIGINT) throw new ErrorSyntax(pos, "sig "+label+" cannot extend the builtin \"Int\" signature");
if (parent==SEQIDX) throw new ErrorSyntax(pos, "sig "+label+" cannot extend the builtin \"seq/Int\" signature");
if (parent==STRING) throw new ErrorSyntax(pos, "sig "+label+" cannot extend the builtin \"String\" signature");
if (parent==NONE) throw new ErrorSyntax(pos, "sig "+label+" cannot extend the builtin \"none\" signature");
if (parent==null) parent=UNIV; else if (parent!=UNIV) parent.children.add(this);
this.parent = parent;
if (isEnum!=null && parent!=UNIV) throw new ErrorType(pos, "sig "+label+" is not a toplevel sig, so it cannot be an enum.");
for( ; parent!=null ; parent=parent.parent) if (parent.isEnum!=null) {
if (parent!=this.parent) throw new ErrorSyntax(pos, "sig "+label+" cannot extend a signature which is an atom in an enum.");
if (isOne==null) throw new ErrorSyntax(pos, "sig "+label+" is an atom in an enum, so it must have the \"one\" multiplicity.");
}
}