o ‡ÎÖa73ã@s¨dZddlZddlmZmZmZmZmZmZddl m Z m Z m Z m Z mZmZmZmZmZmZgd¢ZGdd„deƒZGdd „d eƒZGd d „d eƒZGd d „d eƒZdS)zè pygments.lexers.installers ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for installer/packager DSLs and formats. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. éN)Ú RegexLexerÚincludeÚbygroupsÚusingÚthisÚdefault) ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚ PunctuationÚGenericÚNumberÚ Whitespace)Ú NSISLexerÚ RPMSpecLexerÚSourcesListLexerÚDebianControlLexerc @sPeZdZdZdZgd¢ZddgZdgZej Z de fde j fd e jd fd e jd fed ƒedƒedƒdejfdejfdefdefg deeeeejƒfdeejeejƒfdeejeƒfdefdefdefdefdejfgde jfgdejjfdejfdej j!fd ej fgd e jd!fd"e j"fedƒd#e jfgd e jd!fd"e j"fedƒd$e jfgd%œZ#d&S)'rzX For `NSIS `_ scripts. .. versionadded:: 1.6 ÚNSIS)ÚnsisÚnsiÚnshz*.nsiz*.nshz text/x-nsisz[;#].*\nú'.*?'ú"Ú str_doubleú`Ú str_backtickÚmacroÚinterpolÚbasicz\$\{[a-z_|][\w|]*\}z /[a-z_]\w*ú\s+z[\w.]+z$(\n)(Function)(\s+)([._a-z][.\w]*)\bz#\b([_a-z]\w*)(::)([a-z][a-z0-9]*)\bz\b([_a-z]\w*)(:)z!(\b[ULS]|\B)([!<>=]?=|\<\>?|\>)\Bz[|+-]z\\a­\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)\baÕ\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)\bzø\!(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)\bz \$(R?[0-9])as\$(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\})z#\$(CMDLINE|INSTDIR|OUTDIR|LANGUAGE)z \$[a-z_]\w*ú#popz\$(\\[nrt"]|\$)z[^"]+z[^`]+)Úrootr!rr rrN)$Ú__name__Ú __module__Ú __qualname__Ú__doc__ÚnameÚaliasesÚ filenamesÚ mimetypesÚreÚ IGNORECASEÚflagsr r ÚSingleÚDoubleÚBacktickrr ÚPseudor Ú AttributerrrÚFunctionÚ NamespacerÚLabelr ÚConstantÚPreprocÚBuiltinÚVariableÚGlobalÚEscapeÚtokens©r?r?úr?r?r?r@r’spþ  ÿü  ÿû üü  þ ð ÿý û Ðrc @sÆeZdZdZdZgd¢ZdgZdgZdefde fde e eƒd fgde d fd e j fd efd ejdfdefdedfgdejd fd e j fdejfdejfgde dfdedfdefde jfgdœZdd„ZdS)rzU Lexer that highlights debian sources.list files. .. versionadded:: 0.7 zDebian Sourcelist)Ú debsourcesÚ sourceslistú sources.listrNz application/x-debian-sourceslistr"z#.*?$z^(deb(?:-src)?)(\s+)Ú distributionr#z \$\(ARCH\)z[^\s$[]+z\[úescaped-distributionz\$Ú componentsz\]z[^\]$]+z#pop:2ú$z\S+)r$rOrPrQcCs4| ¡D]}| ¡}| d¡s| d¡rdSqdS)Nzdeb zdeb-src T)Ú splitlinesÚstripÚ startswith)ÚtextÚliner?r?r@Ú analyse_texts ÿþzSourcesListLexer.analyse_textN)r%r&r'r(r)r*r+Úmimetyperr rr r r;r ÚOtherr3r>rXr?r?r?r@rÛs> ÿý ú üüë rc @sBeZdZdZdZddgZdgZdedfdeee ƒdfd eee ƒd fd eee ƒd fd eee e ƒfd eee e ƒfdeee e ƒfdeee e ƒfgde jdfde jfde fde dfde fgdee e eejƒfde jfde fedƒgdeee eje ƒfde dfdefde fde dfde fd ejfd!ejfgd"e dfd#eee e ƒfgd$œZd%S)&rzç Lexer for Debian ``control`` files and ``apt-cache show `` outputs. Specification of `control`` files is available at https://www.debian.org/doc/debian-policy/ch-controlfields.html .. versionadded:: 0.9 zDebian Control fileÚ debcontrolÚcontrolz^(Description)rEz^(Maintainer|Uploaders)(:\s*)Ú maintainerz1^((?:Build-|Pre-)?Depends(?:-Indep|-Arch)?)(:\s*)Údependsz%^(Recommends|Suggests|Enhances)(:\s*)z"^((?:Python-)?Version)(:\s*)(\S+)$z"^((?:Installed-)?Size)(:\s*)(\S+)$z!^(MD5Sum|SHA1|SHA256)(:\s*)(\S+)$z ^([a-zA-Z\-0-9\.]*?)(:\s*)(.*?)$z<[^>]+>$r#z<[^>]+>z,\n?z[^,<]+$z[^,<]+z(.*)(Homepage)(: )(\S+)z:.*\nz .*\nz(\$)(\{)(\w+\s*:\s*\w+)(\})z\(Ú depend_versz\|z,\nrCz[,\s]z[+.a-zA-Z0-9-]+z\[.*?\]z\)z([><=]+)(\s*)([^)]+))r$r]rEr^r_N)r%r&r'r(r)r*r+r rrrrr rÚStrongr ÚClassrr ÚEntityr5r>r?r?r?r@r sp ÿ ÿ ÿ ÿ ÿ ÿ ÿò ûÿûÿ÷ þ Õr)r(r-Úpygments.lexerrrrrrrÚpygments.tokenrr r r r r rrrrÚ__all__rrrrr?r?r?r@Ús 0}I0