}
private static int consumeNumeric(final String sql, final int start, final CompositeNode parent) throws ParseException {
Matcher matcher = Pattern.compile("((?:[+-]?(?:\\d+)?(?:\\.\\d+(?:[eE][+-]?\\d+)?))|(?:[+-]?\\d+))").matcher(sql.substring(start));
if (matcher.find()) {
parent.add(new NumericLiteralPiece(matcher.group(1), matcher.start()));
return start + matcher.group(1).length();
}
else {
throw new ParseException("Invalid numeric literal", start);
}