o
    ůhc8                     @   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 g dZG dd deZG dd	 d	eZG d
d deZG dd deZG dd deZdS )z
    pygments.lexers.installers
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for installer/packager DSLs and formats.

    :copyright: Copyright 2006-2025 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DebianSourcesLexerSourcesListLexerDebianControlLexerc                   @   s^  e Zd ZdZdZdZg dZddgZdgZdZ	e
jZd	ee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defgd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ej fgdej!jfd ej!fd!ej"j#fd"ej"fgdejd#fd$ej$fedd%ejfgdejd#fd$ej$fedd&ejfgd'Z%d(S ))r   z
    For NSIS scripts.
    NSISzhttp://nsis.sourceforge.net/)nsisnsinshz*.nsiz*.nshztext/x-nsis1.6z([;#].*)(\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#   r!   r"   r   r    N)&__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesversion_addedre
IGNORECASEflagsr   r	   r   r   SingleDoubleBacktickr   r   Pseudor   	Attributer   Function	Namespacer   Labelr
   ConstantPreprocBuiltinVariableGlobalEscapetokens rC   rC   W/var/www/Befach/backend/venv/lib/python3.10/site-packages/pygments/lexers/installers.pyr      sx    

%&A




r   c                   @   sx  e Zd ZdZdZdgZdgZdgZdZdZ	dZ
d	efed
gde
 d eejedfdefdefgdejfde
 d eejedfdefdefgdejdfdejfeddejfge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defgdejfdejfdeejefgd ejfd!ejfd"ej fd#ej j!fd$ej"fgd%Z#d&S )'r   z"
    For RPM ``.spec`` files.
    RPMSpecspecz*.specztext/x-rpm-specz>https://rpm-software-management.github.io/rpm/manual/spec.htmlr   zS(?:package|prep|build|install|clean|check|pre[a-z]*|post[a-z]*|trigger[a-z]*|files)z#.*$r#   z^(%z)(.*)$r%   r$   .z\*.*$r   z/\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})r"   r!   z(?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]+)(:)(.*)$z^%descriptiondescriptionz^%changelog	changelogzo%(attr|defattr|dir|doc(?:dir)?|setup|config(?:ure)?|make(?:install)|ghost|patch[0-9]+|find_lang|exclude|verify)r   stringz
%define.*$z%\{\!\?.*%define.*\}z+(%(?:if(?:n?arch)?|else(?:if)?|endif))(.*)$z%\{?__[a-z_]+\}?z'%\{?_([a-z_]+dir|[a-z_]+path|prefix)\}?z
%\{\?\w+\}z\$\{?RPM_[A-Z0-9_]+\}?z%\{[a-zA-Z]\w+\})r&   rH   rI   rJ   r#   r!   r"   N)$r'   r(   r)   r*   r+   r-   r.   r/   r,   r0   _directivesr	   r   r   r   	Decoratorr   r   r   
Subheadingr   r5   rA   Headingr   r   r   r   r4   r=   r9   r7   r?   r@   r<   rB   rC   rC   rC   rD   r      sv    








r   c                   @   s`   e Zd ZdZdZdgZdgZdZdZde	e
eedfd	e	e
eeefgd
edfdefgdZdS )r   z5
    Lexer that highlights debian.sources files.
    zDebian Sources filezdebian.sourcesz	*.sourcesz2.19zihttps://manpages.debian.org/bookworm/apt/sources.list.5.en.html#THE_DEB_AND_DEB-SRC_TYPES:_GENERAL_FORMATz^(Signed-By)(:)(\s*)	signed-by"^([a-zA-Z\-0-9\.]*?)(:)(\s*)(.*?)$z% -----END PGP PUBLIC KEY BLOCK-----\nr%   z.+\n)r&   rO   N)r'   r(   r)   r*   r+   r-   r.   r0   r,   r   r   r   r   r   r   rB   rC   rC   rC   rD   r      s     
r   c                	   @   s   e Zd ZdZdZg dZdgZdZdgZdZ	de
fd	efd
eee
dfgd	edfdejfdefdejdfdefde
dfgdejdfdejfdejfdejfgd	edfdedfde
fdejfgdZdd ZdS )r   z:
    Lexer that highlights debian sources.list files.
    zDebian Sourcelist)
debsourcessourceslistsources.listrS   z0.7z application/x-debian-sourceslistz#https://wiki.debian.org/SourcesListr$   z#.*?$z^(deb(?:-src)?)(\s+)distributionr%   z
\$\(ARCH\)z[^\s$[]+z\[escaped-distributionz\$
componentsz\]z[^\]$]+z#pop:2$z\S+)r&   rT   rU   rV   c                 C   s4   |   D ]}| }|ds|dr dS qd S )Nzdeb zdeb-src T)
splitlinesstrip
startswith)textlinerC   rC   rD   analyse_text  s   zSourcesListLexer.analyse_textN)r'   r(   r)   r*   r+   r-   r.   r0   mimetyper,   r   r	   r   r   r   r?   r   Otherr   r7   rB   r]   rC   rC   rC   rD   r      sB    


	r   c                   @   s`  e Zd ZdZdZdZddgZdgZdZde	dfd	e
e	eed
fde
e	eedfde
e	eedfde
e	eeefde
e	eeefde
e	eeefde
e	eeefgdejdfdejfdefdedfdefgde
eeeejfdejfdefedgde
eeejeeeeefdedfdefdefd edfd!efd"ejfd#ejfgd$edfd%e
eeefgd&Zd'S )(r   zR
    Lexer for Debian ``control`` files and ``apt-cache show <pkg>`` outputs.
    zDebian Control filez>https://www.debian.org/doc/debian-policy/ch-controlfields.html
debcontrolcontrolz0.9z^(Description)rH   z*^(Maintainer|Uploaders|Changed-By)(:)(\s*)
maintainerz3^((?:Build-|Pre-)?Depends(?:-Indep|-Arch)?)(:)(\s*)package_listzJ^(Recommends|Suggests|Enhances|Breaks|Replaces|Provides|Conflicts)(:)(\s*)z$^((?:Python-)?Version)(:)(\s*)(\S+)$z$^((?:Installed-)?Size)(:)(\s*)(\S+)$z#^(MD5Sum|SHA1|SHA256)(:)(\s*)(\S+)$rP   z<[^>]+>$r%   z<[^>]+>z,\n?z[^,<]+$z[^,<]+z(.*)(Homepage)(: )(\S+)z:.*\nz .*\nz#(\$)(\{)(\w+)(\s*)(:)(\s*)(\w+)(\})z\(package_list_versz\|z\n\sz\nz[,\s]z[+.a-zA-Z0-9-]+z\[.*?\]z\)z([><=]+)(\s*)([^)]+))r&   rb   rH   rc   rd   N)r'   r(   r)   r*   r+   r,   r-   r.   r0   r   r   r   r   r   r   r   Strongr   r   Classr   r
   Entityr9   rB   rC   rC   rC   rD   r   %  sz    


r   )r*   r1   pygments.lexerr   r   r   r   r   r   pygments.tokenr   r	   r
   r   r   r   r   r   r   r   __all__r   r   r   r   r   rC   rC   rC   rD   <module>   s    
 0}J0