throw new InternalException("Unhandle " + currentMacro.getClass());
}
if (node.getType() instanceof HomogeneousType) {
HomogeneousType type = (HomogeneousType) node.getType();
String listType = computeListType(type.getName());
newList.newNormalDeclaration(listType);
this.listStack.push(new NormalListDescriptor(listName, listType));
}
else {
String leftListType;
String rightListType;
if (node.getType() instanceof SeparatedType) {
SeparatedType type = (SeparatedType) node.getType();
leftListType = computeListType(type.getLeftElementName());
rightListType = computeListType(type.getRightElementName());
newList.newSeparatedDeclaration(leftListType, rightListType);
this.listStack.push(new DoubleListDescriptor(
DoubleListDescriptor.Type.SEPARATED, listName,
leftListType, rightListType));
}
else if (node.getType() instanceof AlternatedType) {
AlternatedType type = (AlternatedType) node.getType();
leftListType = computeListType(type.getLeftElementName());
rightListType = computeListType(type.getRightElementName());
newList.newAlternatedDeclaration(leftListType, rightListType);
this.listStack.push(new DoubleListDescriptor(
DoubleListDescriptor.Type.ALTERNATED, listName,