private void discardTokens(TokenStream stream, boolean ignoreCase, String... tokens) {
        if (tokens.length > 0) {
            for (String token : tokens) {
                String next = getNextToken(stream);
                if (!compare(token, next, ignoreCase))
                    throw new MismatchedTokenException(token, next);
            }
        }
    }