ó
l2RTc           @   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 g Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d S(	   sË   
    pygments.lexers.diff
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for diff/patch formats.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iÿÿÿÿ(   t
   RegexLexert   includet   bygroups(   t   Textt   Commentt   Operatort   Keywordt   Namet   Generict   Literalt	   DiffLexert   DarcsPatchLexerc        
   B   s¨   e  Z d  Z d Z d d g Z d d g Z d d g Z i 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 6Z d „  Z RS(   s>   
    Lexer for unified or context-style diffs or patches.
    t   Difft   difft   udiffs   *.diffs   *.patchs   text/x-diffs   text/x-patchs    .*\ns   \+.*\ns   -.*\ns   !.*\ns   @.*\ns   ([Ii]ndex|diff).*\ns   =.*\ns   .*\nt   rootc         C   s@   |  d  d k r t  S|  d  d k r( t  S|  d  d k r< d Sd  S(   Ni   s   Index: i   s   diff i   s   --- gÍÌÌÌÌÌì?(   t   True(   t   text(    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/diff.pyt   analyse_text*   s    (   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypesR   R   t   Insertedt   Deletedt   Strongt
   Subheadingt   Headingt   tokensR   (    (    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/diff.pyR
      s   	c           B   s©  e  Z d  Z d Z d g Z d d g Z d& Z i d e f d e f d e f d e f d e e e	 e
 e e
 e e j e e ƒ	 f d e e e	 e
 e e
 e e j e ƒ d f d e j f d e j f d e j f d d j e ƒ e e e	 e ƒ f d e j d f d e j d f d e f g d 6d e f d e d  f g d 6d! e d  f d" e f g d# 6e d# ƒ d$ e j f d% e j f g d 6e d# ƒ d$ e j f d% e j f g d 6Z RS('   sä   
    DarcsPatchLexer is a lexer for the various versions of the darcs patch
    format.  Examples of this format are derived by commands such as
    ``darcs annotate --patch`` and ``darcs send``.

    .. versionadded:: 0.10
    s   Darcs Patcht   dpatchs   *.dpatchs   *.darcspatcht   hunkt   addfilet   adddirt   rmfilet   rmdirt   movet   replacet   <t   >s   \{s   \}s/   (\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)(\])s+   (\[)((?:TAG )?)(.*)(\n)(.*)(\*\*)(\d+)(\s?)t   comments   New patches:s   Context:s   Patch bundle hash:s   (\s*)(%s)(.*\n)t   |s   \+t   insertt   -t   deletes   .*\nR   s	   [^\]].*\ns   \]s   #pops   \ns
   \[_[^_]*_]t   specialTexts   \[s   [^\n\[]+(   R!   R"   R#   R$   s   rmdirR&   s   replace(   R   R   R   R   R   R   t   DPATCH_KEYWORDSR   R   R   R   R   R	   t   DateR   R   t   joinR   R   R   R   R   (    (    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/diff.pyR   3   sF   	 							N(   R   t   pygments.lexerR    R   R   t   pygments.tokenR   R   R   R   R   R   R	   t   __all__R
   R   (    (    (    s8   /usr/lib/python2.7/dist-packages/pygments/lexers/diff.pyt   <module>
   s
   4 