HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pygments/lexers/__pycache__/haskell.cpython-38.pyc
U

6�\5{�	@s(dZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZddlmZdddd	d
ddd
dg	Ze�d�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGdd�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�Z Gdd
�d
e�Z!Gdd�de�Z"dS)z�
    pygments.lexers.haskell
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Haskell and related languages.

    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�Lexer�
RegexLexer�bygroups�
do_insertions�default�include)	�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic)�	unistring�HaskellLexer�
IdrisLexer�	AgdaLexer�CryptolLexer�LiterateHaskellLexer�LiterateIdrisLexer�LiterateAgdaLexer�LiterateCryptolLexer�	KokaLexerz.*?
c @sFeZdZdZdZddgZdgZdgZej	ej
BZdZdZ
d	efd
ejfdejdfd
ejdfdejdfdejfdd�e�ejfdejfdejdejfdejdefdejdejfdejdejfdejfdejfdejfdejfdejfd efd!e j!fd"e j!fd#e j!fd$e j!fd%e j"fd&e j#fd'e j$fd(e j%fd)ejd*fd+ed,fd-ejfd.ej&fd/e'fgd	efd+ed,fd0e'd1fd2efd3ejd4ejd5e(ej)eeee�d1fd3ejd6e(ej)eeee'�d7fd3ejd8e(ej)ee'�d7fd9ej)d1fgd	efd3ejd8e(ej)ee'�d7fd:ejd;ej)d1fgd	efd:ejd<ejfd=ejd>ejfd
ejfdejdfd?e'fd efd@e'dAfd0e'dBfg	dCejfdejdDfdEejd1fdFejfgdGejd1fdHej*dIfd)ejd1fgdJefdHej*dIfd+ed1fgdKej*d1fdLejdMej*d1fd�e
�ej*d1fdNej*d1fdOej*d1fdPej*d1fdQej*d1fgdR�Z+dSS)Trzk
    A Haskell lexer based on the lexemes defined in the Haskell 98 Report.

    .. versionadded:: 0.8
    ZHaskellZhaskellZhsz*.hsztext/x-haskell)�case�class�datarZderiving�do�elseZfamily�if�in�
infix[lr]?�instance�let�newtype�of�then�type�where�_�ZNULZSOHz[SE]TXZEOTZENQZACKZBELZBSZHTZLFZVTZFFZCRzS[OI]ZDLEzDC[1-4]ZNAKZSYNZETBZCANZEMZSUBZESCz[FGRU]SZSPZDEL�\s+�!--(?![!#$%&*+./<=>?@^|_~:\\]).*?$�\{-�comment�
\bimport\b�import�
\bmodule\b�module�	\berror\b�\b(%s)(?!\')\b�|z'[^\\]'z^[_z][\w\']*z'?[_z][\w']*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\']*)�,�\(�rErE�#pop:2�[^-{}]+�#push�-\}�[-{}]�[^\\']'�\\�escape�[^\\"]+�[abfnrtv"\'&\\]z\^[][z@^_]�o[0-7]+�x[\da-fA-F]+�\d+�\s+\\��rootr1r3rEr/r<r>rRN),�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenames�	mimetypes�re�	MULTILINE�UNICODE�flags�reserved�asciirr	�Single�	Multiliner�Reservedr�	Exception�joinr
�Char�uniZLl�FunctionZLu�Typer
�Wordr�FloatZBin�Oct�Hex�Integer�Builtinrr�	Namespace�Escape�tokens�r{r{�9/usr/lib/python3/dist-packages/pygments/lexers/haskell.pyrs�



�+���
���
�

�	


�
�




��c@s*eZdZdZdZddgZdgZdgZdZdZ	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
�dfdejfde
fdejfdejfdejfdejfdejfdejfdejdfdedfd e
fd!e
fgd"e
fd#eeje
e�d$fd%ejd&fgd"e
fd'ejfd(ejfd)ejfd*ejdfd+efd,efd-ed.fd/ed0fg	d1ejfd*ejd2fd3ejd&fd4ejfgd5ejfd6ej d7fdejd&fgd8efd6ej d7fded&fgd9ej d&fd:ej d&fd�e	�ej d&fd;ej d&fd<ej d&fdej d&fd=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
    ZIdrisZidrisZidrz*.idrztext/x-idris).rrrr�usingrrr r!r"r#�rewrite�auto�	namespace�codata�mutual�private�public�abstractZtotal�partialr$Zproofr&r'Zstaticr)r*�with�patternZterm�syntax�prefix�	postulateZ
parameters�recordZdslZ
impossibleZimplicitZtacticsZintrosZintroZcomputeZrefine�exactZtrivialr+)
�lib�link�flagrZhideZfreeze�accessrZloggingZdynamicr_Zerror_handlersZlanguagez^(\s*)(%%%s)r6z((\s*)(--(?![!#$%&*+./<=>?@^|_~:\\]).*?)$z(\s*)(\|{3}.*?)$z
(\s*)(\{-)r/�^(\s*)([^\s(){}]+)(\s*)(:)(\s*)r5�(import|module)(\s+)r3�('')?[A-Z][\w\']*z[a-z][\w\']*z(<-|::|->|=>|=)z"([(){}\[\]:!#$%&*+.\\/<=>?@^|~-]+)�\d+[eE][+-]?\d+�\d+\.\d+([eE][+-]?\d+)?�0[xX][\da-fA-F]+rWr;r<r=r>�
[^\s(){}]+�\s+?r,�([A-Z][\w.]*)(\s+)(\()rE�[A-Z][\w.]*rC�[A-Z]\w*�(_[\w\']+|[a-z][\w\']*)z--.*$r.rHr:rIrJrBrKrLrMrNrOz[^\\']rQrRrSrT�\^[][A-Z@^_]rUrVrX)rZr3rEr/r<r>rRN)"r[r\r]r^r_r`rarbrgrhZ
directivesrmrrrrkr	rirjrrpr
rrrqrrsrurvr
rnrxrryrzr{r{r{r|r�s�	
��
��
�
�

�	

�
�





��c"@s~eZdZdZdZdgZdgZdgZdddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'g"Zd(e	e
eje
e
je
�fd)ejfd*ejd+fd,ejd-fd.d/�e�ejfd0e	eje
�d1fd2ejfd3e
fd4e
jfd5ejfd6ejfd7ejfd8ejfd9ejd:fd;ed<fd=e
fd>e
fgd?ejfd,ejd@fdAejdBfdCejfgd*ejd+fdDedBfdEe
fgejd+ejd:ejd<ejdFdG�ZdHS)Irz�
    For the `Agda <http://wiki.portal.chalmers.se/agda/pmwiki.php>`_
    dependently typed functional programming language and proof assistant.

    .. versionadded:: 2.0
    ZAgdaZagdaz*.agdaztext/x-agdar�r�Zcoinductive�constructorrZfield�forallZhidingr!Z	inductive�infix�infixl�infixrr#r$r��openr�r�Z	primitiver�ZquoteZ	quoteGoalZ	quoteTermr�Zrenamingr~r�ZtacticZunquoteZunquoteDeclr}r)r�r�r-r.r/z\{!�holer5r6r�r3z\b(Set|Prop)\bz
(\(|\)|\{|\})u(\.{1,3}|\||Λ|∀|→|:|=|->)r�r�r�rWr;r<r=r>r�r�z[^!{}]+rMz!\}rCz[!{}]z[a-zA-Z][\w.]*z	[\W0-9_]+rR)rZr�r3r/r<r>rRN)r[r\r]r^r_r`rarbrgrrrrpr
rrr	rirjZ	Directivermrrkrqrrsrurvr
rnrrzr{r{r{r|rs�
��


�

�
��c@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(fdBej"d(fgdC�Z#e$dD�Z%dEdF�Z&dGS)Hrzs
    FIXME: A Cryptol2 lexer based on the lexemes defined in the Haskell 98 Report.

    .. versionadded:: 2.0
    ZCryptolZcryptolZcryz*.cryztext/x-cryptol)ZArithZBitZCmp�FalseZInf�TruerZexportZexternZfinr r1�infZlg2�max�minr3r%Zpragma�propertyr'r(r)�widthr+r,�//.*$�/\*r/r0r1r2r3r4r5r6z^[_a-z][\w\']*z'?[_a-z][\w']*r�r7r8r9r:r�r�z0[oO][0-7]+r�rWr;r<r=r>r?r@rArBrCrDz(([A-Z][\w.]*)(\s+)(as)(\s+)([A-Z][\w.]*)z#([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()rEr�rFr�r�r�rHrIrJrK�[^/*]+rM�\*/�[*/]rPrQrRrSrTr�rUrVrXrY)rm�split�reverseZ	transposer�Zlength�tailz<<z>>z<<<z>>>ZconstZregZpar�seq�ASSERTZ	undefined�errorZtraceccsRdg}t�|||�D]8\}}}|tkr@||jkr@|tj|fVq|||fVqdS)NrZ)r�get_tokens_unprocessedr�EXTRA_KEYWORDSrw)�self�text�stack�index�token�valuer{r{r|r��s�z#CryptolLexer.get_tokens_unprocessedN)'r[r\r]r^r_r`rarbrgrhrr	rirjrrkrrlrmrprqr
rrrrsrtrurvr
rnrwrrrxryrz�setr�r�r{r{r{r|rSs�



�$���
��
��

�	


�
�





��fc@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|f|�dS�N)�	baselexerr�__init__)r�r��optionsr{r{r|r��szLiterateLexer.__init__c
	cs�|j�d�}|dkr0|��dd�dkr,dp.d}d}g}|dkr�t�|�D]h}|��}|j�|�}|r�|�t	|�dt
j|�d�fgf�||�d�7}qJ|�t	|�dt|fgf�qJn�dd	l
m}|f|j�}	d}
d}t�|�D]�}|��}|
�r|���d
��rd}
||7}n||7}q�|���d��rXd}
||7}|�t	|�t|	�|��f�d}q�||7}q�|�t	|�t|	�|��f�t||j�|��D]}|V�q�dS)N�litstyler�z%\�latexZbird��)�TexLexerz
\end{code}z\begin{code})r��get�lstrip�line_re�finditer�group�bird_re�match�append�lenr	�SpecialrZpygments.lexers.markupr��
startswith�listr�rr�)
r�r�Zstyle�codeZ
insertionsr��line�mr�ZlxlexerZ	codelinesr��itemr{r{r|r��sN
�


�

�z$LiterateLexer.get_tokens_unprocessedN)	r[r\r]r^rc�compiler�r�r�r{r{r{r|r��s
r�c@s2eZdZdZdZdddgZdgZdgZdd	�Zd
S)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 HaskellZlhszliterate-haskellZlhaskellz*.lhsztext/x-literate-haskellcKstf|�}tj||f|�dSr�)rr�r��r�r�Zhslexerr{r{r|r�/s
zLiterateHaskellLexer.__init__N�	r[r\r]r^r_r`rarbr�r{r{r{r|rs
c@s2eZdZdZdZdddgZdgZdgZdd	�Zd
S)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 IdrisZlidrzliterate-idrisZlidrisz*.lidrztext/x-literate-idriscKstf|�}tj||f|�dSr�)rr�r�r�r{r{r|r�Fs
zLiterateIdrisLexer.__init__Nr�r{r{r{r|r4s
c@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 AgdaZlagdaz
literate-agdaz*.lagdaztext/x-literate-agdacKs&tf|�}tj||fddi|��dS)Nr�r�)rr�r�)r�r�Z	agdalexerr{r{r|r�]s
zLiterateAgdaLexer.__init__Nr�r{r{r{r|rKsc@s2eZdZdZdZdddgZdgZdgZdd	�Zd
S)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 CryptolZlcryzliterate-cryptolZlcryptolz*.lcryztext/x-literate-cryptolcKstf|�}tj||f|�dSr�)rr�r�)r�r�Zcrylexerr{r{r|r�ts
zLiterateCryptolLexer.__init__Nr�r{r{r{r|rbs
c"@s�eZdZdZdZdgZddgZdgZddd	d
ddd
dddddddddddddddddddd d!d"d#d$d%d&d'g"Zd
ddd
dd%gZ	d(d)d*d+gZ
d,d-d.d/d0d1d2d3d4d5d6d7d8g
Zd9Zd:ed;Z
d<ZejZejZejZed=�d>e
ed
fd?eeee�d@fdAeeee�dBfdCdD�e	�dEeeee�d
fdFeeeeej�fdGeeeejeeeeej�fdHedIeeeej�fdJedIeeeeej�fdCdD�e
�eejfdCdD�e�eefdCdD�e�eejfdKe
efdLeeje�fdMeeje�fdNedIeeje�fdOej fdPe!j"dQfedRe#fdSe#fdTe$fdUe%j&fdVe%j'fdWe%j(fdXe!j)dYfdZe!j"d[fgd\efed
�gd]e$d^fed
�gd_ed`feda�gdbed^fd_ed`fdcefddeeee�feda�ged=�dCdD�e
�eefdedD�e�edfed^fdgeefdhefdOej fdLeeje�fdieeje�fdjefe*d^�g
dke+j,fdlefdme+j-dnfdoe+j.fgdpe+j-fdme+j-dqfdre+j-d^fdse+j-fgdte!j"fdue!j/fdZe!j"d^fgdve!j"fedw�dxe!j"d^fgdye!j)fedw�dze!j)d^fgd{e!j/fd|e!j/fd}e!j/fd~e!j/fgd�Z0d�S)�rzc
    Lexer for the `Koka <http://koka.codeplex.com>`_
    language.

    .. versionadded:: 1.6
    ZKokaZkokaz*.kkz*.kkiztext/x-kokar�r�r�r(ZcotypeZrectype�aliasZstructZconZfunZfunction�val�varZexternalr r'r�elif�returnr�r�r�r3r1�asrZinlineZrec�try�yield�enumZ	interfacer#r��existsZsomer��for�while�repeatZforeachzforeach-indexedr�Zcatch�finallyZcsZjs�file�ref�assignedz[$%&*+@!/\\^~=.:\-?|<>]+z(?!�)z	(?![\w/])�
whitespacez::?z(alias)(\s+)([a-z]\w*)?�
alias-typez(struct)(\s+)([a-z]\w*)?�struct-typez(%s)r6z(\s+)([a-z]\w*)?z4(module)(\s+)(interface\s+)?((?:[a-z]\w*/)*[a-z]\w*)zb(import)(\s+)((?:[a-z]\w*/)*[a-z]\w*)(?:(\s*)(=)(\s*)((?:qualified\s*)?)((?:[a-z]\w*/)*[a-z]\w*))?zE(^(?:(?:public|private)\s*)?(?:function|fun|val))(\s+)([a-z]\w*|\((?:z|/)\))zE(^(?:(?:public|private)\s*)?external)(\s+)(inline\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]+r;�charr=r>�=z(?=\((?!,*\)))rCz[(\[<]�type-nested�type-contentz[)\]>]rHz([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*#.*$r,r�r/r�r�rMr�r�z[^"]+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})rZr�r�r(r�r�r�r/r�r>r�r�N)1r[r\r]r^r_r`rarb�keywordsZtypeStartKeywordsZtypekeywordsZbuiltinZsymbolsZ	sboundary�boundaryrZ	AttributeZ	tokenTypeZClassZtokenTypeDefrZEmphZtokenConstructorrrrrrmrxrprqZPseudoZVariabler
�Doubler
rrrsrurvrnrr	ZPreprocrjriryrzr{r{r{r|rys��������
����������

�

�



�?���
���

�
��
�

�
�
�
����)#r^rcZpygments.lexerrrrrrrZpygments.tokenrr	r
rrr
rrrZpygmentsrro�__all__r�r�rrrrr�rrrrrr{r{r{r|�<module>s0
 ,�
nE
A