File: //opt/imh-python/lib/python3.9/site-packages/simplejson/__pycache__/decoder.cpython-39.pyc
a
`�h; � @ sR d Z ddlmZ ddlZddlZddlZddlmZmZ ddl m
Z
mZ dd� Ze� Z
d gZejejB ejB Zd
d� Ze� \ZZZeeed�Ze�d
e�Zddddddddd�ZdZeed�r�eZn
d*dd�Ze�d�jfdd�Z ddeejd j!eej"e fd!d"�Z#e
�p
e#Z$e�d#e�Z%d$Z&de%je&fd%d&�Z'e%je&fd'd(�Z(G d)d � d e)�Z*dS )+zImplementation of JSONDecoder
� )�absolute_importN� )�PY3�unichr)�make_scanner�JSONDecodeErrorc C s, zddl m} | W S ty& Y d S 0 d S )Nr ��
scanstring)Z _speedupsr �ImportErrorr � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/simplejson/decoder.py�_import_c_scanstring
s
r
�JSONDecoderc C sB t jdk r&d�d�} t�d| �\}}ntd�}td�}||| fS )N)� � Z 7FF80000000000007FF0000000000000�hexz>dd�nan�inf)�sys�version_info�decode�struct�unpack�float)Z_BYTESr r r r r �_floatconstants s
r )z -Infinity�Infinity�NaNz(.*?)(["\\\x00-\x1f])�"�\�/���
�
� )r r r �b�f�n�r�tzutf-8Zget_int_max_str_digits�� c C s( t | �|kr td|t | �f ��t| �S )z�Backport of the integer string length conversion limitation
https://docs.python.org/3/library/stdtypes.html#int-max-str-digits
zIExceeds the limit (%s) for integer string conversion: value has %s digits)�len�
ValueError�int)�sZINT_MAX_STR_DIGITSr r r �bounded_int4 s r/ z^[0-9a-fA-F]{4}$c C sh d}| ||d � }||�s,t || |d ��zt|d�|d fW S tyb t || |d ��Y n0 dS )z5Scan a four digit hex number from s[end:end + 4]
zInvalid \uXXXX escape sequence� r � N)r r- r, )r. �end�_m�msg�escr r r �scan_four_digit_hex>