ó
Ál[Tc           @   s‹   d  Z  d d l Z d d l 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 g Z d e f d „  ƒ  YZ d S(   sÍ   
    pygments.lexers.nix
    ~~~~~~~~~~~~~~~~~~~

    Lexers for the NixOS Nix language.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iÿÿÿÿN(   t
   RegexLexert   include(	   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Numbert   Punctuationt   Literalt   NixLexerc           B   s7  e  Z d  Z d Z d d g Z d g Z d g Z e j e j	 BZ
 d d d d	 d
 d d d d d g
 Z d d d d d d d d d d d g Z d d d d d d  d! d" d# d$ d% d& g Z d' d( d) d* d+ d, d- d. d/ d0 g
 Z i d1 e j f d2 e j d3 f d4 e f d5 d6 j d7 „  e Dƒ ƒ e f d5 d6 j d8 „  e Dƒ ƒ e j f d9 e j f d5 d6 j d: „  e Dƒ ƒ e f d; e j f d5 d6 j d< „  e Dƒ ƒ e f d= e j f d> e j d? f d@ e j dA f dB e f dC e f dD e f dE e j  f dF e f g dG 6dH e j f d2 e j dI f dJ e j dK f dL e j f g d3 6dM e j! f dN e j! f dO e j! f dP e j! f dQ e j! f d@ e j dK f dR e j" dS f dT e j f g dA 6dU e j! f dV e j! f dW e j! f d> e j dK f dR e j" dS f dX e j f g d? 6dY e j" dK f dR e j" dI f e# dG ƒ g dS 6Z$ dZ „  Z% RS([   sU   
    For the `Nix language <http://nixos.org/nix/>`_.

    .. versionadded:: 2.0
    t   Nixt   nixost   nixs   *.nixs
   text/x-nixt   rect   witht   lett   int   inheritt   assertt   ift   elset   thens   ...t   importt   abortt
   baseNameOft   dirOft   isNullt   builtinst   mapt   removeAttrst   throwt   toStringt
   derivations   ++t   +t   ?t   .t   !s   //s   ==s   !=s   &&s   ||s   ->t   =t   (t   )t   [t   ]t   ;t   {t   }t   :t   ,t   @s   #.*$s   /\*t   comments   \s+s   (%s)t   |c         c   s"   |  ] } t  j | ƒ d  Vq d S(   s   \bN(   t   ret   escape(   t   .0t   entry(    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/nix.pys	   <genexpr>8   s    c         c   s"   |  ] } t  j | ƒ d  Vq d S(   s   \bN(   R4   R5   (   R6   R7   (    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/nix.pys	   <genexpr>;   s    s   \b(true|false|null)\bc         c   s   |  ] } t  j | ƒ Vq d  S(   N(   R4   R5   (   R6   R7   (    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/nix.pys	   <genexpr>A   s    s   \b(or|and)\bc         c   s   |  ] } t  j | ƒ Vq d  S(   N(   R4   R5   (   R6   R7   (    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/nix.pys	   <genexpr>H   s    s   [0-9]+t   "t   doublequotes   ''t   singlequotes   [\w.+-]*(\/[\w.+-]+)+s   \<[\w.+-]+(\/[\w.+-]+)*\>s4   [a-zA-Z][a-zA-Z0-9\+\-\.]*\:[\w%/?:@&=+$,\\.!~*\'-]+s
   [\w-]+\s*=s   [a-zA-Z_][\w\'-]*t   roots   [^/*]+s   #pushs   \*/s   #pops   [*/]s   '''s   ''\$\{s   ''\ns   ''\rs   ''\ts   \$\{t	   antiquotes   [^']s   \\s   \\"s   \\$\{s   [^"]s   \}c         C   s†   d } t  j d |  ƒ r% | d 7} n  t  j d |  ƒ rD | d 7} n  t  j d |  ƒ rc | d 7} n  t  j d |  ƒ r‚ | d 7} n  | S(   Ng        s   import.+?<[^>]+>gš™™™™™Ù?s   mkDerivation\s+(\(|\{|rec)s   =\s+mkIf\s+s   \{[a-zA-Z,\s]+\}:gš™™™™™¹?(   R4   t   search(   t   textt   rv(    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/nix.pyt   analyse_text}   s    (&   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypesR4   t	   MULTILINEt   UNICODEt   flagst   keywordsR   t	   operatorst   punctuationsR   t   Singlet	   MultilineR   t   joinR   R   t   Builtint   ConstantR   t   WordR	   R   t   IntegerR   t   DoubleR
   t   Symbolt   Escapet   InterpolR   t   tokensR@   (    (    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/nix.pyR      sn   		$	 	 			(   RC   R4   t   pygments.lexerR    R   t   pygments.tokenR   R   R   R   R   R   R   R	   R
   t   __all__R   (    (    (    s7   /usr/lib/python2.7/dist-packages/pygments/lexers/nix.pyt   <module>
   s
   @	