
    Mh(                         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e          Z G d d	e          Z G d
 de          ZdS )z
    pygments.lexers.dylan
    ~~~~~~~~~~~~~~~~~~~~~

    Lexers for the Dylan language.

    :copyright: Copyright 2006-2025 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                      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 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z   dz    eej$        eej%                  fd eej$        eej%                  fd ez   ej$        fd!e&fd"efd#e'fd$ej(        d%fd&e)fed'z   e)fd(ez   d)z   ej*        fd*ez   d*z   ej+        j,        fd+ez   ej-        feefgd,ej        fdej        d-fd.ej        d/fd0ej        fgdej(        d/fd1ej(        fgded/fd2ej.        fd3efd4efd5efgd6Z/d7S )8r   z!
    For the Dylan language.
    Dylanhttp://www.opendylan.org/dylan)z*.dylanz*.dylz*.intrztext/x-dylanz0.7>%   inline-onlycompiler-openeach-subclasscompiler-sidewaysopenslotblockclassmacrodomainimportinlinemethodmodulesealedthreaddynamicexcludegenerichandlerkeywordlibraryprimaryvirtualabstractconcreteconstantfunctioninstancerequiredsidewayssubclassvariable	exception	inherited	interface	singleton>   byifintoendforletusecaseelsefromthenwhenabovebeginbelowlocaluntilwhilecreatedefineelseifexportrenameselectsignalunlesscleanupfinally	otherwise
afterwards>   <===>=~=~==*&+-<=>^|~>   add!any?odd?even?fill!sort!zero?empty?every?floor/map-asone-ofround/add-newlogbit?member?remove!add-new!ceiling/false-orfind-keykey-testmap-intopop-lastreverse!subtype?	choose-by	instance?	integral?	negative?	positive?	push-last	truncate/
add-method
check-type
type-unionaref-setterdo-handlersfind-methodhead-setterlast-setternext-methodobject-hashremove-key!size-settertail-setteras-lowercaseas-uppercasefirst-setterkey-sequenceobject-classreturn-queryshallow-copythird-setteras-lowercase!as-uppercase!copy-sequenceremove-methodrestart-querysecond-settertype-for-copyconcatenate-aselement-settertable-protocoldefault-handlerreturn-allowed?row-major-indexall-superclassesmerge-hash-codestype-error-valuedirect-subclassesremove-duplicatesreplace-elements!slot-initialized?applicable-method?function-argumentsremove-duplicates!return-descriptiondirect-superclassesreplace-subsequence!subsequence-positionfunction-specializersfunction-return-valuescondition-format-stringgeneric-function-methodstype-error-expected-typesorted-applicable-methodscondition-format-argumentsforward-iteration-protocolbackward-iteration-protocol#generic-function-mandatory-keywordsasdoabsaddashgcdlcmmapmaxminpoparefheadlastlistmakepairpushranksizesorttailabortapplybreakcurryerrorfirstfloorrangeroundthirdunionalwayscerrorchooselogandlogiorlognotlogxormodulorcurryreduceremovesecondrX   valuesvectorceilingcomposeconjoindisjoinelementlimitedreduce1reverseidentitynegativetruncate	dimension	remainderr>   
complement
dimensions
initializeconcatenateintersectionz\\?[\w!&*<>|^$%@\-+~?/=]+c              #   N  K   t          j        | |          D ]\  }}}|t          u rv|                                }|| j        v r|t          j        |fV  >|| j        v r|t          |fV  T|| j        v r|t          j        |fV  o|| j	        v r|t          |fV  |||fV  d S )N)r   get_tokens_unprocessedr   lowerbuiltinsBuiltinkeywordsr   	functions	operatorsr
   )selftextindextokenvaluelowercase_values         U/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pygments/lexers/dylan.pyr
  z!DylanLexer.get_tokens_unprocessed]   s      #-#DT4#P#P 	& 	&E5%}}"'++--"dm33u4444"dm33%////"dn44u4444"dn4450000%%%%%	& 	&    \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-]+:rg   ri   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flagsr  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tokens r  r  r   r      s         D
%CiG...I IMME> > >H  H  I" " "IH 1J& & &* Z  ( ::vFFH GFOO
 Z  XXgnjAAB W&	2 68$?M $ &*% A&,O &.) VZ( j  $C C8T\::< J8T\::<Z* =kJ H w FM9- W% #w' :#TZ0 Z%')=> Z/ EC
J )*W&0W&/g'(	
 6=&)'

 66"<fmL6"fFO
yc cFFFr  r   c            
           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.
    DylanLIDz	dylan-lid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   r0  r
   r   r?  r@  r  r  r   r      s          DE"G'"I#$I
%CMME 	Z  XXgnjAAB 3Xdnh
FCCE

FFFr  r   c                   \    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j        d
          Z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   rD  z#dylan-console/console.dylan-consolez\?| c           	   #   x  K   t          di | j        }d}g }t          j        |          D ]}|                                }| j                            |          }|\|                                }|                    t          |          dt          j        |d |         fgf           |||d          z  }|r-t          ||                    |                    E d {V  d}g }|                                t          j        |fV  |r+t          ||                    |                    E d {V  d S d S )N r   r@  )r   optionsr   finditergroup
_prompt_rematchrC   appendlenr   Promptr   r
  startOutput)	r  r  dylexercurcode
insertionsrL  linemrC   s	            r  r
  z(DylanConsoleLexer.get_tokens_unprocessed  s     ,,t|,,
%d++ 	: 	:E;;==D%%d++A}eegg!!3w<<%&TcT
$C#D#F G G G4:% $,Z-4-K-KG-T-T V  V V V V V V V V G!#JkkmmW^T99999 	N$Z%,%C%CG%L%LN N N N N N N N N N N	N 	Nr  N)r!  r"  r#  r$  r%  r'  r(  r)  r&  r*  _exampler+  compilerK  r
  r@  r  r  r   r      ss         
 D-G"#I'(I
%CM4HG$$JN N N N Nr  r   )r$  r+  pygments.lexerr   r   r   r   r   r   pygments.tokenr	   r
   r   r   r   r   r   r   r   r   __all__r   r   r   r@  r  r  <module>r\     s    
			               6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 ?
>
>} } } } } } } }@    J   8&N &N &N &N &N &N &N &N &N &Nr  