https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/pygments/lexers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/pygments/lexers/__pycache__/haskell.cpython-310.pyc
o

���a��@s2dZddlZddlmZmZmZmZmZmZm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZddlmZgd�Ze�d�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�Z Gdd�de �Z!Gdd�de �Z"Gdd�de �Z#Gdd�de �Z$Gdd�de�Z%dS)z�
    pygments.lexers.haskell
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Haskell and related languages.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�Lexer�
RegexLexer�bygroups�
do_insertions�default�include�inherit)
�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic�
Whitespace)�	unistring)
�HaskellLexer�
HspecLexer�
IdrisLexer�	AgdaLexer�CryptolLexer�LiterateHaskellLexer�LiterateIdrisLexer�LiterateAgdaLexer�LiterateCryptolLexer�	KokaLexerz.*?
c@s�eZdZdZdZddgZdgZdgZej	ej
BZdZdZ
gd	ef�d
ejf�dejdf�d
ejdf�dejdf�dejf�dd�e�ejf�dejf�dejdejf�dejdef�dejdejf�dejdejf�dejf�dejf�dejf�dejf�dejf�d ejf�d!ef�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*ejd+f�d,ed-f�d.ejf�d/ej&f�d0e'f�d	efd,ed-fd1e'd2fd3efd4ejd5ejd6e(ej)eeee�d2fd4ejd7e(ej)eeee'�d8fd4ejd9e(ej)ee'�d8fd:ej)d2fgd	efd4ejd9e(ej)ee'�d8fd;ejd<ej)d2fgd	efd;ejd=ejfd>ejd?ejfd
ejfdejdfd@e'fd!efdAe'dBfd1e'dCfg	dDejfdejdEfdFejd2fdGejfgdHejd2fdIej*dJfd*ejd2fgdKefdIej*dJfd,ed2fgdLej*d2fdMejdNej*d2fd�e
�ej*d2fdOej*d2fdPej*d2fdQej*d2fdRe(eej*�d2fgdS�Z+dTS)Urzk
    A Haskell lexer based on the lexemes defined in the Haskell 98 Report.

    .. versionadded:: 0.8
    �Haskell�haskell�hsz*.hsztext/x-haskell)�case�class�datar�deriving�do�else�family�if�in�
infix[lr]?�instance�let�newtype�of�then�type�where�_��NUL�SOHz[SE]TX�EOT�ENQ�ACK�BEL�BS�HT�LF�VT�FF�CRzS[OI]�DLEzDC[1-4]�NAK�SYN�ETB�CAN�EM�SUB�ESCz[FGRU]S�SP�DEL�\s+�!--(?![!#$%&*+./<=>?@^|_~:\\]).*?$�\{-�comment�
\bimport\b�import�
\bmodule\b�module�	\berror\b�\b(%s)(?!\')\b�|z'[^\\]'z^[_z][\w\']*z'?[_z][\w']*z('')?[z(')[z
(')\[[^\]]*\]z(')\([^)]*\)z(')[:!#$%&*+.\\/<=>?@^|~-]+�\\(?![:!#$%&*+.\\/<=>?@^|~-]+)�+(<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)�:[:!#$%&*+.\\/<=>?@^|~-]*�[:!#$%&*+.\\/<=>?@^|~-]+z40[xX]_*[\da-fA-F](_*[\da-fA-F])*_*[pP][+-]?\d(_*\d)*zR0[xX]_*[\da-fA-F](_*[\da-fA-F])*\.[\da-fA-F](_*[\da-fA-F])*(_*[pP][+-]?\d(_*\d)*)?z\d(_*\d)*_*[eE][+-]?\d(_*\d)*z+\d(_*\d)*\.\d(_*\d)*(_*[eE][+-]?\d(_*\d)*)?z0[bB]_*[01](_*[01])*z0[oO]_*[0-7](_*[0-7])*z 0[xX]_*[\da-fA-F](_*[\da-fA-F])*z	\d(_*\d)*�'�	character�"�string�\[\]�\(\)�[][(),;`{}]�\)�#pop�qualified\bz([z][\w.]*)(\s+)(as)(\s+)([z][\w.]*)z][\w.]*)(\s+)(hiding)(\s+)(\()�funclistz][\w.]*)(\s+)(\()�[\w.]+�[z][\w.]*z]\w*z(_[\w\']+|[z	][\w\']*)�,�\(�rcrc�#pop:2�[^-{}]+�#push�-\}�[-{}]�[^\\']'�\\�escape�[^\\"]+�[abfnrtv"\'&\\]z\^[][z@^_]�o[0-7]+�x[\da-fA-F]+�\d+�	(\s+)(\\)��rootrOrQrcrMrZr\rpN),�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenames�	mimetypes�re�	MULTILINE�UNICODE�flags�reserved�asciirr
�Single�	Multiliner�Reservedr
�	Exception�joinr�Char�uni�Ll�Function�Lu�Typer�Wordr�Float�Bin�Oct�Hex�Integer�Builtinrr�	Namespace�Escape�tokens�r�r��9/usr/lib/python3/dist-packages/pygments/lexers/haskell.pyrs��
�
�
	�
���
����������������� �!�"�
$�%�'�(�)�-���
���
�

�
	

�
�



�
�rc@s\eZdZdZdZdgZgZgZddee	e
ej�fdee	e
ej�fdee	e
ej�fe
giZdS)	rzY
    A Haskell lexer with support for Hspec constructs.

    .. versionadded:: 2.4.0
    �Hspec�hspecrxz(it)(\s*)("[^"]*")z(describe)(\s*)("[^"]*")z(context)(\s*)("[^"]*")N)ryrzr{r|r}r~rr�rr	rr�Docrr�r�r�r�r�r�s��rc@s0eZdZdZdZddgZdgZdgZdZdZ	d	Z
d
d�e
�ee
ej�fdee
ej�fd
ee
ej�fdee
ej�dfdee
eje
eje
�fdd�e�ejfdeeje
�dfdejfdefdejfdejfdejfdejfdejfdejfdejdfdedfd efd!e
fgd"e
fd#eeje
e �d$fd%ejd&fgd"e
fd'ejfd(ejfd)ejfd*ejdfd+e fd,efd-e d.fd/e d0fg	d1ejfd*ejd2fd3ejd&fd4ejfgd5ejfd6ej!d7fdejd&fgd8efd6ej!d7fded&fgd9ej!d&fd:ej!d&fd�e	�ej!d&fd;ej!d&fd<ej!d&fdej!d&fd=ee
ej!�d&fgd>�Z"d?S)@rz�
    A lexer for the dependently typed programming language Idris.

    Based on the Haskell and Agda Lexer.

    .. versionadded:: 2.0
    �Idris�idris�idrz*.idrztext/x-idris)3r!r"r#r�usingr%r&r(r)r*r+�rewrite�auto�	namespace�codata�mutual�private�public�abstract�total�partial�	interface�implementation�export�covering�constructorr,�proofr.r/�staticr1r2�with�pattern�term�syntax�prefix�	postulate�
parameters�record�dsl�
impossible�implicit�tactics�intros�intro�compute�refine�exact�trivialr3)
�lib�link�flagr�hide�freeze�accessr�logging�dynamicr}�error_handlers�languagez^(\s*)(%%(%s))rTz((\s*)(--(?![!#$%&*+./<=>?@^|_~:\\]).*?)$z(\s*)(\|{3}.*?)$z
(\s*)(\{-)rM�^(\s*)([^\s(){}]+)(\s*)(:)(\s*)rS�(import|module)(\s+)rQ�('')?[A-Z][\w\']*z[a-z][\w\']*z(<-|::|->|=>|=)z"([(){}\[\]:!#$%&*+.\\/<=>?@^|~-]+)�\d+[eE][+-]?\d+�\d+\.\d+([eE][+-]?\d+)?�0[xX][\da-fA-F]+rurYrZr[r\�
[^\s(){}]+�\s+?rJ�([A-Z][\w.]*)(\s+)(\()rc�[A-Z][\w.]*ra�[A-Z]\w*�(_[\w\']+|[a-z][\w\']*)z--.*$rLrfrXrgrhr`rirjrkrlrmz[^\\']rorprqrr�\^[][A-Z@^_]rsrtrv)rxrQrcrMrZr\rpN)#ryrzr{r|r}r~rr�r�r��
directivesr�rrrr�r
r�r�r
r�rr�r�r	rr�r�r�rr�r�rr�r�r�r�r�r�r�s�

��
��
�
�

�	

�
�




�
�rc@s>eZdZdZdZdgZdgZdgZgd�Zde	e
eje
e
je
�fdejfd	ejd
fdejdfd
d�e�ejfde	eje
�dfdejfde
fde
jfdejfdejfdejfdejfdejdfdedfdefde
fgdejfdejdfd ejd!fd"ejfgd	ejd
fd#ed!fd$efgejd
ejdejdejd%d&�Zd'S)(rz�
    For the `Agda <http://wiki.portal.chalmers.se/agda/pmwiki.php>`_
    dependently typed functional programming language and proof assistant.

    .. versionadded:: 2.0
    �Agda�agdaz*.agdaztext/x-agda)"r�r��coinductiver�r#�field�forall�hidingr)�	inductive�infix�infixl�infixrr+r,r��openr�r��	primitiver��quote�	quoteGoal�	quoteTermr��renamingr�r��tactic�unquote�unquoteDeclr�r1r�r�rKrLrMz\{!�holerSrTr�rQz\b(Set|Prop)[\u2080-\u2089]*\bz
(\(|\)|\{|\})z((\.{1,3}|\||\u03BB|\u2200|\u2192|:|=|->)r�r�r�rurYrZr[r\r�r�z[^!{}]+rkz!\}raz[!{}]z[a-zA-Z][\w.]*z	[\W0-9_]+rp)rxr�rQrMrZr\rpN) ryrzr{r|r}r~rr�r�rrr
r�rr�r
r�r��	Directiver�rr�r�rr�r�r�rr�r	rr�r�r�r�r�r&sR�


�

�
�
�rc@s�eZdZdZdZddgZdgZdgZdZdZ	d	e
fd
ejfdej
dfd
ejdfdejdfdejfdd�e�ejfdejfdefdejfdejfdejfdejfdefdejfdejfdejfdejfdejfd ejd!fd"ed#fd$ejfd%ejfd&efgd	e
fd"ed#fd'ed(fd)efd*e ej!e
ee
e�d(fd+e ej!e
ee
e�d,fd-e ej!e
e�d,fd.ej!d(fgd	e
fd-e ej!e
e�d,fd/ej!d(fgd	e
fd0ejfd1ejfd2efdefd3ed4fd'ed5fgd6ej
fdej
d7fd8ej
d(fd9ej
fgd:ejd(fd;ej"d<fd ejd(fgd=efd;ej"d<fd"ed(fgd>ej"d(fd?ej"d(fd�e	�ej"d(fd@ej"d(fdAej"d(fdej"d(fdBe e
ej"�d(fgdC�Z#hdD�Z$dEdF�Z%dGS)Hrzs
    FIXME: A Cryptol2 lexer based on the lexemes defined in the Haskell 98 Report.

    .. versionadded:: 2.0
    �Cryptol�cryptol�cryz*.cryztext/x-cryptol)�Arith�Bit�Cmp�False�Inf�Truer&r��extern�finr(rO�inf�lg2�max�minrQr-�pragma�propertyr/r0r1�widthr3rJ�//.*$�/\*rMrNrOrPrQrRrSrTz^[_a-z][\w\']*z'?[_a-z][\w']*r�rUrVrWrXr�r�z0[oO][0-7]+r�rurYrZr[r\r]r^r_r`rarbz(([A-Z][\w.]*)(\s+)(as)(\s+)([A-Z][\w.]*)z#([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()rcr�rdr�r�r�rfrgrhri�[^/*]+rk�\*/�[*/]rnrorprqrrr�rsrtrvrw>�<<�>>�<<<�>>>�par�reg�seqr��tail�const�error�split�tracer�ASSERT�length�reverse�	transpose�	undefinedccsT�dg}t�|||�D]\}}}|tur!||jvr!|tj|fVq|||fVqdS)Nrx)r�get_tokens_unprocessedr
�EXTRA_KEYWORDSr�)�self�text�stack�index�token�valuer�r�r�r�s���z#CryptolLexer.get_tokens_unprocessedN)&ryrzr{r|r}r~rr�r�r�rr
r�r�rr�r
r�r�r�r�rr�rr�r�r�r�rr�r�rrr�r�r�rrr�r�r�r�rks�



�$���
��
��

�
	

�
�




��frc@s*eZdZdZe�d�Zdd�Zdd�ZdS)�
LiterateLexera�
    Base class for lexers of literate file formats based on LaTeX or Bird-style
    (prefixing each code line with ">").

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.
    z(>[ \t]*)(.*\n)cKs||_tj|fi|��dS)N)�	baselexerr�__init__)rr&�optionsr�r�r�r'szLiterateLexer.__init__c	cs��|j�d�}|dur|��dd�dvrdpd}d}g}|dkr\t�|�D]4}|��}|j�|�}|rM|�t	|�dt
j|�d�fgf�||�d�7}q&|�t	|�dt|fgf�q&ncdd	l
m}|di|j��}	d}
d}t�|�D]=}|��}|
r�|���d
�r�d}
||7}qs||7}qs|���d�r�d}
||7}|�t	|�t|	�|��f�d}qs||7}qs|�t	|�t|	�|��f�t||j�|��EdHdS)
N�litstyler�z%\�latex�bird��)�TexLexerz
\end{code}z\begin{code}r�)r(�get�lstrip�line_re�finditer�group�bird_re�match�append�lenr
�Specialr	�pygments.lexers.markupr/�
startswith�listrrr&)rr �style�code�
insertionsr6�line�mr/�lxlexer�	codelinesr+r�r�r�rsP�
��


�

�z$LiterateLexer.get_tokens_unprocessedN)	ryrzr{r|r��compiler5r'rr�r�r�r�r%�s

r%c@�0eZdZdZdZgd�ZdgZdgZdd�ZdS)	ran
    For Literate Haskell (Bird-style or LaTeX) source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 0.9
    zLiterate Haskell)zliterate-haskell�lhaskell�lhsz*.lhsztext/x-literate-haskellcK�&tdi|��}tj||fi|��dS�Nr�)rr%r'�rr(�hslexerr�r�r�r'F�zLiterateHaskellLexer.__init__N�	ryrzr{r|r}r~rr�r'r�r�r�r�r4�rc@rE)	ral
    For Literate Idris (Bird-style or LaTeX) source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 2.0
    zLiterate Idris)zliterate-idris�lidris�lidrz*.lidrztext/x-literate-idriscKrHrI)rr%r'rJr�r�r�r']rLzLiterateIdrisLexer.__init__NrMr�r�r�r�rKrNrc@s0eZdZdZdZddgZdgZdgZdd�Zd	S)
raU
    For Literate Agda source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 2.0
    z
Literate Agdaz
literate-agda�lagdaz*.lagdaztext/x-literate-agdacKs*tdi|��}tj||fddi|��dS)Nr)r+r�)rr%r')rr(�	agdalexerr�r�r�r'tszLiterateAgdaLexer.__init__NrMr�r�r�r�rbrNrc@rE)	ran
    For Literate Cryptol (Bird-style or LaTeX) source.

    Additional options accepted:

    `litstyle`
        If given, must be ``"bird"`` or ``"latex"``.  If not given, the style
        is autodetected: if the first non-whitespace character in the source
        is a backslash or percent character, LaTeX is assumed, else Bird.

    .. versionadded:: 2.0
    zLiterate Cryptol)zliterate-cryptol�lcryptol�lcryz*.lcryztext/x-literate-cryptolcKrHrI)rr%r')rr(�crylexerr�r�r�r'�rLzLiterateCryptolLexer.__init__NrMr�r�r�r�ryrNrc@s�eZdZdZdZdgZddgZdgZgd�Zgd�Z	gd	�Z
gd
�ZdZded
Z
dZejZejZejZed�de
edfdeeee�dfdeeee�dfdd�e	�deeee�dfdeeeeeej�fdeeeejeeeeeej�	fdedeeeeeej�fdedeeeeeeeej�fdd�e
�eejfdd�e�eefdd�e�eejfde
efdeeje�fd eeje�fd!edeeje�fd"ej fd#e!j"d$fed%e#fd&e#fd'e$fd(e%j&fd)e%j'fd*e%j(fd+e!j)d,fd-e!j"d.fgd/efed�gd0e$d1fed�gd2ed3fed4�gd5ed1fd2ed3fd6efd7eeee�fed4�ged�dd�e
�eefd8d�e�ed9ed1fd:eefd;efd"ej fdeeje�fd<eeje�fd=efe*d1�g
d>eee+j,�fd?efd@e+j-dAfdBe+j.fgdCe+j-fd@e+j-dDfdEe+j-d1fdFe+j-fgdGe!j"fdHe!j/fd-e!j"d1fgdIe!j"fedJ�dKe!j"d1fgdLe!j)fedJ�dMe!j)d1fgdNe!j/fdOe!j/fdPe!j/fdQe!j/fgdR�Z0dSS)Trzc
    Lexer for the `Koka <http://koka.codeplex.com>`_
    language.

    .. versionadded:: 1.6
    �Koka�kokaz*.kkz*.kkiztext/x-koka)"r�r�r�r0�cotype�rectype�alias�struct�con�fun�function�val�var�externalr(r/r&�elif�returnr6r�r�r�rQrO�asr�inline�rec�try�yield�enumr�r+)r0rXrYrZr[ri)r��exists�somer�)
�for�while�repeat�foreachzforeach-indexedr�catch�finally�cs�js�file�ref�assignedz[$%&*+@!/\\^~=.:\-?|<>]+z(?!�)z	(?![\w/])�
whitespacez::?r0z(alias)(\s+)([a-z]\w*)?�
alias-typez(struct)(\s+)([a-z]\w*)?�struct-typez(%s)rTz(\s+)([a-z]\w*)?z=(module)(\s+)(interface(?=\s))?(\s+)?((?:[a-z]\w*/)*[a-z]\w*)z`(import)(\s+)((?:[a-z]\w*/)*[a-z]\w*)(?:(\s*)(=)(\s*)(qualified)?(\s*)((?:[a-z]\w*/)*[a-z]\w*))?z>^(public|private)?(\s+)?(function|fun|val)(\s+)([a-z]\w*|\((?:z|/)\))zd^(?:(public|private)(?=\s+external))?((?<!^)\s+)?(external)(\s+)(inline(?=\s))?(\s+)?([a-z]\w*|\((?:z::?|:=|\->|[=.]z((?:[a-z]\w*/)*)([A-Z]\w*)z((?:[a-z]\w*/)*)([a-z]\w*)z((?:[a-z]\w*/)*)(\((?:z_\w*z@"�	litstringz
|/(?![*/])�`z[{}()\[\];,]z![0-9]+\.[0-9]+([eE][\-+]?[0-9]+)?z0[xX][0-9a-fA-F]+z[0-9]+rY�charr[r\�=z(?=\((?!,*\)))raz[(\[<]�type-nested�type-contentz[)\]>]rfz([a-z]\w*)(\s*)(:)(?!:)z(?=((%s)z))z[EPHVX]z[a-z][0-9]*(?![\w/])z((?:[a-z]\w*/)*)([a-z]\w+)z::|->|[.:|]z
(\n\s*)(#.*)$rJrrMrr	rkr
rz[^"]+z""z	[^\\"\n]+�escape-sequencez["\n]z
[^\\\'\n]+z[\'\n]z\\[nrt\\"\']z\\x[0-9a-fA-F]{2}z\\u[0-9a-fA-F]{4}z\\U[0-9a-fA-F]{6})rxryrzr0rr�rxrMr{r\r}r�N)1ryrzr{r|r}r~rr��keywords�typeStartKeywords�typekeywords�builtin�symbols�	sboundary�boundaryr
�	Attribute�	tokenType�Class�tokenTypeDefr�Emph�tokenConstructorrrrrr�r�r�r��Pseudo�Variabler�Doublerrrr�r�r�r�rr
�Preprocr�r�r�r�r�r�r�r�r�s���
����������

�

�



�?���
���

�
��
�

�
�
�
���
�r)&r|r��pygments.lexerrrrrrrr�pygments.tokenr	r
rrr
rrrrr�pygmentsrr��__all__rDr2rrrrrr%rrrrrr�r�r�r��<module>s(
$0
oE
@

https://t.me/RX1948 - 2025