public Iterator<Token> iterator() {
        return new Iterator<Token>() {

                public boolean hasNext() {
                    return !skipWhitespacesAndComments();
                }

                public Token next() {
                    for(;;) {
                        try {
                            return nextToken();
                        } catch(LexisException ex) {
                            errorRecovery();
                        }
                    }
                }

                public void remove() {
                    throw new UnsupportedOperationException();
                }
            };
    }