code: protected String number() throws ParserException {
          StringBuilder sb = new StringBuilder();
          sb.append(current);
          next();
          boolean hasDot = false;
          while (!end() && (Character.isDigit(current) || current == '.')) {
              if (current == '.') {
                  if (hasDot) {
                      throw new ParserException("Unexpected '.' at position " + pos);
                  }
                  hasDot = true;
              }
              sb.append(current);
              next();
          }
          return sb.toString();
      }
docs: num       [0-9]+|[0-9]*\.[0-9]+