
%^Tc        
   @   s  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 d d l m Z d d d d	 d
 d d d d d g
 Z d e f d     YZ d e f d     YZ d e f d     YZ 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 S(   s   
    pygments.lexers.configs
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for configuration file formats.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iN(   t
   RegexLexert   defaultt   wordst   bygroupst   includet   using(	   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Punctuationt
   Whitespace(   t	   BashLexert   IniLexert   RegeditLexert   PropertiesLexert   KconfigLexert   Cfengine3Lexert   ApacheConfLexert   SquidConfLexert   NginxConfLexert   LighttpdConfLexert   DockerLexerc           B   s   e  Z d  Z d Z d d d g Z d d g Z d g Z i d e f d	 e j	 f d
 e
 f d e e j e e e e  f g d 6Z d   Z RS(   s5   
    Lexer for configuration files in INI style.
    t   INIt   init   cfgt   dosinis   *.inis   *.cfgs
   text/x-inis   \s+s   [;#].*s   \[.*?\]$s*   (.*?)([ \t]*)(=)([ \t]*)(.*(?:\n[ \t].+)*)t   rootc         C   sA   |  j  d  } | d k  r t S|  d d k o@ |  | d d k S(   Ns   
i   i    t   [i   t   ](   t   findt   False(   t   textt   npos(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyt   analyse_text,   s    (   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypesR   R   t   SingleR	   R   R
   t	   AttributeR   R   t   tokensR%   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR      s   			%c           B   s   e  Z d  Z d Z d g Z d g Z d g Z i d e f d e f d e j	 f d e
 e e e j e  f d	 e
 e j e e e  d
 f d e
 e j e e e  d
 f g d 6d e d f d e
 e j e e  d f d e d f e d  g d
 6Z d   Z RS(   s   
    Lexer for `Windows Registry
    <http://en.wikipedia.org/wiki/Windows_Registry#.REG_files>`_ files produced
    by regedit.

    .. versionadded:: 1.6
    t   regt   registrys   *.regs   text/x-windows-registrys   Windows Registry Editor.*s   \s+s   [;#].*s   (\[)(-?)(HKEY_[A-Z_]+)(.*?\])$s)   ("(?:\\"|\\\\|[^"])+")([ \t]*)(=)([ \t]*)t   values   (.*?)([ \t]*)(=)([ \t]*)R   t   -s   #pops1   (dword|hex(?:\([0-9a-fA-F]\))?)(:)([0-9a-fA-F,]+)s   .+c         C   s   |  j  d  S(   Ns   Windows Registry Editor(   t
   startswith(   R#   (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR%   [   s    (   R&   R'   R(   R)   R*   R+   R,   R   R   R-   R   R	   R   R
   t   BuiltinR.   t   VariableR   R   R   R   R/   R%   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR   3   s.   					c        
   B   so   e  Z d  Z d Z d d g Z d g Z d g Z i d e f d e f d e	 e
 j e e e e  f g d	 6Z RS(
   s_   
    Lexer for configuration files in Java's properties format.

    .. versionadded:: 1.4
    t
   Propertiest
   propertiest   jpropertiess   *.propertiess   text/x-java-propertiess   \s+s   (?:[;#]|//).*$s/   (.*?)([ \t]*)([=:])([ \t]*)(.*(?:(?<=\\)\n.*)*)R   (   R&   R'   R(   R)   R*   R+   R,   R   R   R   R
   R.   R   R   R/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR   _   s   				c         C   sY   d } | d k r d } n d | d } |  d k r> d } n
 d |  } d | | | f S(	   Ni   i   t   +s   {1,%d}i   t    s   {%s}s   (?:\t| %s\t| {%s})%s.*\n(    (   t   levelt	   tab_widtht   space_repeatt   level_repeat(    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyt
   _rx_indentu   s    		
c           B   s  e  Z d  Z d Z d d d d g Z d d d d g Z d	 g Z d
 Z d   Z d   Z	 i	 d e
 f d e j f e d< d  d! e f d" e d# f d$ e j f d% e f d& e f d' e j f d( e j f d) e j f d* e
 f g d+ 6d, e
 f e d-  e d.  e d/  e d0  e d1  e d2  e d3  e d4  g	 d# 6e	 d-  d5 6e	 d.  d6 6e	 d/  d7 6e	 d0  d8 6e	 d1  d9 6e	 d2  d: 6e	 d3  d; 6Z RS(=   sC   
    For Linux-style Kconfig files.

    .. versionadded:: 1.6
    t   Kconfigt   kconfigt
   menuconfigs   linux-configs   kernel-configs   *Config.in*s   external.in*s   standard-modules.ins   text/x-kconfigi    c         C   s   t  |   t j d |  f S(   Ns   indent%s(   R@   R   t   Doc(   R<   (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyt   call_indent   s    c         C   s(   t  |   t j f d t f t d  g S(   Ns   \s*\ns   #pop:2(   R@   R   RD   R   R   (   R<   (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyt	   do_indent   s    	s   \s+s   #.*?\nt   mainmenut   configt   choicet	   endchoicet   commentt   menut   endmenus
   visible ift   ift   endift   sourcet   promptt   selects
   depends onR   t   ranget   optiont   suffixs   \bs   (---help---|help)[\t ]*\nt   helps;   (bool|tristate|string|hex|int|defconfig_list|modules|env)\bs   [!=&|]s   [()]s   [0-9]+s   '(''|[^'])*'s   "(""|[^"])*"s   \S+R   s   \s*\ni   i   i   i   i   i   i   s   #popt   indent7t   indent6t   indent5t   indent4t   indent3t   indent2t   indent1(   RG   RH   RC   RI   RJ   RK   RL   RM   s
   visible ifRN   RO   s   sources   promptRR   s
   depends ons   defaults   rangeRT   (   R&   R'   R(   R)   R*   R+   R,   t   flagsRE   RF   R   R   R-   R   R	   R
   R5   R   R   R   t   IntegerR   t   DoubleR   R/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR      sV   							   											c           B   s(  e  Z d  Z d Z d d g Z d g Z g  Z i d e f d e e	 e
 e	 e
 e	  f d e e	 e
 e	 e
 e j e  d f d	 e e	 e
 e	 e
 e j  f d
 e e e j e e
 e	 j e
 e e
  f d e e	 j e
 e e
  f d e d f d e e j e  f d e e j e  f d e e	 j e  f d e j f d e f d e f d e f d e j f d e j f d e j f d e
 f g d 6d e j d f d e j f d e d f d e f d e f g d 6d e j d  f d! e j d f d" e j f g d 6d# e d f d$ e f d e j f d e
 f g d 6Z RS(%   s_   
    Lexer for `CFEngine3 <http://cfengine.org>`_ policy files.

    .. versionadded:: 1.5
    t	   CFEngine3t	   cfengine3t   cf3s   *.cfs   #.*?\ns   (body)(\s+)(\S+)(\s+)(control)s%   (body|bundle)(\s+)(\S+)(\s+)(\w+)(\()t   arglists!   (body|bundle)(\s+)(\S+)(\s+)(\w+)s7   (")([^"]+)(")(\s+)(string|slist|int|real)(\s*)(=>)(\s*)s   (\S+)(\s*)(=>)(\s*)t   "t   strings	   (\w+)(\()s   ([\w.!&|()]+)(::)s   (\w+)(:)s   @[{(][^)}]+[})]s   [(){},;]s   =>s   ->s   \d+\.\d+s   \d+s   \w+s   \s+R   s   \$[{(]t   interpols   \\.s   #pops   \nt   .s   #pushs   [})]s	   [^${()}]+s   \)t   ,(   R&   R'   R(   R)   R*   R+   R,   R   R   R	   R   R
   t   FunctionR   R6   t   TypeR   t   ReservedR   t   Classt   DeclarationR   t   FloatR_   t   Interpolt   EscapeR/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR      sV   							c           B   s  e  Z d  Z d Z d d d g Z d d d g Z d g Z e j e j	 BZ
 i d	 e f d
 e f d e e j e e e j  f d e e j e  d f d e f g d 6d e f d e d f d e f d e f d e f d e f d e j f d e f d e j f d e f g
 d 6Z RS(   so   
    Lexer for configuration files following the Apache config file
    format.

    .. versionadded:: 0.6
    t
   ApacheConft
   apacheconft   aconft   apaches	   .htaccesss   apache.confs   apache2.confs   text/x-apacheconfs   \s+s   (#.*?)$s   (<[^\s>]+)(?:(\s+)(.*?))?(>)s   ([a-z]\w*)(\s+)R2   s   \.+R   s   \\\nt   $s   #pops   \\s   [^\S\n]+s   \d+\.\d+\.\d+\.\d+(?:/\d+)?s   \d+s   /([a-z0-9][\w./-]+)s   (on|off|none|any|all|double|email|dns|min|minimal|os|productonly|full|emerg|alert|crit|error|warn|notice|info|debug|registry|script|inetd|standalone|user|group)\bs   "([^"\\]*(?:\\.[^"\\]*)*)"s	   [^\s"\\]+(   R&   R'   R(   R)   R*   R+   R,   t   ret	   MULTILINEt
   IGNORECASER^   R   R   R   R
   t   TagR   R5   R   t   OtherR	   R`   R/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR     s2   								c           B   s  e  Z d  Z d Z d d d g Z d g Z d g Z e j Z	 dZ
 dZ dZ dZ dZ dZ d Z i d e f d e d f e e
 dddde f e e dddde j f e e dddde f e e dddde f e e dddde f e e dddde f e de de j f d	e f d
e f g d6de j df de df e d g d 6Z RS(  sj   
    Lexer for `squid <http://www.squid-cache.org/>`_ configuration files.

    .. versionadded:: 0.9
    t	   SquidConft	   squidconfs
   squid.conft   squids   text/x-squidconft
   access_logt   aclt   always_directt   announce_hostt   announce_periodt   announce_portt   announce_tot   anonymize_headerst   append_domaint   as_whois_servert   auth_param_basict   authenticate_childrent   authenticate_programt   authenticate_ttlt   broken_postst   buffered_logst   cache_access_logt   cache_announcet	   cache_dirt   cache_dns_programt   cache_effective_groupt   cache_effective_usert
   cache_hostt   cache_host_aclt   cache_host_domaint	   cache_logt	   cache_memt   cache_mem_hight   cache_mem_lowt	   cache_mgrt   cachemgr_passwdt
   cache_peert   cache_peer_accesst   cahce_replacement_policyt   cache_stoplistt   cache_stoplist_patternt   cache_store_logt
   cache_swapt   cache_swap_hight   cache_swap_logt   cache_swap_lowt	   client_dbt   client_lifetimet   client_netmaskt   connect_timeoutt   coredump_dirt   dead_peer_timeoutt   debug_optionst   delay_accesst   delay_classt   delay_initial_bucket_levelt   delay_parameterst   delay_poolst	   deny_infot   dns_childrent   dns_defnamest   dns_nameserverst   dns_testnamest   emulate_httpd_logt   err_html_textt   fake_user_agentt   firewall_ipt   forwarded_fort   forward_snmpd_portt   fqdncache_sizet   ftpget_optionst   ftpget_programt   ftp_list_widtht   ftp_passivet   ftp_usert   half_closed_clientst   header_accesst   header_replacet   hierarchy_stoplistt   high_response_time_warningt   high_page_fault_warningt
   hosts_filet	   htcp_portt   http_accesst   http_anonymizert   httpd_accelt   httpd_accel_hostt   httpd_accel_portt   httpd_accel_uses_host_headert   httpd_accel_with_proxyt	   http_portt   http_reply_accesst
   icp_accesst   icp_hit_stalet   icp_portt   icp_query_timeoutt   ident_lookupt   ident_lookup_accesst   ident_timeoutt   incoming_http_averaget   incoming_icp_averaget   inside_firewallt   ipcache_hight   ipcache_lowt   ipcache_sizet   local_domaint   local_ipt   logfile_rotatet   log_fqdnt   log_icp_queriest   log_mime_hdrst   maximum_object_sizet   maximum_single_addr_triest   mcast_groupst   mcast_icp_query_timeoutt   mcast_miss_addrt   mcast_miss_encode_keyt   mcast_miss_portt   memory_poolst   memory_pools_limitt   memory_replacement_policyt
   mime_tablet   min_http_poll_cntt   min_icp_poll_cntt   minimum_direct_hopst   minimum_object_sizet   minimum_retry_timeoutt   miss_accesst   negative_dns_ttlt   negative_ttlt   neighbor_timeoutt   neighbor_type_domaint
   netdb_hight	   netdb_lowt   netdb_ping_periodt   netdb_ping_ratet   never_directt   no_cachet   passthrough_proxyt   pconn_timeoutt   pid_filenamet   pinger_programt   positive_dns_ttlt   prefer_directt
   proxy_autht   proxy_auth_realmt
   query_icmpt   quick_abortt   quick_abort_maxt   quick_abort_mint   quick_abort_pctt   range_offset_limitt   read_timeoutt   redirect_childrent   redirect_programt   redirect_rewrites_host_headert   reference_aget   refresh_patternt   reload_into_imst   request_body_max_sizet   request_sizet   request_timeoutt   shutdown_lifetimet   single_parent_bypasst   siteselect_timeoutt   snmp_accesst   snmp_incoming_addresst	   snmp_portt   source_pingt	   ssl_proxyt   store_avg_object_sizet   store_objects_per_buckett   strip_query_termst   swap_level1_dirst   swap_level2_dirst   tcp_incoming_addresst   tcp_outgoing_addresst   tcp_recv_bufsizet   test_reachabilityt   udp_hit_objt   udp_hit_obj_sizet   udp_incoming_addresst   udp_outgoing_addresst   unique_hostnamet   unlinkd_programt   uri_whitespacet   useragent_logt   visible_hostnamet
   wais_relayt   wais_relay_hostt   wais_relay_ports
   proxy-onlyt   weightt   ttls   no-queryR   s   round-robins   multicast-respondert   ont   offt   allt   denyt   allowt   viat   parents	   no-digestt   heapt   lrut   realmt   childrent   q1t   q2t   credentialsttlt   nonet   disablet   offline_togglet   diskdt   shutdownt   infot	   parametert   server_listt   client_listt   objectst
   vm_objectst   utilizationt   ipcachet	   fqdncachet   dnst
   redirectort   iot   reply_headerst   filedescriptorst   netdbt   statust   enablet   cleart	   url_regext   urlpath_regext   referer_regext   portt   protot   req_mime_typet   rep_mime_typet   methodt   browsert   usert   srct   dstt   timet	   dstdomaint   identt   snmp_communitys  (?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|:(?=:))(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)){6}(?:[0-9a-f]{0,4}(?:(?<=::)|(?<!::):)[0-9a-f]{0,4}(?:(?<=::)|(?<!:)|(?<=:)(?<!::):)|(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-4]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))s   \s+t   #RK   t   prefixs   \bRU   s   stats/s   log/t   =s   (?:/(?:s   |\b\d+\b))?s   (?:\b\d+\b(?:-\b\d+|%)?)s   \S+R   s	   \s*TAG:.*s   #pops   .+(   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   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   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   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  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/  R0  R1  R2  R3  R4  R5  R6  R7  R8  (   s
   proxy-onlyR9  R:  s   no-querys   defaults   round-robins   multicast-responderR;  R<  s   allR>  R?  R@  RA  s	   no-digestRB  RC  RD  RE  RF  RG  RH  RI  RJ  RK  RL  (   RM  s   infoRO  RP  RQ  s
   squid.conf(   RR  RS  RT  RU  RV  RW  RX  RY  RZ  R[  R\  (   R]  R^  RJ  s   clear(   R`  Ra  Rb  Rc  s   protoRe  Rf  Rg  Rh  Ri  Rj  Rk  Rl  Rm  Rn  Ro  (   R&   R'   R(   R)   R*   R+   R,   Rw   Ry   R^   t   keywordst   optst   actionst   actions_statst   actions_logt   aclst   ip_reR   R   R   R	   R
   t   ConstantR   R   Ro   R   Rq   R   R/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR   =  s   			                                                              			c           B   sS  e  Z d  Z d Z d g Z g  Z d g Z i d e e e	 e
  f d e d f e d  g d 6d	 e d
 f d e j d f e d  g d 6d e d f d e d f e d  g d 6d e j f d e
 j f d e
 j f d e e
 e e j  f d e f d e j f d e e e	 e j  f d e f d e f d e
 f d e	 f d e	 f g d 6Z RS(   sa   
    Lexer for `Nginx <http://nginx.net/>`_ configuration files.

    .. versionadded:: 0.11
    s   Nginx configuration filet   nginxs   text/x-nginx-confs   (include)(\s+)([^\s;]+)s   [^\s;#]+t   stmtt   baseR   s   \}s   #pop:2t   blocks   \{t   ;s   #pops   #.*\ns   on|offs   \$[^\s;#()]+s   ([a-z0-9.-]+)(:)([0-9]+)s   [a-z-]+/[a-z-+]+s   [0-9]+[km]?\bs   (~)(\s*)([^\s{]+)s   [:=~]s   [^\s;#{}$]+s	   /[^\s;#]*s   \s+s   [$;](   R&   R'   R(   R)   R*   R+   R,   R   R	   R   R
   R   R   t	   NamespaceR   R-   Rz  R6   R   R_   R   t   RegexR/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR     s8   							c           B   s   e  Z d  Z d Z d d g Z g  Z d g Z i d e j f d e	 f d e
 f d e f d	 e f d
 e f d e	 j f d e f d e j f d e f g
 d 6Z RS(   sg   
    Lexer for `Lighttpd <http://lighttpd.net/>`_ configuration files.

    .. versionadded:: 0.11
    s   Lighttpd configuration filet   lightyt   lighttpds   text/x-lighttpd-confs   #.*\ns   /\S*s   [a-zA-Z._-]+s   \d+\.\d+\.\d+\.\d+(?:/\d+)?s   [0-9]+s   =>|=~|\+=|==|=|\+s   \$[A-Z]+s   [(){}\[\],]s   "([^"\\]*(?:\\.[^"\\]*)*)"s   \s+R   (   R&   R'   R(   R)   R*   R+   R,   R   R-   R
   R	   R   R   R5   R   R   R`   R   R/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR     s    							c           B   s   e  Z d  Z d Z d d g Z d d g Z d g Z d Z e j	 e j
 BZ i d e f e e j e e  f d	 e f e e e  f d
 e f d e f d e e  f g d 6Z RS(   s`   
    Lexer for `Docker <http://docker.io>`_ configuration files.

    .. versionadded:: 2.0
    t   Dockert   dockert
   dockerfilet
   Dockerfiles   *.dockers   text/x-dockerfile-configs@   (?:FROM|MAINTAINER|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|WORKDIR)s   ^(ONBUILD)(\s+)(%s)\bs   ^(%s)\b(.*)s   #.*t   RUNs   (.*\\\n)*.+R   (   R&   R'   R(   R)   R*   R+   R,   t	   _keywordsRw   Ry   Rx   R^   R   R
   R	   R   R   R   R   R   R/   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyR   	  s   	
		(!   R(   Rw   t   pygments.lexerR    R   R   R   R   R   t   pygments.tokenR   R   R   R	   R
   R   R   R   R   t   pygments.lexers.shellR   t   __all__R   R   R   R@   R   R   R   R   R   R   R   (    (    (    s;   /usr/lib/python2.7/dist-packages/pygments/lexers/configs.pyt   <module>
   s$   .@	,	M=*.