o
    ni(                     @   s   d Z ddlZddl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-2017 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)Lexer
RegexLexerbygroupsdo_insertionsdefault)
TextCommentOperatorKeywordNameStringNumberPunctuationGenericLiteral)
DylanLexerDylanConsoleLexerDylanLidLexerc                   @   s  e Zd ZdZdZdgZg dZdgZej	Z
edZedZedZe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j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d-fd.ejfgdej'd-fd/ej'fgded-fd0ej-fd1efd2efd3efgd4Z.d5S )6r   z[
    For the `Dylan <http://www.opendylan.org/>`_ language.

    .. versionadded:: 0.7
    Dylandylan)z*.dylanz*.dylz*.intrztext/x-dylan)%subclassabstractblockconcreteconstantclasszcompiler-openzcompiler-sidewaysdomaindynamiczeach-subclass	exceptionexcludefunctiongenerichandler	inheritedinlinezinline-onlyinstance	interfaceimportkeywordlibrarymacromethodmoduleopenprimaryrequiredsealedsideways	singletonslotthreadvariablevirtual)above
afterwardsbeginbelowbycasecleanupcreatedefineelseelseifendexportfinallyforfromifinletlocal	otherwiserenameselectsignalthentounlessuntilusewhenwhile)~+-*|^=z==z~=z~==<z<=>z>=&rZ   )abortabsaddzadd!z
add-methodzadd-newzadd-new!zall-superclassesalwayszany?zapplicable-method?applyarefzaref-setteraszas-lowercasezas-lowercase!zas-uppercasezas-uppercase!ashzbackward-iteration-protocolbreakceilingzceiling/cerrorz
check-typechoosez	choose-by
complementcomposeconcatenatezconcatenate-aszcondition-format-argumentszcondition-format-stringconjoinzcopy-sequencecurryzdefault-handler	dimension
dimensionszdirect-subclasseszdirect-superclassesdisjoindozdo-handlerselementzelement-setterzempty?errorzeven?zevery?zfalse-orzfill!zfind-keyzfind-methodfirstzfirst-setterfloorzfloor/zforward-iteration-protocolzfunction-argumentszfunction-return-valueszfunction-specializersgcdz#generic-function-mandatory-keywordszgeneric-function-methodsheadzhead-setteridentity
initializez	instance?z	integral?intersectionzkey-sequencezkey-testlastzlast-setterlcmlimitedlistlogandzlogbit?logiorlognotlogxormakemapzmap-aszmap-intomaxzmember?zmerge-hash-codesminmodulonegativez	negative?znext-methodzobject-classzobject-hashzodd?zone-ofpairpopzpop-lastz	positive?pushz	push-lastrangerankrcurryreducereduce1	remainderremovezremove!zremove-duplicateszremove-duplicates!zremove-key!zremove-methodzreplace-elements!zreplace-subsequence!zrestart-queryzreturn-allowed?zreturn-descriptionzreturn-queryreversezreverse!roundzround/zrow-major-indexsecondzsecond-setterzshallow-copyrN   r2   sizezsize-setterzslot-initialized?sortzsort!zsorted-applicable-methodszsubsequence-positionzsubtype?ztable-protocoltailztail-setterthirdzthird-settertruncatez	truncate/ztype-error-expected-typeztype-error-valueztype-for-copyz
type-unionunionvaluesvectorzzero?z\\?[\w!&*<>|^$%@\-+~?/=]+c                 c   s    t | |D ]E\}}}|tu rF| }|| jv r!|tj|fV  q|| jv r-|t|fV  q|| jv r:|tj|fV  q|| j	v rF|t
|fV  q|||fV  qd S )N)r   get_tokens_unprocessedr   lowerbuiltinsBuiltinkeywordsr
   	functions	operatorsr	   )selftextindextokenvaluelowercase_value r   `/home/ubuntu/SoloSpeech/.venv/lib/python3.10/site-packages/wandb/vendor/pygments/lexers/dylan.pyr   ]   s$   



z!DylanLexer.get_tokens_unprocessed\s+//.*?\nz)([a-z0-9-]+)(:)([ \t]*)(.*(?:\n[ \t].+)*)codez/\*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-]+:r]   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)/__name__
__module____qualname____doc__namealiases	filenames	mimetypesre
IGNORECASEflagssetr   r   r   r   
valid_namer   r   r   Singler   r   	Attributer	   r   r   	MultilineCharr   BinOctFloatIntegerHexTagr   r   r   Symbolr
   ClassVariableGlobalConstantEscapetokensr   r   r   r   r      s~    	$



E



r   c                	   @   sX   e Zd ZdZdZddgZddgZdgZej	Z
dd	efd
ejfdeejeeefgiZdS )r   zZ
    For Dylan LID (Library Interchange Definition) files.

    .. versionadded:: 1.6
    DylanLIDz	dylan-lidlidz*.lidz*.hdpztext/x-dylan-lidr   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      s    r   c                   @   sD   e Zd ZdZdZddgZdgZdgZe	dZ
e	dZd	d
 ZdS )r   z
    For Dylan interactive console output like:

    .. sourcecode:: dylan-console

        ? let a = 1;
        => 1
        ? a
        => 1

    This is based on a copy of the RubyConsoleLexer.

    .. versionadded:: 1.6
    zDylan sessionzdylan-consolez
dylan-replz*.dylan-consoleztext/x-dylan-consolez.*?
z\?| c           
   	   c   s    t di | j}d}g }| j|D ]L}| }| j|}|d urB| }|t	|dt
j|d | fgf |||d  7 }q|rVt|||D ]}	|	V  qLd}g }| t
j|fV  q|rpt|||D ]}	|	V  qjd S d S )N r   r   )r   options_line_refinditergroup
_prompt_rematchrB   appendlenr   Promptr   r   startOutput)
r   r   dylexercurcode
insertionsr   linemrB   itemr   r   r   r   	  s8   
z(DylanConsoleLexer.get_tokens_unprocessedN)r   r   r   r   r   r   r   r   r   compiler   r   r   r   r   r   r   r      s    

r   )r   r   pygments.lexerr   r   r   r   r   pygments.tokenr   r   r	   r
   r   r   r   r   r   r   __all__r   r   r   r   r   r   r   <module>   s   
0 A