B
    (d                 @   sf   d 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lmZ dgZG dd deZdS )z
    pygments.lexers.tcl
    ~~~~~~~~~~~~~~~~~~~

    Lexers for Tcl and related languages.

    :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    )
RegexLexerincludewords)TextCommentOperatorKeywordNameStringNumber
Whitespace)shebang_matchesTclLexerc               @   s  e Zd ZdZeddddZeddddZdZdZdgZ	d	d
gZ
dddgZd>ddZedededdefgeeeeeedeeedeeeddedfdedfdedfdejdfd ejfd!efgd"e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fgd*ed+fd,ed+fd-efededgded.fed/gd0ed.fed/gd1ed.fed/gdejd2fd3ejfdejd+fgdejd2fd4ejfd1ejd+fgded+fed5ededgd0ed+fed6ededgd1ed+fed7ededgd8ed+fd9efgd:Zd;d< Zd=S )?r   z:
    For Tcl source code.

    .. versionadded:: 0.10
    )afterapplyarraybreakZcatchcontinueZelseifelseerrorevalexprforZforeachglobalif	namespaceprocrenamereturnsetswitchZthentraceunsetupdateZuplevelZupvarvariableZvwaitwhilez\b)prefixsuffix)KappendZbgerrorbinarycdZchanclockcloseconcatZddedictencodingeofexecexitZfblockedZ
fconfigureZfcopyfileZ	fileeventflushformatZgetsglobhistoryhttpincrinfoZinterpjoinlappendZlassignZlindexZlinsertlistZllengthloadZloadTkZlrangeZlrepeatZlreplaceZlreverseZlsearchZlsetZlsortZmathfuncZmathopZmemoryZmsgcatopenpackagepidzpkg::createZpkg_mkIndexplatformzplatform::shellZputspwdZ	re_syntaxreadZrefchanregexpregistryZregsubscanseeksocketsourcesplitstringZsubsttelltimetmunknownZunloadTclz&https://www.tcl.tk/about/language.htmltclz*.tclz*.rvtz
text/x-tclztext/x-script.tclzapplication/x-tcl c             C   s4   | t d| f|tjd| fdtjd| fdtdfgS )Nparamsz	([\w.-]+)#comment)r   r	   BuiltinVariabler   )keyword_cmds_rebuiltin_cmds_recontext r\   `/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/pygments/lexers/tcl.py_gen_command_rules4   s    zTclLexer._gen_command_rulescommandbasicdataz\}z	-in-bracez-in-bracketz	-in-parenz\(parenz\[bracketz\{brace"rL   z(eq|ne|in|ni)\bz/!=|==|<<|>>|<=|>=|&&|\|\||\*\*|[-+~!*/%<>&^|?:]z\s+z0x[a-fA-F0-9]+z0[0-7]+z\d+\.\d+z\d+z
\$[\w.:-]+z\$\{[\w.:-]+\}z
[\w.,@:-]+;z#popz\nz(else|elseif|then)\b)z#popz#poprT   z\)z\]zstring-squarez(?s)(\\\\|\\[0-7]+|\\.|[^"\\])z$(?s)(\\\\|\\[0-7]+|\\.|\\\n|[^\]\\])zcommand-in-bracezcommand-in-parenzcommand-in-bracketz	.*[^\\]\nz.*\\\n)rootr_   zcommand-in-bracezcommand-in-bracketzcommand-in-parenr`   ra   rT   zparams-in-bracezparams-in-parenzparams-in-bracketrL   zstring-squarerd   rb   rc   rV   c             C   s
   t | dS )Nz(tcl))r   )textr\   r\   r]   analyse_text   s    zTclLexer.analyse_textN)rS   )__name__
__module____qualname____doc__r   rY   rZ   nameurlaliases	filenames	mimetypesr^   r   r   r
   Doubler   Wordr   r   HexOctFloatIntegerr	   rX   r   r   tokensri   r\   r\   r\   r]   r      s   








N)rm   Zpygments.lexerr   r   r   Zpygments.tokenr   r   r   r   r	   r
   r   r   Zpygments.utilr   __all__r   r\   r\   r\   r]   <module>	   s
   (