HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/pygments/lexers/__pycache__/data.cpython-310.pyc
o

;j�i�@s�dZddlmZmZmZmZmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZgd�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZGd
d�de�ZdS)z�
    pygments.lexers.data
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for data file format.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�Lexer�ExtendedRegexLexer�LexerContext�include�bygroups)	�Comment�Error�Keyword�Literal�Name�Number�Punctuation�String�
Whitespace)�	YamlLexer�	JsonLexer�JsonBareObjectLexer�JsonLdLexercs eZdZdZ�fdd�Z�ZS)�YamlLexerContextz'Indentation context for the YAML lexer.cs.t�j|i|��g|_d|_d|_d|_dS�N���r)�super�__init__�indent_stack�indent�next_indent�block_scalar_indent)�self�args�kwds��	__class__��H/opt/saltstack/salt/lib/python3.10/site-packages/pygments/lexers/data.pyrs

zYamlLexerContext.__init__)�__name__�
__module__�__qualname__�__doc__r�
__classcell__r"r"r r#rsrc
s�eZdZdZdZdZdgZddgZdgZdZ	d	d
�Z
dd�Zdndd�Zdndd�Z
dd�Zdd�Zdd�Zdd�Ziddefdefdejfdeej�dfd eej�d!fd"eej�d#fd$eed%d&�d'fg�d(defdejfd)ed*fg�dd+eee�d(fg�d!d,eeejeej�d(fg�d-d.e
e�d*fd/ee�fd0e
ej�fd1ee�d2fg�d#d3e
e�d2fd4efd5eeje
ed%d6��fed7�ed8�ed9�d:e
ej�d;fg�d7d<ejfd=ejfd>ej fd?ejfg�d8d@e
ejd%d6�fdAejdBfg�d9dCejdDfdEejdFfdGe!dHfdIe!dJfg�dKd4efdefdejfdLejfed7�ed9�dMe
ej�dNfg�dDedK�dOejd2fg�dFdPeeje�fedK�dQejd2fg�dRd)efdSeeej"�fdTee�fdUej"fg�dVdWeej�d(fdXeej�d(fg�dYdZefd[efdefd4ejfg�dHedY�d\e!j#fd]e!fdGe!d2fg�dJedY�d^e!fd_e!j#fd`e!fdae!d2fg�dSefdefdbe
ej�dcfdTee�d2fgdde
e�d2fdeed2fd[efdedffd4e$j%j&fdge$j%j&fgdhe
e�d2fdeed2fdZefd[efdefd4ejfdiejfgdj��Z'do�fdldm�	Z(�Z)S)przK
    Lexer for YAML, a human-friendly data serialization
    language.
    ZYAMLzhttp://yaml.org/Zyamlz*.yamlz*.ymlztext/x-yamlz0.11c��fdd�}|S)zDo not produce empty tokens.c3s0�|��}|s	dS|���|fV|��|_dS�N)�group�start�end�pos��lexer�match�context�text��token_classr"r#�callback-s�z%YamlLexer.something.<locals>.callbackr"�r5r6r"r4r#�	something+szYamlLexer.somethingcr))zReset the indentation levels.c3s@�|��}g|_d|_d|_d|_|���|fV|��|_dSr)r+rrrrr,r-r.r/r4r"r#r67s�z(YamlLexer.reset_indent.<locals>.callbackr"r7r"r4r#�reset_indent5szYamlLexer.reset_indentFc���fdd�}|S)z"Save a possible indentation level.c3s��|��}d}�r;t|�|_|j|jkr:|j|jkr&|j��|_|j|jks|j|jkr:||jd�}|d|j�}n	|jt|�7_|rN|���|fV|r]|��t|��j|fV|��|_	dS)N�)
r+�lenrrr�popr,rr-r.)r0r1r2r3�extra�r,r5r"r#r6Cs&�
��z'YamlLexer.save_indent.<locals>.callbackr")r5r,r6r"r?r#�save_indentAszYamlLexer.save_indentcr:)z+Set the previously saved indentation level.c3s`�|��}|j|jkr|j�|j�|j|_�s!|jt|�7_|���|fV|��|_dSr*)	r+rrr�appendr<r,r-r.r/��implicitr5r"r#r6Ys�z&YamlLexer.set_indent.<locals>.callbackr")r5rCr6r"rBr#�
set_indentWs	zYamlLexer.set_indentcr))z5Set an explicit indentation level for a block scalar.c3sj�|��}d|_|sdS|�d�}|r"t|jd�}t|�}|||_|r3|���|fV|��|_dSdS)N�r)r+r�maxr�intr,r-r.)r0r1r2r3Z	increment�current_indentr4r"r#r6fs�

�z3YamlLexer.set_block_scalar_indent.<locals>.callbackr"r7r"r4r#�set_block_scalar_indentds
z!YamlLexer.set_block_scalar_indentcr:)z(Process an empty line in a block scalar.c3s��|��}|jdust|�|jkr|r|���|fVn!|d|j�}||jd�}|���|fV|��|j�|fV|��|_dSr*)r+rr<r,r-r.)r0r1r2r3�indentation�content��content_token_class�indent_token_classr"r#r6ws�
��z9YamlLexer.parse_block_scalar_empty_line.<locals>.callbackr")rNrMr6r"rLr#�parse_block_scalar_empty_lineus
z'YamlLexer.parse_block_scalar_empty_linecr))z-Process indentation spaces in a block scalar.c3s��|��}|jdur&t|�t|jd�kr |j��|j��dSt|�|_nt|�|jkr9|j��|j��dS|rJ|���|fV|��|_	dSdS�Nr)
r+rr<rFr�stackr=r,r-r.r/r4r"r#r6�s �




�z5YamlLexer.parse_block_scalar_indent.<locals>.callbackr"r7r"r4r#�parse_block_scalar_indent�sz#YamlLexer.parse_block_scalar_indentcr))z-Process indentation spaces in a plain scalar.c3sV�|��}t|�|jkr|j��|j��dS|r)|���|fV|��|_dSdSr*)r+r<rrQr=r,r-r.r/r4r"r#r6�s�

�z5YamlLexer.parse_plain_scalar_indent.<locals>.callbackr"r7r"r4r#�parse_plain_scalar_indent�s	z#YamlLexer.parse_plain_scalar_indent�rootz[ ]+(?=#|$)z\n+z#[^\n]*z^%YAML(?=[ ]|$)zyaml-directivez^%TAG(?=[ ]|$)z
tag-directivez^(?:---|\.\.\.)(?=[ ]|$)�
block-linez[ ]*(?!\s|$)T)r,)rUrJzignored-linez\nz#pop:2z([ ]+)([0-9]+\.[0-9]+)z;([ ]+)(!|![\w-]*!)([ ]+)(!|!?[\w;/?:@&=+$,.!~*\'()\[\]%-]+)rJz[ ]*$z[ ]+(?=[?:-](?:[ ]|$))z[?:-](?=[ ]|$)z[ ]*z#popz[ ]*(?=#|$)z[ ]+z([^#,?\[\]{}"'\n]+)(:)(?=[ ]|$))rCZdescriptorszblock-nodesz
flow-nodesz'(?=[^\s?:,\[\]{}#&*!|>\'"%@`-]|[?:-]\S)�plain-scalar-in-block-contextz!!<[\w#;/?:@&=+$,.!~*\'()\[\]%-]+>z+!(?:[\w-]+!)?[\w#;/?:@&=+$,.!~*\'()\[\]%-]*z&[\w-]+z\*[\w-]+z
:(?=[ ]|$)z[|>])�block-scalar-content�block-scalar-headerz\[z
flow-sequencez\{zflow-mappingz\'zsingle-quoted-scalarz\"zdouble-quoted-scalarzflow-collectionz[?:,]z(?=[^\s?:,\[\]{}#&*!|>\'"%@`])�plain-scalar-in-flow-contextz\]z([^,:?\[\]{}"'\n]+)(:)(?=[ ]|$)z\}rWz^[ ]+$z^[ ]*z[\S\t ]+rXz([1-9])?[+-]?(?=[ ]|$)z[+-]?([1-9])?(?=[ ]|$)zquoted-scalar-whitespacesz^[ ]+z[ ]+$z\'\'z[^\s\']+z\\[0abt\tn\nvfre "\\N_LP]z5\\(?:x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})z	[^\s"\\]+�"z^(?=---|\.\.\.)z#pop:3z[ ]*(?=:[ ]|:$)z	[ ]+(?=#)�&plain-scalar-in-block-context-new-linez(?::(?!\s)|[^\s:])+z[ ]*(?=[,:?\[\]{}])z[^\s,:?\[\]{}]+)r[rVrYNcs |dur	t|d�}t��||�SrP)rr�get_tokens_unprocessed)rr3r2r r"r#r\�s
z YamlLexer.get_tokens_unprocessed)F)NN)*r$r%r&r'�name�url�aliases�	filenames�	mimetypes�
version_addedr8r9r@rDrIrOrRrSrr�Singler�Tag�	Namespacerrr	�Typer
Z	IndicatorrZVariableZLabelr�ConstantZEscaper
ZScalarZPlain�tokensr\r(r"r"r r#rs�





������ 
���'���0
��<����Q���^���g

��s���
���
�
���
�
���(�����4���?���K����\�

����	rc@sleZdZdZdZdZddgZgd�Zgd�ZdZ	e
d	�Ze
d
�Ze
d�Z
e
d�Ze
d
�Zhd�Zdd�ZdS)ra(
    For JSON data structures.

    Javascript-style comments are supported (like ``/* */`` and ``//``),
    though comments are not part of the JSON specification.
    This allows users to highlight JSON as it is used in the wild.

    No validation is performed on the input JSON document.
    ZJSONzhttps://www.json.org�jsonzjson-object)z*.jsonz*.jsonlz*.ndjsonzPipfile.lockz*.modulez*.xc)zapplication/jsonzapplication/json-objectzapplication/x-ndjsonzapplication/jsonlzapplication/json-seqz1.5z-0123456789z.eE+Z
truefalsenullZ0123456789abcdefABCDEFz{}[],>� �	�
�
c	cs�d}d}d}d}d}d}d}d}	d}
d}d}d}
d}g}t|�D�]�\}}|rj|r=||jvr8|d8}|s7d}n1d}d}n,|rI|dkrFd}n#d}n |dkrPd}n|dkri|�|tj|||d�f�d}d}d}q!|r�||jvrrq!|r�|�|t|||�f�n
|t|||�fVd}n�|r�||jvr�q!|tj	|||�fVd}n�|r�||j
vr�q!||jvr�d}q!|r�|tj
|||�fVn|tj|||�fVd}d}n�|	r�||jvr�q!|t|||�fVd}	n�|
�r
|d	kr�q!|r�|�|tj|||�f�n|tj|||�fVd}
n`|�rE|d
k�rd}
n,|
�rDd}
|dk�rD|�r5|�|tj|||d�f�n
|tj|||d�fVd}q!|�rmd}|dk�rRd}
q!|d
k�rZd}q!|EdH|��|t|||�fV|}|dk�rwd}q!||jv�r�d}q!|d
v�r�|EdH|��d}q!||j
v�r�|EdH|��d}q!|dk�r�|D]\}}}|tju�r�|tj|fV�q�|||fV�q�|��d}	q!||jv�r�|EdH|��d}	q!|dk�r�d}q!|EdH|��|t|fVq!|EdH|�r|t||d�fVdS|�r|tj
||d�fVdS|�r+|tj||d�fVdS|�r;|tj	||d�fVdS|�rJ|t||d�fVdS|	�rY|t||d�fVdS|
�ri|tj||d�fVdS|�rx|t||d�fVdS|�r�|t||d�fVdSdS)zParse JSON data.FrrE�u��\TrZrm�*�/N>�t�n�f�:)�	enumerate�hexadecimalsrAr�Double�whitespacesr�	constantsr	rg�integers�floatsrZFloatZInteger�punctuationsr
rrcZ	Multiline�clearrrrd)rr3Z	in_stringZ	in_escapeZin_unicode_escapeZ
in_whitespaceZin_constantZ	in_numberZin_floatZin_punctuationZin_comment_singleZin_comment_multilineZexpecting_second_comment_openerZexpecting_second_comment_closerr,�queue�stop�	characterZ_startZ_tokenZ_textr"r"r#r\�s�
�






 







	



�z JsonLexer.get_tokens_unprocessedN)r$r%r&r'r]r^r_r`rarb�setr|r}r{rxr~rzr\r"r"r"r#r�s

rc@s$eZdZdZdZgZgZgZdZdS)rz�
    For JSON data structures (with missing object curly braces).

    .. deprecated:: 2.8.0

       Behaves the same as `JsonLexer` now.
    ZJSONBareObjectz2.2N)	r$r%r&r'r]r_r`rarbr"r"r"r#r�srcsNeZdZdZdZdZddgZdgZdgZdZ	d	d
�dD�Z
�fdd
�Z�ZS)rz"
    For JSON-LD linked data.
    zJSON-LDzhttps://json-ld.org/Zjsonldzjson-ldz*.jsonldzapplication/ld+jsonz2.0cCsh|]}d|�d��qS)z"@rZr")�.0�keywordr"r"r#�	<setcomp>�s
��zJsonLdLexer.<setcomp>)�base�	containerr2�	directionZgraph�id�importZincluded�indexri�language�listZnest�none�prefix�	propagateZ	protected�reverser��type�value�versionZvocabc#sN�t��|�D]\}}}|tjur||jvr|tj|fVq|||fVqdSr*)rr\rrd�json_ld_keywordsZ	Decorator)rr3r,�tokenr�r r"r#r\�s��z"JsonLdLexer.get_tokens_unprocessed)
r$r%r&r'r]r^r_r`rarbr�r\r(r"r"r r#r�s�rN)r'Zpygments.lexerrrrrrZpygments.tokenrrr	r
rrr
rr�__all__rrrrrr"r"r"r#�<module>s
,