
    bB                     "   S r SSKrSSKJrJrJrJrJrJr  SSK	J
r
JrJrJrJrJrJrJrJrJr  SSKJrJrJr  SSKJr  SSKJr  SSKJr  / S	QrS
\" \
R>                  \5      4r  " S S\5      r! " S S\!5      r" " S S\!5      r# " S S\5      r$g)z
pygments.lexers.csound
~~~~~~~~~~~~~~~~~~~~~~

Lexers for Csound languages.

:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
    N)
RegexLexerbygroupsdefaultincludeusingwords)
CommentErrorKeywordNameNumberOperatorPunctuationStringText
Whitespace)OPCODESDEPRECATED_OPCODESREMOVED_OPCODES)	HtmlLexer)PythonLexer)LuaLexer)CsoundScoreLexerCsoundOrchestraLexerCsoundDocumentLexerz((?:(?:;|//).*)*)(\n)c            
          \ rS rSrSr0 SS\4S\R                  4S\R                  4S\	" \
\5      4/_SS	\R                  4S
\R                  S4S\R                  S4S\R                  S4S\R                  S4/_S\" S5      S\S4/_S\" S5      S\S4/_SS\4\" S5      S\	" \R                  \5      S4S\R                  S4/_S\" S5      S\R                  4S\4S\S4/_SS\4\" S5      S\S 4/_S!S"\R                  4S#\R                  4S$\S4/_S\" S5      S\R                  S4/_S%S&\	" \R                  \5      S'4S(\R                  4/_S'S)\R                  4S\4S\S*4S+\S,4S-\R                  S.4S\S4/_S*S/\R                  4S0\4\" S15      /_S,S/\R                  4S0\4\" S25      /_S.S3\R                  4S-\R                  S44S\R                  S4/_S5\" S5      \" S%5      /_S6S7\R"                  4S8\	" \R&                  \R(                  5      4S9\R*                  4/_S1S\S4S:\4\" S%5      S;\4/_S2/ 0ErS<rg=)>CsoundLexer   zhttps://csound.com/
whitespacez[ \t]+z/[*](?:.|\n)*?[*]/(?:;|//).*$z(\\)(\n)preprocessor directivesz)#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+z#includestrzincludestr directivez#includezinclude directivez#[ \t]*definezdefine directivez#(?:ifn?def|undef)\bzmacro directivez([^ \t]).*?\1#pop")r"   quoted string\nz([A-Z_a-z]\w*)(\())r"   macro parameter name list[A-Z_a-z]\w*)r"   before macro bodyr&   z['#]z\)r(   #)r"   
macro bodyr*   z(?:\\(?!#)|[^#\\]|\n)+z\\#z(?<!\\)#
macro usesz(\$[A-Z_a-z]\w*\.?)(\()zmacro parameter value listz\$[A-Z_a-z]\w*(?:\.|\b)z(?:[^\'#"{()]|\{(?!\{))+z#macro parameter value quoted string\{\{z#macro parameter value braced stringz\(z#macro parameter value parentheticalz\\[#'()]z[#'()]r$   braced stringz(?:[^\\()]|\\\))+z#pushwhitespace and macro usesnumbersz2\d+[Ee][+-]?\d+|(\d+\.\d*|\d*\.\d+)([Ee][+-]?\d+)?z(0[Xx])([0-9A-Fa-f]+)\d+z[^"$]+z[$] N)__name__
__module____qualname____firstlineno__urlr   r	   	MultilineSingler   r   Preprocr   r   r   r
   r   Floatr   TypeHexIntegertokens__static_attributes__r1       )lib/third_party/pygments/lexers/csound.pyr   r      s   
Ch
#"G$5$56W^^,(445	
h 	"97??KW__.DE'//+>?w0BC$goo7HI$
h  	L!vv.
!h( 	L!645!
)h2 	JL!"HW__k$J24goo/LM
3h@ 	$L!goo.k"K!>?	&
AhL 	JL!; 67
MhV 	&8W__%+v.
Whb 	L!goov6
chl 	''//;)O)+'9
mhv 	%('//:k"6@AfCDGOO%JKK('
whF 	.'//*O$0
GhP 	.'//*O$0
QhZ 	.!7??3GOOW-GOOV,0
[hf 	$L!L!&
ghp 	BFLLQ%xfjj'IJV^^$
qh| 	66"L!V	
}hJ 	 
KhFr@   r   c                      \ rS rSrSrSrSS/rS/rS\4\	" S5      \	" S	5      S
\
4S\
R                  4S\" \
\R                  5      4S\
S4\	" S5      S\4S\4S\S4S\R&                  S4/\	" S5      S\R*                  4S\S4/\	" S5      S\R                  S4/\	" S5      S\R&                  S4/S\R&                  S4\	" S5      /S\S4S\4/S.rS rg!)"r      zC
For `Csound <https://csound.com>`_ scores.

.. versionadded:: 2.1
zCsound Scorezcsound-scorez
csound-scoz*.scor%   r.   r!   z[aBbCdefiqstvxy]zz([nNpP][pP])(\d+)z[mn]mark statementr/   z[!+\-*/^%&|<>#~.]z[()\[\]]r#   r$   z\{loop after left bracer'   r"   r0   )r"   loop after repeat count)r"   loopz\}root\}\}z[^}]|\}(?!\}))rI   rE   rF   rG   rH   r-   r1   N)r2   r3   r4   r5   __doc__namealiases	filenamesr   r   r   Constantr   r   r=   r   r   r   r	   r9   r   Labelr>   r?   r1   r@   rA   r   r      sJ    D|,G	I J/0-. '* 7##$ "8GV^^#DEg/0I!8,+&6?+GOO%<=/
6 /0djj)J'
 /0V^^%HI"

 /0goo/?@$

 GOOV,FO
 ff%v&
a4Fr@   r   c                      \ rS rSrSrSrSS/rSS/r\" 5       r	S r
S	 r0 S
S\4S\" \\R                  \\5      4\" S5      \" S5      S\R&                  S4S\R&                  S4S\R&                  4\" S5      /_SS\R(                  R*                  4\" S5      S\4S\4S\S4S\S4\" SSSS9\4\" S SSS9\R2                  4S!\S"4S#\" \R2                  \5      S"4S$\" \R2                  \5      S%4S&\" \R2                  \5      S'4S(\" \R2                  \5      S)4S*\R4                  S+4S,\R4                  S-4S.\R4                  S/4S0\R4                  S14S2\R(                  R6                  4S3\4/_S\" S5      S4\R8                  4S5\4S\S64/_S\" S5      S7\
S84S\S64/_S9\" S5      S:\R:                  4S;\4S\S64/_SS\S64S<\4\" S=5      \" S>5      \" S?5      S@\4/_SSA\S64SB\4\" S>5      \" S?5      SC\4/_S>SD\R<                  4/_S?SE\R>                  4SF\R<                  4/_SG\" S5      S;\S64\" S5      /_S"\" S5      SH\R                  S64\ " S65      /_S+\" S5      S\SI4\ " S65      /_SISJ\R<                  4SK\R<                  4\" S5      /_S-\" S5      S\S4S\SL4S\S64/_SLSA\S64SM\!" \"5      4/_S/\" S5      S\S4S\SN4S\S64/_SNSA\S64SM\!" \#5      4/_\" S5      S\S4S\SO4S\S64/SA\S64SM\!" \$5      4/SP.Er%SQr&gR)Sr      zG
For `Csound <https://csound.com>`_ orchestras.

.. versionadded:: 2.1
zCsound Orchestracsoundz
csound-orcz*.orcz*.udoc              #      #    UR                  S5      nU R                  R                  U5        UR                  5       [        R
                  U4v   g 7f)Nr   )groupuser_defined_opcodesaddstartr   Function)lexermatchopcodes      rA   opcode_name_callback)CsoundOrchestraLexer.opcode_name_callback   s=     Q""&&v.kkmT]]F22s   AAc              #   4  #    [         R                  nUR                  S5      nU[        ;   d  U[        ;   d
  U[
        ;   a$  UR                  5       [        R                  U4v   OX0R                  ;   a$  UR                  5       [        R                  U4v   O[        n[        R                  " SU5      nU(       a]  UR                  S5      [         R                  UR                  S5      4v   UR                  S5      [        UR                  S5      4v   OUR                  5       [        U4v   UR                  S5      (       aN  UR                  S5      [        UR                  S5      4v   UR                  S5      X!R                  S5      4v   g g 7f)N   z^(g?[afikSw])(\w+)      )r   r;   rU   r   r   r   rX   r   BuiltinrV   rY   researchr   )rZ   r[   type_annotation_tokenrL   
name_matchs        rA   name_callback"CsoundOrchestraLexer.name_callback   s.     '{{1~7?d&88DO<S++-t33///++-44$(!#8$?J &&q)7<<9I9I!9LLL &&q)41A1A!1DDDkkmT4//;;q>>++a.+u{{1~==++a."7QGG s   FFrI   r%   z^([ \t]*)(\w+)(:)([ \t]+|$)r.   r!   z	\binstr\bz"instrument numbers and identifiersz
\bopcode\bzafter opcode keywordz\b(?:end(?:in|op))\bzpartial statementsz-\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\br/   u@   \+=|-=|\*=|/=|<<|>>|<=|>=|==|!=|&&|\|\||[~¬]|[=!+\-*/^%&|<>#?:]z	[(),\[\]]r#   r$   r,   r-   )doelseelseifendifenduntilfiifithenkthenodthenuntilwhilez\b)prefixsuffix)returnrireturnz\b[ik]?goto\b
goto labelz"\b(r(?:einit|igoto)|tigoto)(\(|\b)z\b(c(?:g|in?|k|nk?)goto)(\(|\b))r{   goto argumentz\b(timout)(\(|\b))r{   r|   r|   z\b(loop_[gl][et])(\(|\b))r{   r|   r|   r|   z\bprintk?s\bzprints opcodez"\b(?:readscore|scoreline(?:_i)?)\bzCsound score opcodez\bpyl?run[it]?\bzPython opcodez\blua_(?:exec|opdef)\b
Lua opcodez\bp\d+\bz$\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\bz\d+|[A-Z_a-z]\w*z[+,]r"   r'   )r"   opcode type signaturesr~   z0|[afijkKoOpPStV\[\]]+,z
[^\\"$%)]+r+   zescape sequenceszformat specifiersz[\\$%)]rJ   z(?:[^\\%)}]|\}(?!\}))+z[\\%)]z\\(?:[\\abnrt"]|[0-7]{1,3})z'%[#0\- +]*\d*(?:\.\d+)?[AE-GXac-giosux]z%%r|   z\w+zprints quoted stringz\\\\[aAbBnNrRtT]z%[!nNrRtT]|[~^]{1,2}zCsound scorez([^}]+)|\}(?!\})PythonLua)r}   r   r1   N)'r2   r3   r4   r5   rK   rL   rM   rN   setrV   r]   rh   r   r   r   rP   r   r   r   DeclarationVariableGlobalr   r   r   Pseudorc   InstancerY   r;   EscapeInterpolr   r   r   r   r   r>   r?   r1   r@   rA   r   r      sB    D&G'"I53
H*hJ+Xj$**k[e-fg/0-.7..0TUG//1GH$g&9&9:()
h  	=t}}?S?STIPRZ[;'6?+fo.   / 189 )%FWw52HW^^[4Y/'..+1V,.!8GNNK#H=?((7>>;*ONP dllO<2DLLBWX $,,@&lC$--0014mDA!
!hf 	-/0 $--0k"J'	/
ght 	/024VWJ'!
uh~ 	!/0 '5;J'#
hR 	66"F#L!&''( 
Shb 	ff%&/&''(
chp 	+V]];
qhZ 	7IFMM"
[hd 	/0;'()
ehn 	/0TZZ(FO
ohz 	/0612FO
{hD 	 &--0$fmm4O$!
EhP 	/06?+fn-J'	 
Qh\ 	ff% %(8"9:
]hf 	/06?+fh'J'	
ghr 	ff% %"45
sh~ /06?+fe$J'	
 ff% %/2
IhFr@   r   c                      \ rS rSrSrSrSS/rS/rS\R                  4S\R                  4S	\4S
\R                  S4S\R                  S4S\R                  S4S\R                  S4S\R                  4/S\R                  S4S\" \5      4/S\R                  S4S\" \5      4/S\R                  S4S\" \5      4/S\4S\R&                  S4S\R                  S4/S\4S\S4S\S4S \S4/S!.rS"rg#)$r   i  zF
For `Csound <https://csound.com>`_ documents.

.. versionadded:: 2.1
zCsound Documentzcsound-documentz
csound-csdz*.csdz/[*](.|\n)*?[*]/r    z[^/;<]+|/(?!/)z<\s*CsInstruments)	orchestratagz<\s*CsScore)scorer   z<\s*[Hh][Tt][Mm][Ll])HTMLr   z<\s*[\w:.-]+r   z<\s*/\s*[\w:.-]+\s*>z<\s*/\s*CsInstruments\s*>r"   z%(.|\n)+?(?=<\s*/\s*CsInstruments\s*>)z<\s*/\s*CsScore\s*>z(.|\n)+?(?=<\s*/\s*CsScore\s*>)z<\s*/\s*[Hh][Tt][Mm][Ll]\s*>z((.|\n)+?(?=<\s*/\s*[Hh][Tt][Mm][Ll]\s*>)z\s+z[\w.:-]+\s*=attrz/?\s*>z".*?"z'.*?'z[^\s>]+)rI   r   r   r   r   r   r1   N)r2   r3   r4   r5   rK   rL   rM   rN   r	   r7   r8   r   r   Tagr   r   r   r   r   	Attributer   r>   r?   r1   r@   rA   r   r     sV    D ,/G	I !'"3"34W^^,%!488-ABTXX'78$dhh@dhh.$dhh/
 *488V<5u=Q7RS

 $TXXv6/7G1HI

 -dhh?8%	:JK
 Z dnnf5&)
 Z vv&vv&(	
A&Fr@   r   )%rK   rd   pygments.lexerr   r   r   r   r   r   pygments.tokenr	   r
   r   r   r   r   r   r   r   r    pygments.lexers._csound_builtinsr   r   r   pygments.lexers.htmlr   pygments.lexers.pythonr   pygments.lexers.scriptingr   __all__r8   newliner   r   r   r   r1   r@   rA   <module>r      s    
 O O   Y Y * . .
M#Xgnnd%C
Dk* k\?{ ?DO; Od8* 8r@   