Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/__pycache__/csound.cpython-37.pyc

B

̽�\KA�@s�dZddlZddlmZmZmZmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZmZddlmZddlmZddlmZd	d
dgZdee
je�fZGd
d�de�Z Gdd	�d	e �Z!Gdd
�d
e �Z"Gdd�de�Z#dS)z�
    pygments.lexers.csound
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Csound languages.

    :copyright: Copyright 2006-2019 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)�	HtmlLexer)�PythonLexer)�LuaLexer�CsoundScoreLexer�CsoundOrchestraLexer�CsoundDocumentLexerz((?:(?:;|//).*)*)(\n)c@s�eZdZdefdejfdejfdeee�fgdej	fdej	dfdej	d	fd
ej	dfge
d�d
edfgdefe
d�deej	e�dfdej	dfge
d�dej	fdefdedfgdefe
d�dedfgdej	fdej	fdedfge
d�dej	dfgdeej	e�dfdej	fgdej	fdefded fd!ed"fd#ej	d$fdedfgd%ej	fd&e
fe
d'�gd%ej	fd&e
fe
d(�gd)ej	fd#ej	d*fdej	dfge
d�e
d+�gd,ejfd-eejej�fd.ejfggd/�Zd0S)1�CsoundLexerz[ \t]+z/[*](?:.|\n)*?[*]/z(?:;|//).*$z(\\)(\n)z)#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+z#includezinclude directivez
#[ \t]*definezdefine directivez#(?:ifn?def|undef)\bzmacro directive�
whitespacez
([^ \t]).*?\1z#popz\nz([A-Z_a-z]\w*)(\())z#popzmacro parameter name listz[A-Z_a-z]\w*)z#popzbefore macro bodyz['#]z\)�#)z#popz
macro bodyz(?:\\(?!#)|[^#\\]|\n)+z\\#z(?<!\\)#z(\$[A-Z_a-z]\w*\.?)(\()zmacro parameter value listz\$[A-Z_a-z]\w*(?:\.|\b)z(?:[^\'#"{()]|\{(?!\{))+�"z#macro parameter value quoted stringz\{\{z#macro parameter value braced stringz\(z#macro parameter value parentheticalz\\[#'()]z[#'()]z
quoted stringz
braced stringz(?:[^\\()]|\\\))+z#pushz
macro usesz2\d+[Ee][+-]?\d+|(\d+\.\d*|\d*\.\d+)([Ee][+-]?\d+)?z(0[Xx])([0-9A-Fa-f]+)z\d+)rzpreprocessor directiveszinclude directivezdefine directivezmacro parameter name listzbefore macro bodyz
macro bodyzmacro directivez
macro useszmacro parameter value listz#macro parameter value quoted stringz#macro parameter value braced stringz#macro parameter value parentheticalzwhitespace and macro uses�numbersz
braced stringN)�__name__�
__module__�__qualname__rr�	Multiline�Singlerr�Preprocrrrr	rZFloatr
�TypeZHex�Integer�tokens�r(r(�G/opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/csound.pyrsf










rc@s�eZdZdZdZddgZdgZdefed�ed�d	e	fd
e	j
fdee	ej
�fde	d
fed�defdefdedfdejdfged�dejfdedfgdedfdefed�defged�dej
dfged�dejdfgdejdfed�gdedfd efgd!�Zd"S)#rzU
    For `Csound <https://csound.github.io>`_ scores.

    .. versionadded:: 2.1
    zCsound Scorezcsound-scorez
csound-scoz*.scoz\nzwhitespace and macro useszpreprocessor directivesz[abCdefiqstvxy]�zz([nNpP][pP])(\d+)z[mn]zmark statementrz[!+\-*/^%&|<>#~.]z[()\[\]]rz
quoted stringz\{zloop after left bracez[A-Z_a-z]\w*z#popz[^"$]+z
macro usesz[$]z\d+)z#popzloop after repeat count)z#pop�loopz\}�rootz\}\}z
[^}]|\}(?!\}))r,zmark statementz
quoted stringzloop after left bracezloop after repeat countr+z
braced stringN)rr r!�__doc__�name�aliases�	filenamesrrr
ZConstantrrr&r
rrrr$r�Labelr'r(r(r(r)r{s>

c@s�eZdZdZdZddgZddgZe�Zdd�Z	d	d
�Z
defdeee
je�fed
�ed�dejdfdejdfdejfed�gde
jjfed�defdefdedfdedfedddd�efed ddd�ejfd!ed"fd#eeje�d"fd$eeje�d%fd&eeje�d'fd(eeje�d)fd*e
jd+fd,e
jd-fd.e
jd/fd0e
jd1fd2e
jjfd3e
fged
�d4e
jfd5efded6fged
�d7e	d8fded6fged
�d9ejfd:efded6fgded6fd;efed<�ed=�ed>�d?efgd@ed6fdAefed=�ed>�dBefgdCejfgdDejfdEejfged
�d:ed6fed�ged
�dFe
jd6fed6�ged
�dedGfed6�gdHejfdIejfed�ged
�dedJfded6fgd@ed6fdKe e!�fged
�dedLfded6fgd@ed6fdKe e"�fged
�dedMfded6fgd@ed6fdKe e#�fgdN�Z$dOS)PrzY
    For `Csound <https://csound.github.io>`_ orchestras.

    .. versionadded:: 2.1
    zCsound OrchestraZcsoundz
csound-orcz*.orcz*.udoccs,|�d�}|j�|�|��tj|fVdS)Nr)�group�user_defined_opcodes�add�startr�Function)�lexer�match�opcoder(r(r)�opcode_name_callback�s
z)CsoundOrchestraLexer.opcode_name_callbackccs|�d�}|tks|tkrj|��tj|fV|�d�rh|�d�t|�d�fV|�d�tj|�d�fVn�||j	kr�|��tj
|fVn�t�d|�}|r�|�d�tj|�d�fV|�d�t|�d�fVn|��t|fV|�d��r|�d�t|�d�fV|�d�t|�d�fVdS)N���z^(g?[afikSw])(\w+))
r2rrr5r�Builtinrr
r%r3r6�re�search)r7r8r.Z	nameMatchr(r(r)�
name_callback�s 


z"CsoundOrchestraLexer.name_callbackz\nz^([ \t]*)(\w+)(:)(?:[ \t]+|$)zwhitespace and macro useszpreprocessor directivesz	\binstr\bz"instrument numbers and identifiersz
\bopcode\bzafter opcode keywordz\b(?:end(?:in|op))\bzpartial statementsz-\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\bru@\+=|-=|\*=|/=|<<|>>|<=|>=|==|!=|&&|\|\||[~¬]|[=!+\-*/^%&|<>#?:]z	[(),\[\]]rz
quoted stringz\{\{z
braced string)
Zdo�elseZelseifZendifZenduntil�fi�ifZithenZkthenZodZthenZuntil�whilez\b)�prefix�suffix)�returnZrireturnz
\b[ik]?goto\bz
goto labelz"\b(r(?:einit|igoto)|tigoto)(\(|\b)z\b(c(?:g|in?|k|nk?)goto)(\(|\b))z
goto labelz
goto argumentz\b(timout)(\(|\b))z
goto labelz
goto argumentz
goto argumentz\b(loop_[gl][et])(\(|\b))z
goto labelz
goto argumentz
goto argumentz
goto argumentz\bprintk?s\bz
prints opcodez"\b(?:readscore|scoreline(?:_i)?)\bzCsound score opcodez\bpyl?run[it]?\bz
Python opcodez\blua_(?:exec|opdef)\bz
Lua opcodez\bp\d+\bz$\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\bz\d+|[A-Z_a-z]\w*z[+,]z#popz[A-Z_a-z]\w*)z#popzopcode type signaturesz0|[afijkKoOpPStV\[\]]+�,z
[^\\"$%)]+z
macro useszescape sequenceszformat specifiersz[\\$%)]z\}\}z(?:[^\\%)}]|\}(?!\}))+z[\\%)]z\\(?:[\\abnrt"]|[0-7]{1,3})z)%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]z%%z\w+zprints quoted stringz\\\\[aAbBnNrRtT]z%[!nNrRtT]|[~^]{1,2}zCsound scorez([^}]+)|\}(?!\})�Python�Lua)r,zpartial statementsz"instrument numbers and identifierszafter opcode keywordzopcode type signaturesz
quoted stringz
braced stringzescape sequenceszformat specifiersz
goto argumentz
goto labelz
prints opcodezprints quoted stringzCsound score opcodezCsound scorez
Python opcoderJz
Lua opcoderKN)%rr r!r-r.r/r0�setr3r:rArrrr1rrr
ZDeclaration�VariableZGlobalr
rrZPseudor>ZInstancer6r%ZEscapeZInterpolrrrrrr'r(r(r(r)r�s�
















c@s�eZdZdZdZddgZdgZdejfdej	fde
fd	ejd
fdejdfd
ejdfdejdfdejfgdejdfde
e�fgdejdfde
e�fgdejdfde
e�fgde
fdejdfdejdfgde
fdedfdedfdedfgd �Zd!S)"rzX
    For `Csound <https://csound.github.io>`_ documents.

    .. versionadded:: 2.1
    zCsound Documentzcsound-documentz
csound-csdz*.csdz/[*](.|\n)*?[*]/z(?:;|//).*$z[^/;<]+|/(?!/)z<\s*CsInstruments)�	orchestra�tagz<\s*CsScore)�scorerOz<\s*[Hh][Tt][Mm][Ll])�HTMLrOz<\s*[\w:.-]+rOz<\s*/\s*[\w:.-]+\s*>z<\s*/\s*CsInstruments\s*>z#popz%(.|\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>]+)r,rNrPrQrOrRN)rr r!r-r.r/r0rr"r#rrZTagrrrr�	Attributerr'r(r(r(r)r�s2








)$r-r?Zpygments.lexerrrrrrrZpygments.tokenrr	r
rrr
rrrrZ pygments.lexers._csound_builtinsrrZpygments.lexers.htmlrZpygments.lexers.pythonrZpygments.lexers.scriptingr�__all__r#�newlinerrrrr(r(r(r)�<module>
s 0
`IQ