}
@Override
protected Long doAccept(Token token, int flags) throws CommandSyntaxException {
String str = token.text;
ScaleFactor factor = scaleFactor(str);
if (factor != null) {
str = str.substring(0, str.length() - factor.getUnit().length());
}
try {
long tmp = Long.parseLong(str);
if (factor != null) {
tmp *= factor.getMultiplier();
}
return new Long(tmp);
} catch (NumberFormatException ex) {
throw new CommandSyntaxException("invalid size");
}