a
    €˜ëj¬(  ã                   @   s˜   d Z ddlZddl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mZ g d¢ZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZdS )zÐ
    pygments.lexers.dylan
    ~~~~~~~~~~~~~~~~~~~~~

    Lexers for the Dylan language.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)ÚLexerÚ
RegexLexerÚbygroupsÚdo_insertionsÚdefaultÚline_re)
ÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚGenericÚLiteralÚ
Whitespace)Ú
DylanLexerÚDylanConsoleLexerÚDylanLidLexerc                   @   sÞ  e Zd ZdZdZdZdgZg d¢ZdgZdZ	e
jZh d£Zh d	£Zh d
£Zh d£ZdZdd„ Zdefdejfdeejeeeƒfedƒgdefdeejeƒfdejdfde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 d eej$eej%ƒfd eej$eej%ƒfd!e ej$fd"e&fd#efd$e'fd%ej(d&fd'e)fed( e)fd)e d* ej*fd+e d+ ej+j,fd,e ej-feefgd-ejfdejd.fd/ejd0fd1ejfgdej(d0fd2ej(fgded0fd3ej.fd4efd5efd6efgd7œZ/d8S )9r   z!
    For the Dylan language.
    ZDylanúhttp://www.opendylan.org/Zdylan)z*.dylanz*.dylz*.intrztext/x-dylanz0.7>%   ÚblockÚkeywordZ	interfaceÚfunctionZabstractZconstantZslotZsidewaysZvirtualÚexcludeZprimaryZsealedzeach-subclassÚinlineÚmacroÚ	exceptionÚrequiredZdynamicÚimportÚmethodzcompiler-sidewaysÚhandlerzinline-onlyZconcreteZgenericZlibraryÚ	singletonÚinstanceÚopenÚmoduleÚthreadÚclassÚvariableÚsubclassZ	inheritedÚdomainzcompiler-open>   ZbelowÚwhenZdefineÚlocalÚfinallyÚselectÚelseZ
afterwardsÚfromZ	otherwiseÚifZbyÚwhileÚcleanupÚcreateÚforZthenÚbeginZunlessZuseZelseifÚendZcaseÚsignalÚinÚrenameÚtoZuntilZletZaboveÚexport>   ú>ú^Ú*ú~ú+ú&ú<ú=z~=z~==ú|z<=ú-z>=z==>ž   zmap-intozceiling/zodd?ztype-error-expected-typez	integral?Zlogxorzany?z
add-methodzfunction-specializersÚgcdzremove!ZrcurryZdoÚsortzbackward-iteration-protocolzfunction-argumentsZconjoinzdirect-subclassesÚalwayszas-lowercasezsubtype?ÚidentityÚ	remainderzapplicable-method?Úabortzmerge-hash-codesZcerrorzreturn-queryz#generic-function-mandatory-keywordszfirst-setterzreturn-allowed?zas-uppercaseÚremoveÚerrorÚthirdzremove-duplicates!zslot-initialized?Zashzmap-asZarefzevery?zfloor/zempty?zgeneric-function-methodsÚchoosezreplace-elements!z
check-typezlogbit?z	push-lastZrankztable-protocolÚintersectionÚlcmzreturn-descriptionzremove-methodÚsecondzfill!zcopy-sequencezas-lowercase!zobject-hashzhead-setterzthird-setterzsecond-setterZmoduloz	negative?r!   zlast-setterzadd-newzconcatenate-asÚpopZlogandÚbreakÚpairzrow-major-indexz	truncate/Úabszremove-key!ÚmakeÚlastÚtruncateZ
initializezpop-lastZvectorzforward-iteration-protocolÚreduceZ	dimensionzreverse!zround/zsubsequence-positionÚfirstZlognotzobject-classztype-error-valueZconcatenateÚpushZcomposezdo-handlerszone-ofZlogiorzshallow-copyÚaddÚsizezkey-sequencezfind-methodzcondition-format-argumentsZ
dimensionsÚfloorÚlistzas-uppercase!zreplace-subsequence!ZdisjoinÚheadZreduce1ÚtailÚnegativezfalse-orzsize-setterzremove-duplicatesÚapplyzall-superclassesZlimitedzzero?zcondition-format-stringz	instance?Úvalueszadd!znext-methodz	choose-byÚunionZcurryÚminzmember?zeven?ÚreverseZceilingz
type-unionzdefault-handlerÚmapz	positive?Úrangezadd-new!zfind-keyÚroundzelement-setterzrestart-queryzsorted-applicable-methodsztype-for-copyzfunction-return-valuesÚelementÚmaxzsort!zaref-setterr7   Z
complementztail-setterzdirect-superclassesÚaszkey-testz\\?[\w!&*<>|^$%@\-+~?/=]+c                 c   sœ   t  | |¡D ]Š\}}}|tu rŠ| ¡ }|| jv r@|tj|fV  q|| jv rX|t|fV  q|| jv rr|tj|fV  q|| j	v rŠ|t
|fV  q|||fV  qd S )N)r   Úget_tokens_unprocessedr   ÚlowerÚbuiltinsÚBuiltinÚkeywordsr
   Ú	functionsÚ	operatorsr	   )ÚselfÚtextÚindexÚtokenÚvalueZlowercase_value© r{   úT/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pygments/lexers/dylan.pyro   ]   s     



z!DylanLexer.get_tokens_unprocessedú\s+z//.*?\nz)([a-z0-9-]+)(:)([ \t]*)(.*(?:\n[ \t].+)*)Úcodeú(//.*?)(\n)z/\*Úcommentú"Ústringz/'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'z#b[01]+z#o[0-7]+z0[-+]?(\d*\.\d+(e[-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)z[-+]?\d+z#x[0-9a-f]+z(\?z6)(:)(token|name|variable|expression|body|case-body|\*)z9(\?)(:)(token|name|variable|expression|body|case-body|\*)z\?z,(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])z:=z#[tf]z#"r   z#[a-z0-9-]+ú:rB   r<   z\*z\$z[^*/]+z#pushz\*/z#popz[*/]z[^\\"]+z,\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})z	[^\\"\n]+z\\\nz\\)Úrootr~   r€   r   r‚   N)0Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesÚ	mimetypesÚversion_addedÚreÚ
IGNORECASEÚflagsrq   rs   ru   rt   Z
valid_namero   r   r   ÚSingler   r   Ú	Attributer	   r   r   Z	MultilineÚCharr   ZBinÚOctZFloatZIntegerZHexÚTagrr   r   r   ZSymbolr
   ZClassÚVariableÚGlobalÚConstantZEscapeÚtokensr{   r{   r{   r|   r      s€   	$ÿõ

þÿ

¾E

ü
þû¤r   c                	   @   sf   e Zd ZdZdZddgZddgZdgZdZd	Z	e
jZd
defdeejeƒfdeejeeeƒfgiZdS )r   z?
    For Dylan LID (Library Interchange Definition) files.
    ZDylanLIDz	dylan-lidZlidz*.lidz*.hdpztext/x-dylan-lidr   ú1.6r„   r}   r   z"(.*?)(:)([ \t]*)(.*(?:\n[ \t].+)*)N)r…   r†   r‡   rˆ   r‰   r‹   rŒ   r�   rŠ   rŽ   r�   r�   r‘   r   r   r   r’   r   r“   r	   r   rš   r{   r{   r{   r|   r   Õ   s    ÿøÿr   c                   @   sF   e Zd ZdZdZddgZdgZdgZdZdZ	d	Z
e d
¡Zdd„ ZdS )r   zi
    For Dylan interactive console output.

    This is based on a copy of the ``RubyConsoleLexer``.
    zDylan sessionzdylan-consolez
dylan-replz*.dylan-consoleztext/x-dylan-consoler   r›   z#dylan-console/console.dylan-consolez\?| c           	   	   c   sÔ   t f i | j¤Ž}d}g }t |¡D ]’}| ¡ }| j |¡}|d ur€| ¡ }| t	|ƒdt
j|d |… fgf¡ |||d … 7 }q"|r¢t|| |¡ƒE d H  d}g }| ¡ t
j|fV  q"|rÐt|| |¡ƒE d H  d S )NÚ r   )r   Úoptionsr   ÚfinditerÚgroupÚ
_prompt_reÚmatchr6   ÚappendÚlenr   ZPromptr   ro   ÚstartZOutput)	rv   rw   ZdylexerZcurcodeZ
insertionsr¡   ÚlineÚmr6   r{   r{   r|   ro     s.    
ÿÿ
ÿz(DylanConsoleLexer.get_tokens_unprocessedN)r…   r†   r‡   rˆ   r‰   r‹   rŒ   r�   rŠ   rŽ   Z_exampler�   Úcompiler    ro   r{   r{   r{   r|   r   ñ   s   
r   )rˆ   r�   Zpygments.lexerr   r   r   r   r   r   Zpygments.tokenr   r	   r
   r   r   r   r   r   r   r   Ú__all__r   r   r   r{   r{   r{   r|   Ú<module>   s   
 0 A