U
    ]g5                     @   s   d Z ddl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gZG dd deZG dd deZG d	d deZd
S )a  
    pygments.lexers.minecraft
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Minecraft related languages.

    SNBT. A data communication format used in Minecraft.
    wiki: https://minecraft.wiki/w/NBT_format

    MCFunction. The Function file for Minecraft Data packs and Add-ons.
    official: https://learn.microsoft.com/en-us/minecraft/creator/documents/functionsintroduction
    wiki: https://minecraft.wiki/w/Function

    MCSchema. A kind of data Schema for Minecraft Add-on Development.
    official: https://learn.microsoft.com/en-us/minecraft/creator/reference/content/schemasreference/
    community example: https://www.mcbe-dev.net/addons/data-driven/manifest.html

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    )
RegexLexerdefaultincludebygroups)
CommentKeywordLiteralNameNumberOperatorPunctuationStringText
Whitespace	SNBTLexerMCFunctionLexerMCSchemaLexerc                   @   s*  e Zd ZdZdZdZdgZdgZdgZdZ	de
d	fd
efgdefgde
fgdejfdejfdejfdejfdejdfdejdfgdejfdejfdejdfgdejfdejfdejdfgdejfedededde
dfde
dfd e
dfgdejfedededde
dfde
d	fd!e
dfgd"Zd#S )$r   z?Lexer for stringified NBT, a data format used in Minecraft
    ZSNBTz#https://minecraft.wiki/w/NBT_formatZsnbtz*.snbtz	text/snbt2.12\{compoundz[^\{]+\s+z[,:;](true|false)z-?\d+[eE]-?\d+z-?\d*\.\d+[fFdD]?z-?\d+[bBsSlLfFdD]?"literals.string_double'literals.string_single\\.	[^\\"\n]+#pop	[^\\'\n]+z
[A-Z_a-z]+	operators
whitespaceliteralsz#push\[list\}\])rootr!   r    r"   r   r   r   r$   N)__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesversion_addedr   r   r   r   Constantr
   FloatIntegerr   DoubleSingleEscaper	   	Attributer   tokens r:   r:   =/tmp/pip-unpacked-wheel-zak7uw41/pygments/lexers/minecraft.pyr      s\   



	c                   @   s  e Zd ZdZdZdZddgZdgZdgZdZ	d	Z
ed
ededededededgdeeejfdejfdejfeddejfdejjfgdejfdejfgdefgde
 dejdfdejfgde
 ejdfdejd fed!ged"d#ejfd$ed!fedged"d#ejfd$ed!fedgd%ejfeddejjfgd&efgd'efd(ejfd)ejj fd*e!j"fd+e!j#fd,e!j$fd-ej%d.fd/ejd0fgd1ej&fd2ej%fd-ej%d!fgd1ej&fd3ejfd/ejd!fgd4ejfgd5e'd6fd7e'd8fgededd9e'd!fgededd:e'd!fd;e'fgedd<ej(d=fd>ej(d=fd?ej(d=fd-ej(d=d.fd/ej(d=d0fd@e!j$d=fed!gd1ej&fd2ej(fd-ej(d!fgd1ej&fd3ej(fd/ej(d!fgeddAe'dBfd;e'fed!geddCej)fd>ej)fededed!gdDZ*dES )Fr   zLexer for the mcfunction scripting language used in Minecraft
    Modelled somewhat after the `GitHub mcfunction grammar <https://github.com/Arcensoth/language-mcfunction>`_.
    Z
MCFunctionz!https://minecraft.wiki/w/CommandsZ
mcfunctionZmcfz*.mcfunctionztext/mcfunctionr   z[>!]namescommentsr"   r!   propertyr    	selectorsz^(\s*)([a-z_]+)z(?<=run)\s+[a-z_]+z$\b[0-9a-fA-F]+(?:-[0-9a-fA-F]+){4}\bresource-namez[A-Za-z_][\w.#%$]+z[#%$][\w.#%$]+z#?[a-z_][a-z_.-]*:[a-z0-9_./-]+z"#?[a-z0-9_\.\-]+\/[a-z0-9_\.\-\/]+r   z^\s*(#))comments.blockcomments.block.emphasizedz#.*$z^\s*#rC   comments.block.normalr   comments.block.specialz\S+\nz@\S+z[\-~%^?!+*<>\\/|&=.]z\.\.r   z
[A-Za-z_]+z[0-7]bz%[+-]?\d*\.?\d+([eE]?[+-]?\d+)?[df]?\bz
[+-]?\d+\br   literals.string-doubler   literals.string-singler   r   r   z@[a-z]r   )property.curlyproperty.keyr#   )property.squarerJ   r%   r&   ,z-#?[a-z_][a-z_\.\-]*\:[a-z0-9_\.\-/]+(?=\s*\=)property.delimiterz#?[a-z_][a-z0-9_\.\-/]+z[A-Za-z_\-\+]+z-?\d+z[:=]!?property.valuez$#?[a-z_][a-z_\.\-]*\:[a-z0-9_\.\-/]+)r'   r<   r@   r!   r=   rB   rD   rC   rE   r    r"   rG   rH   r?   r>   rI   rK   rJ   zproperty.key.string-doublezproperty.key.string-singlerM   rN   N)+r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   Z_block_comment_prefixr   r   r   r	   ZBuiltinVariabler   r2   ZMagicZFunctionr   	Multiliner6   r   r   r   ZDocZ	Decoratorr   r   ZPseudoZClassr
   ZByter3   r4   r5   r7   r   r8   Tagr9   r:   r:   r:   r;   r   e   s   
	






"
	





	 c                "   @   sZ  e Zd ZdZdZdZdgZdgZdgZdZ	de
fd	ejfd
ejfgeddejdfdedfedgde
dfgdejfdejdfdejfgdejfdejdfdejfgdedfed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jfdefd edfd!edfd"efdejd#fdejd$fd%ej fd&e!ej eejeejeejeeeefd'efgd(Z"d)S )*r   z`Lexer for Minecraft Add-ons data Schemas, an interface structure standard used in Minecraft
    ZMCSchemazWhttps://learn.microsoft.com/en-us/minecraft/creator/reference/content/schemasreference/Zmcschemaz
*.mcschemaztext/mcschemaz2.14r   z//.*?$z	/\*.*?\*/commentsandwhitespacez7/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gimuysd]+\b|\B)r   z(?=/))r   badregexrF   r   r   z[^\\']+r   z[^\\"]+z^(?=\s|/|<!--)slashstartsregexz
(?<=: )optz(?<=\s)[\w-]*(?=(\s+"|\n))z
0[bB][01]+z0[oO]?[0-7]+z0[xX][0-9a-fA-F]+z\d+z#(\.\d+|\d+\.\d*|\d+)([eE][-+]?\d+)?z	\.\.\.|=>zP\+\+|--|~|\?\?=?|\?|:|\\(?=\n)|(<<|>>>?|==?|!=?|(?:\*\*|\|\||&&|[-<>+*%&|^/]))=?z[{(\[;,]z[})\].]singlestringdoublestringz[\w-]*?(?=:\{?\n)z([\w-]*?)(:)(\d+)(?:(\.)(\d+)(?:(\.)(\d+)(?:(\-)((?:[^\W_]|-)*(?:\.(?:[^\W_]|-)*)*))?(?:(\+)((?:[^\W_]|-)+(?:\.(?:[^\W_]|-)+)*))?)?)?(?=:\{?\n)z.*\n)rR   rT   rS   rU   rV   r'   N)#r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r   r   r6   rP   r   r   Regexr   r   r7   r5   r   Wordr   ZDeclarationr
   ZBinOctZHexr4   r3   r   ZSymbolr   r9   r:   r:   r:   r;   r   @  sh    

 

&N)r+   Zpygments.lexerr   r   r   r   Zpygments.tokenr   r   r   r	   r
   r   r   r   r   r   __all__r   r   r   r:   r:   r:   r;   <module>   s   0
H \