// ?TupleElementIn ?TupleTypeIn ?ListTypeIn ?STypeOut ?typeOut ?DTypeOut
// ?TupleElementOut ?TupleTypeOut ?ListTypeOut
if (tokens[i + 3] != null) {
// found ?TupleElementIn tokens[9]
TupleSType tuple = new TupleSType();
if (tokens[i + 4] != null) {
if (tokens[i + 4].equals("rest")) {
tuple.setRest(true);
} else {
SType tupleType = null;
if (tokens[i + 4].equals("Anyany")) {
tupleType = new AnySType();
} else {
tupleType = new PrimitiveSType(tokens[i + 4]);
}
tuple.addElement(tokens[i + 3], tupleType);
}
}
peInputDescriptor.setSType(tuple);
}
// checking for ArraySType
else if (tokens[i + 5] != null) {
// found ?ListElementIn tokens[9]
ArraySType array = null;
// found Tuple element
if (tokens[i + 7] != null) {
TupleSType tuple = new TupleSType();
if (tokens[i + 7].equals("rest")) {
tuple.setRest(true);
} else {
SType tupleType = null;
if (tokens[i + 8].equals("Anyany")) {
tupleType = new AnySType();
} else {
tupleType = new PrimitiveSType(tokens[i + 8]);
}
tuple.addElement(tokens[i + 7], tupleType);
}
array = new ArraySType(tuple, Integer.parseInt(tokens[i + 6]));
} else {
Integer size = Integer.parseInt(tokens[i + 6]);
// what is the array Type?
SType tupleType = null;
if (tokens[i + 5].equals("Anyany")) {
tupleType = new AnySType();
} else {
tupleType = new PrimitiveSType(tokens[i + 5]);
}
array = new ArraySType(tupleType, size);
}
peInputDescriptor.setSType(array);
}
// checking for ListSType
else if (tokens[i + 9] != null) {
// found ?ListElementIn tokens[9]
ListSType list = null;
if (tokens[i + 10] != null) {
TupleSType tuple = new TupleSType();
if (tokens[i + 10].contains("rest")) {
tuple.setRest(true);
} else {
SType tupleType = null;
if (tokens[i + 11].equals("Anyany")) {
tupleType = new AnySType();
} else {
tupleType = new PrimitiveSType(tokens[i + 11]);
}
tuple.addElement(tokens[i + 10], tupleType);
}
list = new ListSType(tuple);
} else {
list = new ListSType(new PrimitiveSType(tokens[i + 9]));
}