HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/dns/__pycache__/grange.cpython-310.pyc
o

!wed�@s8dZddlmZddlZdedeeeeffdd�ZdS)zDNS GENERATE range conversion.�)�TupleN�text�returncCsd}d}d}d}d}|r|ddkrtj�d��|D]0}|dkr-|dkr-t|�}d}d}q|dkr:t|�}d}d}q|��rC||7}qtj�d	|��|dkrUtj�d
��|dkr^t|�}n
|dksdJ�t|�}|dksnJ�|dkstJ�||kr~tj�d��|||fS)z�Convert the text form of a range in a ``$GENERATE`` statement to an
    integer.

    *text*, a ``str``, the textual range in ``$GENERATE`` form.

    Returns a tuple of three ``int`` values ``(start, stop, step)``.
    �����r�-z!Start cannot be a negative number�/�zCould not parse %szno stop value specifiedzstart must be <= stop)�dns�	exception�SyntaxError�int�isdigit)r�start�stop�step�cur�state�c�r�C/home/arjun/projects/env/lib/python3.10/site-packages/dns/grange.py�	from_texts<	


r)�__doc__�typingrr�strrrrrrr�<module>s