
    |e5                         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y)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-2023 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                   R   e Zd ZdZdZdZdgZdgZdg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y")#r   z]Lexer for stringified NBT, a data format used in Minecraft

    .. versionadded:: 2.12.0
    SNBTz#https://minecraft.wiki/w/NBT_formatsnbtz*.snbtz	text/snbt\{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	mimetypesr   r   r   r   Constantr   FloatIntegerr   DoubleSingleEscaper
   	Attributer   tokens     ;/usr/lib/python3/dist-packages/pygments/lexers/minecraft.pyr   r      s   
 D
/ChG
II K,	
 Z 

 {#

 g../-!6<<0"FNN3 6==":;6==":;	
 V]]#6==)6==&)#
 V]]#6==)6==&)#
 DNN+K L!JK)K(K(

 DNN+JK L!K)K,K(
c:Fr=   r   c                   D   e Zd ZdZdZdZddgZdgZdg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j4                  fd%ed"f e
d      gd#d&ej6                  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 jB                  fd,e jD                  fd-e jF                  fd.ejH                  d/fd0ej,                  d1fgd/d2ejJ                  fd3ejH                  fd.ejH                  d"fgd1d2ejJ                  fd4ej,                  fd0ej,                  d"fgdd5ej                  fgdd6e&d7fd8e&d9f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jN                  d@fdAejN                  d@fdBejN                  d@fd.ejN                  d@d/fd0ejN                  d@d1fdCe jF                  d@f ed"      gd2ejJ                  fd3ejN                  fd.ejN                  d"fgd2ejJ                  fd4ejN                  fd0ejN                  d"fg e
d      dDe&dEfd>e&f ed"      g e
d      dFejP                  fdAejP                  f e
d       e
d       ed"      gdGZ)yH)Ir   zLexer for the mcfunction scripting language used in Minecraft
    Modelled somewhat after the `GitHub mcfunction grammar <https://github.com/Arcensoth/language-mcfunction>`_.

    .. versionadded:: 2.12.0
    
MCFunctionz!https://minecraft.wiki/w/Commands
mcfunctionmcfz*.mcfunctionztext/mcfunctionz[>!]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#.*$rH   z^\s*#rI   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.squarerL   rK   r(   rM   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_\.\-/]+)rL   zproperty.key.string-doublezproperty.key.string-singlerO   rP   N)*r+   r,   r-   r.   r/   r0   r1   r2   r3   _block_comment_prefixr   r   r   r
   BuiltinVariabler   r4   MagicFunctionr   	Multiliner8   r   r   r   Doc	Decoratorr   r	   PseudoClassr   Byter5   r6   r7   r9   r   r:   Tagr;   r<   r=   r>   r   r   f   sY    D
-CU#G I"#I #IGJJL!JK K 
I 	  *dll!CD"DLL1 5dmmDO$ #G$4$45 3 34
I6 	/? 3DMMB
7IF 	Z 
GIN 	,-Q/1B1B<>gnn%
OIX 	+,-w/@/@(*w((*ABFO	
YId 	 ,-W&&'D&!L!	"
eIp 	$,-VZZ D&!L!	&
qI| 	!dnn%O$  3 34#
}IP 	$h/
QIX 	ggnn- DMM//0$5v||DFNN+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 	L!JK(
SI\ 	L!JK( ;
]In L!
 >t~~Ocd'9MN 0DE 4>>#79QR4>>#79QR v~~';<FO'
, V]]#4>>*4>>6*'
 V]]#4>>*4>>6*'
 L!%56;FO
 L! 5dhh?'2JJFO
{IFr=   r   c            #          e Zd ZdZdZdZdgZdgZdg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j2                  fdej4                  fdej6                  fdej8                  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j8                  eej8                  eej8                  eeee      fd&efgd'Z!y())r   z~Lexer for Minecraft Add-ons data Schemas, an interface structure standard used in Minecraft

    .. versionadded:: 2.14.0
    MCSchemazWhttps://learn.microsoft.com/en-us/minecraft/creator/reference/content/schemasreference/mcschemaz
*.mcschemaztext/mcschemar   z//.*?$z	/\*.*?\*/commentsandwhitespacez7/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gimuysd]+\b|\B)r!   z(?=/))r!   badregexrJ   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)r`   rb   ra   rc   rd   r*   N)"r+   r,   r-   r.   r/   r0   r1   r2   r3   r   r   r8   rV   r   r   Regexr   r   r9   r7   r   Wordr   Declarationr   BinOctHexr6   r5   r   Symbolr   r;   r<   r=   r>   r   r   B  sp   
 D
cClGI !I Z '7,,-"
 +,"#)<<9t12FO
 J'
 V]]#6==&)'
 V]]#6==&)'
 &89+, HMM**G,?,?@ FJJ'fjj)!6::.V^^$3V\\B ;'BCKM_a+'9:% 6==.16==.1 "6==1 `  bj  kq  kx  kx  zB  DJ  DR  DR  T\  ^d  ^l  ^l  nv  x~  xF  xF  HP  RX  Zb  dj  bk  ldOA!
5<Fr=   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>ro      sU   * B A* * * <F
 FRYj YxHJ Hr=   