String rangesetname = pn.getChild("range").getChild("type").getTerminal();
assert rangesetname != null;
- /* get domain multiplicity */
- String domainmult = pn.getChild("domain").getChild("mult").getTerminal();
- assert domainmult != null;
+ /* get domain multiplicity */
+ String domainmult;
+ if (pn.getChild("domain").getChild("domainmult") != null)
+ domainmult = pn.getChild("domain").getChild("domainmult").getChild("mult").getTerminal();
+ //assert domainmult != null;
/* get range multiplicity */
- String rangemult = pn.getChild("range").getChild("mult").getTerminal();
- assert rangemult != null;
+ String rangemult;
+ if (pn.getChild("range").getChild("domainrange") != null)
+ rangemult = pn.getChild("range").getChild("domainrange").getChild("mult").getTerminal();
+ //assert rangemult != null;
/* NOTE: it is assumed that the sets have been parsed already so that the
set namespace is fully populated. any missing setdescriptors for the set
} else if (t instanceof StructureTypeDescriptor) {
StructureTypeDescriptor type = (StructureTypeDescriptor) t;
- TypeDescriptor subtype = type.getSubType();
+ TypeDescriptor subtype = type.getSuperType();
// check that the subtype is valid
if (subtype instanceof MissingTypeDescriptor) {
er.report(null, "Undefined subtype '" + subtype.getSymbol() + "'");
ok = false;
} else {
- type.setSubType(newtype);
+ type.setSuperType(newtype);
}
}
} else if (t instanceof StructureTypeDescriptor) {
StructureTypeDescriptor type = (StructureTypeDescriptor)t;
- TypeDescriptor subtype = type.getSubType();
+ TypeDescriptor subtype = type.getSuperType();
Iterator fields = type.getFields();
while (fields.hasNext()) {
return false;
}
- stGlobals.add(new VarDescriptor(name, name, td));
+ stGlobals.add(new VarDescriptor(name, name, td,true));
return true;
}
}
/* lookup the type to get the type descriptor */
- type.setSubType(lookupType(subtype, CREATE_MISSING));
+ type.setSuperType(lookupType(subtype, CREATE_MISSING));
}
// set the current type so that the recursive parses on the labels