U
    -e,                     @   s~   d Z ddlmZ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 ddlmZmZ dgZG dd deZdS )z
    pygments.lexers.arturo
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexer for the Arturo language.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    )
RegexLexerbygroupsdo_insertionsincludethisusingwords)	CommentErrorKeywordNameNumberOperatorPunctuationStringText)ClassNotFoundget_bool_optArturoLexerc                   @   s  e Zd ZdZdZddgZdgZdZdd Zd	d
 Z	de
jfde
jfedddejfeddddejj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jfdejfdejfdeeee efdej!dfdejd fd!ej!d"fd#ejd$fd%ej!d&fd'e	fd(ejd)fd*ejd+fe"d,d-efed.ej#fed/e$fd0efd1e%j&fd2e'fgd3ej(d4fd5ee fgd6ej(d4fd5ee fged7ej)fge"d8d3ej(d9fd:ej(d;fdej!d4fd<efge"d8d3ej(d9fd:ej(d;fd=ejd4fd>efge"d8d3ej(d9fd:ej(d;fd?ej!d4fd@efgdAej)fd3ej(d9fd:ej(d;fdBejd4fdCej*fge"d8d3ej(d9fd:ej(d;fdDej!d4fdEefge"d8d3ej(d9fd:ej(d;fdFejd4fdGefge"d8d3ej(d9fd:ej(d;fdHejd4fdIefgedJddKdejfedLdddejfgdMZ+dNS )Or   z
    For Arturo source code.

    See `Arturo's Github <https://github.com/arturo-lang/arturo>`_
    and `Arturo's Website <https://arturo-lang.io/>`_.

    .. versionadded:: 2.14.0
    Arturoarturoartz*.artzhttps://arturo-lang.io/c                 K   s    t |dd| _tj| f| d S )Nhandle_annotatedsT)r   r   r   __init__)selfoptions r   W/var/www/html/Darija-Ai-Train/env/lib/python3.8/site-packages/pygments/lexers/arturo.pyr   $   s    zArturoLexer.__init__c                 c   s  ddl m} |dtj|dfV  |dtj|dfV  |dtj|dfV  |dtj|dfV  d}| j	rz||d
 }W n tk
r   Y nX |d}|dkr|dt|fV  ntg ||E dH  |d	tj|d	fV  dS )
zAdds syntax from another languages inside annotated strings

        match args:
            1:open_string,
            2:exclamation_mark,
            3:lang_name,
            4:space_or_newline,
            5:code,
            6:close_string
        r   )get_lexer_by_name            N      )Zpygments.lexersr   startr   DoublegroupInterpolr   
Whitespacer   stripr   r   get_tokens_unprocessed)r   matchr   lexercoder   r   r   handle_annotated_strings)   s     
z$ArturoLexer.handle_annotated_stringsz;.*?$z^((\s#!)|(#!)).*?$)falsetruemaybez\b)suffix)r   initz\b\??:?)prefixr3   z`.`z\\\w+\b\??:?z#\w+z\b[0-9]+\.[0-9]+z\b[0-9]+z	\w+\b\??:z\'(?:\w+\b\??:?)z\:\w+z
\.\w+\??:?z(\()(.*?)(\)\?)"inside-simple-string   »inside-smart-stringu   «««inside-safe-stringz\{\/inside-regex-stringz\{\:inside-curly-verb-stringz#(\{)(\!)(\w+)(\s|\n)([\w\W]*?)(^\})z\{inside-curly-stringz\-{3,}inside-eof-stringbuiltin-functionsz[()[\],])z->==>|z::@#$&!z!!z./)$z<:z:>z:<z>:z<\z<><>   øu   ∞+-*~=^%/z//r@   z<=>z<==>z=>>z<<=>>z<<==>>z-->z<->z<-->z=|z|=z-:z:-_.z..\z\b\w+z\s+z.+$z\|z#popz[^|]+z\|\|\>)z\\\nz\tz\"string-escapeinside-interpolz\<\|\|inside-templatez[^|"]+rU   z[^|\n]+u   »»»u   [^|»]+z\\[sSwWdDbBZApPxucItnvfr0]+z\/\}z[^|\/]+z\:\}z[^|<:]+z\}z[^|<}]+z\Zz[^|<]+)Fallandanyasciiattr	attributeZattributeLabelbinaryZ	blockcharcontainsZdatabasedate
dictionaryemptyequalZevenZeveryexistsr0   ZfloatinfunctionZgreaterZgreaterOrEqualifininlineintegeriskeylabelZleaplessZlessOrEqualliteralZlogicallowernandnegativenornotZnotEqualnullnumericZoddorpathZ	pathLabelZpositiver5   primesetZsomesorted
standalonestringZsubsetr3   ZsupersetZymbolr1   trytypeunlessupperwhen
whitespacewordxnorxorzeroz\b\?)absacosacoshZacsecZacsechZactanZactanhaddafteralphabetrZ   ZangleappendargargsarityarrayasZasecZasechasinasinhatanatan2atanhr]   attrsZaveragebeforeZ	benchmarkblendbreakZ	builtins1Z	builtins2call
capitalizecaseceilZchopchunkclearcloseZclustercolorcombineZconjcontinuecopycoscoshcoupleZcsecZcsechZctanZctanhcursorZdarkendecdecodeZdecoupledefinedeleteZ
desaturateZ	deviationrb   
differencedigestdigitsdivdodownloadZdropdupeelserc   encodeZensureenvepsilonescapeexecuteexitexpextendextractZfactorsr0   Zfdivfilterfirstflattenfloorfoldfromrf   gammagcdgetZgotohashhelphypotrg   rh   incindentindexinfinityinfoinputinsertinspectintersectioninvertjoinkeysZkurtosislastZletZlevenshteinZlightenlistlnloglooprp   mailmapr,   maxr2   Zmedianminmodmodulemulrq   negnewrs   	normalizert   nowru   openrw   Zoutdentpadpanicrx   pauseZpermissionsZ	permutatepipoppowZpowersetZpowmodr5   printZprintsprocessproductqueryrandomrangereadrelativeremoverenamerenderrepeatreplacerequestreturnreverseroundsampleZsaturatescriptsecZsechselectZserverz   ZshlZshrshufflesinsinhsizeZskewnessslicesortsplitsqrtZsqueezestackr*   subr3   sumswitchsymbolssymlinksysZtaketantanhZterminaltor1   truncater~   r   unionuniquer   ZuntilZunzipr   valuesvarZvariancevolumeZwebviewwhilewithZwordwrapwriter   r   zip)rootrW   rX   rV   r7   r9   r:   r;   r<   r=   r>   r?   N),__name__
__module____qualname____doc__namealiases	filenamesurlr   r/   r	   SingleHashbangr   r   ConstantBuiltinPseudor   CharPropertyr   FloatIntegerLabelr   DeclarationType	Attributer   r   r   r   r&   r   	Decoratorr   r   r)   r
   r(   EscapeRegextokensr   r   r   r   r      s   	$ 






	:
























	 % %N)r&  Zpygments.lexerr   r   r   r   r   r   r   Zpygments.tokenr	   r
   r   r   r   r   r   r   r   Zpygments.utilr   r   __all__r   r   r   r   r   <module>   s
   
$,