def match(self, f, *args):
try:<EOL><INDENT>match = f(self.tokenizer, *args)<EOL><DEDENT>except StopIteration:<EOL><INDENT>return<EOL><DEDENT>if match is None:<EOL><INDENT>return<EOL><DEDENT>if not isinstance(match, grammar.TokenMatch):<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>% (f, match))<EOL><DEDENT>self.matched = match<EOL>return match<EOL>
Match grammar function 'f' against next token and set 'self.matched'.

        Arguments:
            f: A grammar function - see efilter.parsers.common.grammar. Must
                return TokenMatch or None.
            args: Passed to 'f', if any.

        Returns:
            Instance of efilter.parsers.common.grammar.TokenMatch or None.

        Comment:
            If a match is returned, it will also be stored in self.matched.