def keywords(tokens, expected):
try:<EOL><INDENT>token = next(iter(tokens))<EOL><DEDENT>except StopIteration:<EOL><INDENT>return<EOL><DEDENT>if token and token.name == "<STR_LIT>" and token.value.lower() in expected:<EOL><INDENT>return TokenMatch(None, token.value, (token,))<EOL><DEDENT>
Match against any of a set/dict of keywords.

    Not that this doesn't support multi-part keywords. Any multi-part keywords
    must be special-cased in their grammar function.