'Check whether the grammar rules cover the given list of tokens.
If not, then raise an exception.
:type tokens: list(str)'

def check_coverage(self, tokens):

    missing = [tok for tok in tokens if (not self._lexical_index.get(tok))]
    if missing:
        missing = u',    '.join(((u'%r' % (w,)) for w in missing))
        raise ValueError((u'Grammar    does    not    cover    some    of    the    input    words:    %r.' % missing))
