a
    ñ»jŒ!  ã                   @   sx   d Z ddlZddl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 ddgZG dd„ deƒZeZG dd„ deƒZdS )	zÓ
    pygments.lexers.lean
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for the Lean theorem prover.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Ú
RegexLexerÚwordsÚinclude)ÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚGenericÚ
WhitespaceÚ
Lean3LexerÚ
Lean4Lexerc                   @   s¶  e Zd ZdZdZdZddgZdgZddgZd	Z	d
Z
e
d e
 d Zdefdejdfdedfdejfedddd�efedddd�ejfedddd�ejfedƒefeefde ejfdejfdejfdejfdejdfdejfd ejfd!ejjfged"ddd�ej fed#ddd�ej!fd$ej!d%fed&dd'�efe"d(ƒgd)ej!d*fe"d(ƒgd+ej#fdej#d,fd-ej#d*fd.ej#fgd+ejfd-ejd*fd.ejfgd/ejfd0ej$fdejd*fgd1œZ%d2d3„ Z&d4S )5r   z(
    For the Lean 3 theorem prover.
    ÚLeanz,https://leanprover-community.github.io/lean3ÚleanÚlean3ú*.leanztext/x-leanztext/x-lean3z2.0u”   (?![Î»Î Î£])[_a-zA-ZÎ±-Ï‰Î‘-Î©ÏŠ-Ï»á¼€-á¿¾â„€-â…�ð�’œ-ð�–Ÿ](?:(?![Î»Î Î£])[_a-zA-ZÎ±-Ï‰Î‘-Î©ÏŠ-Ï»á¼€-á¿¾â„€-â…�ð�’œ-ð�–Ÿ0-9'â�¿-â‚‰â‚�-â‚œáµ¢-áµª])*ú(\.ú)*ú\s+ú/--Ú	docstringú/-Úcommentz--.*?$)ÚforallÚfunÚPiÚfromÚhaveÚshowÚassumeZsufficesÚletÚifÚelseÚthenÚinÚwithÚcalcÚmatchÚdoú\b©ÚprefixÚsuffix©ZsorryZadmit)ÚSortÚPropÚType)ú(ú)ú:Ú{Ú}ú[ú]õ   âŸ¨õ   âŸ©u   â€¹u   â€ºõ   â¦ƒõ   â¦„ú:=ú,ú``?z0x[A-Za-z0-9]+z0b[01]+ú\d+ú"Ústringz='(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4})|.)'ú[~?][a-z][\w\']*:ú\S)ÚimportÚrenamingÚhidingÚ	namespaceÚlocalÚprivateÚ	protectedÚsectionr   ZomitrL   rK   ÚexportÚopenÚ	attribute)(ÚlemmaÚtheoremÚdefZ
definitionÚexampleÚaxiomZaxiomsZconstantÚ	constantsÚuniverseZ	universesÚ	inductiveZcoinductiveÚ	structureÚextendsÚclassÚinstanceZabbreviationznoncomputable theoryÚnoncomputableÚmutualÚmetarO   Z	parameterÚ
parametersÚvariableÚ	variablesZreserveÚ
precedenceÚpostfixr,   ÚnotationÚinfixÚinfixlÚinfixrÚbeginÚbyÚendÚ
set_optionZrun_cmdú@\[rO   )ú#evalú#checkú#reduceú#exitú#printú#help)r-   Ú
expressionú\]ú#popú[^/-]+ú#pushú-/ú[/-]ú[^\\"]+z9(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4}))©rs   ÚrootrO   r   r   rB   c                 C   s   t  d| t j¡rdS d S )Nz^import [a-z]çš™™™™™¹?©ÚreÚsearchÚ	MULTILINE©Útext© r„   ú:E:\soccer\ml_env\Lib\site-packages\pygments/lexers/lean.pyÚanalyse_text   s    zLean3Lexer.analyse_textN)'Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesÚ	mimetypesÚversion_addedÚ_name_segmentÚ_namer   r	   ÚDocr   ÚSingler   r   r   ÚErrorr1   r   r   ÚSymbolr
   ÚIntegerÚDoubleÚCharÚVariableÚBuiltinÚPseudoÚ	NamespaceÚDeclarationr   Ú	MultilineÚEscapeÚtokensr†   r„   r„   r„   r…   r      sŒ   ÿ
üüþ

é	÷	÷
èè
ýý×,
þ

ü
ý
ý¬[c                   @   sª  e Zd ZdZdZdZdgZdgZdgZdZ	dZ
e
d	 e
 d
 ZdZdZdZdZdZdefdejdfdedfdejfeeddd�ejfedddd�ejfeeƒejjfeeƒefe
efde ejfde fde j!fde j"fdej#dfdej$fd ejjfgeeddd�ej%feeddd�efd!ej&d"fe'd#ƒgd$ej&d%fe'd#ƒgd&ej(fdej(d'fd(ej(d%fd)ej(fgd&ejfd(ejd%fd)ejfgd*ej#fd+ej)fdej#d%fgd,œZ*d-d.„ Z+d/S )0r   z(
    For the Lean 4 theorem prover.
    ÚLean4z#https://github.com/leanprover/lean4Úlean4r   ztext/x-lean4z2.18u–   (?![Î»Î Î£])[_a-zA-ZÎ±-Ï‰Î‘-Î©ÏŠ-Ï»á¼€-á¿¾â„€-â…�ð�’œ-ð�–Ÿ](?:(?![Î»Î Î£])[_a-zA-ZÎ±-Ï‰Î‘-Î©ÏŠ-Ï»á¼€-á¿¾â„€-â…�ð�’œ-ð�–Ÿ0-9'â�¿-â‚‰â‚�-â‚œáµ¢-áµª!?])*r   r   )6rE   Z	unif_hintrF   ÚinlinerG   rP   r`   rQ   rT   rW   rX   rV   Úaliasrr   rb   rc   r,   re   rf   rg   rd   rm   rn   ro   rp   rj   rJ   ÚusingrH   r[   rL   rK   rM   rk   rY   rN   rS   rq   ÚopaquerR   ÚmacroZelabÚsyntaxZmacro_rulesro   ÚwhereZabbrevr\   rZ   rO   z#synthr]   ZscopedrI   )r   r   Úobtainr   r   r   r    r!   r"   r#   r$   ri   r%   r&   r'   r(   Znomatchr)   Úat)r1   r0   r/   )8z!=ú#ú&z&&Ú*ú+ú-ú/ú@ú!z-.z->Ú.z..z...z::z:>ú;z;;ú<z<-ú=z==ú>Ú_ú|z||ú~z=>z<=z>=z/\z\/u   âˆ€u   Î u   Î»u   â†”u   âˆ§u   âˆ¨u   â‰ u   â‰¤u   â‰¥õ   Â¬u   â�»Â¹u   â¬�u   â–¸u   â†’u   âˆƒu   â‰ˆõ   Ã—u   âŒžu   âŒŸu   â‰¡r9   r:   u   â†¦)r2   r3   r4   r5   r6   r7   r8   r;   r<   r=   r>   z]'z]?z]!r   r   r   r   r   z--.*$r*   r+   r.   r?   z
(?<=\.)\d+z(\d+\.\d*)([eE][+-]?[0-9]+)?r@   rA   rB   rC   rD   rl   rO   rs   rt   ru   rv   rw   rx   ry   rz   z
\\[n"\\\n]r{   c                 C   s   t  d| t j¡rdS d S )Nz^import [A-Z]r}   r~   r‚   r„   r„   r…   r†   ï   s    zLean4Lexer.analyse_textN),r‡   rˆ   r‰   rŠ   r‹   rŒ   r�   rŽ   r�   r�   r‘   r’   Z	keywords1Z	keywords2Z	keywords3Ú	operatorsÚpunctuationr   r	   r“   r   r”   r   r   r1   r   r•   r   r›   rœ   r   r–   r
   ÚFloatr—   r˜   rš   r�   rž   r   rŸ   r    r¡   r†   r„   r„   r„   r…   r   ‡   sn   ÿ	



ð
ü
þ

û
ý
ý×0)rŠ   r   Zpygments.lexerr   r   r   Zpygments.tokenr   r   r   r   r	   r
   r   r   Ú__all__r   Ú	LeanLexerr   r„   r„   r„   r…   Ú<module>   s   
(q