} else {
if (insideComment) {
if (c == ')') {
insideComment = false;
comment = commentBuilder.toString();
result.add(new Product(token, version,
comment));
insideToken = true;
tokenBuilder = new StringBuilder();
} else {
commentBuilder.append(c);
}
} else {
result.add(new Product(token, version, null));
insideToken = true;
tokenBuilder = new StringBuilder();
tokenBuilder.append(c);
}
}
}
}
}
if (insideComment) {
comment = commentBuilder.toString();
result.add(new Product(token, version, comment));
} else {
if (insideVersion) {
version = versionBuilder.toString();
result.add(new Product(token, version, null));
} else {
if (insideToken && (tokenBuilder.length() > 0)) {
token = tokenBuilder.toString();
result.add(new Product(token, null, null));
}
}
}
}