'Consumes a single string character and advance the state as
necessary.
:param str char: a character to consume.'

def consume(self, char):

    if (not isinstance(char, str)):
        raise TypeError((u'%s    requires    str    input' % self.__class__.__name__))
    try:
        self.handlers.get(self.state)(char)
    except TypeError:
        pass
    except KeyError:
        if __debug__:
            self.flags[u'state'] = self.state
            self.flags[u'unhandled'] = char
            self.dispatch(u'debug', *self.params)
            self.reset()
        else:
            raise
