question: public String number ( ) throws ParseException { int startIdx = ptr ; try { if ( ! isDigit ( lookAhead ( 0 ) ) ) { throw new ParseException ( buffer + ": Unexpected token at " + lookAhead ( 0 ) , ptr ) ; } consume ( 1 ) ; while ( true ) { char next = lookAhead ( 0 ) ; if ( isDigit ( next ) ) { consume ( 1 ) ; } else break ; } return String . valueOf ( buffer , startIdx , ptr - startIdx ) ; } catch ( ParseException ex ) { return String . valueOf ( buffer , startIdx , ptr - startIdx ) ; } }
target:  Get and consume the next number.