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__/php.cpython-310.pyc
o

;js3�@s�dZddlZddlmZmZmZmZmZmZm	Z	m
Z
mZmZddl
mZmZmZmZmZmZmZmZmZmZddlmZmZmZgd�ZGdd�de�ZGd	d
�d
e�ZGdd�de�ZdS)
z�
    pygments.lexers.php
    ~~~~~~~~~~~~~~~~~~~

    Lexers for PHP and related languages.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)
�Lexer�
RegexLexer�include�bygroups�default�using�this�words�
do_insertions�line_re)
�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Other�Generic)�get_bool_opt�get_list_opt�shebang_matches)�ZephirLexer�PsyshConsoleLexer�PhpLexerc@seZdZdZdZdZdgZdgZdZgd�Z	gd�Z
ejej
BZd	efd
ejfdejfged�d
ejdfdedfed�gdedfgdedfed�dedfdedfdefdedfdejdfdejfdejfdejfdejfde j!fde j"fde j#fdej$fd ejfgd!�Z%d"S)#rz�
    For Zephir language source code.

    Zephir is a compiled high level language aimed
    to the creation of C-extensions for PHP.
    ZZephirzhttp://zephir-lang.com/Zzephirz*.zepz2.0)ZfetchZechoZisset�empty)�bit�bits�string�\s+�//.*?\n�	/\*.*?\*/�commentsandwhitespacez3/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)�#pop�/z\nz	^(?=\s|/)�slashstartsregexzC\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|->|[-<>+*%&|^/])=?z[{(\[;,]z[})\].]z�(for|in|while|do|break|return|continue|switch|case|default|if|else|loop|require|inline|throw|try|catch|finally|new|delete|typeof|instanceof|void|namespace|use|extends|this|fetch|isset|unset|echo|fetch|likely|unlikely|empty)\bz(var|let|with|function)\bz�(abstract|boolean|bool|char|class|const|double|enum|export|extends|final|native|goto|implements|import|int|string|interface|long|ulong|char|uchar|float|unsigned|private|protected|public|short|static|self|throws|reverse|transient|volatile|readonly)\bz(true|false|null|undefined)\bzm(Array|Boolean|Date|_REQUEST|_COOKIE|_SESSION|_GET|_POST|_SERVER|this|stdClass|range|count|iterator|window)\bz[$a-zA-Z_][\w\\]*z%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?z0x[0-9a-fA-F]+z[0-9]+z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*')r#r&Zbadregex�rootN)&�__name__�
__module__�__qualname__�__doc__�name�url�aliases�	filenames�
version_addedZzephir_keywordsZzephir_type�re�DOTALL�	MULTILINE�flagsrr
�Single�	MultilinerrZRegexrrrrZDeclarationZReserved�Constantr�Builtinrr�Float�Hex�Integer�Double�tokens�r>r>�G/opt/saltstack/salt/lib/python3.10/site-packages/pygments/lexers/php.pyrsb������
���
�rc@s2eZdZdZdZdZdgZdZdd�Zdd	�Z	d
S)ru
    For PsySH console output, such as:

    .. sourcecode:: psysh

        >>> $greeting = function($name): string {
        ...     return "Hello, {$name}";
        ... };
        => Closure($name): string {#2371 …3}
        >>> $greeting('World')
        => "Hello, World"
    zPsySH console session for PHPzhttps://psysh.org/Zpsyshz2.7cKsd|d<tj|fi|��dS)NT�startinline)r�__init__)�self�optionsr>r>r?rAiszPsyshConsoleLexer.__init__c	cs�tdi|j��}d}g}t�|�D]b}|��}|�d�s"|�d�r=|�t|�dtj	|dd�fgf�||dd�7}q|�
�dkrZ|�t|�dtj	dfgf�||dd�7}q|rkt||�|��EdHd}g}|�
�tj|fVq|r�t||�|��EdHdSdS)	N�z>>> z... r�z...�r>)rrCr�finditer�group�
startswith�append�lenrZPrompt�rstripr
�get_tokens_unprocessed�startZOutput)rB�textZphplexerZcurcodeZ
insertions�match�liner>r>r?rMms8�
�
�

���z(PsyshConsoleLexer.get_tokens_unprocessedN)
r(r)r*r+r,r-r.r0rArMr>r>r>r?rWsrc@s0eZdZdZdZdZgd�Zgd�ZdgZdZ	dZ
d	Zej
ejBejBZd
ejdfdefd
efggdejdf�dedeeeejeejee�f�def�dedf�dejf�dejf�dejf�dejf�dejf�dedeeeej�f�def�def�def�deeee�f�d eee�d!f�d"eee�f�d#eeeee�d$f�d%e
deeeej �f�d&ef�d'ej f�e!d(��d)ej"d*f�d+e
ej"f�e
ejf�d,e#j$f�d-e#j$f�d.e#j%f�d/e#j&f�d0e#j'f�d1e#j(f�d2ejf�d3ej)f�d4ej*d5f�d6ej"dfe!d�ge+d7d8d9�ej,j-fge+d:d8d9�ej fge
ej.dfge!d;�e
ej,dfe/d�gd4ej*dfd<ej*fd=ej0fd>ed?ed@ej1fdAeej1e2e3dBdC�ej1�fdDeej1e2e3dBdC�ej1�fdEeej1ej"ej1�fdFej*fgdGedfdHedIfe
ej4fe!d�gdJedfe!d�gdK�
Z5dLdM�Z6dNdO�Z7dPdQ�Z8dRS)Sra;
    For PHP source code.
    For PHP embedded in HTML, use the `HtmlPhpLexer`.

    Additional options accepted:

    `startinline`
        If given and ``True`` the lexer starts highlighting with
        php code (i.e.: no starting ``<?php`` required).  The default
        is ``False``.
    `funcnamehighlighting`
        If given and ``True``, highlight builtin function names
        (default: ``True``).
    `disabledmodules`
        If given, must be a list of module names whose function names
        should not be highlighted. By default all modules are highlighted
        except the special ``'unknown'`` module that includes functions
        that are known to php but are undocumented.

        To get a list of allowed modules have a look into the
        `_php_builtins` module:

        .. sourcecode:: pycon

            >>> from pygments.lexers._php_builtins import MODULES
            >>> MODULES.keys()
            ['PHP Options/Info', 'Zip', 'dba', ...]

        In fact the names of those modules match the module names from
        the php documentation.
    ZPHPzhttps://www.php.net/)�phpZphp3Zphp4Zphp5)z*.phpz
*.php[345]z*.incz
text/x-phprDz1(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*z+(?:[_a-z]|[^\x00-\x7f])(?:\w|[^\x00-\x7f])*z	<\?(php)?rRz[^<]+�<z\?>r$z(<<<)([\'"]?)(z)(\2\n.*?\n\s*)(\3)(;?)(\n)r z#\[�	attributez#.*?\nr!z/\*\*/z/\*\*.*?\*/r"z
(->|::)(\s*)(�)z[~!%^&*+=|:.<>/@-]+z\?z
[\[\]{}();,]+z(new)(\s+)(class)\bz(class)(\s+)�	classnamez(function)(\s*)(?=\()z(function)(\s+)(&?)(\s*)�functionnamez
(const)(\s+)(a&(and|E_PARSE|old_function|E_ERROR|or|as|E_WARNING|parent|eval|PHP_OS|break|exit|case|extends|PHP_VERSION|cfunction|FALSE|print|for|require|continue|foreach|require_once|declare|return|default|static|do|switch|die|stdClass|echo|else|TRUE|elseif|var|empty|if|xor|enddeclare|include|virtual|endfor|include_once|while|endforeach|global|endif|list|endswitch|new|endwhile|not|array|E_ALL|NULL|final|php_user_filter|interface|implements|public|private|protected|abstract|clone|try|catch|throw|this|use|namespace|trait|yield( from)?|finally|match|readonly)\bz(true|false|null)\b�magicconstantsz\$\{�variablevariablez\$+z"(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?z\d+e[+-]?[0-9]+z0[0-7]+z0x[a-f0-9]+z\d+z0b[01]+z'([^'\\]*(?:\\.[^'\\]*)*)'z`([^`\\]*(?:\\.[^`\\]*)*)`�"rz\})Z__constructZ
__destructZ__callZ__callStaticZ__getZ__setZ__issetZ__unsetZ__sleepZ__wakeupZ
__toStringZ__invokeZ__set_stateZ__cloneZ__debugInfoz\b)�suffix)	Z__LINE__Z__FILE__Z__DIR__Z__FUNCTION__Z	__CLASS__Z	__TRAIT__Z
__METHOD__Z
__NAMESPACE__Z__PROPERTY__�
magicfuncsz	[^{$"\\]+z'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})z\$z(\[\S+?\]|->z)?z(\{\$\{)(.*?)(\}\})T)�_startinlinez(\{)(\$.*?)(\})z(\$\{)(\S+)(\})z[${\\]z\]z\(�attributeparamsz\))
r'rRrYr\rXrVrWrrTr^cKs�t|dd�|_t|ddg�|_t|dd�|_d|vr |�d�|_t�|_|jrAdd	lm	}|�
�D]\}}||jvr@|j�|�q1tj
|fi|��dS)
N�funcnamehighlightingT�disabledmodules�unknownr@Fr]r)�MODULES)rr_rr`r@�pop�set�
_functionsZpygments.lexers._php_builtinsrb�items�updaterrA)rBrCrb�key�valuer>r>r?rA)s"��
�zPhpLexer.__init__ccsf�dg}|jr|�d�t�|||�D]\}}}|tjur*||jvr*|tj|fVq|||fVqdS)Nr'rR)r@rJrrMrrrer8)rBrO�stack�index�tokenrir>r>r?rM=s�
�

�zPhpLexer.get_tokens_unprocessedcCs*t|d�rdSd}t�d|�r|d7}|S)NrRTgz
<\?(?!xml)g333333�?)rr1�search)rO�rvr>r>r?�analyse_textIs
zPhpLexer.analyse_textN)9r(r)r*r+r,r-r.r/Z	mimetypesr0Z_ident_innerZ_ident_nonsr1�
IGNORECASEr2r3r4r
ZPreprocrrrZ	Delimiterrrr5r6ZDocrrZ	Attributerr7rZVariablerr9�Octr:r;ZBinZBacktickr<r	ZFunctionZMagicZClassrZEscapeZInterpolrrZ	Decoratorr=rArMror>r>r>r?r�s( 
�
�
���������
�
����������
��
��&�'�
(�)�*�+�,�-�.�/�0�1�2�
3�
6����
���
	�
�
����������sr) r+r1Zpygments.lexerrrrrrrrr	r
rZpygments.tokenrr
rrrrrrrrZ
pygments.utilrrr�__all__rrrr>r>r>r?�<module>s
00A0