
X[Tc           @   s   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 d d l m Z d g Z d e f d     YZ d S(   s   
    pygments.lexers.tcl
    ~~~~~~~~~~~~~~~~~~~

    Lexers for Tcl and related languages.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
i(   t
   RegexLexert   includet   words(   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Number(   t   shebang_matchest   TclLexerc        L   B   s1  e  Z d  Z e d d d  d! d  Z e d d d  d! d  Z dm Z dn g Z do dp g Z dq dr ds g Z	 dt du  Z
 i e dv  e dw  e dx  dy e f g dz 6e
 e e  dv 6e
 e e d{  d| 6e
 e e d}  d~ 6e
 e e d  d 6d e d f d e d f d e d f d e j df f d e j f d e f g dw 6d e 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 dx 6d e d f d e d f d e f e dw  e dx  g d 6dy e d f e d  g d 6d e d f e d  g d 6d e d f e d  g d 6d e j d f d e j f d e j d f g df 6d e j d f d e j f d e j d f g d 6dy e d f e d|  e dw  e dx  g d 6d e d f e d  e dw  e dx  g d 6d e d f e d~  e dw  e dx  g d 6d e d f d e f g d 6Z d   Z RS(   s:   
    For Tcl source code.

    .. versionadded:: 0.10
    t   aftert   applyt   arrayt   breakt   catcht   continuet   elseift   elset   errort   evalt   exprt   fort   foreacht   globalt   ift	   namespacet   proct   renamet   returnt   sett   switcht   thent   tracet   unsett   updatet   uplevelt   upvart   variablet   vwaitt   whilet   prefixs   \bt   suffixt   appendt   bgerrort   binaryt   cdt   chant   clockt   closet   concatt   ddet   dictt   encodingt   eoft   exect   exitt   fblockedt
   fconfiguret   fcopyt   filet	   fileeventt   flusht   formatt   getst   globt   historyt   httpt   incrt   infot   interpt   joint   lappendt   lassignt   lindext   linsertt   listt   llengtht   loadt   loadTkt   lranget   lrepeatt   lreplacet   lreverset   lsearcht   lsett   lsortt   mathfunct   mathopt   memoryt   msgcatt   opent   packaget   pids   pkg::createt   pkg_mkIndext   platforms   platform::shellt   putst   pwdt	   re_syntaxt   readt   refchant   regexpt   registryt   regsubt   scant   seekt   sockett   sourcet   splitt   stringt   substt   tellt   timet   tmt   unknownt   unloadt   Tclt   tcls   *.tcls   *.rvts
   text/x-tcls   text/x-script.tcls   application/x-tclt    c         C   sF   |  t  d | f | t j d | f d t j d | f d t d f g S(   Nt   paramss	   ([\w.-]+)t   #t   comment(   R   R   t   Builtint   VariableR   (   t   keyword_cmds_ret   builtin_cmds_ret   context(    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/tcl.pyt   _gen_command_rules1   s    t   commandt   basict   datas   \}t   roots	   -in-braces   command-in-braces   -in-brackets   command-in-brackets	   -in-parens   command-in-parens   \(t   parens   \[t   brackets   \{t   bracet   "s   (eq|ne|in|ni)\bs/   !=|==|<<|>>|<=|>=|&&|\|\||\*\*|[-+~!*/%<>&^|?:]s   \s+s   0x[a-fA-F0-9]+s   0[0-7]+s   \d+\.\d+s   \d+s   \$([\w.:-]+)s
   ([\w.:-]+)t   ;s   #pops   \ns   (else|elseif|then)\bRx   s   params-in-braces   \)s   params-in-parens   \]s   params-in-brackets   string-squares   (?s)(\\\\|\\[0-7]+|\\.|[^"\\])s$   (?s)(\\\\|\\[0-7]+|\\.|\\\n|[^\]\\])s	   .*[^\\]\ns   .*\\\nRz   c         C   s   t  |  d  S(   Ns   (tcl)(   R
   (   t   text(    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/tcl.pyt   analyse_text   s    (   s   afters   applys   arrayR   R   R   R   s   elses   errors   evalR   R   R   R   R   s	   namespaceR   s   renameR   s   setR    R!   R"   R#   s   updateR%   R&   R'   R(   R)   (K   s   appendR-   R.   R/   R0   R1   s   closeR3   R4   s   dicts   encodings   eofs   execs   exitR:   R;   R<   s   fileR>   s   flushs   formatRA   RB   RC   RD   RE   s   infoRG   s   joinRI   RJ   RK   RL   s   listRN   s   loadRP   RQ   RR   RS   RT   RU   RV   RW   RX   RY   RZ   R[   s   opens   packages   pids   pkg::createR_   s   platforms   platform::shellRa   s   pwdRc   s   readRe   Rf   s   registryRh   s   scans   seekRk   s   sources   splits   stringRo   s   tellRq   Rr   s   unknownRt   (   s   #pops   #pop(   s   #pops   #pop(   s   #pops   #pop(   t   __name__t
   __module__t   __doc__R   R}   R~   t   namet   aliasest	   filenamest	   mimetypesR   R   R   R   t   DoubleR   t   WordR   R	   t   Hext   Octt   Floatt   IntegerR   R|   R   t   tokensR   (    (    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/tcl.pyR      s              				


									N(   R   t   pygments.lexerR    R   R   t   pygments.tokenR   R   R   R   R   R   R	   t   pygments.utilR
   t   __all__R   (    (    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/tcl.pyt   <module>
   s
   4	