code: public String lookupNextToken() {
          skipWhitespace();
          int start = index;
          for (int end = index; end < originalInput.length(); end++) {
              if (Character.isWhitespace(originalInput.charAt(end))) {
                  if (end > start) {
                      return originalInput.subSequence(start, end).toString();
                  }
                  return null;
              }
          }
          if (start < originalInput.length()) {
              return originalInput.subSequence(start, originalInput.length())
                      .toString();
          }
          return null;
      }
docs: This method skips all whitespaces and returns the full text, until
  another whitespace area or the end of the input is reached. The method
  will not update any index pointers.
  
  @return the next token found, or null.