encodedSpecs.addAll(subTokenList);
}
}
private Multiplier multiplier(String expression, int offset) {
Matcher matcher = MULTIPLIER_PREFIX_PATTERN.matcher(expression);
if (!matcher.find()) {
return null;
}
if (matcher.start() > 0) {
fail(offset + matcher.start(), "illegal multiplier position");
}
Matcher digitMatcher = DIGIT_PATTERN.matcher(expression);
if (!digitMatcher.find()) {
return null;
}
String digitStr = expression.substring(0, digitMatcher.end());
int number = 0;
try {
number = Integer.parseInt(digitStr);
} catch (NumberFormatException e) {
fail(offset, e);