'Match current input symbol against ttype.  Attempt
single token insertion or deletion error recovery.  If
that fails, throw MismatchedTokenException.
To turn off single token insertion or deletion error
recovery, override mismatchRecover() and have it call
plain mismatch(), which does not recover.  Then any error
in a rule will cause an exception and immediate exit from
rule.  Rule would recover by resynchronizing to the set of
symbols that can follow rule ref.'

def match(self, input, ttype, follow):

    matchedSymbol = self.getCurrentInputSymbol(input)
    if (self.input.LA(1) == ttype):
        self.input.consume()
        self._state.errorRecovery = False
        return matchedSymbol
    if (self._state.backtracking > 0):
        raise BacktrackingFailed
    matchedSymbol = self.recoverFromMismatchedToken(input, ttype, follow)
    return matchedSymbol
