o
    Ñ­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ÚassumeÚsufficesÚletÚifÚelseÚthenÚinÚwithÚcalcÚmatchÚdoú\b©ÚprefixÚsuffix©ÚsorryÚ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   ÚomitrO   rN   ÚexportÚopenÚ	attribute)(ÚlemmaÚtheoremÚdefÚ
definitionÚexampleÚaxiomÚaxiomsÚconstantÚ	constantsÚuniverseÚ	universesÚ	inductiveÚcoinductiveÚ	structureÚextendsÚclassÚinstanceÚabbreviationznoncomputable theoryÚnoncomputableÚmutualÚmetarS   Ú	parameterÚ
parametersÚvariableÚ	variablesÚreserveÚ
precedenceÚpostfixr-   ÚnotationÚinfixÚinfixlÚinfixrÚbeginÚbyÚendÚ
set_optionÚrun_cmdú@\[rS   )ú#evalú#checkú#reduceú#exitú#printú#help)r.   Ú
expressionú\]ú#popú[^/-]+ú#pushú-/ú[/-]ú[^\\"]+z9(?:(\\[\\\"'nt])|(\\x[0-9a-fA-F]{2})|(\\u[0-9a-fA-F]{4}))©r€   ÚrootrS   r   r   rE   c                 C   ó   t  d| t j¡r
dS d S )Nz^import [a-z]çš™™™™™¹?©ÚreÚsearchÚ	MULTILINE©Útext© r’   úQ/var/www/html/CropPilot/venv/lib/python3.10/site-packages/pygments/lexers/lean.pyÚanalyse_text   ó   ÿzLean3Lexer.analyse_textN)'Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesÚ	mimetypesÚversion_addedÚ_name_segmentÚ_namer   r	   ÚDocr   ÚSingler   r   r   ÚErrorr4   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   )6rH   Ú	unif_hintrI   ÚinlinerJ   rT   rk   rU   rY   r_   ra   r]   Úaliasr   rn   ro   r-   rq   rr   rs   rp   rz   r{   r|   r}   rv   rM   ÚusingrK   rd   rO   rN   rQ   rw   rb   rR   rX   r~   ÚopaquerV   ÚmacroÚelabÚsyntaxÚmacro_rulesr|   ÚwhereÚabbrevrf   rc   rS   z#synthrg   ÚscopedrL   )r   r   Úobtainr   r   r   r    r"   r#   r$   r%   ru   r&   r'   r(   r)   Únomatchr*   Úat)r4   r3   r2   )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   â‰¡r<   r=   u   â†¦)r5   r6   r7   r8   r9   r:   r;   r>   r?   r@   rA   z]'z]?z]!r   r   r   r   r   z--.*$r+   r,   r/   rB   z
(?<=\.)\d+z(\d+\.\d*)([eE][+-]?[0-9]+)?rC   rD   rE   rF   rG   ry   rS   r€   r�   r‚   rƒ   r„   r…   r†   r‡   z
\\[n"\\\n]rˆ   c                 C   rŠ   )Nz^import [A-Z]r‹   rŒ   r�   r’   r’   r“   r”   ï   r•   zLean4Lexer.analyse_textN),r–   r—   r˜   r™   rš   r›   rœ   r�   rž   rŸ   r    r¡   Ú	keywords1Ú	keywords2Ú	keywords3Ú	operatorsÚpunctuationr   r	   r¢   r   r£   r   r   r4   r   r¤   r   rª   r«   r   r¥   r
   ÚFloatr¦   r§   r©   r¬   r­   r   r®   r¯   r°   r”   r’   r’   r’   r“   r   ‡   sp    ÿ	



ð
ü
þ

û
ý
ý×0)r™   r�   Úpygments.lexerr   r   r   Úpygments.tokenr   r   r   r   r	   r
   r   r   Ú__all__r   Ú	LeanLexerr   r’   r’   r’   r“   Ú<module>   s    
(q