code: private int assertToken(final StreamTokenizer tokeniser, Reader in, final int token)
              throws IOException, ParserException {
  
          int ntok = nextToken(tokeniser, in);
          if (ntok != token) {
              throw new ParserException(MessageFormat.format(UNEXPECTED_TOKEN_MESSAGE, token, tokeniser.ttype), getLineNumber(tokeniser, in));
          }
  
          if (log.isDebugEnabled()) {
              log.debug("[" + token + "]");
          }
          return ntok;
      }
docs: Asserts that the next token in the stream matches the specified token.
  
  @param tokeniser stream tokeniser to perform assertion on
  @param token     expected token
  @return int value of the ttype field of the tokeniser
  @throws IOException     when unable to read from stream
  @throws ParserException when next token in the stream does not match the expected token