Ë
    Q5ýjÂl  ã                   óÔ   — d Z ddlZddlZddlmZ ddlZddlZddlZddl	Zh d£Z
dhZdZdZdZdZd	Zd
ZdZ G d„ dej&                  j(                  «      Z G d„ d«      Z G d„ d«      Zy)zTokenize DNS zone file formaté    N)ÚAny>   ú	ú
ú ú"ú(ú)ú;r   é   é   é   é   é   é   c                   ó   — e Zd ZdZy)ÚUngetBufferFullzDAn attempt was made to unget a token when the unget buffer was full.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úG/root/telegram-saas/.venv/lib/python3.12/site-packages/dns/tokenizer.pyr   r   )   s   „ ÚNr   r   c            
       ó¸   — e Zd ZdZ	 	 	 ddededededz  fd„Zdefd	„Z	defd
„Z
defd„Zdefd„Zdefd„Zdefd„Zdefd„Zdefd„Zd„ Zd„ Zd„ Zdd„Zdd„Zy)ÚTokenzŽA DNS zone file format token.

    ttype: The token type
    value: The token value
    has_escape: Does the token value contain escapes?
    NÚttypeÚvalueÚ
has_escapeÚcommentc                 ó<   — || _         || _        || _        || _        y)zInitialize a token instance.N)r   r   r   r   )Úselfr   r   r   r   s        r   Ú__init__zToken.__init__5   s    € ð ˆŒ
ØˆŒ
Ø$ˆŒØˆ�r   Úreturnc                 ó(   — | j                   t        k(  S ©N)r   ÚEOF©r!   s    r   Úis_eofzToken.is_eofC   ó   € Ø�z‰zœSÑ Ð r   c                 ó(   — | j                   t        k(  S r%   )r   ÚEOLr'   s    r   Úis_eolzToken.is_eolF   r)   r   c                 ó(   — | j                   t        k(  S r%   )r   Ú
WHITESPACEr'   s    r   Úis_whitespacezToken.is_whitespaceI   ó   € Ø�z‰zœZÑ'Ð'r   c                 ó(   — | j                   t        k(  S r%   )r   Ú
IDENTIFIERr'   s    r   Úis_identifierzToken.is_identifierL   r0   r   c                 ó(   — | j                   t        k(  S r%   )r   ÚQUOTED_STRINGr'   s    r   Úis_quoted_stringzToken.is_quoted_stringO   s   € Ø�z‰zœ]Ñ*Ð*r   c                 ó(   — | j                   t        k(  S r%   )r   ÚCOMMENTr'   s    r   Ú
is_commentzToken.is_commentR   s   € Ø�z‰zœWÑ$Ð$r   c                 ó(   — | j                   t        k(  S r%   )r   Ú	DELIMITERr'   s    r   Úis_delimiterzToken.is_delimiterU   s   € Ø�z‰zœYÑ&Ð&r   c                 óR   — | j                   t        k(  xs | j                   t        k(  S r%   )r   r+   r&   r'   s    r   Úis_eol_or_eofzToken.is_eol_or_eofX   s   € Ø�z‰zœSÑ Ò5 D§J¡J´#Ñ$5Ð5r   c                 óŒ   — t        |t        «      sy| j                  |j                  k(  xr | j                  |j                  k(  S )NF©Ú
isinstancer   r   r   ©r!   Úothers     r   Ú__eq__zToken.__eq__[   s4   € Ü˜%¤Ô'ØØ�z‰z˜UŸ[™[Ñ(ÒF¨T¯Z©Z¸5¿;¹;Ñ-FÐFr   c                 óŒ   — t        |t        «      sy| j                  |j                  k7  xs | j                  |j                  k7  S )NTr@   rB   s     r   Ú__ne__zToken.__ne__`   s4   € Ü˜%¤Ô'ØØ�z‰z˜UŸ[™[Ñ(ÒE¨D¯J©J¸%¿+¹+Ñ,EÐEr   c                 ó:   — | j                   › d| j                  › d�S )Nú "r   )r   r   r'   s    r   Ú__str__zToken.__str__e   s   € Ø—*‘*�˜R §
¡
˜|¨1Ð-Ð-r   c                 óœ  — | j                   s| S d}t        | j                  «      }d}||k  �rŠ| j                  |   }|dz  }|dk(  �rd||k\  rt        j                  j
                  ‚| j                  |   }|dz  }t        j                  j                  |«      �r||k\  rt        j                  j
                  ‚| j                  |   }|dz  }||k\  rt        j                  j
                  ‚| j                  |   }|dz  }t        j                  j                  |«      rt        j                  j                  |«      st        j                  j                  ‚t        |«      dz  t        |«      dz  z   t        |«      z   }|dkD  rt        j                  j                  ‚t        |«      }||z  }||k  r�ŒŠt        | j                  |«      S )NÚ r   r   ú\éd   é
   éÿ   )r   Úlenr   ÚdnsÚ	exceptionÚUnexpectedEndÚ
_text_utilÚis_ascii_digitÚSyntaxErrorÚintÚchrr   r   ©r!   Ú	unescapedÚlÚiÚcÚc2Úc3Ú	codepoints           r   ÚunescapezToken.unescapeh   s~  € Ø�ŠØˆKØˆ	Ü�—
‘
‹OˆØˆØ�!‹eØ—
‘
˜1‘ˆAØ�‰FˆAØ�D‹yØ˜’6ÜŸ-™-×5Ñ5Ð5Ø—J‘J˜q‘M�Ø�Q‘�Ü—>‘>×0Ñ0°Õ3Ø˜A’vÜ!Ÿm™m×9Ñ9Ð9ØŸ™ A™�BØ˜‘F�AØ˜A’vÜ!Ÿm™m×9Ñ9Ð9ØŸ™ A™�BØ˜‘F�AäŸ™×5Ñ5°bÔ9ÜŸN™N×9Ñ9¸"Ô=ä!Ÿm™m×7Ñ7Ð7Ü # A£¨¡¬s°2«w¸©|Ñ ;¼cÀ"»gÑ E�IØ  3’Ü!Ÿm™m×7Ñ7Ð7Ü˜I›�AØ˜‰NˆIð5 �!Œeô6 �T—Z‘Z Ó+Ð+r   c                 óâ  — t        «       }t        | j                  «      }d}||k  �rª| j                  |   }|dz  }|dk(  �rv||k\  rt        j                  j
                  ‚| j                  |   }|dz  }t        j                  j                  |«      �r||k\  rt        j                  j
                  ‚| j                  |   }|dz  }||k\  rt        j                  j
                  ‚| j                  |   }|dz  }t        j                  j                  |«      rt        j                  j                  |«      st        j                  j                  ‚t        |«      dz  t        |«      dz  z   t        |«      z   }|dkD  rt        j                  j                  ‚|d|z  z  }n'||j                  «       z  }n||j                  «       z  }||k  r�Œªt        | j                  t        |«      «      S )Nr   r   rL   rM   rN   rO   s   %c)Ú	bytearrayrP   r   rQ   rR   rS   rT   rU   rV   rW   Úencoder   r   ÚbytesrY   s           r   Úunescape_to_byteszToken.unescape_to_bytes‹   sœ  € ô2 “Kˆ	Ü�—
‘
‹OˆØˆØ�!‹eØ—
‘
˜1‘ˆAØ�‰FˆAØ�D‹yØ˜’6ÜŸ-™-×5Ñ5Ð5Ø—J‘J˜q‘M�Ø�Q‘�Ü—>‘>×0Ñ0°Õ3Ø˜A’vÜ!Ÿm™m×9Ñ9Ð9ØŸ™ A™�BØ˜‘F�AØ˜A’vÜ!Ÿm™m×9Ñ9Ð9ØŸ™ A™�BØ˜‘F�AäŸ™×5Ñ5°bÔ9ÜŸN™N×9Ñ9¸"Ô=ä!Ÿm™m×7Ñ7Ð7Ü # A£¨¡¬s°2«w¸©|Ñ ;¼cÀ"»gÑ E�IØ  3’Ü!Ÿm™m×7Ñ7Ð7Ø ¨)Ñ!4Ñ4‘Ið  §¡£Ñ+‘Ià˜QŸX™X›ZÑ'�	ðE �!ŒeôF �T—Z‘Z¤ yÓ!1Ó2Ð2r   )rK   FN)r#   r   )r   r   r   r   rW   r   ÚboolÚstrr"   r(   r,   r/   r3   r6   r9   r<   r>   rD   rF   rI   ra   rf   r   r   r   r   r   -   s½   „ ñð Ø Ø"ñàðð ðð ð	ð
 �t‘óð!˜ó !ð!˜ó !ð(˜tó (ð(˜tó (ð+ $ó +ð%˜Dó %ð'˜dó 'ð6˜tó 6òGò
Fò
.ó!,ôF?3r   r   c                   óÈ  — e Zd ZdZej
                  ddfdededz  dej                  j                  dz  fd„Zdefd„Zdeeef   fd	„Zd
eddfd„Zdefd„Zd2dededefd„Zdeddfd„Zd„ ZeZd„ Zd3dedefd„Zdefd„Zd3dedefd„Zd3dedefd„Zd3dedefd„Zd4dedz  defd„Zd4dedz  defd„Z defd„Z!d4dedz  de"e   fd„Z#d5d edefd!„Z$	 	 	 d6ded"ej                  jJ                  dz  d#ed$ej                  jJ                  dz  dej                  jJ                  f
d%„Z&d3dededefd&„Z'dedefd'„Z(d3dededefd(„Z)d3dededefd)„Z*d3dededefd*„Z+d4dededz  defd+„Z,d4dededz  defd,„Z-dedefd-„Z.	 	 	 d6d"ej                  jJ                  dz  d#ed$ej                  jJ                  dz  dej                  jJ                  fd.„Z/defd/„Z0defd0„Z1defd1„Z2y)7Ú	Tokenizerag  A DNS zone file format tokenizer.

    A token object is basically a (type, value) tuple.  The valid
    types are EOF, EOL, WHITESPACE, IDENTIFIER, QUOTED_STRING,
    COMMENT, and DELIMITER.

    file: The file to tokenize

    ungotten_char: The most recently ungotten character, or None.

    ungotten_token: The most recently ungotten token, or None.

    multiline: The current multiline level.  This value is increased
    by one every time a '(' delimiter is read, and decreased by one every time
    a ')' delimiter is read.

    quoting: This variable is true if the tokenizer is currently
    reading a quoted string.

    eof: This variable is true if the tokenizer has encountered EOF.

    after_cr: This variable is true if the most recent character read was
    a carriage return, which is read as a newline.

    delimiters: The current delimiter dictionary.

    line_number: The current line number

    filename: A filename that will be returned by the where() method.

    idna_codec: A dns.name.IDNACodec, specifies the IDNA
    encoder/decoder.  If None, the default IDNA
    encoder/decoder is used.
    NÚfÚfilenameÚ
idna_codecc                 óè  — t        |t        «      rt        j                  |«      }|€Td}nQt        |t        «      r(t        j                  |j                  «       «      }|€d}n|€|t        j                  u rd}nd}|| _        d| _	        d| _
        d| _        d| _        d| _        d| _        t        | _        d| _        |€J ‚|| _        |€ t&        j(                  j*                  | _        y|| _        y)aØ  Initialize a tokenizer instance.

        f: The file to tokenize.  The default is sys.stdin.
        This parameter may also be a string, in which case the tokenizer
        will take its input from the contents of the string.

        filename: the name of the filename that the where() method
        will return.

        idna_codec: A dns.name.IDNACodec, specifies the IDNA
        encoder/decoder.  If None, the default IDNA
        encoder/decoder is used.
        Nz<string>z<stdin>z<file>r   Fr   )rA   rh   ÚioÚStringIOre   ÚdecodeÚsysÚstdinÚfileÚungotten_charÚungotten_tokenÚ	multilineÚquotingÚeofÚafter_crÚ_DELIMITERSÚ
delimitersÚline_numberrl   rQ   ÚnameÚIDNA_DEFAULTrm   )r!   rk   rl   rm   s       r   r"   zTokenizer.__init__ñ   sÝ   € ô( �aœÔÜ—‘˜A“ˆAØÐØ%‘Ü˜œ5Ô!Ü—‘˜AŸH™H›JÓ'ˆAØÐØ%‘àÐØœŸ	™	‘>Ø(‘Hà'�HØˆŒ	Ø)-ˆÔØ,0ˆÔØˆŒØˆŒØˆŒØˆŒÜ%ˆŒØˆÔØÐ#Ð#Ð#Ø ˆŒØÐÜ25·(±(×2GÑ2GˆD�Oà(ˆD�Or   r#   c                 óˆ  — | j                   €¢| j                  rd}|S | j                  j                  d«      }| j                  r'd| _        |dk(  r| j                  j                  d«      }|dk(  r| j
                  s	d| _        d}|dk(  r	d| _        |S |dk(  r| xj                  dz  c_        |S | j                   }d| _         |S )zRead a character from input.NrK   r   Fr   úT)ru   ry   rt   Úreadrz   rx   r}   ©r!   r]   s     r   Ú	_get_charzTokenizer._get_char#  sÇ   € ð ×ÑÐ%Ø�xŠxØ�ð& ˆð# —I‘I—N‘N 1Ó%�Ø—=’=Ø$)�D”MØ˜D’yà ŸI™IŸN™N¨1Ó-˜Ø˜’9 T§\¢\à$(�D”MØ�AØ˜’7Ø#�D”Hð ˆð ˜$’YØ×$Ò$¨Ñ)Õ$ð ˆð ×"Ñ"ˆAØ!%ˆDÔØˆr   c                 ó2   — | j                   | j                  fS )z·Return the current location in the input.

        Returns a (string, int) tuple.  The first item is the filename of
        the input, the second is the current line number.
        )rl   r}   r'   s    r   ÚwherezTokenizer.where=  s   € ð —‘˜t×/Ñ/Ð0Ð0r   r]   c                 ó6   — | j                   �t        ‚|| _         y)a%  Unget a character.

        The unget buffer for characters is only one character large; it is
        an error to try to unget a character when the unget buffer is not
        empty.

        c: the character to unget
        raises UngetBufferFull: there is already an ungotten char
        N)ru   r   rƒ   s     r   Ú_unget_charzTokenizer._unget_charF  s   € ð ×ÑÐ)ä!Ð!ØˆÕr   c                 ó�   — d}	 | j                  «       }|dk7  r)|dk7  r$|dk7  s| j                  s| j                  |«       |S |dz  }ŒD)aF  Consume input until a non-whitespace character is encountered.

        The non-whitespace character is then ungotten, and the number of
        whitespace characters consumed is returned.

        If the tokenizer is in multiline mode, then newlines are whitespace.

        Returns the number of characters skipped.
        r   r   r   r   r   )r„   rw   rˆ   )r!   Úskippedr]   s      r   Úskip_whitespacezTokenizer.skip_whitespaceV  sS   € ð ˆØØ—‘Ó ˆAØ�CŠx˜A šIØ˜’I d§n¢nØ×$Ñ$ QÔ'Ø"�NØ�q‰LˆGð r   Úwant_leadingÚwant_commentc                 óÊ  — | j                   �=| j                   }d| _         |j                  «       r|r|S |j                  «       r|r|S |S | j                  «       }|r|dkD  rt	        t
        d«      S d}t        }d}	 | j                  «       }|dk(  s|| j                  v �rö|dk(  r&| j                  rt        j                  j                  ‚|dk(  �r³|t        k7  �r©|dk(  r&| xj                  dz  c_        | j                  «        Œ‹|d	k(  rO| j                  dk  rt        j                  j                  ‚| xj                  dz  c_        | j                  «        Œß|d
k(  rJ| j                  sd| _	        t         | _        t        }�Œ
d| _	        t"        | _        | j                  «        �Œ.|dk(  rt	        t$        d«      S |dk(  r¸	 | j                  «       }|dk(  s|dk(  rn||z  }Œ!|r!| j'                  |«       t	        t(        |«      S |dk(  r<| j                  rt        j                  j                  d«      ‚t	        t*        |¬«      S | j                  r| j                  «        d}�Œît	        t$        d|¬«      S |}t,        }n| j'                  |«       nƒ| j                  r$|dk(  rt        j                  j                  d«      ‚|dk(  rG||z  }d}| j                  «       }|dk(  s|dk(  r&| j                  st        j                  j                  ‚||z  }�Œ�|dk(  r:|t        k7  r1| j                  rt        j                  j                  d«      ‚t*        }t	        |||«      S )a½  Get the next token.

        want_leading: If True, return a WHITESPACE token if the
        first character read is whitespace.  The default is False.

        want_comment: If True, return a COMMENT token if the
        first token read is a comment.  The default is False.

        Raises dns.exception.UnexpectedEnd: input ended prematurely

        Raises dns.exception.SyntaxError: input was badly formed

        Returns a Token.
        Nr   r   rK   FTr   r   r	   r   r   r
   zunbalanced parentheses)r   znewline in quoted stringrL   )rv   r/   r9   r‹   r   r.   r2   r„   r|   rx   rQ   rR   rS   r5   rw   rV   Ú_QUOTING_DELIMITERSr{   r+   rˆ   r8   r&   r;   )	r!   rŒ   r�   ÚutokenrŠ   Útokenr   r   r]   s	            r   ÚgetzTokenizer.getj  s  € ð  ×ÑÐ*Ø×(Ñ(ˆFØ"&ˆDÔØ×#Ñ#Ô%ÙØ!�MØ×"Ñ"Ô$ÙØ!�Mà�Ø×&Ñ&Ó(ˆÙ˜G ašKÜœ SÓ)Ð)ØˆÜˆØˆ
ØØ—‘Ó ˆAØ�BŠw˜!˜tŸ™Ò.Ø˜’7˜tŸ|š|ÜŸ-™-×5Ñ5Ð5Ø˜B“; 5¬MÓ#9Ø˜C’xØŸš¨!Ñ+�Ø×,Ñ,Ô.Ø Ø˜cšØŸ>™>¨QÒ.Ü"%§-¡-×";Ñ";Ð;ØŸš¨!Ñ+�Ø×,Ñ,Ô.Ø Ø˜cšØ#Ÿ|š|Ø+/˜DœLÜ.A˜DœOÜ$1˜EÙ$à+0˜DœLÜ.9˜DœOØ ×0Ñ0Ô2Ù$Ø˜dšÜ$¤S¨$Ó/Ð/Ø˜cšØØ $§¡Ó 0˜AØ  Dšy¨A°ªGØ %Ø! Q™J˜Eð	  ñ
 (Ø ×,Ñ,¨QÔ/Ü#(¬°%Ó#8Ð8Ø "šWØ#Ÿ~š~Ü&)§m¡m×&?Ñ&?Ø$<ó'"ð !"ô $)¬°eÔ#<Ð<Ø!Ÿ^š^Ø ×0Ñ0Ô2Ø$&˜EÙ$ä#(¬¨d¸EÔ#BÐBð
 !"˜Ü )™à×$Ñ$ QÔ'ØØ—’ ! t¢)Ü—m‘m×/Ñ/Ð0JÓKÐKØ�d’ð
 ˜‘
�Ø!�
Ø—N‘NÓ$�Ø˜’7˜q Dšy°·²ÜŸ-™-×5Ñ5Ð5Ø�Q‰JˆEñO ðP �BŠ;˜5¤MÒ1Ø�~Š~Ü—m‘m×/Ñ/Ð0HÓIÐIÜˆEÜ�U˜E :Ó.Ð.r   r‘   c                 ó6   — | j                   �t        ‚|| _         y)a  Unget a token.

        The unget buffer for tokens is only one token large; it is
        an error to try to unget a token when the unget buffer is not
        empty.

        token: the token to unget

        Raises UngetBufferFull: there is already an ungotten token
        N)rv   r   ©r!   r‘   s     r   ÚungetzTokenizer.ungetÙ  s   € ð ×ÑÐ*Ü!Ð!Ø#ˆÕr   c                 óR   — | j                  «       }|j                  «       rt        ‚|S )zHReturn the next item in an iteration.

        Returns a Token.
        )r’   r(   ÚStopIterationr”   s     r   ÚnextzTokenizer.nexté  s#   € ð —‘“
ˆØ�<‰<Œ>ÜÐØˆr   c                 ó   — | S r%   r   r'   s    r   Ú__iter__zTokenizer.__iter__ö  s   € Øˆr   Úbasec                 ó^   — | j                  | j                  «       j                  «       |«      S )z¤Read the next token and interpret it as an unsigned integer.

        Raises dns.exception.SyntaxError if not an unsigned integer.

        Returns an int.
        )Úas_intr’   ra   ©r!   r›   s     r   Úget_intzTokenizer.get_intû  s$   € ð �{‰{˜4Ÿ8™8›:×.Ñ.Ó0°$Ó7Ð7r   c                 ó\   — | j                  | j                  «       j                  «       «      S )z¸Read the next token and interpret it as an 8-bit unsigned
        integer.

        Raises dns.exception.SyntaxError if not an 8-bit unsigned integer.

        Returns an int.
        )Úas_uint8r’   ra   r'   s    r   Ú	get_uint8zTokenizer.get_uint8  s"   € ð �}‰}˜TŸX™X›Z×0Ñ0Ó2Ó3Ð3r   c                 ó^   — | j                  | j                  «       j                  «       |«      S )z¸Read the next token and interpret it as a 16-bit unsigned
        integer.

        Raises dns.exception.SyntaxError if not a 16-bit unsigned integer.

        Returns an int.
        )Ú	as_uint16r’   ra   rž   s     r   Ú
get_uint16zTokenizer.get_uint16  ó$   € ð �~‰~˜dŸh™h›j×1Ñ1Ó3°TÓ:Ð:r   c                 ó^   — | j                  | j                  «       j                  «       |«      S )z¸Read the next token and interpret it as a 32-bit unsigned
        integer.

        Raises dns.exception.SyntaxError if not a 32-bit unsigned integer.

        Returns an int.
        )Ú	as_uint32r’   ra   rž   s     r   Ú
get_uint32zTokenizer.get_uint32  r¦   r   c                 ó^   — | j                  | j                  «       j                  «       |«      S )z¸Read the next token and interpret it as a 48-bit unsigned
        integer.

        Raises dns.exception.SyntaxError if not a 48-bit unsigned integer.

        Returns an int.
        )Ú	as_uint48r’   ra   rž   s     r   Ú
get_uint48zTokenizer.get_uint48%  r¦   r   Ú
max_lengthc                 ó^   — | j                  | j                  «       j                  «       |«      S )zúRead the next token and interpret it as a string.

        Raises dns.exception.SyntaxError if not a string.
        Raises dns.exception.SyntaxError if token value length
        exceeds max_length (if specified).

        Returns a string.
        )Ú	as_stringr’   ra   ©r!   r­   s     r   Ú
get_stringzTokenizer.get_string0  s$   € ð �~‰~˜dŸh™h›j×1Ñ1Ó3°ZÓ@Ð@r   c                 ó^   — | j                  | j                  «       j                  «       |«      S )a-  Read the next token and interpret it as a byte string,
        applying any DNS escapes directly to bytes.

        Raises dns.exception.SyntaxError if not a string.
        Raises dns.exception.SyntaxError if the byte length
        exceeds max_length (if specified).

        Returns bytes.
        )Úas_bytesr’   rf   r°   s     r   Ú	get_byteszTokenizer.get_bytes<  s$   € ð �}‰}˜TŸX™X›Z×9Ñ9Ó;¸ZÓHÐHr   c                 ó\   — | j                  | j                  «       j                  «       «      S )z—Read the next token, which should be an identifier.

        Raises dns.exception.SyntaxError if not an identifier.

        Returns a string.
        )Úas_identifierr’   ra   r'   s    r   Úget_identifierzTokenizer.get_identifierI  s$   € ð ×!Ñ! $§(¡(£*×"5Ñ"5Ó"7Ó8Ð8r   Ú
max_tokensc                 ó¶   — g }	 | j                  «       }|j                  «       r| j                  |«       	 |S |j                  |«       t	        |«      |k(  r	 |S ŒW)zµReturn the remaining tokens on the line, until an EOL or EOF is seen.

        max_tokens: If not None, stop after this number of tokens.

        Returns a list of tokens.
        )r’   r>   r•   ÚappendrP   )r!   r¸   Útokensr‘   s       r   Úget_remainingzTokenizer.get_remainingS  s`   € ð ˆØØ—H‘H“JˆEØ×"Ñ"Ô$Ø—
‘
˜5Ô!Øð ˆð �M‰M˜%Ô Ü�6‹{˜jÒ(ØØˆð r   Úallow_emptyc                 óF  — d}	 | j                  «       j                  «       }|j                  «       r| j                  |«       n:|j	                  «       st
        j                  j                  ‚||j                  z  }Œz|s!|st
        j                  j                  d«      ‚|S )a  Read the remaining tokens on the line, which should be identifiers.

        Raises dns.exception.SyntaxError if there are no remaining tokens,
        unless `allow_empty=True` is given.

        Raises dns.exception.SyntaxError if a token is seen that is not an
        identifier.

        Returns a string containing a concatenation of the remaining
        identifiers.
        rK   zexpecting another identifier)	r’   ra   r>   r•   r3   rQ   rR   rV   r   )r!   r½   Úsr‘   s       r   Ú!concatenate_remaining_identifiersz+Tokenizer.concatenate_remaining_identifiersf  sŒ   € ð ˆØØ—H‘H“J×'Ñ'Ó)ˆEØ×"Ñ"Ô$Ø—
‘
˜5Ô!ØØ×&Ñ&Ô(Ü—m‘m×/Ñ/Ð/Ø�—‘ÑˆAð ñ ™qÜ—-‘-×+Ñ+Ð,JÓKÐKØˆr   ÚoriginÚ
relativizeÚrelativize_toc                 óö   — |j                  «       st        j                  j                  d«      ‚t        j                  j                  |j                  || j                  «      }|j                  |xs ||«      S )z�Try to interpret the token as a DNS name.

        Raises dns.exception.SyntaxError if not a name.

        Returns a dns.name.Name.
        úexpecting an identifier)	r3   rQ   rR   rV   r~   Ú	from_textr   rm   Úchoose_relativity)r!   r‘   rÁ   rÂ   rÃ   r~   s         r   Úas_namezTokenizer.as_name  s^   € ð ×"Ñ"Ô$Ü—-‘-×+Ñ+Ð,EÓFÐFÜ�x‰x×!Ñ! %§+¡+¨v°t·±ÓGˆØ×%Ñ% mÒ&=°v¸zÓJÐJr   c                 ó  — |j                  «       st        j                  j                  d«      ‚t        j                  j                  |j                  |«      st        j                  j                  d«      ‚t        |j                  |«      S )an  Try to interpret the token as an unsigned integer.

        The token must consist only of ASCII digits valid in *base*, which
        must be between 2 and 36 inclusive.  A sign, whitespace, underscores,
        and base prefixes such as ``0x`` are not allowed.

        Raises dns.exception.SyntaxError if not an unsigned integer.

        Returns an int.
        rÅ   zexpecting an integer)r3   rQ   rR   rV   rT   Úis_ascii_digitsr   rW   )r!   r‘   r›   s      r   r�   zTokenizer.as_int‘  se   € ð ×"Ñ"Ô$Ü—-‘-×+Ñ+Ð,EÓFÐFÜ�~‰~×-Ñ-¨e¯k©k¸4Ô@Ü—-‘-×+Ñ+Ð,BÓCÐCÜ�5—;‘; Ó%Ð%r   c                 ó‚   — | j                  |¬«      }|dk  s|dkD  r"t        j                  j                  |› d�«      ‚|S )z£Try to interpret the token as an unsigned 8-bit integer.

        Raises dns.exception.SyntaxError if not 8-bit unsigned integer.

        Returns an int.
        )r‘   r   rO   z! is not an unsigned 8-bit integer©r�   rQ   rR   rV   )r!   r‘   r   s      r   r¡   zTokenizer.as_uint8£  sC   € ð —‘ %�Ó(ˆØ�1Š9˜ šÜ—-‘-×+Ñ+¨u¨gÐ5VÐ,WÓXÐXØˆr   c                 óÔ   — | j                  ||¬«      }|dk  s|dkD  rJ|dk(  r#t        j                  j                  |d›d�«      ‚t        j                  j                  |› d�«      ‚|S )z§Try to interpret the token as an unsigned 16-bit integer.

        Raises dns.exception.SyntaxError if not a 16-bit unsigned integer.

        Returns an int.
        ©r‘   r›   r   iÿÿ  é   Úoz( is not an octal unsigned 16-bit integerz" is not an unsigned 16-bit integerrÌ   ©r!   r‘   r›   r   s       r   r¤   zTokenizer.as_uint16°  sy   € ð —‘ %¨d�Ó3ˆØ�1Š9˜ šØ�qŠyÜ—m‘m×/Ñ/Ø˜Q�iÐGÐHóð ô —m‘m×/Ñ/Ø�gÐ?Ð@óð ð ˆr   c                 ó„   — | j                  ||¬«      }|dk  s|dkD  r"t        j                  j                  |› d�«      ‚|S )z§Try to interpret the token as an unsigned 32-bit integer.

        Raises dns.exception.SyntaxError if not a 32-bit unsigned integer.

        Returns an int.
        rÎ   r   l   ÿÿ z" is not an unsigned 32-bit integerrÌ   rÑ   s       r   r¨   zTokenizer.as_uint32Ä  sM   € ð —‘ %¨d�Ó3ˆØ�1Š9˜ 
Ò*Ü—-‘-×+Ñ+Ø�'Ð;Ð<óð ð ˆr   c                 ó„   — | j                  ||¬«      }|dk  s|dkD  r"t        j                  j                  |› d�«      ‚|S )z§Try to interpret the token as an unsigned 48-bit integer.

        Raises dns.exception.SyntaxError if not a 48-bit unsigned integer.

        Returns an int.
        rÎ   r   l   ÿÿÿ z" is not an unsigned 48-bit integerrÌ   rÑ   s       r   r«   zTokenizer.as_uint48Ó  sM   € ð —‘ %¨d�Ó3ˆØ�1Š9˜ Ò/Ü—-‘-×+Ñ+Ø�'Ð;Ð<óð ð ˆr   c                 ó
  — |j                  «       s/|j                  «       st        j                  j	                  d«      ‚|r7t        |j                  «      |kD  rt        j                  j	                  d«      ‚|j                  S )zðTry to interpret the token as a string.

        Raises dns.exception.SyntaxError if not a string.
        Raises dns.exception.SyntaxError if token value length
        exceeds max_length (if specified).

        Returns a string.
        úexpecting a stringústring too long)r3   r6   rQ   rR   rV   rP   r   )r!   r‘   r­   s      r   r¯   zTokenizer.as_stringâ  sd   € ð ×#Ñ#Ô%¨×)?Ñ)?Ô)AÜ—-‘-×+Ñ+Ð,@ÓAÐAÙœ#˜eŸk™kÓ*¨ZÒ7Ü—-‘-×+Ñ+Ð,=Ó>Ð>Ø�{‰{Ðr   c                 ó:  — |j                  «       s/|j                  «       st        j                  j	                  d«      ‚|j
                  }t        |t        «      r|j                  «       }|r-t        |«      |kD  rt        j                  j	                  d«      ‚|S )zïTry to interpret the token as a byte string.

        Raises dns.exception.SyntaxError if not a string.
        Raises dns.exception.SyntaxError if the byte length
        exceeds max_length (if specified).

        Returns bytes.
        rÕ   rÖ   )
r3   r6   rQ   rR   rV   r   rA   rh   rd   rP   )r!   r‘   r­   r   s       r   r³   zTokenizer.as_bytesò  sx   € ð ×#Ñ#Ô%¨×)?Ñ)?Ô)AÜ—-‘-×+Ñ+Ð,@ÓAÐAØ—‘ˆÜ�eœSÔ!Ø—L‘L“NˆEÙœ#˜e›* zÒ1Ü—-‘-×+Ñ+Ð,=Ó>Ð>Øˆr   c                 óx   — |j                  «       st        j                  j                  d«      ‚|j                  S )z�Try to interpret the token as an identifier.

        Raises dns.exception.SyntaxError if not an identifier.

        Returns a string.
        rÅ   )r3   rQ   rR   rV   r   r”   s     r   r¶   zTokenizer.as_identifier  s0   € ð ×"Ñ"Ô$Ü—-‘-×+Ñ+Ð,EÓFÐFØ�{‰{Ðr   c                 óJ   — | j                  «       }| j                  ||||«      S )z—Read the next token and interpret it as a DNS name.

        Raises dns.exception.SyntaxError if not a name.

        Returns a dns.name.Name.
        )r’   rÈ   )r!   rÁ   rÂ   rÃ   r‘   s        r   Úget_namezTokenizer.get_name  s$   € ð —‘“
ˆØ�|‰|˜E 6¨:°}ÓEÐEr   c                 óº   — | j                  «       }|j                  «       s:t        j                  j	                  d|j
                  › d|j                  › d�«      ‚|S )znRead the next token and raise an exception if it isn't EOL or
        EOF.

        Returns a string.
        zexpected EOL or EOF, got rH   r   )r’   r>   rQ   rR   rV   r   r   r”   s     r   Úget_eol_as_tokenzTokenizer.get_eol_as_token!  sS   € ð —‘“
ˆØ×"Ñ"Ô$Ü—-‘-×+Ñ+Ø+¨E¯K©K¨=¸¸5¿;¹;¸-ÀqÐIóð ð ˆr   c                 ó6   — | j                  «       j                  S r%   )rÜ   r   r'   s    r   Úget_eolzTokenizer.get_eol/  s   € Ø×$Ñ$Ó&×,Ñ,Ð,r   c                 óî   — | j                  «       j                  «       }|j                  «       st        j                  j                  d«      ‚t        j                  j                  |j                  «      S )z¾Read the next token and interpret it as a DNS TTL.

        Raises dns.exception.SyntaxError or dns.ttl.BadTTL if not an
        identifier or badly formed.

        Returns an int.
        rÅ   )	r’   ra   r3   rQ   rR   rV   ÚttlrÆ   r   r”   s     r   Úget_ttlzTokenizer.get_ttl2  sS   € ð —‘“
×#Ñ#Ó%ˆØ×"Ñ"Ô$Ü—-‘-×+Ñ+Ð,EÓFÐFÜ�w‰w× Ñ  §¡Ó-Ð-r   )FF)rN   r%   )F)NFN)3r   r   r   r   rr   rs   r   rh   rQ   r~   Ú	IDNACodecr"   r„   ÚtuplerW   r†   rˆ   r‹   rg   r   r’   r•   r˜   Ú__next__rš   rŸ   r¢   r¥   r©   r¬   r±   re   r´   r·   Úlistr¼   rÀ   ÚNamerÈ   r�   r¡   r¤   r¨   r«   r¯   r³   r¶   rÚ   rÜ   rÞ   rá   r   r   r   rj   rj   Í   sG  „ ñ!ðJ —‘Ø#Ø04ñ	0)àð0)ð ˜‘*ð0)ð —H‘H×&Ñ&¨Ñ-ó	0)ðd˜3ó ð41�u˜S #˜X‘ó 1ð˜Sð  Tó ð  ó ñ(m/ ð m/¸Dð m/ÈUó m/ð^$˜5ð $ Tó $ò 	ð €Hòñ
8˜Cð 8¨ó 8ð	4˜3ó 	4ñ	;˜sð 	;¨Có 	;ñ	;˜sð 	;¨Có 	;ñ	;˜sð 	;¨Có 	;ñ
A S¨4¡Zð 
A¸3ó 
AñI C¨$¡Jð I¸%ó Ið9 ó 9ñ¨¨d©
ð ¸dÀ5¹kó ñ&¸Tð Ècó ð8 (,Ø Ø.2ñKàðKð —‘—‘ Ñ$ðKð ð	Kð
 —x‘x—}‘} tÑ+ðKð 
�‰�‰óKñ$&˜Eð &¨ð &°có &ð$˜eð ¨ó ñ˜uð ¨Cð ¸ó ñ(˜uð ¨Cð ¸ó ñ˜uð ¨Cð ¸ó ñ˜uð °#¸±*ð Èó ñ ˜eð °°t±ð Àuó ð&
 5ð 
¨Só 
ð (,Ø Ø.2ñ	Fà—‘—‘ Ñ$ðFð ðFð —x‘x—}‘} tÑ+ð	Fð
 
�‰�‰óFð  %ó ð-˜ó -ð.˜ô .r   rj   )r   ro   rr   Útypingr   Údns._text_utilrQ   Údns.exceptionÚdns.nameÚdns.ttlr{   r�   r&   r+   r.   r2   r5   r8   r;   rR   ÚDNSExceptionr   r   rj   r   r   r   ú<module>rí      s€   ðñ$ $ã 	Û 
Ý ã Û Û Û â3€Ø�eÐ à€Ø€Ø€
Ø€
Ø€Ø
€Ø€	ôO�c—m‘m×0Ñ0ô O÷]3ñ ]3÷@q	.ò q	.r   