'Read the next token and interpret it as an integer.
@raises dns.exception.SyntaxError:
@rtype: int'

def get_int(self):

    token = self.get().unescape()
    if (not token.is_identifier()):
        raise dns.exception.SyntaxError('expecting    an    identifier')
    if (not token.value.isdigit()):
        raise dns.exception.SyntaxError('expecting    an    integer')
    return int(token.value)
