
    Mh&                         d Z ddlZddlmZmZmZmZ ddl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mZmZmZmZmZmZmZmZmZmZmZ ddlm Z  dgZ!dZ"e"fd	Z# G d
 de          Z$dS )z
    pygments.lexers.lilypond
    ~~~~~~~~~~~~~~~~~~~~~~~~

    Lexer for LilyPond.

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    N)bygroupsdefaultinheritwords)SchemeLexer)keywordspitch_language_namesclefsscalesrepeat_typesunitschord_modifierspitchesmusic_functionsdynamicsarticulationsmusic_commandsmarkup_commandsgrobstranslatorscontextscontext_propertiesgrob_propertiesscheme_functionspaper_variablesheader_variables)TokenLilyPondLexerz(?=\d|[^\w\-]|[\-_][\W\d])c                 h    d}|dk    r|dz  }n|dk    r|dz  }n|dk    sJ t          | ||          S )Nz[\-_^]?	mandatoryz\\optionalz\\?
disallowed)r   )names	backslashsuffixprefixs       X/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pygments/lexers/lilypond.pybuiltin_wordsr(   $   sW    FK%	j	 	 &L(((('''    c            	       @    e Zd ZdZdZdZdgZdgZg ZdZ	e
j        e
j        z  Z fdZg dej        j        fd	ej        j        fd
ej        j        fdej        dfdej        dfdej        f eedez             ej        fdej        dfdej        j        fdej        j        fdej        fdej        fdej        j        j         fdej        j        j         fdej        j        j         f e!e"d          ej#        f e!e$d          ej        j%        f e!e&d          ej        j        j'        f e!e(d          ej        j        j)        f e!e*d          ej        j        j+        f e!e,d          ej        f e!e-d          ej.        f e!e/d          ej        j        j0        f e!e1d          ej        j        j2        f e!e3d          ej        j        j         f e!e4d          ej        j        j5        f e!e6d          ej        j        j7        f e!e8d          ej        j        j9        f e!e:d          ej        j        j;        f e!e<d          ej        j        j=        f e!e>d          ej        j        j?        f e!e@d          ej        j        jA        df e!eBd          ej        j        jC        f e!eDd          ej        j        jE        fdez   ej        jF        fd ej        jG        fd!ez   ej        fd"ej        fd#ej        dfd$ej        jH        fd%ej        fgd&ej        d'feIgdej        j        fd(ez    eJej        ej        j        jA                  f eKd          gd)ZL xZMS )*r   z
    Lexer for input to LilyPond, a text-based music typesetter.

    .. important::

       This lexer is meant to be used in conjunction with the ``lilypond`` style.
    LilyPondzhttps://lilypond.orglilypondz*.lyz2.11c              #   H  K   t                                          |          D ]|\  }}}|t          j        j        u s|t          j        j        u r |t          v rt          j        j        j        }n)|t          j        j        u rt          j        j        j	        }|||fV  }dS )z@Highlight Scheme variables as LilyPond builtins when applicable.N)
superget_tokens_unprocessedr   NameFunctionVariabler   BuiltinSchemeFunctionSchemeBuiltin)selftextindextokenvalue	__class__s        r'   r/   z$LilyPondLexer.get_tokens_unprocessedK   s      #(77#A#A$#G#G 	& 	&E5%
+++u
8K/K/K,,,!J.=E%*,,,
*8%%%%%	& 	&r)   z\s+z	%\{.*?%\}z%.*?$z#\}#popz[#$]@?r:   zm(?x)
               \\\\
               | (?<= \s ) (?: -- | __ )
               | [{}<>=.,:|]
              z=?[',]*!?\??)r%   z[\-_^]?"stringz
-?\d+\.\d+z	-?\d+/\d+z(?x)
               (?<= \s ) -\d+
               | (?: (?: \d+ | \\breve | \\longa | \\maxima )
                     \.* )
              z\*z[~()[\]]z[\-_^][>^_!.\-+]z[\-_^]?\\?\d+r    r"   r!   maybe-subpropertiesz[\-_^]?\\.+?zg(?x)
               (?: [^\W\d] | - )+
               (?= (?: [^\W\d] | [\-.] )* \s* = )
              z([^\W\d]|-)+?."z\\.z[^\\"]+z#\{)r<   rootz(\.)((?:[^\W\d]|-)+?))rA   r=   r:   r>   )N__name__
__module____qualname____doc__nameurlaliases	filenames	mimetypesversion_addedreDOTALL	MULTILINEflagsr/   r   Text
WhitespaceComment	MultilineSinglePunctuationr   r   NAME_END_REPitchStringNumberFloatFractionr0   r3   Articulationr(   r   Keywordr	   PitchLanguager
   Clefr   Scaler   
RepeatTyper   r   ChordModifierr   MusicFunctionr   Dynamicr   r   MusicCommandr   MarkupCommandr   Grobr   
Translatorr   Contextr   ContextPropertyr   GrobPropertyr   PaperVariabler   HeaderVariableBackslashReferenceLvalueEscaper   r   r   tokens__classcell__)r;   s   @r'   r   r   /   s         D
 ClGIIMI$E& & & & &u
UZ*+u

 5=23u
 u}+,u
 U&/u
  )73!u
> $	&?u
N U7?[#@AAA5;OOu
T %,1Uu
Z EL./[u
\ 5<01]u
n <	!ou
z EL!{u
@ %*,9:Au
H !%*"4"ABIu
N uz1>?Ou
T ]8[115=AUu
V ]/>>
@XYWu
X ]5,//1C1HIYu
Z ]6;//1C1IJ[u
\ ]<66
8J8UV]u
^ ]5+..=_u
` ]?L995;NOau
b ]?K88%*:L:Z[cu
d ]8[115:3E3MNeu
h ]=+66
8J8WXiu
j ]>;779K9XYku
l ]?K88%*:L:Z[mu
n ]5,//1C1HIou
p ];55uz7I7TUqu
t ]8Z00%*2D2LMuu
v ]-|<<ej>P>`awu
x ]?L99Z,"$yu
D ]?J779K9YZEu
F ]+Z88%*:L:[\Gu
N {*EJ,IJOu
V :$&Wu
f +UZ8gu
h 5:iu
n 5<(U\()&
 U&(89	
 UZ*+%3Xe');)HIIKGFOO	 
ML LFFFFFr)   )%rE   rL   pygments.lexerr   r   r   r   pygments.lexers.lispr   "pygments.lexers._lilypond_builtinsr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   pygments.tokenr   __all__rV   r(   r    r)   r'   <module>ry      s    
			 < < < < < < < < < < < < , , , , , ,                                              !          
 ,+6 ( ( ( (r r r r rK r r r r rr)   