
xi\c        
   @   s  d  Z  d d l 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 m Z m Z m Z m Z m Z m Z m Z d d l m Z d d d d	 d
 d d d d d g
 Z e j d  Z d e f d     YZ d
 e f d     YZ d e f d     YZ d e f d     YZ d	 e f d     YZ d e f d     YZ  d e f d     YZ! d e f d     YZ" d e f d     YZ# d e f d     YZ$ d e f d     YZ% d S(   s   
    pygments.lexers.shell
    ~~~~~~~~~~~~~~~~~~~~~

    Lexers for various shells.

    :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iN(	   t   Lexert
   RegexLexert   do_insertionst   bygroupst   includet   defaultt   thist   usingt   words(	   t   Punctuationt   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Generic(   t   shebang_matchest	   BashLexert   BashSessionLexert	   TcshLexert
   BatchLexert   SlurmBashLexert   MSDOSSessionLexert   PowerShellLexert   PowerShellSessionLexert   TcshSessionLexert   FishShellLexers   .*?
c           B   s  e  Z d  Z d Z d d d d d g Z d d d	 d
 d d d d d d d d d d d g Z d d d g Z i	 e d  d e j	 d f e d  e d  g d 6d e
 d  f d! e
 d" f d# e j d$ f d% e j f d& e j f d' e f g d 6d( e e
 e  f d) e j f d* e j f d+ e j f d, e j f d- e e j e e  f d. e f d/ e f d0 e f d1 e f g
 d 6d2 e j f d3 e j d4 f d5 e j f d6 e j f d7 e f d8 e f d9 e f d: e f d; e f d< e f d= e f g d 6d3 e j d> f d? e j f e d  g d4 6d@ e j d> f dA e
 f dB e j f dC e f dD e f e d  g d$ 6dE e
 d> f e d  g d" 6dF e
 d> f dG e f dH e f dI e f dJ e f e d  g d  6d e j	 d> f e d  g d 6Z dK   Z RS(L   sI   
    Lexer for (ba|k|z|)sh shell scripts.

    .. versionadded:: 0.6
    t   Basht   basht   sht   ksht   zsht   shells   *.shs   *.kshs   *.bashs   *.ebuilds   *.eclasss   *.exheres-0s   *.exlibs   *.zshs   .bashrct   bashrcs   .bash_*s   bash_*t   zshrcs   .zshrct   PKGBUILDs   application/x-shs   application/x-shellscripts   text/x-shellscriptt   basict   `t	   backtickst   datat   interpt   roots   \$\(\(t   maths   \$\(t   parens   \$\{#?t   curlys   \$[a-zA-Z_]\w*s   \$(?:\d+|[#$?!_*@-])s   \$sa   \b(if|fi|else|while|do|done|for|then|return|function|case|select|continue|until|esac|elif)(\s*)\bsM  \b(alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|time|times|trap|true|type|typeset|ulimit|umask|unalias|unset|wait)(?=[\s)`])s   \A#!.+\ns   #.*\ns   \\[\w\W]s   (\b\w+)(\s*)(\+?=)s   [\[\]{}()=]s   <<<s   <<-?\s*(\'?)\\?(\w+)[\w\W]+?\2s   &&|\|\|s   (?s)\$?"(\\.|[^"\\$])*"t   "t   strings#   (?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'s	   (?s)'.*?'t   ;t   &s   \|s   \s+s   \d+\bs   [^=\s\[\]{}()$"\'`\\<&|;]+t   <s   #pops    (?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+s   \}s   :-s   \w+s   [^}:"\'`$\\]+t   :s   \)s   \)\)s   [-+*/%^|&]|\*\*|\|\|s   \d+#\d+s	   \d+#(?! )s   \d+c         C   s*   t  |  d  r d S|  j d  r& d Sd  S(   Ns	   (ba|z|)shi   s   $ g?(   R   t
   startswith(   t   text(    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   analyse_textz   s    (   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypesR   R   t   BacktickR   t   InterpolR   t   VariableR
   R   t   BuiltinR   t   Hashbangt   Singlet   EscapeR   t   DoubleR	   R   t   tokensR7   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR      s|   																					c           B   sA   e  Z d  Z d Z d d g Z d g Z g  Z d h Z d   Z RS(   sI   
    Lexer for (ba|k|z|)sh Slurm scripts.

    .. versionadded:: 2.4
    t   Slurmt   slurmt   sbatchs   *.slt   srunc         c   s   x t  j |  |  D]{ \ } } } | t k rQ | |  j k rQ | t j | f Vq | t j k r d | k r | t j	 | f Vq | | | f Vq Wd  S(   Nt   SBATCH(
   R   t   get_tokens_unprocessedR
   t   EXTRA_KEYWORDSR   RB   R   RD   R   t   Pseudo(   t   selfR6   t   indext   tokent   value(    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyRM      s    "(	   R8   R9   R:   R;   R<   R=   R>   RN   RM   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR      s   		t   ShellSessionBaseLexerc           B   s   e  Z d  Z d   Z RS(   sN   
    Base lexer for simplistic shell sessions.

    .. versionadded:: 2.1
    c         c   s#  |  j  |  j   } d } d } g  } t } xt j |  D]} | j   } t j |  j |  }	 | r | | 7} | j	 d  } q: |	 r | s | j
   } n  | j t |  d t j |	 j d  f g f  | |	 j d  7} | j	 d  } q: | j |  j  rd| j t |  d t j | t |  j   f g f  | | t |  j  7} | j	 d  } q: | r| j |  }
 x5 t | |
  D]! \ } } } | | | | f VqWn  | j
   t j | f Vg  } d } q: W| rx> t | | j |   D]! \ } } } | | | | f VqWn  d  S(   Ni    t    s   \
i   i   (   t   _innerLexerClst   optionst   Falset   line_ret   finditert   groupt   ret   matcht   _ps1rgxt   endswitht   startt   appendt   lenR   t   PromptR5   t   _ps2RM   R   t   Output(   RP   R6   t
   innerlexert   post   curcodet
   insertionst   backslash_continuationR]   t   linet   mt   tokst   it   tt   v(    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyRM      sD    
"&
	(   R8   R9   R:   RM   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyRT      s   c           B   sJ   e  Z d  Z d Z d d g Z d d g Z d d g Z e Z d Z	 d	 Z
 RS(
   sI   
    Lexer for simplistic shell sessions.

    .. versionadded:: 1.1
    s   Bash Sessiont   consoles   shell-sessions   *.sh-sessions   *.shell-sessions   application/x-shell-sessions   application/x-sh-sessionsh   ^((?:(?:\[.*?\])|(?:\(\S+\))?(?:| |sh\S*?|\w+\S+[@:]\S+(?:\s+\S+)?|\[\S+[@:][^\n]+\].+))\s*[$#%])(.*\n?)t   >(   R8   R9   R:   R;   R<   R=   R>   R   RV   R^   Rd   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR      s   c           B   s,  e  Z d  Z d Z d d d d g Z d d g Z d g Z e j e j	 BZ
 d	 Z d
 Z d Z d e e f Z d e e e e f Z d e e e f Z d e Z d e e e e f Z d e e e e f Z d e Z d Z d e e f Z d e e e e e e e e e e e e f Z d e e e e f Z d e e e e f Z d e e f Z d e e f Z d e e e e f Z e e e e e e e e e e e e d  Z e e e e e e e e d  Z e e e e e d  Z e e d  Z  e e e e e e d  Z! e e e e e e e e d  Z" i e e#  d  6e e#  d! 6e e#  d" 6e  e#  d# 6e! e#  d$ 6e" e#  d% 6e e$  d& 6e e$  d' 6e e$  d( 6e  e$  d) 6e! e$  d* 6e" e$  d+ 6e e% j& f d, e e' j( f g d- 6d. e' j) d/ f e e% j& f d0 e' j( f d1 e e' j) f e* d/  g d2 6e+ d-  d3 e' j, f g d4 6e+ d-  d3 e' j- f g d5 6d. e' j) d2 f e+ d-  d6 e e e f e. f g d7 6d. e' j) d2 f e+ d-  d8 e e% j& f g d9 6d: e e f e/ e0 e1 d; d7 e2 e0 e1 d; d7 e3  d/ f e+ d!  g d< 6d= e3 f d> e e f e/ e0 e1 d; d7 e2  d/ f d? e e. f e+ d!  g d@ 6dA e e e f e/ e' j) e0 e1 d; d2 e. e3  f d. e' j) dS f dB e e e f e/ e0 e1 d; d4 e. e3  f dC e e e f e/ e0 e1 d; d5 e. e3  f e+ d@  g dD 6dE e4 j5 f e+ d@  g dF 6dG e e f e/ e2 e0 e1 d; d7 e4 j5  d/ f dH e e e f e/ e2 e0 e1 d; d7 e0 e1 d; d9  d/ f dI e e e f e/ e2 e0 e1 d; d7  d/ f dJ e e e e e f e/ e0 e1 d; d" e6 j7 e0 e1 d; d"  d/ f e e0 e1 d; d7 dT f g dL 6dM e e e f e/ e0 e1 d; d7 e6 e0 e1 d; d7  d/ f dN e e e e f e/ e0 e1 d; d7 e6 j7 e0 e1 d; d7  d/ f g dK 6e e0 e1 d; d7 f dO e3 dU f e* d/  g dQ 6e e0 e1 d; d7 f dR e e2 d/ f e* d/  g dP 6Z8 RS(V   sQ   
    Lexer for the DOS/Windows Batch file format.

    .. versionadded:: 0.7
    t	   Batchfilet   batt   batcht   dosbatcht   winbatchs   *.bats   *.cmds   application/x-dos-batchs   \n\x1as   &<>|s   \t\v\f\r ,;=\xa0s   (?:(?:(?:\^[%s])?[%s])+)s%   (?=(?:\^[%s]?)?[%s+./:[\\\]]|[%s%s(])s   (?=\^?[%s]|[%s%s])s   ((?:(?<=^[^:])|^[^:]?)[%s]*)(:)s#   (?:(?:[^%s%s%s+:^]|\^[%s]?[\w\W])*)s"   (?:(?:[^%s%s%s+:^)]|\^[%s]?[^)])*)s"   (?:-?(?:0[0-7]+|0x[\da-f]+|\d+)%s)s   (?:equ|geq|gtr|leq|lss|neq)s   (?:"[^%s"]*(?:"|(?=[%s])))s  (?:(?:%%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%%:%s]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%%%s^]|\^[^%%%s])[^=%s]*=(?:[^%%%s^]|\^[^%%%s])*)?)?%%))|(?:\^?![^!:%s]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!%s^]|\^[^!%s])[^=%s]*=(?:[^!%s^]|\^[^!%s])*)?)?\^?!))s   (?:(?:(?:\^[%s]?)?[^"%s%s%s])+)s    (?:(?:(?:\^[%s]?)?[^"%s%s%s)])+)s   (?:[%s]+|%s)s   (?:[%s]+|(?:%s|%s|%s)+)c      1   C   s  d | | | | |  r d n d f } d | | f } d | | f } d | } d } |  rx d | } d |
 }
 d } n  |  r d	 t  d
 f n d |
 | f t j f d | t d | f | t t d d f t d |  d | t f d t  d f d t  f d | |
 | |  r| n | | | f t t t t d d  d | f d | | | | | f t t t t d d  d | f t	 dR d> | t d | f d? | t t t t d d t   d@ | f d@ | t f dA |
 | |
 f t t t t d d t  dS f dD |
 | |
 f t t t t d d t  dT f dF |
 t dU f dH | | f t t t t d d t   dI | f dJ |
 | |
 | |
 | f t t t t d d t t t d d t t t d d  dV f dM |
 | |	 | |  r| n | f t j d | f dN | | f t t t t d d t  dO | f dP | | | | | | |  rSd n d | | f	 t t t t d d t t t d d t t d dQ t   d | f t
 d |  g S(W   Ns   (?:%s|%s|[^"%%%s%s%s])*t   )RU   s   (?:(?:[^%s^]|\^[%s]?[\w\W])*)s   (?:(?:[^%s^)]|\^[%s]?[^)])*)s   ((?:(?:\^[%s]?)?[^\S\n])*)s   (?:(?=\))|%s)s	   /compounds   \)s   #pops   \)((?=\()|%s)%ss   (?=%s)s   follow%st   stateR6   s
   redirect%ss   [%s]+s   \(s   root/compounds   @+sg   ((?:for|if|rem)(?:(?=(?:\^[%s]?)?/)|(?:(?!\^)|(?<=m))(?:(?=\()|%s)))(%s?%s?(?:\^[%s]?)?/(?:\^[%s]?)?\?)s)   (goto%s)(%s(?:\^[%s]?)?/(?:\^[%s]?)?\?%s)t   assoct   breakt   cdt   chdirt   clst   colort   copyt   datet   delt   dirt   dpatht   echot   endlocalt   eraset   exitt   ftypet   keyst   mdt   mkdirt   mklinkt   movet   patht   pauset   popdt   promptt   pushdt   rdt   rent   renamet   rmdirt   setlocalt   shiftR`   t   timet   titlet   typet   vert   verifyt   volt   suffixs   (call)(%s?)(:)s   call%ss   (for%s(?!\^))(%s)(/f%s)s   for/ft   fors   (for%s(?!\^))(%s)(/l%s)s   for/ls   for%s(?!\^)t   for2s   (goto%s)(%s?)(:?)s   label%ss=   (if(?:(?=\()|%s)(?!\^))(%s?)((?:/i%s)?)(%s?)((?:not%s)?)(%s?)s   (?t   ifs   rem(((?=\()|%s)%s?%s?.*|%s%s)s   (set%s)%s(/a)s   arithmetic%ssY   (set%s)%s((?:/p)?)%s((?:(?:(?:\^[%s]?)?[^"%s%s^=%s]|\^[%s]?[^"=])+)?)((?:(?:\^[%s]?)?=)?)t   variable('   Rz   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   R   R   R   R   R   R   R`   R   R   R   R   R   R   (   s   for/fR   (   s   for/lR   (   R   R   (   s   (?R   (   R	   R   RD   R
   R   R   R   R   R   R   R   (   t   compoundt   _core_tokent   _core_token_compoundt   _keyword_terminatort   _nlt   _punctt   _stringt   _spacet   _start_labelt   _stokent   _token_terminatort	   _variablet   _wst   restt   rest_of_linet   rest_of_line_compoundt	   set_spaceR   (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   _make_begin_state  s    


				

    




c	         C   s   |  r d n d }	 g  }
 |  r7 |
 j  d t d f  n  |
 d | | |  rO | n | f t t t t t j t j  f t d |	  d | t d f d t d f t d	  g 7}
 |
 S(
   Ns	   /compoundRU   s   (?=\))s   #pops   %s([%s]*)(%s)(.*)s
   redirect%ss   (?=[%s])s	   \|\|?|&&?R6   (	   Ra   R
   R   R	   R   t   LabelR   RD   R   (   R   t   _labelt   _label_compoundR   R   R   t   _tokent   _token_compoundR   R   Ry   (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   _make_follow_stateY  s    c         C   s   d } g  } |  r+ | j  d t d f  n  | d t j f d t j f d t j f d t f d | t f d	 | | | | | | | | | |  r d
 n d f
 t t	 d d f d t d f t
 d  g 7} | S(   Ns   =+\-*/!~s   (?=\))s   #pops   0[0-7]+s
   0x[\da-f]+s   \d+s   [(),]+s   ([%s]|%%|\^\^)+s0   (%s|%s|(\^[%s]?)?[^()%s%%^"%s%s%s]|\^[%s%s]?%s)+s   [^)]s   [\w\W]Ry   R   s   (?=[\x00|&])t   follow(   Ra   R
   R   t   Octt   Hext   IntegerR	   R   R   R   R   (   R   R   R   R   R   R   t   opRy   (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   _make_arithmetic_statem  s"    	c         C   s[   g  } |  r% | j  d t d f  n  | j  d |  r: | n | t t t j  d f  | S(   Ns   (?=\))s   #pops   (:?)(%s)(   Ra   R
   R   R	   R   R   (   R   R   R   Ry   (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   _make_call_state  s    c      
   C   s   g  } |  r% | j  d t d f  n  | j  d |  r: | n | | | | |  rR d n d | | |  rg d n d f t t j t j  d f  | S(   Ns   (?=\))s   #pops)   (%s?)((?:%s|%s|\^[%s]?%s|[^"%%^%s%s%s])*)s   [^)]s   [\w\W]Rx   RU   (   Ra   R
   R   R   R   R   RD   (   R   R   R   R   R   R   R   Ry   (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   _make_label_state  s    	c	   
   	   C   s   d | | | | f }	 d | | | | f t  t j t t t j  f d | | | | |  r_ |	 n | f t  t j t t t d d  f g S(   Ns   (?:[%s]+|(?:%s|%s|%s)+)s*   ((?:(?<=[%s%s])\d)?)(>>?&|<&)([%s%s]*)(\d)s-   ((?:(?<=[%s%s])(?<!\^[%s])\d)?)(>>?|<)(%s?%s)Ry   R6   (   R   R   R   R	   R
   R   R   (
   R   R   R   R   R   R   R   R   R   t   stoken_compound(    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   _make_redirect_state  s    R+   R   t
   arithmetict   callt   labelt   redirects   root/compounds   follow/compounds   arithmetic/compounds   call/compounds   label/compounds   redirect/compounds   %%%%|\^[%s]?(\^!|[\w\W])s   variable-or-escapeR/   s   #pops   \^!|%%s   [^"%%^%s]+|[%%^]R0   s   [^%]+|%t   sqstringt   bqstrings   [^"%%^%s%s%s\d)]+|.R6   s   [^"%%^%s]+|.R   s   (%s)(in)(%s)(\()Ry   R   s   \)s
   (%s)(do%s)s   [%s]+R   s    (")((?:%s|[^"])*?")([%s%s]*)(\))s%   ('(?:%%%%|%s|[\w\W])*?')([%s%s]*)(\))s%   (`(?:%%%%|%s|[\w\W])*?`)([%s%s]*)(\))s   for/fs   -?\d+s   for/ls)   ((?:cmdextversion|errorlevel)%s)(%s)(\d+)s   (defined%s)(%s)(%s)s   (exist%s)(%s%s)s   (%s%s)(%s)(%s%s)t   if2R   s   (%s?)(==)(%s?%s)s   (%s)(%s)(%s%s)s   \(s   else?s   (?s   else%s(   s   #popR   R0   (   s   #popR   (   s   #pops   else?s   root/compound(9   R8   R9   R:   R;   R<   R=   R>   R\   t	   MULTILINEt
   IGNORECASEt   flagsR   R   R   R   R   R   R   R   R   t   _numbert   _opwordR   R   R   R   R   R   R   R   R   R   R   R   R   RX   t   TrueR   RA   R   RE   RF   R   R   RD   R?   R
   R   R   R   R   R	   R   R   R   t   WordRG   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR      s   	

+		N							
c           B   s;   e  Z d  Z d Z d g Z g  Z g  Z e Z d Z	 d Z
 RS(   sI   
    Lexer for simplistic MSDOS sessions.

    .. versionadded:: 2.1
    s   MSDOS Sessiont   doscons   ^([^>]*>)(.*\n?)s   More? (   R8   R9   R:   R;   R<   R=   R>   R   RV   R^   Rd   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR     s   	c        
   B   s  e  Z d  Z d Z d d g Z d d g Z d g Z i e d  d e d	 f d
 e d f d e	 j
 d f e d  g d 6d e f d e j f d e f d e	 j f d e e j e e  f d e f d e	 f d e f g d 6d e	 j f d e	 j f d e f d e f d e f d e j f g d 6d e d f d  e f d! e j f d" e f d# e f e d  g d 6d$ e d f e d  g d	 6d e	 j
 d f e d  g d 6Z RS(%   s=   
    Lexer for tcsh scripts.

    .. versionadded:: 0.10
    t   Tcsht   tcsht   cshs   *.tcshs   *.cshs   application/x-cshR&   s   \$\(R-   s   \$\{#?R.   R'   R(   R)   R+   s]   \b(if|endif|else|while|then|foreach|case|default|continue|goto|breaksw|end|switch|endsw)\s*\bs  \b(alias|alloc|bg|bindkey|break|builtins|bye|caller|cd|chdir|complete|dirs|echo|echotc|eval|exec|exit|fg|filetest|getxvers|glob|getspath|hashstat|history|hup|inlib|jobs|kill|limit|log|login|logout|ls-F|migrate|newgrp|nice|nohup|notify|onintr|popd|printenv|pushd|rehash|repeat|rootnode|popd|pushd|set|shift|sched|setenv|setpath|settc|setty|setxvers|shift|source|stop|suspend|source|suspend|telltc|time|umask|unalias|uncomplete|unhash|universe|unlimit|unset|unsetenv|ver|wait|warp|watchlog|where|which)\s*\bs   #.*s   \\[\w\W]s   (\b\w+)(\s*)(=)s   [\[\]{}()=]+s   <<\s*(\'?)\\?(\w+)[\w\W]+?\2R1   s!   (?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"s!   (?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'s   \s+s   [^=\s\[\]{}()$"\'`\\;#]+s   \d+(?= |\Z)s   \$#?(\w+|.)s   \}s   #pops   :-s   \w+s   [^}:"\'`$]+R4   s   \)(   R8   R9   R:   R;   R<   R=   R>   R   R   R   R?   R   RB   R   RE   R   RA   R
   R   R	   RF   RD   R   RG   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR   #  sJ   													c           B   s;   e  Z d  Z d Z d g Z g  Z g  Z e Z d Z	 d Z
 RS(   s=   
    Lexer for Tcsh sessions.

    .. versionadded:: 2.1
    s   Tcsh Sessiont   tcshcons   ^([^>]+>)(.*\n?)s   ? (   R8   R9   R:   R;   R<   R=   R>   R   RV   R^   Rd   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR   g  s   	c           B   s  e  Z d  Z d Z d d d d g Z d d g Z d g Z e j e j	 Be j
 BZ d	 j   Z d
 j   Z d j   Z d j   Z d j   Z i d e d f d e f d d j e  e e e j e  f d e f d e j d f d e j d f d e j f d e f d e j d f d e j f d e j f d d j e  e f d d j e  e  f d  d j e  e j! f d! d j e  e j! f d" e j" f d# e f d$ e f d% e f g d& 6d' e d( f e# d&  g d 6d) e j f d* e j d( f d+ d j e  e j f d, e j f g d 6d- e j$ f d. e j f d/ e d f d0 e j f d1 e j f d e j d( f g d 6d2 e j d( f d/ e d f d3 e j f d4 e j f g d 6Z% RS(5   sA   
    For Windows PowerShell code.

    .. versionadded:: 1.5
    t
   PowerShellt
   powershellt   posht   ps1t   psm1s   *.ps1s   *.psm1s   text/x-powershells  while validateset validaterange validatepattern validatelength validatecount until trap switch return ref process param parameter in if global: function foreach for finally filter end elseif else dynamicparam do default continue cmdletbinding break begin alias \? % #script #private #local #global mandatory parametersetname position valuefrompipeline valuefrompipelinebypropertyname valuefromremainingarguments helpmessage try catch throwsN  and as band bnot bor bxor casesensitive ccontains ceq cge cgt cle clike clt cmatch cne cnotcontains cnotlike cnotmatch contains creplace eq exact f file ge gt icontains ieq ige igt ile ilike ilt imatch ine inotcontains inotlike inotmatch ireplace is isnot le like lt match ne not notcontains notlike notmatch or regex replace wildcards  write where watch wait use update unregister unpublish unprotect unlock uninstall undo unblock trace test tee take sync switch suspend submit stop step start split sort skip show set send select search scroll save revoke resume restore restart resolve resize reset request repair rename remove register redo receive read push publish protect pop ping out optimize open new move mount merge measure lock limit join invoke install initialize import hide group grant get format foreach find export expand exit enter enable edit dismount disconnect disable deny debug cxnew copy convertto convertfrom convert connect confirm compress complete compare close clear checkpoint block backup assert approve aggregate adds  ac asnp cat cd cfs chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo epal epcsv epsn erase etsn exsn fc fhx fl foreach ft fw gal gbp gc gci gcm gcs gdr ghy gi gjb gl gm gmo gp gps gpv group gsn gsnp gsv gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc select set shcm si sl sleep sls sort sp spjb spps spsv start sujb sv swmi tee trcm type wget where wjb writes   component description example externalhelp forwardhelpcategory forwardhelptargetname functionality inputs link notes outputs parameter remotehelprunspace role synopsiss   \(t   childs   \s+s    ^(\s*#[#\s]*)(\.(?:%s))([^\n]*$)t   |s	   #[^\n]*?$s	   (&lt;|<)#t   multlines   @"\ns   heredoc-doubles   @'\n.*?\n'@s	   `[\'"$@-]R/   R0   s   '([^']|'')*'s+   (\$|@@|@)((global|script|private|env):)?\w+s   (%s)\bs   -(%s)\bs   (%s)-[a-z_]\w*\bs   (%s)\ss   \[[a-z_\[][\w. `,\[\]]*\]s
   -[a-z_]\w*s   \w+s#   [.,;@{}\[\]$()=+*/\\&%!~?^`|<>-]|::R+   s   \)s   #pops   [^#&.]+s	   #(>|&gt;)s   \.(%s)s   [#&.]s   `[0abfnrtv'\"$`]s   [^$`"]+s   \$\(s   ""s   [`$]s   \n"@s	   [^@\n]+"]t   .(&   R8   R9   R:   R;   R<   R=   R>   R\   t   DOTALLR   R   R   t   splitt   keywordst	   operatorst   verbst   aliases_t   commenthelpR	   R
   t   joinR   R   R   t   Doct	   Multilinet   HeredocRF   RD   R   RA   R   R   RB   t   ConstantR   RE   RG   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR   x  sb   								c           B   s;   e  Z d  Z d Z d g Z g  Z g  Z e Z d Z	 d Z
 RS(   sV   
    Lexer for simplistic Windows PowerShell sessions.

    .. versionadded:: 2.1
    s   PowerShell Sessiont   ps1cons   ^(PS [^>]+> )(.*\n?)s   >> (   R8   R9   R:   R;   R<   R=   R>   R   RV   R^   Rd   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR     s   	c           B   s  e  Z d  Z d Z d d g Z d d g Z d g Z i e d  e d  e d	  g d
 6d e d f d e d f d e	 j
 f g d	 6d e e e  f d e	 j f d e f d e j f d e e	 j
 e e  f d e f d e f g d 6d e j f d e j d f d e j f d e j f d e f d e f d e f d e f d  e f g	 d 6d e j d! f d" e j f e d	  g d 6d# e d! f e d
  g d 6d$ e d! f d% e f d& e f d' e f d( e f e d
  g d 6Z RS()   sB   
    Lexer for Fish shell scripts.

    .. versionadded:: 2.1
    t   Fisht   fisht	   fishshells   *.fishs   *.loads   application/x-fishR&   R)   R*   R+   s   \$\(\(R,   s   \(R-   s   \$#?(\w+|.)s   \b(begin|end|if|else|while|break|for|in|return|function|block|case|continue|switch|not|and|or|set|echo|exit|pwd|true|false|cd|count|test)(\s*)\bs  \b(alias|bg|bind|breakpoint|builtin|command|commandline|complete|contains|dirh|dirs|emit|eval|exec|fg|fish|fish_config|fish_indent|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|isatty|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|random|read|set_color|source|status|trap|type|ulimit|umask|vared|fc|getopts|hash|kill|printf|time|wait)\s*\b(?!\.)s   #.*\ns   \\[\w\W]s   (\b\w+)(\s*)(=)s	   [\[\]()=]s   <<-?\s*(\'?)\\?(\w+)[\w\W]+?\2s%   (?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"R/   R0   s#   (?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'s	   (?s)'.*?'R1   s   &|\||\^|<|>s   \s+s   \d+(?= |\Z)s   [^=\s\[\]{}()$"\'`\\<&|;]+s   #pops    (?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+s   \)s   \)\)s   [-+*/%^|&]|\*\*|\|\|s   \d+#\d+s	   \d+#(?! )s   \d+(   R8   R9   R:   R;   R<   R=   R>   R   R   R   RA   R   R
   RB   R   R   RE   R   RF   RD   R	   R   RG   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyR     sR   														(&   R:   R\   t   pygments.lexerR    R   R   R   R   R   R   R   R   t   pygments.tokenR	   R
   R   R   R   R   R   R   R   t   pygments.utilR   t   __all__t   compileRY   R   R   RT   R   R   R   R   R   R   R   R   (    (    (    s4   lib/python2.7/site-packages/pygments/lexers/shell.pyt   <module>
   s(   @@	e2 7Dr