code: private static boolean expect(StringTokenizer tokenizer, String token) {
          if (!tokenizer.hasMoreTokens()) {
              return false;
          }
          String s = tokenizer.nextToken();
          if (DEBUG) {
              System.out.println("token=" + s);
          }
          return s.equals(token);
      }
docs: Expect a particular token string to be returned by the given
  StringTokenizer.
  
  @param tokenizer
  the StringTokenizer
  @param token
  the expectedToken
  @return true if the expected token was returned, false if not