
    Mh5                         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 g dZ G d de          Z G d de          Z G 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                      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
    SNBTz#https://minecraft.wiki/w/NBT_format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     Y/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pygments/lexers/minecraft.pyr   r      s         D
/ChG
IIM K,	
 Z 

 {#

 g./-!6<0"FN3 6=":;6=":;	
 V]#6=)6=&)#
 V]#6=)6=&)#
 DN+GK  GL!!GJK)K(K(

 DN+GJGK  GL!!K)K,K(
c: :FFFr?   r   c                       e Zd ZdZdZdZddgZdgZdgZdZ	d	Z
i d
 ed           ed           ed           ed           ed           ed           ed          gd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dej        fdej        fgddefgdde
 dej        dfdej        fgdd e
 ej        d!fd ej        d"f ed#          gd" ed$          d%ej        fd&ed#f ed          gd! ed$          d%ej        fd&ed#f ed          gd$d'ej        f ed          dej        j        fgdd(efgd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%        d0fd1ej        d2fgd0d3ej&        fd4ej%        fd/ej%        d#fgd2d3ej&        fd5ej        fd1ej        d#fgdd6ej        fgdd7e'd8fd9e'd:fgd; ed           ed          d<e'd#fgd= ed           ed          d>e'd#fd?e'fg ed          d@ej(        dAfdBej(        dAfdCej(        dAfd/ej(        dAd0fd1ej(        dAd2fdDe!j$        dAf ed#          gd3ej&        fd4ej(        fd/ej(        d#fgd3ej&        fd5ej(        fd1ej(        d#fg ed          dEe'dFfd?e'f ed#          g ed          dGej)        fdBej)        f ed           ed           ed#          gdHZ*dIS )Jr   zLexer for the mcfunction scripting language used in Minecraft
    Modelled somewhat after the `GitHub mcfunction grammar <https://github.com/Arcensoth/language-mcfunction>`_.
    
MCFunctionz!https://minecraft.wiki/w/Commands
mcfunctionmcfz*.mcfunctionztext/mcfunctionr   z[>!]r+   namescommentsr&   r%   propertyr$   	selectorsz^(\s*)([a-z_]+)z(?<=run)\s+[a-z_]+z$\b[0-9a-fA-F]+(?:-[0-9a-fA-F]+){4}\bz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#.*$rJ   z^\s*#rK   zcomments.block.normalr"   z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   zliterals.string-doubler   zliterals.string-singler    r!   r#   z@[a-z]r   )property.curlyproperty.keyr'   )property.squarerN   rM   r)   rO   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_\.\-/]+)rN   zproperty.key.string-doublezproperty.key.string-singlerQ   rR   N)+r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   _block_comment_prefixr   r   r   r
   BuiltinVariabler   r6   MagicFunctionr   	Multiliner:   r   r   r   Doc	Decoratorr   r	   PseudoClassr   Byter7   r8   r9   r;   r   r<   Tagr=   r>   r?   r@   r   r   e   s         D
-CU#G I"#IM #IGGGJGJGL!!GJGK  GK  
I 	  *dl!C!CD"DL1 5dmDGO$$ #G$45 34
I6 	/? 3DMB
7IF 	Z 
GIN 	/,///1B<>gn%
OIX 	-+--w/@(*w(*ABGFOO	
YId 	 G,--W&'D&!GL!!	"
eIp 	$G,--VZ D&!GL!!	&
qI| 	!dn%GO$$  34#
}IP 	$h/
QIX 	ggn- DM/0$5v|DFN+6=":;6=":;
YIr 	!V]#6=)6=&)#
sI| 	!V]#6=)6=&)#
}IH 	&
II@ 	 K!CDK!DE
AIR 	GL!!GJK(
SI\ 	GL!!GJK( ;
]In GL!!
 >t~Ocd'9MN 0DE 4>#79QR4>#79QR v~';<GFOO'
, V]#4>*4>6*'
 V]#4>*4>6*'
 GL!!%56;GFOO
 GL!! 5dh?'2GJGJGFOO
{I I IFFFr?   r   c            #       L   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
    MCSchemazWhttps://learn.microsoft.com/en-us/minecraft/creator/reference/content/schemasreference/mcschemaz
*.mcschemaztext/mcschemaz2.14r   z//.*?$z	/\*.*?\*/commentsandwhitespacez7/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gimuysd]+\b|\B)r"   z(?=/))r"   badregexrL   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)rb   rd   rc   re   rf   r+   N)#r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r   r   r:   rX   r   r   Regexr   r   r;   r9   r   Wordr   Declarationr   BinOctHexr8   r7   r   Symbolr   r=   r>   r?   r@   r   r   @  sc         D
cClGI !IM Z '7,-"
 G+,,"#)<9t12GFOO
 J'
 V]#6=&)'
 V]#6=&)'
 &89G+,, HM**G,?@ FJ'fj)!6:.V^$3V\B ;'BCKM_a+'9:% 6=.16=.1 "6=1 `  bj  bj  kq  kx  zB  DJ  DR  T\  ^d  ^l  nv  x~  xF  HP  RX  Zb  dj  bk  bk  ldOA!
5< <FFFr?   r   N)r/   pygments.lexerr   r   r   r   pygments.tokenr   r   r	   r
   r   r   r   r   r   r   __all__r   r   r   r>   r?   r@   <module>rq      s_   * B A A A A A A A A A A A* * * * * * * * * * * * * * * * * * * * * * * * <
;
;E E E E E
 E E EPX X X X Xj X X XvG G G G GJ G G G G Gr?   