o
    ni)                     @   s   d Z ddlZddlmZmZmZmZmZmZm	Z	 ddl
mZmZmZmZmZmZmZmZmZ ddlmZmZmZ ddgZG dd deZG d	d deZdS )
z
    pygments.lexers.php
    ~~~~~~~~~~~~~~~~~~~

    Lexers for PHP and related languages.

    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)
RegexLexerincludebygroupsdefaultusingthiswords)	TextCommentOperatorKeywordNameStringNumberPunctuationOther)get_bool_optget_list_opt	iteritemsZephirLexerPhpLexerc                   @   s   e Zd ZdZdZdgZdgZg dZg dZe	j
e	jB Zdefdejfd	ejfged
dejdfedgdedfgdedfed
dedfdedfdefdedfdejdfdejfdejfdejfdejfdejfdej fdej!fdej"fdejfgdZ#dS ) r   z
    For `Zephir language <http://zephir-lang.com/>`_ source code.

    Zephir is a compiled high level language aimed
    to the creation of C-extensions for PHP.

    .. versionadded:: 2.0
    Zephirzephirz*.zep)fetchechoissetempty)bitbitsstring\s+//.*?\n	/\*.*?\*/commentsandwhitespacez3/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)#popz\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)\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]?z0x[0-9a-fA-F]+z[0-9]+z"(\\\\|\\"|[^"])*"z'(\\\\|\\'|[^'])*')r#   r%   badregexrootN)$__name__
__module____qualname____doc__namealiases	filenameszephir_keywordszephir_typereDOTALL	MULTILINEflagsr	   r
   Single	Multiliner   r   Regexr   r   r   r   DeclarationReservedConstantr   Builtinr   r   FloatHexIntegerDoubletokens rA   rA   ^/home/ubuntu/SoloSpeech/.venv/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/php.pyr      s\    	

c                   @   s  e Zd ZdZdZg dZg dZdgZdZdZ	de d	 Z
e	e
 ZejejB ejB Zd
ejdfdefdefgg dejdfde d eeeejeejeefdefdejfdejfdejfdejfdejfde d eeeejfdefdefdefdeeedfdeeefd eeeeed!fd"e d eeeej fd#efd$ej fe!d%d&e d' ej"fd(e ej"feejfd)e#j$fd*e#j$fd+e#j%fd,e#j&fd-e#j'fd.e#j(fd/ejfd0ej)fd1ej*d2fe+d3d4d5ej,j-fge+d6d4d5ej fgeej.dfge!d7eej,dfe/dgd1ej*dfd8ej*fd9ej0fd:e d; e d< ej1fd=eej1e2e3d>d?ej1fd@eej1e2e3d>d?ej1fdAeej1ej"ej1fdBej*fgdCZ4dDdE Z5dFdG Z6dHdI Z7dJS )Kr   aT  
    For `PHP <http://www.php.net/>`_ 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.
    PHP)phpphp3php4php5)z*.phpz
*.php[345]z*.incz
text/x-phpz[\\\w]|[^\x00-\x7f]z(?:[\\_a-z]|[^\x00-\x7f])z(?:z)*z	<\?(php)?rD   z[^<]+<z\?>r$   z(<<<)([\'"]?)(z)(\2\n.*?\n\s*)(\3)(;?)(\n)r    z#.*?\nr!   z/\*\*/z/\*\*.*?\*/r"   z(->|::)(\s*)()z[~!%^&*+=|:.<>/@-]+z\?z[\[\]{}();,]+z(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|finally)\bz(true|false|null)\bmagicconstantsz\$\{\$+z\}z\$+z"(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?z\d+e[+-]?[0-9]+z0[0-7]+z0x[a-f0-9]+z\d+z0b[01]+z'([^'\\]*(?:\\.[^'\\]*)*)'z`([^`\\]*(?:\\.[^`\\]*)*)`"r   )__construct
__destruct__call__callStatic__get__set__isset__unset__sleep__wakeup
__toString__invoke__set_state__clone__debugInfoz\b)suffix)__LINE____FILE____DIR____FUNCTION__	__CLASS__	__TRAIT__
__METHOD____NAMESPACE__
magicfuncsz	[^{$"\\]+z'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})z\$z(\[\S+?\]|->z)?z(\{\$\{)(.*?)(\}\})T)_startinlinez(\{)(\$.*?)(\})z(\$\{)(\S+)(\})z[${\\])r'   rD   rf   rL   rJ   rK   r   c                 K   s   t |dd| _t|ddg| _t |dd| _d|v r |d| _t | _| jrAdd	lm	} t
|D ]\}}|| jvr@| j| q1tj| fi | d S )
NfuncnamehighlightingTdisabledmodulesunknownstartinlineFrg   r   )MODULES)r   rh   r   ri   rk   popset
_functionspygments.lexers._php_builtinsrl   r   updater   __init__)selfoptionsrl   keyvaluerA   rA   rB   rr      s"   
zPhpLexer.__init__c                 c   sf    dg}| j r|d t| ||D ]\}}}|tju r*|| jv r*|tj|fV  q|||fV  qd S )Nr'   rD   )rk   appendr   get_tokens_unprocessedr   r   ro   r;   )rs   textstackindextokenrv   rA   rA   rB   rx      s   


zPhpLexer.get_tokens_unprocessedc                 C   s   d}t d| r|d7 }|S )Ng        z
<\?(?!xml)g333333?)r1   search)ry   rvrA   rA   rB   analyse_text  s   zPhpLexer.analyse_textN)8r(   r)   r*   r+   r,   r-   r.   	mimetypes_ident_char_ident_begin
_ident_end_ident_innerr1   
IGNORECASEr2   r3   r4   r
   Preprocr   r   r   	Delimiterr   r	   r5   r6   Docr   r   	Attributer   r:   r   Variabler   r<   Octr=   r>   BinBacktickr?   r   FunctionMagicClassr   EscapeInterpolr   r   r@   rr   rx   r   rA   rA   rA   rB   r   W   s
    






#$%&'()*+,-./
04

	

b)r+   r1   pygments.lexerr   r   r   r   r   r   r   pygments.tokenr	   r
   r   r   r   r   r   r   r   pygments.utilr   r   r   __all__r   r   rA   rA   rA   rB   <module>   s   
$,@