ó
Ej[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 m Z d d d d g Z 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.installers
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for installer/packager DSLs and formats.

    :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
iÿÿÿÿN(   t
   RegexLexert   includet   bygroupst   usingt   thist   default(
   t   Textt   Commentt   Operatort   Keywordt   Namet   Stringt   Punctuationt   Generict   Numbert
   Whitespacet	   NSISLexert   RPMSpecLexert   SourcesListLexert   DebianControlLexerc           B   s÷  e  Z d  Z d Z d d d g Z d d g Z d g Z e j Z	 i d e
 f d	 e j f d
 e j d f d e j d f e d ƒ e d ƒ e d ƒ d e j f d e j f d e f g
 d 6d e e e e e j ƒ f d e e j e e j ƒ f d e e j e ƒ f d e f d e f d e f d e f d e j f g d 6d e
 j f g d 6d e j j f d e j f d  e j j f d! e j f g d 6d
 e d" f d# e j  f e d ƒ d e j f g d 6d e d" f d# e j  f e d ƒ d e j f g d 6Z! RS($   sX   
    For `NSIS <http://nsis.sourceforge.net/>`_ scripts.

    .. versionadded:: 1.6
    t   NSISt   nsist   nsit   nshs   *.nsis   *.nshs   text/x-nsiss   [;#].*\ns   '.*?'t   "t
   str_doublet   `t   str_backtickt   macrot   interpolt   basics   \$\{[a-z_|][\w|]*\}s
   /[a-z_]\w*t   .t   roots$   (\n)(Function)(\s+)([._a-z][.\w]*)\bs#   \b([_a-z]\w*)(::)([a-z][a-z0-9]*)\bs   \b([_a-z]\w*)(:)s!   (\b[ULS]|\B)([!<>=]?=|\<\>?|\>)\Bs   [|+-]s   \\s­  \b(Abort|Add(?:BrandingImage|Size)|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient)|BrandingText|BringToFront|Call(?:InstDLL)?|(?:Sub)?Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|Create(?:Directory|Font|Shortcut)|Delete(?:INI(?:Sec|Str)|Reg(?:Key|Value))?|DetailPrint|DetailsButtonText|Dir(?:Show|Text|Var|Verify)|(?:Disabled|Enabled)Bitmap|EnableWindow|EnumReg(?:Key|Value)|Exch|Exec(?:Shell|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read(?:Byte)?|Seek|Write(?:Byte)?)?|Find(?:Close|First|Next|Window)|FlushINI|Function(?:End)?|Get(?:CurInstType|CurrentAddress|DlgItem|DLLVersion(?:Local)?|ErrorLevel|FileTime(?:Local)?|FullPathName|FunctionAddress|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Inst(?:ProgressFlags|Type(?:[GS]etText)?)|Int(?:CmpU?|Fmt|Op)|IsWindow|LangString(?:UP)?|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|MessageBox|MiscButtonText|Name|Nop|OutFile|(?:Uninst)?Page(?:Ex(?:End)?)?|PluginDir|Pop|Push|Quit|Read(?:(?:Env|INI|Reg)Str|RegDWORD)|Reboot|(?:Un)?RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|Section(?:Divider|End|(?:(?:Get|Set)(?:Flags|InstTypes|Size|Text))|Group(?:End)?|In)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress(?:ionLevel|or(?:DictSize)?)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|Error(?:s|Level)|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|ShellVarContext|Silent|StaticBkColor)|Show(?:(?:I|Uni)nstDetails|Window)|Silent(?:Un)?Install|Sleep|SpaceTexts|Str(?:CmpS?|Cpy|Len)|SubSection(?:End)?|Uninstall(?:ButtonText|(?:Sub)?Caption|EXEName|Icon|Text)|UninstPage|Var|VI(?:AddVersionKey|ProductVersion)|WindowIcon|Write(?:INIStr|Reg(:?Bin|DWORD|(?:Expand)?Str)|Uninstaller)|XPStyle)\bsÕ  \b(CUR|END|(?:FILE_ATTRIBUTE_)?(?:ARCHIVE|HIDDEN|NORMAL|OFFLINE|READONLY|SYSTEM|TEMPORARY)|HK(CC|CR|CU|DD|LM|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_(?:CONFIG|USER)|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON[1-4]|ICON(?:EXCLAMATION|INFORMATION|QUESTION|STOP)|OK(?:CANCEL)?|RETRYCANCEL|RIGHT|SETFOREGROUND|TOPMOST|USERICON|YESNO(?:CANCEL)?)|SET|SHCTX|SW_(?:HIDE|SHOW(?:MAXIMIZED|MINIMIZED|NORMAL))|admin|all|auto|both|bottom|bzip2|checkbox|colored|current|false|force|hide|highest|if(?:diff|newer)|lastused|leave|left|listonly|lzma|nevershow|none|normal|off|on|pop|push|radiobuttons|right|show|silent|silentlog|smooth|textonly|top|true|try|user|zlib)\bsø   \!(addincludedir(?:dir)?|addplugindir|appendfile|cd|define|delfilefile|echo(?:message)?|else|endif|error|execute|if(?:macro)?n?(?:def)?|include|insertmacro|macro(?:end)?|packhdr|search(?:parse|replace)|system|tempfilesymbol|undef|verbose|warning)\bs   \$(R?[0-9])ss  \$(ADMINTOOLS|APPDATA|CDBURN_AREA|COOKIES|COMMONFILES(?:32|64)|DESKTOP|DOCUMENTS|EXE(?:DIR|FILE|PATH)|FAVORITES|FONTS|HISTORY|HWNDPARENT|INTERNET_CACHE|LOCALAPPDATA|MUSIC|NETHOOD|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES(?:32|64)|QUICKLAUNCH|RECENT|RESOURCES(?:_LOCALIZED)?|SENDTO|SM(?:PROGRAMS|STARTUP)|STARTMENU|SYSDIR|TEMP(?:LATES)?|VIDEOS|WINDIR|\{NSISDIR\})s#   \$(CMDLINE|INSTDIR|OUTDIR|LANGUAGE)s   \$[a-z_]\w*s   #pops   \$(\\[nrt"]|\$)("   t   __name__t
   __module__t   __doc__t   namet   aliasest	   filenamest	   mimetypest   ret
   IGNORECASEt   flagsR   R   t   Singlet   Doublet   BacktickR   R	   t   PseudoR
   t	   AttributeR   R   t   Functiont	   NamespaceR   t   LabelR   t   Constantt   Preproct   Builtint   Variablet   Globalt   Escapet   tokens(    (    (    s>   /usr/lib/python2.7/dist-packages/pygments/lexers/installers.pyR      sX   									%			c           B   s"  e  Z d  Z d Z d g Z d g Z d g Z d Z i d e f e	 d ƒ g d 6d	 e d
 e
 e j e ƒ d f d e f d e f g d 6d e j f d	 e d
 e
 e j e ƒ d f d e f d e f g d 6d e j d f d e j f e	 d ƒ d e j f g d 6e	 d ƒ d e
 e j e e e ƒ ƒ f d e j d f d e j d f d	 e d
 e
 e j e ƒ f d e f e	 d ƒ d e j f d e j d f d e f g
 d 6d e j f d e j f d e
 e j e ƒ f g d 6d e j f d e j f d  e j f d! e j j f d" e j f g d 6Z RS(#   s=   
    For RPM ``.spec`` files.

    .. versionadded:: 1.6
    t   RPMSpect   specs   *.specs   text/x-rpm-specsS   (?:package|prep|build|install|clean|check|pre[a-z]*|post[a-z]*|trigger[a-z]*|files)s   #.*\nR   R    s   ^(%s   )(.*)$s   #pops   \nR   t   descriptions   \*.*\nt	   changelogR   s/   \\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})R   t   stringR   sì   (?i)^(Name|Version|Release|Epoch|Summary|Group|License|Packager|Vendor|Icon|URL|Distribution|Prefix|Patch[0-9]*|Source[0-9]*|Requires\(?[a-z]*\)?|[a-z]+Req|Obsoletes|Suggests|Provides|Conflicts|Build[a-z]+|[a-z]+Arch|Auto[a-z]+)(:)(.*)$s   ^%descriptions   ^%changelogso   %(attr|defattr|dir|doc(?:dir)?|setup|config(?:ure)?|make(?:install)|ghost|patch[0-9]+|find_lang|exclude|verify)s   '.*?'s   %define.*\ns   %\{\!\?.*%define.*\}s+   (%(?:if(?:n?arch)?|else(?:if)?|endif))(.*)$s   %\{?__[a-z_]+\}?s'   %\{?_([a-z_]+dir|[a-z_]+path|prefix)\}?s
   %\{\?\w+\}s   \$\{?RPM_[A-Z0-9_]+\}?s   %\{[a-zA-Z]\w+\}(    R!   R"   R#   R$   R%   R&   R'   t   _directivesR   R   R   R
   t	   DecoratorR   R   t
   SubheadingR   R,   R8   t   HeadingR   R   R   R	   R+   R4   R0   R.   R6   R7   R3   R9   (    (    (    s>   /usr/lib/python2.7/dist-packages/pygments/lexers/installers.pyR   ’   sV   									c        	   B   s,  e  Z d  Z d Z d d d g Z d g Z d g Z i d e f d e f d e	 e
 e ƒ d	 f g d
 6d e d f d e j f d e f d e j d f d e f d e d f g d	 6d e j d f d e j f d e j f d e j f g d 6d e d f d e d f d e f d e
 j f g d 6Z d „  Z RS(   sU   
    Lexer that highlights debian sources.list files.

    .. versionadded:: 0.7
    s   Debian Sourcelistt   sourceslists   sources.listt
   debsourcess    application/x-debian-sourceslists   \s+s   #.*?$s   ^(deb(?:-src)?)(\s+)t   distributionR    s   #pops
   \$\(ARCH\)s   [^\s$[]+s   \[s   escaped-distributions   \$t
   componentss   \]s   [^\]$]+s   #pop:2t   $s   \S+c         C   sI   xB |  j  ƒ  D]4 } | j ƒ  } | j d ƒ s= | j d ƒ r t Sq Wd  S(   Ns   deb s   deb-src (   t
   splitlinest   stript
   startswitht   True(   t   textt   line(    (    s>   /usr/lib/python2.7/dist-packages/pygments/lexers/installers.pyt   analyse_text  s    (   R!   R"   R#   R$   R%   R&   t   mimetypeR   R   R   R	   R
   R6   R   t   OtherR.   R9   RN   (    (    (    s>   /usr/lib/python2.7/dist-packages/pygments/lexers/installers.pyR   Û   s2   							c           B   só  e  Z d  Z d Z d d g Z d g Z i d e d f d e e e ƒ d f d e d	 f d
 e e e e	 ƒ f d e e e e	 ƒ f d e e e e	 ƒ f d e e e
 e ƒ f g d 6d e j f d e j d f d e f d e f g d 6d e e e e e j ƒ f d e j f d e f e d ƒ g d 6d e f d e e e e j ƒ f d e d f d e f d e f d e f d e d f d e f d  e j d f d! e e j e ƒ f d" e j f g d	 6d# e d f d$ e d% f d& e e e e	 ƒ f g d 6Z RS('   sm   
    Lexer for Debian ``control`` files and ``apt-cache show <pkg>`` outputs.

    .. versionadded:: 0.9
    s   Debian Control filet   controlt
   debcontrols   ^(Description)R<   s   ^(Maintainer)(:\s*)t
   maintainers   ^((Build-)?Depends)t   dependss"   ^((?:Python-)?Version)(:\s*)(\S+)$s"   ^((?:Installed-)?Size)(:\s*)(\S+)$s!   ^(MD5Sum|SHA1|SHA256)(:\s*)(\S+)$s    ^([a-zA-Z\-0-9\.]*?)(:\s*)(.*?)$R    s   <[^>]+>s   <[^>]+>$s   #pops   ,\n?R   s   (.*)(Homepage)(: )(\S+)s   :.*\ns    .*\ns   :\s*s   (\$)(\{)(\w+\s*:\s*\w+)s   \(t   depend_verst   ,s   \|s   [\s]+s   [})]\s*$s   \}s   [^,]$s   ([+.a-zA-Z0-9-])(\s*)s   \[.*?\]s   \),s   \)[^,]s   #pop:2s   ([><=]+)(\s*)([^)]+)(   R!   R"   R#   R$   R%   R&   R	   R   R   R   R   R   R   t   StrongR
   t   ClassR   R   t   EntityR0   R9   (    (    (    s>   /usr/lib/python2.7/dist-packages/pygments/lexers/installers.pyR     sN   								(   R#   R(   t   pygments.lexerR    R   R   R   R   R   t   pygments.tokenR   R   R   R	   R
   R   R   R   R   R   t   __all__R   R   R   R   (    (    (    s>   /usr/lib/python2.7/dist-packages/pygments/lexers/installers.pyt   <module>
   s   .F		|I0