code: private BigDecimal parseBasicNumber(final NumberBuffer buffer) {
          final StringBuilder builder = new StringBuilder();
          int i = buffer.position();
  
          while (i < buffer.length()) {
              final char c = buffer.charAt(i);
  
              if (isArabicNumeral(c)) {
                  // Arabic numerals; 0 to 9 or ０ to ９ (full-width)
                  builder.append(arabicNumeralValue(c));
              } else if (isKanjiNumeral(c)) {
                  // Kanji numerals; 〇, 一, 二, 三, 四, 五, 六, 七, 八, or 九
                  builder.append(kanjiNumeralValue(c));
              } else if (isDecimalPoint(c)) {
                  builder.append(".");
              } else if (isThousandSeparator(c)) {
                  // Just skip and move to the next character
              } else {
                  // We don't have an Arabic nor kanji numeral, nor separation or punctuation, so we'll stop.
                  break;
              }
  
              i++;
              buffer.advance();
          }
  
          if (builder.length() == 0) {
              // We didn't build anything, so we don't have a number
              return null;
          }
  
          return new BigDecimal(builder.toString());
      }
docs: Parse a basic number, which is a sequence of Arabic numbers or a sequence or 0-9 kanji numerals (〇 to 九).
  
  @param buffer buffer to parse
  @return parsed number, or null on error or end of input