a
    ñ»jŽ�  ã                   @   s4  d Z ddlZddlmZmZmZmZmZ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 g d¢ZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZeZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZ G dd„ deƒZ!G dd„ deƒZ"G dd„ deƒZ#dS )zÝ
    pygments.lexers.dsls
    ~~~~~~~~~~~~~~~~~~~~

    Lexers for various domain-specific languages.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)	ÚExtendedRegexLexerÚ
RegexLexerÚbygroupsÚwordsÚincludeÚdefaultÚthisÚusingÚcombined)	ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚ
Whitespace)ÚProtoBufLexerÚ	ZeekLexerÚPuppetLexerÚRslLexerÚMscgenLexerÚVGLLexerÚ
AlloyLexerÚPanLexerÚ
CrmshLexerÚThriftLexerÚFlatlineLexerÚSnowballLexerc                   @   s2  e Zd ZdZdZdZddgZdgZdZde	fd	e
fd
ejfdejfedddd�efeddd�ejfdejfdeeje	ƒdfdeeje	ƒdfdeeje	ƒdfdefde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eje	eƒfd"efgd#ejd$fed$ƒgd%ejd$fed$ƒgd%ed$fed$ƒgd&œZ d'S )(r   z5
    Lexer for Protocol Buffer definition files.
    zProtocol Bufferz/https://developers.google.com/protocol-buffers/ÚprotobufÚprotoz*.protoz1.4z[ \t]+z[,;{}\[\]()<>]z/(\\\n)?/(\n|[\s\S]*?[^\\]\n)z/(\\\n)?\*[\s\S]*?\*(\\\n)?/)ÚimportÚoptionÚoptionalÚrequiredZrepeatedÚreservedr   ÚpackedÚctypeÚ
extensionsÚtoÚmaxZrpcÚreturnsZoneofÚsyntaxú\b©ÚprefixÚsuffix)Zint32Zint64Zuint32Zuint64Zsint32Zsint64Zfixed32Zfixed64Zsfixed32Zsfixed64ÚfloatÚdoubleÚboolÚstringÚbytes©r1   ú(true|false)\bz(package)(\s+)Úpackagez(message|extend)(\s+)Úmessagez(enum|group|service)(\s+)Útypez\".*?\"z\'.*?\'z'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*z(\d+\.\d*|\.\d+|\d+[fF])[fF]?z(\-?(inf|nan))\bz0x[0-9a-fA-F]+[LlUu]*z0[0-7]+[LlUu]*z
\d+[LlUu]*z[+-=]z([a-zA-Z_][\w.]*)([ \t]*)(=)z[a-zA-Z_][\w.]*z[a-zA-Z_][\w\.]*ú#popú[a-zA-Z_]\w*)Úrootr9   r:   r;   N)!Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesÚversion_addedr   r   r   ÚSingleÚ	Multiliner   r   ÚTypeÚConstantr   Ú	NamespaceÚDeclarationr   r   ÚFloatÚHexÚOctÚIntegerr   r   Ú	Attributer   ÚClassÚtokens© rU   rU   ú:E:\soccer\ml_env\Lib\site-packages\pygments/lexers/dsls.pyr      sh   ýüýüÿÿÿà#
þ
þþÕr   c                   @   s”  e Zd ZdZdZdZdgZdgZdgZdZ	e
dƒe
d	ƒd
ejeddƒfdejeddƒfdeejeƒdfdeejeƒdfdeeeƒejeeƒfe
dƒe
dƒdefdefdefgdefdefgdefdefdejfgdejfgd
ejdfd ejfgd!ejdfd"ejfgd#ejdfedƒgd$ejdfedƒgd%efd&ejfd'ejfe d(d)d*�ejfe d+d)d*�ej!fe d,d)d)d-�ej"fgd.e#j$fd/e#j%fd0e#j&fgd1œ
Z'd2S )3r   z+
    For Thrift interface definitions.
    ÚThriftzhttps://thrift.apache.org/Úthriftz*.thriftzapplication/x-thriftú2.1Ú
whitespaceÚcommentsú"ÚstringescapeÚdqsz\'Úsqsz(namespace)(\s+)Ú	namespacez*(enum|union|struct|service|exception)(\s+)ÚclasszE((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)((?:[^\W\d]|\$)[\w$]*)(\s*)(\()ÚkeywordsÚnumbersz[&=]z[:;,{}()<>\[\]]z[a-zA-Z_](\.\w|\w)*ú\nú\s+ú#.*$z//.*?\nú/\*[\w\W]*?\*/z\\([\\nrt"\'])r<   z	[^\\"\n]+ú'z
[^\\\'\n]+z[a-z*](\.\w|\w)*r=   z1(async|oneway|extends|throws|required|optional)\br8   z(const|typedef)\b)Zcpp_namespaceZcpp_includeZcpp_typeZjava_packageZcocoa_prefixZcsharp_namespaceZdelphi_namespaceZphp_namespaceZ	py_moduleZperl_packageZruby_namespaceZsmalltalk_categoryZsmalltalk_prefixZxsd_allZxsd_optionalZxsd_nillableZxsd_namespaceZ	xsd_attrsr   r.   r7   )Zvoidr4   ÚbyteZi16Zi32Zi64r3   r5   ÚbinaryÚmapÚlistÚsetÚslistZsenum)eZBEGINÚENDZ	__CLASS__Z__DIR__Z__FILE__Z__FUNCTION__Z__LINE__Z
__METHOD__Z__NAMESPACE__ÚabstractÚaliasÚandÚargsÚasÚassertÚbeginÚbreakÚcaseZcatchra   ÚcloneÚcontinueÚdeclareÚdefr   ÚdelÚdeleteÚdoZdynamicÚelifÚelseZelseifÚelsifÚendZ
enddeclareZendforZ
endforeachÚendifZ	endswitchZendwhileZensureÚexceptÚexecÚfinallyr2   ÚforÚforeachÚfunctionÚglobalÚgotoÚifZ
implementsr"   ÚinÚinlineZ
instanceofÚ	interfaceÚisÚlambdaÚmoduleÚnativeÚnewÚnextÚnilÚnotÚorÚpassÚpublicÚprintÚprivateZ	protectedÚraiseZredoZrescueÚretryÚregisterÚreturnÚselfÚsizeofZstaticÚsuperÚswitchÚsynchronizedÚthenr   ÚthrowÚ	transientÚtryÚundefZunlessZunsignedÚuntilÚuseÚvarZvirtualZvolatileÚwhenÚwhileÚwithÚxorÚyieldr/   z1[+-]?(\d+\.\d+([eE][+-]?\d+)?|\.?\d+[eE][+-]?\d+)z[+-]?0x[0-9A-Fa-f]+z[+-]?[0-9]+)
r>   rZ   r[   r]   r^   r_   r`   ra   rb   rc   N)(r?   r@   rA   rB   rC   rD   rE   rF   Ú	mimetypesrG   r   r   ÚDoubler
   rH   r   r   rL   r   rM   r	   r   r   ÚFunctionr   r   r   rI   ÚEscaper   rS   rK   r   rJ   ÚReservedr   rN   rO   rQ   rT   rU   rU   rU   rV   r   T   sŽ   ÿÿýïþýÿ
þ
þ
þ
þúùýüîíï'ýªr   c                   @   sd  e Zd ZdZdZdZddgZddgZdZd	Z	d
Z
dZedƒedƒedƒedƒedƒedƒedƒedƒedƒdejfedƒgdefdefdeeeƒfgdefgdejfdejfdeejeejƒfgeddd d!�ejfged"d d#�ejfd$eejeejeejƒfd%eeeejeeeejƒfd&eeeeeeƒfd'eeeejeejƒfged(d d#�efd)efd*ejfd+eejeejƒfgd,ed-fd.ejd/fd0ejfd1e fd2e fd3e fd4e	 d5 e j!fe
d6 e j"fe
d  e j"fd7e j#fed8 e d9 efgd:efd;efd<ejfd=efgd>e$fd?e$fgd@eee$ƒfdAefgdBej%fdCej%fd,edDfdEefgdBej%fdFejdDfdEejfgdGœZ&dHS )Ir   z
    For Zeek scripts.
    ÚZeekzhttps://www.zeek.org/ÚzeekÚbroz*.zeekz*.broz2.5z[0-9a-fA-F]z(((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?z[A-Za-z0-9][-A-Za-z0-9]*rZ   r[   Ú
directivesÚ
attributesÚtypesrb   ÚliteralsÚ	operatorsÚpunctuationz2((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(?=\s*\()Úidentifiersrd   re   z(\\)(\n)rf   z)@(load-plugin|load-sigs|load|unload)\b.*$z=@(DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)\bz(@prefixes)(\s*)((\+?=).*)$)ÚredefÚpriorityÚlogr$   r   Zadd_funcZdelete_funcZexpire_funcZread_expireZwrite_expireZcreate_expirer¦   Ú
persistentZrotate_intervalZrotate_sizeZencryptÚ
raw_outputZ	mergeableZerror_handlerZtype_columnÚ
deprecatedú&r.   r/   )ÚanyÚenumÚrecordrm   ÚtableZvectorrŠ   ÚhookÚeventÚaddrr4   Úcountr3   ÚfileÚintÚintervalÚpatternÚportr5   ZsubnetÚtimer7   zA(opaque)(\s+)(of)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\bzR(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)(\s*)\b(record|enum)\bz<(type)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(\s*)(:)zI(redef)(\s+)(record|enum)(\s+)((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)\b)rÃ   Zexportr�   r�   rˆ   r°   r¡   rw   r–   rz   Zfallthroughr¥   r   rx   Úaddr~   r¯   ÚtimeoutÚschedulez	(print)\bz(global|local|const|option)\bz4(module)(\s+)(([A-Za-z_]\w*)(?:::([A-Za-z_]\w*))*)\br\   r5   z/(?=.*/)Úregexz[TF]\bz \d{1,5}/(udp|tcp|icmp|unknown)\bz(\d{1,3}.){3}(\d{1,3})\bzH\[([0-9a-fA-F]{0,4}:){2,7}([0-9a-fA-F]{0,4})?((\d{1,3}.){3}(\d{1,3}))?\]z0[xX]z+\bz!\s*(day|hr|min|sec|msec|usec)s?\bz(\d+)\bz(\.z)+z[!%*/+<=>~|&^-]z([-+=&|]{2}|[+=!><-]=)z(in|as|is|of)\bz\??\$z[{}()\[\],;.]z[?:]z([a-zA-Z_]\w*)(::)r=   z\\.z%-?[0-9]*(\.[0-9]+)?[DTd-gsx]r<   Ú.ú/)r>   rZ   r[   r¼   r½   r¾   rb   r¿   rÀ   rÁ   rÂ   r5   rÛ   N)'r?   r@   rA   rB   rC   rD   rE   rF   rG   Z_hexZ_floatÚ_hr   r   r¶   r   r   r   r   ÚPreprocr   r   ÚPseudorJ   r   ÚWordrS   rM   rL   r   ÚRegexrK   r   rO   rN   rQ   r   r·   rT   rU   rU   rU   rV   r   ½   sÐ   ÿôýÿÿýûúÿûúÿÿÿÿîûúÿö
æüú
þü
ý€ ør   c                   @   sþ   e Zd ZdZdZdZdgZdgZdZe	dƒe	dƒe	d	ƒe	d
ƒe	dƒe	dƒde
fdefgdeeeƒfdejfgdefdejfgdejfdeeje
ee
ƒfdejfgdejfdejfdejfdejfdejjfdejfgedddd�efgd efd!efgd"œZd#S )$r   z'
    For Puppet configuration DSL.
    ÚPuppetzhttps://puppet.com/Úpuppetz*.ppú1.6r[   rb   Únamesrc   rÀ   Ústringsz[]{}:(),;[]re   z(\s*)(#.*)$z/(\\\n)?[*][\s\S]*?[*](\\\n)?/z(=>|\?|<|>|=|\+|-|/|\*|~|!|\|)z(in|and|or|not)\br=   z(\$\S+)(\[)(\S+)(\])z\$\S+z'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?z\d+[eE][+-]?[0-9]+j?z	0[0-7]+j?z0[xX][a-fA-F0-9]+z\d+Lz\d+j?)mZabsentÚalertrq   ÚauditÚaugeasÚbeforerx   Úcheckra   ÚcomputerZ
configuredZ	containedZcreate_resourcesÚcritÚcronÚdebugr   ÚdefineÚdefinedÚ	directoryr�   r‚   ÚemergÚerrr†   Z	extlookupÚfailÚfalserÒ   Z
filebucketZ	fqdn_randÚgenerateÚhostr�   r"   r   ÚinfoZinheritsZinline_templateÚ	installedr�   Zk5loginZlatestÚlinkZloglevelZmacauthorizationZ	mailaliasZmaillistZmcxÚmd5ÚmountZmountedZnagios_commandZnagios_contactZnagios_contactgroupZnagios_hostZnagios_hostdependencyZnagios_hostescalationZnagios_hostextinfoZnagios_hostgroupZnagios_serviceZnagios_servicedependencyZnagios_serviceescalationZnagios_serviceextinfoZnagios_servicegroupZnagios_timeperiodÚnodeZnoopÚnoticeÚnotifyr9   ZpresentZpurgedZrealizeZregsubstÚ	resourcesÚroleZrouterÚrunningrÚ   Zscheduled_taskÚsearchZ
selbooleanZ	selmoduleZserviceÚsha1Z
shellquoteÚsplitZsprintfZssh_authorized_keyZsshkeyZstageÚstoppedÚ	subscribeÚtagZtaggedÚtemplateZtidyÚtruer«   Z	unmountedÚuserZ
versioncmpZvlanÚwarningZyumrepoZzfsÚzoneZzpoolz(?i)r.   r/   z	"([^"])*"z'(\\'|[^'])*')r>   r[   rÀ   ræ   rc   rb   rç   N)r?   r@   rA   rB   rC   rD   rE   rF   rG   r   r   r   r   r   rI   r   rá   r   rR   ÚVariabler   r   rN   rP   rO   rQ   ÚLongr   r   rT   rU   rU   rU   rV   r   ^  sX   ÷þþ
ÿü	
ùêéýþ»r   c                   @   sì   e Zd ZdZdZdZdgZdgZdgZdZ	e
je
jB Zded	d
d
d�efdejfdefdefdefdefdeeejeejƒfdeeejeeeeƒfdejfdejfdefdejfdefdejfdejfdejfdefdefgiZ dd„ Z!dS ) r   z‡
    RSL is the formal specification
    language used in RAISE (Rigorous Approach to Industrial Software Engineering)
    method.
    ÚRSLz"http://en.wikipedia.org/wiki/RAISEÚrslz*.rslztext/rslú2.0r>   )JZBoolÚCharZIntZNatÚRealr   ZUnitÚabsÚallÚalwaysrÊ   rt   ZaxiomZcardrx   ZchannelZchaosra   Zdevt_relationÚdomZelemsr�   r€   rƒ   ÚexistsÚextendr÷   rˆ   ZhdÚhider�   rŽ   r‘   ZindsZ
initialiserÓ   ÚinterÚisinÚlenÚletÚlocalZltl_assertionÚobjectZofÚoutÚpostÚpreÚreadÚrealÚrngÚschemeÚskipÚstopZswapr§   ZtheoryZ	test_caseÚtlZtransition_systemr  r;   Úunionr¬   r­   ÚvalueÚvariabler°   r±   Úwritez~isinz-inflistz-infsetz-listz-setr.   r/   z(variable|value)\bz--.*?\nz<:.*?:>z	\{!.*?!\}ú	/\*.*?\*/z^([ \t]*)([\w]+)([ \t]*)(:[^:])z5(^[ \t]*)([\w]+)([ \t]*)(\([\w\s,]*\))([ \t]*)(is|as)z\b[A-Z]\w*\br8   z".*"z\'.\'zq(><|->|-m->|/\\|<=|<<=|<\.|\|\||\|\^\||-~->|-~m->|\\/|>=|>>|\.>|\+\+|-\\|<->|=>|:-|~=|\*\*|<<|>>=|\+>|!!|\|=\||#)z [0-9]+\.[0-9]+([eE][0-9]+)?[fd]?z0x[0-9a-f]+ú[0-9]+re   rÜ   c                 C   s   t  d| t j¡durdS dS )zP
        Check for the most common text in the beginning of a RSL file.
        zscheme\s*.*?=\s*class\s*typeNg      ð?)Úrer  ÚI)ÚtextrU   rU   rV   Úanalyse_textì  s    zRslLexer.analyse_textN)"r?   r@   rA   rB   rC   rD   rE   rF   r´   rG   r4  Ú	MULTILINEÚDOTALLÚflagsr   r   rM   r   r   r   r   r¶   r   rJ   rK   r   r  r   r   rN   rO   rQ   rT   r7  rU   rU   rU   rV   r   µ  sT   õô
ÿÿÿþÝÿ(r   c                   @   sÈ   e Zd ZdZdZdZddgZdgZdZdZ	d	e
jfd
ejfdejfde
fdefdejfe	ejfdedfdefedƒg
dedfe	d e	 eejeeeeƒfdefedƒgdejfdejfdefgdœZdS )r   z
    For Mscgen files.
    ÚMscgenz!http://www.mcternan.me.uk/mscgen/ÚmscgenÚmscz*.mscrå   z(\w+|"(?:\\"|[^"])*")zmsc\bzO(hscale|HSCALE|width|WIDTH|wordwraparcs|WORDWRAPARCS|arcgradient|ARCGRADIENT)\bz)(abox|ABOX|rbox|RBOX|box|BOX|note|NOTE)\bz(\.|-|\|){3}zT(?:-|=|\.|:){2}|<<=>>|<->|<=>|<<>>|<:>|->|=>>|>>|=>|:>|-x|-X|<-|<<=|<<|<=|<:|x-|X-|=z\*z\[Úattrsz	\{|\}|,|;r[   z\]r<   z(\s*)(=)(\s*)ú,z(?://|#).*?\nz/\*[\s\S]*?\*/z
[ \t\r\n]+)r>   r>  r[   N)r?   r@   rA   rB   rC   rD   rE   rF   rG   Z_varr   rJ   r   ÚPropertyr   rá   ÚBuiltinr  r   r   r   rR   r   r   r   rH   rI   rT   rU   rU   rU   rV   r   ô  sH   ÿýî
ÿÿú	ýãr   c                   @   s’   e Zd ZdZdZdZdgZdgZdZe	j
e	jB e	jB Zddejfd	ejfd
efdejfdefdefdeeejƒfdefdefdefdefgiZdS )r   z,
    For SampleManager VGL source code.
    ÚVGLz-http://www.thermoscientific.com/samplemanagerÚvglz*.rpfrå   r>   z	\{[^}]*\}r{   zî(if|then|else|endif|while|do|endwhile|and|or|prompt|object|create|on|line|with|global|routine|value|endroutine|constant|global|set|join|library|compile_option|file|exists|create|copy|delete|enable|windows|name|notprotected)(?! *[=<>.,()])z$(true|false|null|empty|error|locked)z[~^*#!%&\[\]()<>|+=:;,./?-]z"[^"]*"z(\.)([a-z_$][\w$]*)z&[0-9][0-9]*(\.[0-9]+(e[+\-]?[0-9]+)?)?z[a-z_$][\w$]*z[\r\n]+re   N)r?   r@   rA   rB   rC   rD   rE   rF   rG   r4  r8  r9  Ú
IGNORECASEr:  r   rI   r   rK   r   r   r   r   rR   r   r   rT   rU   rU   rU   rV   r   %  s.   üñÿr   c                   @   sZ  e Zd ZdZdZdZdgZdgZdgZdZ	e
je
jB ZdZd	Zd
efZdedfeefedefdedfgeeedfgededfeedfgedƒeedfgdejfdejfdejfedeejeƒdfdeejeƒdfdejfdejfdefdefdefdefdefdej fdeeeƒdfd eeeƒd!fd"efd#efeefd$efd%e!j"feefd&efgd'œZ#d(S ))r   z 
    For Alloy source code.
    ÚAlloyzhttp://alloy.mit.eduÚalloyz*.alsztext/x-alloyr  z[a-zA-Z_][\w]*"*z"\b(\\\\|\\[^\\]|[^"\\])*"z[^\S\n]+z(extends)\br<   r?  ú\{Úfunz--.*?$z//.*?$r2  z(module|open)(\s+)r“   z(sig|enum)(\s+)Úsigz(iden|univ|none)\bz(int|Int)\bz2(var|this|abstract|extends|set|seq|one|lone|let)\bz"(all|some|no|sum|disj|when|else)\bz-(run|check|for|but|exactly|expect|as|steps)\bz)(always|after|eventually|until|release)\bz,(historically|before|once|since|triggered)\bz(and|or|implies|iff|in)\bz(fun|pred|assert)(\s+)z(fact)(\s+)Úfactz&!|#|&&|\+\+|<<|>>|>=|<=>|<=|\.\.|\.|->z[-+/*%=<>&!^|~{}\[\]().\';]z[:,]r3  rd   )rI  r“   rH  rJ  r>   N)$r?   r@   rA   rB   rC   rD   rE   rF   r´   rG   r4  r8  r9  r:  Ziden_rexZ
string_rexr   Z
text_tupler   r   r   r   r   r   r   rH   rI   r   rL   rM   rK   rJ   rá   r   rQ   rT   rU   rU   rU   rV   r   F  sl   ûþýþÿèër   c                
   @   sþ   e Zd ZdZdZdZdgZdgZdZe	dƒde
d	fd
e
dfe	dƒgedddd�e
fedddd�ejfdefdejfdeejeeƒfdefdefdefgdejfdejfdefdefdefgde
dfde
fdejfd efd!efe	d"ƒgd#e
dfe	d"ƒgd$œZd%S )&r   z?
    Lexer for pan source files.

    Based on tcsh lexer.
    ÚPanzhttps://github.com/quattor/pan/Úpanz*.panr  Úbasicz\(ÚparenrG  ÚcurlyÚdata)r�   rˆ   r±   r�   r;   Úbindr°   ZvalidÚfinalr0   Úuniquer#  r‰   r   r  rŠ   r0  Z	structureZ
extensibleÚdeclarationr.   r/   )4Úfile_contentsÚformatÚindexÚlengthÚmatchÚmatchesÚreplaceZsplicer  ÚsubstrZto_lowercaseZto_uppercaserð   ÚerrorÚ	tracebackrÈ   Zbase64_decodeZbase64_encodeÚdigestÚescapeÚunescapeÚappendÚcreateÚfirstZnlistÚkeyrl   Úmerger–   ÚprependZ
is_booleanZ
is_definedZ	is_doubleZis_listZis_longZis_nlistZis_nullZ	is_numberZis_propertyÚis_resourceÚ	is_stringZ
to_booleanZ	to_doubleZto_longZ	to_stringry   r~   r  Zpath_existsZ	if_existsr¡   r/  z#.*z\\[\w\W]z(\b\w+)(\s*)(=)z[\[\]{}()=]+z<<\s*(\'?)\\?(\w+)[\w\W]+?\2ú;z!(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"z!(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'re   z[^=\s\[\]{}()$"\'`\\;#]+z\d+(?= |\Z)z\}r<   z:-z\w+z[^}:"\'`$]+ú:r>   ú\))r>   rM  rP  rO  rN  N)r?   r@   rA   rB   rC   rD   rE   rF   rG   r   r   r   r   rA  r   r   r·   r   r  r   r   r   rµ   rH   r   r   rT   rU   rU   rU   rV   r   Š  sZ   üüû
öõèûú	þÐr   c                   @   sD  e Zd ZdZdZdZddgZddgZg ZdZ	e
d	d
d�Ze
dd
d�Ze
dd
d�Ze
dd
d�Ze
dd
d�Ze
dd
d�ZdZdZdZdZddeeeƒfdeejeeƒfdeeeeeƒfdefeefeefeefde› de› d�ejfeejfeejfeejfdej fde› d�eeeeƒfd e› d!�eeeejƒfd"efd#efgiZ!d$S )%r   zE
    Lexer for crmsh configuration files for Pacemaker clusters.
    ÚCrmshzhttp://crmsh.github.io/ÚcrmshÚpcmkz*.crmshz*.pcmkrY   )rÿ   Z	primitiveÚgroupry   ÚmsÚlocationZ
colocationÚorderZfencing_topologyZ
rsc_ticketZrsc_templateÚpropertyZrsc_defaultsZop_defaultsZ
acl_targetZ	acl_groupr  r  r
  z(?![\w#$-])r7   )ÚparamsÚmetaÚ
operationsÚopÚruler½   Zutilization)r'  r1  Zdeny)rr   r™   )rò   Znot_defined)Zin_rangeÚdateÚspecrŽ   z*(?:tag|ref|reference|attribute|type|xpath)z(?:lt|gt|lte|gte|eq|ne)z(?:string|version|number)z:(?:Master|Started|Slave|Stopped|start|promote|demote|stop)r>   z^(#.*)(\n)?z!([\w#$-]+)(=)("(?:""|[^"])*"|\S+)z(node)(\s+)([\w#$-]+)(:)z([+-]?([0-9]+|inf)):z(?:z:)?(z)(?![\w#$-])z#[a-z]+(?![\w#$-])ú(z)(:)("(?:""|[^"])*"|\S+)z([\w#$-]+)(?:(:)(z))?(?![\w#$-])z(\\(?=\n)|[\[\](){}/:@])z\s+|\nN)"r?   r@   rA   rB   rC   rD   rE   rF   r´   rG   r   ÚelemÚsubZaclZbin_relZun_opsZdate_expZacl_modZbin_opsZval_qualZrsc_role_actionr   r   r   r   rR   r   r   r   r   r   rá   rA  rT   rU   rU   rU   rV   r   Î  s`   ûþÿÿ

ÿ
ÿßÿr   c                   @   s²   e Zd ZdZdZdZdgZg ZdgZdZ	dZ
dZd	Zd
defdefdejfdejfdejfdefdejfdejfee
dd�efeedd�ejfde ejfeejfdefgiZdS )r   z)
    Lexer for Flatline expressions.
    ÚFlatlinez$https://github.com/bigmlcom/flatlineÚflatlineztext/x-flatlineú2.2)r!  )†z!=Ú*ú+ú-ú<z<=ú=ú>z>=r  Úacosr  zall-butzall-with-defaultszall-with-numeric-defaultrr   ÚasinÚatanZavgz
avg-windowz
bin-centerz	bin-countÚcallzcategory-countÚceilZcondzcond-windowZconsÚcosÚcoshrÑ   zdiff-windowÚdivzensure-valuezensure-weighted-valueÚepochz	epoch-dayzepoch-fieldsz
epoch-hourzepoch-millisecondzepoch-minutezepoch-monthzepoch-secondzepoch-weekdayz
epoch-yearÚexpÚfÚfieldz
field-propÚfieldsÚfilterrd  ÚfloorÚheadr�   rŽ   ÚintegerÚlanguagerX  Zlevenshteinzlinear-regressionrl   ÚlnrÅ   Úlog10rk   rZ  zmatches?r+   Úmaximumrý   ÚmeanZmedianÚminÚminimumÚmissingzmissing-countzmissing?Zmissing_countÚmodÚmodeÚ	normalizer˜   ZnthZoccurrencesr™   Z
percentilezpercentile-labelÚ
populationzpopulation-fractionÚpowÚ	preferredz
preferred?zquantile-labelZrandzrand-intzrandom-valuezre-quoter(  r[  zreplace-firstÚrestÚroundz
row-numberzsegment-labelr  Úsha256ÚsinÚsinhÚsqrtZsquarezstandard-deviationZstandard_deviationÚstrÚsubsÚsumzsum-squaresz
sum-windowZsum_squaresÚsummaryz
summary-nozsummary-strÚtailÚtanÚtanhz
to-degreesz
to-radiansZvarianceZ	vectorizezweighted-random-valueZwindowZwinnowzwithin-percentiles?zz-scorez(?!#)[\w!$%*+<=>?/.#-]+r>   z[,]+re   z
-?\d+\.\d+z-?\d+z0x-?[a-f\d]+z"(\\\\|\\[^\\]|[^"\\])*"z\\(.|[a-z]+)Ú_ú r7   z(?<=\()z(\(|\))N)r?   r@   rA   rB   rC   rD   rE   rF   r´   rG   Zspecial_formsÚbuiltinsZ
valid_namer   r   r   rN   rQ   rO   r   r  ÚSymbolr   r   r   rA  r¶   r  r   rT   rU   rU   rU   rV   r     s4   âÿr   c                   @   sf  e Zd ZdZdZdZdgZdgZdZdZ	dd	„ Z
d
d„ Zdd„ Zdd„ Zdejfdejfedƒgde	› d�efdejfdejdfdefdejfdejfdefeddd�ejfeddd�ejd fed!dd�ejfed"dd�ejfd#e	› d$e	› d%�eejeejƒfd&e	› d'e	› d(�efd)efgd*ed+fed,dd�ed-fedƒgd.ed/ƒfgd.ed0ƒfgd1œZ d5d3d4„Z!d2S )6r   z)
    Lexer for Snowball source code.
    ÚSnowballzhttps://snowballstem.org/Úsnowballz*.sblr�  z\n\r\t c                 K   s   |   ¡  tj| fi |¤Ž d S ©N)Ú_reset_stringescapesr   Ú__init__)r¢   ÚoptionsrU   rU   rV   r¼  l  s    zSnowballLexer.__init__c                 C   s   d| _ d| _d S )Nrh   )Ú_startÚ_end)r¢   rU   rU   rV   r»  p  s    z"SnowballLexer._reset_stringescapesc                    s   ‡ fdd„}|S )Nc           	      3   sN  |  ¡ }| ¡ }t dt | j¡› d�¡j}t dt | j¡› d�¡j}d}ˆ }|t|ƒk �r<|rê|||ƒ}||  d¡ t	j
| d¡fV  | d¡dkrÄ||  d¡ t	j
| d¡fV  |j ¡  �q<||  d¡ t	j| d¡fV  | ¡ }|||ƒ}||  ¡  t	j| ¡ fV  | d¡| jk�r.d|jd< �q<| ¡ }d	}qP|| ¡  |_d S )
Nz([^ú]*)(.)r   é   é   rh   r`  éÿÿÿÿT)Ústartrp  r4  Úcompiler`  r¾  rY  r¿  r   r   rH   ÚstackÚpopr·   rƒ   Úpos)	ÚlexerrY  ÚctxÚsr6  r5   r`  rÈ  Z	do_string©Údo_string_firstrU   rV   Úcallbacku  s0    



z'SnowballLexer._string.<locals>.callbackrU   )rÍ  rÎ  rU   rÌ  rV   Ú_stringt  s    zSnowballLexer._stringc                 C   s6   |  d¡| _|  d¡| _ttjttjttjƒ| ||ƒS )Né   é   )	rp  r¾  r¿  r   r   r¸   r   r   r·   )rÉ  rY  rÊ  rU   rU   rV   Ú_stringescapes�  s    ÿÿzSnowballLexer._stringescapeszlen\bzlenof\bÚroot1ú[z]+z\d+rh   r5   z[()]rg   z//.*z)[!*+\-/<=>]=|[-=]>|<[+-]|[$*+\-/<=>?\[\]])rt   ÚgetÚhexZamongrñ   ÚdecimalZbackwardmoder.   r7   )rç   ZbooleansZintegersZroutinesZ	externalsZ	groupingsrT  )!r   r™   rr   rˆ   ZhopZnonr˜   rm   rª   rö   rŒ   Úloopr–   Útestr  r÷   ZunsetZatmarkÚattachr~   ZgopastÚinsertÚrepeatr£   ZtomarkÚatleastZatlimitÚreverseZsetmarkZtolimitZsetlimitZ	backwardsZ	substring)ÚsizeÚlimitÚcursorZmaxintZminintz(stringdef\b)([z]*)([^z]+)z(stringescapes\b)([z]*)(.)([rÀ  z[A-Za-z]\w*rl  r<   )r   Zlenof)rÓ  rT  z[^']*'TF)r>   rÓ  rT  r5   r`  Nc                 C   s   |   ¡  t | ||¡S rº  )r»  r   Úget_tokens_unprocessed)r¢   r6  ÚcontextrU   rU   rV   râ  È  s    z$SnowballLexer.get_tokens_unprocessed)NN)"r?   r@   rA   rB   rC   rD   rE   rF   rG   Ú_wsr¼  r»  rÏ  rÒ  r   rA  r   rá   r   r   r   rQ   r   rH   r   r   rI   r   r   r¸   r   r·   rT   râ  rU   rU   rU   rV   r   _  s|   ý
ÿþÿþûúÿþÿÿäÿü
ÿ
ÿÓ2r   )$rB   r4  Zpygments.lexerr   r   r   r   r   r   r   r	   r
   Zpygments.tokenr   r   r   r   r   r   r   r   r   Ú__all__r   r   r   ZBroLexerr   r   r   r   r   r   r   r   r   rU   rU   rU   rV   Ú<module>   s$   
,,=i W?1!DDEL