a
    ¨ˆcŽ  ã                   @   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-2022 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                   @   s.  e Zd ZdZdZdZddgZdg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   zP
    Lexer for Protocol Buffer definition files.

    .. versionadded:: 1.4
    zProtocol Bufferz/https://developers.google.com/protocol-buffers/ZprotobufÚprotoz*.protoz[ \t]+z[,;{}\[\]()<>]z/(\\\n)?/(\n|(.|\n)*?[^\\]\n)z/(\\\n)?\*(.|\n)*?\*(\\\n)?/)ÚimportÚoptionÚoptionalÚrequiredZrepeatedÚreservedr   ÚpackedÚctypeÚ
extensionsÚtoÚmaxZrpcÚreturnsZoneofZsyntaxú\b©ÚprefixÚsuffix)Úint32Úint64Zuint32Zuint64Zsint32Zsint64Zfixed32Zfixed64Zsfixed32Zsfixed64ÚfloatÚdoubleÚboolÚstringÚbytes©r/   ú(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.]*ú[a-zA-Z_]\w*ú#pop)Úrootr9   r:   r;   N) Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesr   r   r   ÚSingleÚ	Multiliner   r   ÚTypeÚConstantr   Ú	NamespaceÚDeclarationr   r   ÚFloatÚHexÚOctÚIntegerr   r   Ú	Attributer   ÚClassÚtokens© rT   rT   úW/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pygments/lexers/dsls.pyr      sf   ýüýüÿÿÿà#
þ
þþÕr   c                   @   s�  e Zd ZdZdZdZdgZdgZdg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d/e"j%fgd0œ
Z&d1S )2r   zF
    For Thrift interface definitions.

    .. versionadded:: 2.1
    ZThriftzhttps://thrift.apache.org/Zthriftz*.thriftzapplication/x-thriftÚ
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   )Úvoidr4   ÚbyteZi16Zi32Zi64r3   r5   ÚbinaryÚmapÚlistÚsetÚslistZsenum)eZBEGINZENDZ	__CLASS__Z__DIR__Z__FILE__Z__FUNCTION__Z__LINE__Z
__METHOD__Z__NAMESPACE__ZabstractÚaliasÚandÚargsÚasÚassertÚbeginÚbreakÚcaseZcatchr]   Ú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ÚmoduleZnativeÚnewÚnextÚnilÚnotÚorÚpassÚpublicÚprintÚprivateZ	protectedÚraiseZredoZrescueÚretryÚregisterÚreturnÚselfÚsizeofZstaticÚsuperÚswitchÚsynchronizedÚthenr   ÚthrowZ	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>   rV   rW   rY   rZ   r[   r\   r]   r^   r_   N)'r?   r@   rA   rB   rC   rD   rE   rF   Ú	mimetypesr   r   ÚDoubler
   rG   r   r   rK   r   rL   r	   r   r   ÚFunctionr   r   r   rH   ÚEscaper   rR   rJ   r   rI   ÚReservedr   rM   rN   rP   rS   rT   rT   rT   rU   r   U   sŒ   ÿÿýïþýÿ
þ
þ
þ
þúùýüîíï'ýªr   c                   @   s`  e Zd ZdZdZdZddgZddg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d/ejfd0efd1efd2efd3e d4 ej fe	d5 ej!fe	d ej!fd6ej"fe
d7 e
 d8 efgd9efd:efd;ejfd<efgd=e#fd>e#fgd?eee#ƒfd@efgdAej$fdBej$fd+edCfdDefgdAej$fdEejdCfdDejfgdFœZ%dGS )Hr   z6
    For Zeek scripts.

    .. versionadded:: 2.5
    ZZeekzhttps://www.zeek.org/ZzeekZbroz*.zeekz*.broz[0-9a-fA-F]z(((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?z[A-Za-z0-9][-A-Za-z0-9]*rV   rW   Ú
directivesÚ
attributesÚtypesr^   ÚliteralsÚ	operatorsÚpunctuationz2((?:[A-Za-z_]\w*)(?:::(?:[A-Za-z_]\w*))*)(?=\s*\()Úidentifiersr`   ra   z(\\)(\n)rb   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encryptZ
raw_outputZ	mergeableZerror_handlerZtype_columnÚ
deprecatedú&r,   r-   )ÚanyÚenumÚrecordrj   Ú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¹   Úexportrˆ   r|   rƒ   r©   r›   rr   r�   ru   ZfallthroughrŸ   r   rs   Úaddry   r¨   ÚtimeoutÚschedulez	(print)\bz(global|local|const|option)\bz4(module)(\s+)(([A-Za-z_]\w*)(?:::([A-Za-z_]\w*))*)\brX   r5   z/(?=.*/)Úregexz(T|F)\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>   rV   rW   r²   r³   r´   r^   rµ   r¶   r·   r¸   r5   rÑ   N)&r?   r@   rA   rB   rC   rD   rE   rF   Z_hexZ_floatZ_hr   r   r¯   r   r   r   r   ZPreprocr   r   ZPseudorI   r   ÚWordrR   rL   rK   r   ÚRegexrJ   r   rN   rM   rP   r   r°   rS   rT   rT   rT   rU   r   ¿   sÎ   ÿôýÿÿýûúÿûúÿÿÿÿîûúÿö
æüú
þü
ý€ ør   c                   @   sú   e Zd ZdZdZdZdgZdg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   zB
    For Puppet configuration DSL.

    .. versionadded:: 1.6
    ZPuppetzhttps://puppet.com/Zpuppetz*.pprW   r^   Únamesr_   r¶   Ústringsz[]{}:(),;[]ra   z(\s*)(#.*)$z/(\\\n)?[*](.|\n)*?[*](\\\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Úalertrl   ÚauditZaugeasÚbeforers   Úcheckr]   Z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routerZ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>   rW   r¶   rÖ   r_   r^   r×   N)r?   r@   rA   rB   rC   rD   rE   rF   r   r   r   r   r   rH   r   rÔ   r   rQ   ÚVariabler   r   rM   rO   rN   rP   ZLongr   r   rS   rT   rT   rT   rU   r   a  sV   ÷þþ
ÿü	
ùêéýþ»r   c                   @   sè   e Zd ZdZdZdZdgZdgZdg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.

    .. versionadded:: 2.0
    ZRSLz"http://en.wikipedia.org/wiki/RAISEZrslz*.rslztext/rslr>   )JZBoolÚCharZIntZNatÚRealr   ZUnitÚabsÚallÚalwaysr¿   ro   ZaxiomZcardrs   ZchannelZchaosr]   Zdevt_relationÚdomÚelemsr|   r{   r~   ÚexistsÚextendrå   rƒ   ZhdÚhiderˆ   r‰   rŒ   ZindsÚ
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]+ra   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)ÚtextrT   rT   rU   Úanalyse_textñ  s    zRslLexer.analyse_textN)!r?   r@   rA   rB   rC   rD   rE   rF   r­   r  Ú	MULTILINEÚDOTALLÚflagsr   r   rL   r   r   r   r   r¯   r   rI   rJ   r   rþ   r   r   rM   rN   rP   rS   r"  rT   rT   rT   rU   r   ¹  sR   õô
ÿÿÿþÝÿ(r   c                   @   sÄ   e Zd ZdZdZdZddgZdg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   z6
    For Mscgen files.

    .. versionadded:: 1.6
    ZMscgenz!http://www.mcternan.me.uk/mscgen/ZmscgenZmscz*.mscz(\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	\{|\}|,|;rW   z\]r=   z(\s*)(=)(\s*)ú,z(?://|#).*?\nz/\*(?:.|\n)*?\*/z
[ \t\r\n]+)r>   r&  rW   N)r?   r@   rA   rB   rC   rD   rE   rF   Z_varr   rI   r   ZPropertyr   rÔ   ÚBuiltinrý   r   r   r   rQ   r   r   r   rG   rH   rS   rT   rT   rT   rU   r   ù  sF   ÿýî
ÿÿú	ýãr   c                   @   sŽ   e Zd ZdZdZdZdgZdg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   zG
    For SampleManager VGL source code.

    .. versionadded:: 1.6
    ZVGLz-http://www.thermoscientific.com/samplemanagerZvglz*.rpfr>   z	\{[^}]*\}rv   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]+ra   N)r?   r@   rA   rB   rC   rD   rE   rF   r  r#  r$  Ú
IGNORECASEr%  r   rH   r   rJ   r   r   r   r   rQ   r   r   rS   rT   rT   rT   rU   r   +  s,   üñÿr   c                   @   s(  e Zd ZdZdZdZdgZdgZdgZe	j
e	jB 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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jfdeeeƒdfdefdefeefdefdejfd efd!efgd"œZ d#S )$r   z;
    For Alloy source code.

    .. versionadded:: 2.0
    ZAlloyzhttp://alloy.mit.eduZalloyz*.alsztext/x-alloyz[a-zA-Z_][\w\']*z[^\S\n]+z(extends)\br=   r'  ú\{z--.*?$z//.*?$r  z(module|open)(\s+)rŽ   z(sig|enum)(\s+)Úsigz(iden|univ|none)\bz(int|Int)\bz.(this|abstract|extends|set|seq|one|lone|let)\bz"(all|some|no|sum|disj|when|else)\bz'(run|check|for|but|exactly|expect|as)\bz(and|or|implies|iff|in)\bz(fun|pred|fact|assert)(\s+)Úfunz!!|#|&&|\+\+|<<|>>|>=|<=>|<=|\.|->z[-+/*%=<>&!^|~{}\[\]().]z[:,]r  ú"(\\\\|\\[^\\]|[^"\\])*"r`   )r+  rŽ   r,  r>   N)!r?   r@   rA   rB   rC   rD   rE   rF   r­   r  r#  r$  r%  Ziden_rexr   Z
text_tupler   r   r   r   r   rG   rH   r   rK   rL   rJ   rI   rÔ   r   rP   r   rS   rT   rT   rT   rU   r   M  s\   ûþýÿëïr   c                
   @   sú   e Zd ZdZdZdZdgZdg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   zZ
    Lexer for pan source files.

    Based on tcsh lexer.

    .. versionadded:: 2.0
    ZPanzhttps://github.com/quattor/pan/Zpanz*.panÚbasicz\(Úparenr*  ÚcurlyÚdata)rˆ   rƒ   rª   r|   r;   Úbindr©   ZvalidÚfinalr.   Úuniquer  r„   r   rø   r…   r  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Úkeyri   Ú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_stringrt   ry   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]+|\\.|[^'\\])*'ra   z[^=\s\[\]{}()$"\'`\\;#]+z\d+(?= |\Z)z\}r=   z:-z\w+z[^}:"\'`$]+ú:r>   ú\))r>   r.  r1  r0  r/  N)r?   r@   rA   rB   rC   rD   rE   rF   r   r   r   r   r(  r   r   r°   r   rý   r   r   r   r®   rG   r   r   rS   rT   rT   rT   rU   r   Š  sX   üüû
öõèûú	þÐr   c                   @   s2  e Zd ZdZdZdZddgZddgZg 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ef ejfeejfeejfeejfdejfde eeeeƒfde eeeejƒfdefdefgiZ dS ) r   z`
    Lexer for crmsh configuration files for Pacemaker clusters.

    .. versionadded:: 2.1
    ZCrmshzhttp://crmsh.github.io/ZcrmshZpcmkz*.crmshz*.pcmk)rí   Z	primitiveÚgrouprt   Ú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ÚopZruler³   Zutilization)r  r  Zdeny)rm   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(?:%s:)?(%s)(?![\w#$-])z#[a-z]+(?![\w#$-])z(%s)(:)("(?:""|[^"])*"|\S+)z!([\w#$-]+)(?:(:)(%s))?(?![\w#$-])z(\\(?=\n)|[\[\](){}/:@])z\s+|\nN)!r?   r@   rA   rB   rC   rD   rE   rF   r­   r   ÚelemÚsubZaclZbin_relZun_opsZdate_expZacl_modZbin_opsZval_qualZrsc_role_actionr   r   r   r   rQ   r   r   r   r   r   rÔ   r(  rS   rT   rT   rT   rU   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	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   zD
    Lexer for Flatline expressions.

    .. versionadded:: 2.2
    ZFlatlinez$https://github.com/bigmlcom/flatlineZflatlineztext/x-flatline)r  )†z!=Ú*ú+ú-ú<z<=ú=ú>z>=r   Úacosr  zall-butzall-with-defaultszall-with-numeric-defaultrm   ÚasinÚatanÚ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ÚfilterrE  ÚfloorÚheadrˆ   r‰   ÚintegerÚlanguager9  Zlevenshteinzlinear-regressionri   Úlnr»   Úlog10rh   r;  zmatches?r*   Úmaximumrë   ÚmeanZmedianÚminZminimumÚmissingzmissing-countzmissing?Zmissing_countÚmodÚmodeÚ	normalizer’   ZnthÚ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[,]+ra   z
-?\d+\.\d+z-?\d+z0x-?[a-f\d]+r-  z\\(.|[a-z]+)Ú_ú r7   z(?<=\()z(\(|\))N)r?   r@   rA   rB   rC   rD   rE   rF   r­   Zspecial_formsÚbuiltinsZ
valid_namer   r   r   rM   rP   rN   r   rþ   ZSymbolr   r   r   r(  r¯   rý   r   rS   rT   rT   rT   rU   r     s2   âÿr   c                   @   sR  e Zd ZdZdZdZdgZdgZdZdd„ Z	d	d
„ Z
dd„ Zdd„ Zeddd�ejfedƒgde 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ef eejeejƒfd!eef 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d(ƒfgd)œZd-d+d,„Z d*S ).r   zD
    Lexer for Snowball source code.

    .. versionadded:: 2.2
    ZSnowballzhttp://snowballstem.org/Zsnowballz*.sblz\n\r\t c                 K   s   |   ¡  tj| fi |¤Ž d S ©N)Ú_reset_stringescapesr   Ú__init__)rœ   ÚoptionsrT   rT   rU   r“  p  s    zSnowballLexer.__init__c                 C   s   d| _ d| _d S )Nrd   )Ú_startÚ_end)rœ   rT   rT   rU   r’  t  s    z"SnowballLexer._reset_stringescapesc                    s   ‡ fdd„}|S )Nc           	      3   sF  |  ¡ }| ¡ }t dt | j¡ ¡j}t dt | j¡ ¡j}d}ˆ }|t|ƒk �r4|râ|||ƒ}||  d¡ t	j
| d¡fV  | d¡dkr¼||  d¡ t	j
| d¡fV  |j ¡  �q4||  d¡ t	j| d¡fV  | ¡ }|||ƒ}||  ¡  t	j| ¡ fV  | d¡| jk�r&d|jd< �q4| ¡ }d}qH|| ¡  |_d S )	Nz([^%s]*)(.)r   é   é   rd   rA  éÿÿÿÿT)ÚstartrN  r  ÚcompilerA  r•  r:  r–  r  r   rG   ÚstackÚpopr°   r~   Úpos)	Úlexerr:  ÚctxÚsr!  r5   rA  rž  Z	do_string©Údo_string_firstrT   rU   Úcallbacky  s0    



z'SnowballLexer._string.<locals>.callbackrT   )r£  r¤  rT   r¢  rU   Ú_stringx  s    zSnowballLexer._stringc                 C   s6   |  d¡| _|  d¡| _ttjttjttjƒ| ||ƒS )Né   é   )	rN  r•  r–  r   r   r±   r   r   r°   )rŸ  r:  r   rT   rT   rU   Ú_stringescapes”  s    ÿÿzSnowballLexer._stringescapes)r  Zlenofr,   r7   Úroot1z[%s]+z\d+rd   r5   z[()]rc   z//.*z)[!*+\-/<=>]=|[-=]>|<[+-]|[$*+\-/<=>?\[\]])ro   ÚgetÚhexZamongrß   ÚdecimalZbackwardmode)r×   ZbooleansZintegersZroutinesZ	externalsZ	groupingsr5  )!rz   r“   rm   rƒ   ZhopZnonr’   rj   r£   rä   r‡   Zloopr�   Útestrù   rå   ZunsetZatmarkÚattachry   ZgopastÚinsertÚrepeatr�   ZtomarkÚatleastZatlimitÚreverseZsetmarkZtolimitZsetlimitZ	backwardsZ	substring)ÚsizeÚlimitÚcursorZmaxintZminintz(stringdef\b)([%s]*)([^%s]+)z%(stringescapes\b)([%s]*)(.)([%s]*)(.)z[A-Za-z]\w*rM  r=   )r©  r5  z[^']*'TF)r>   r©  r5  r5   rA  Nc                 C   s   |   ¡  t | ||¡S r‘  )r’  r   Úget_tokens_unprocessed)rœ   r!  ÚcontextrT   rT   rU   r¶  Ë  s    z$SnowballLexer.get_tokens_unprocessed)NN)!r?   r@   rA   rB   rC   rD   rE   rF   Ú_wsr“  r’  r¥  r¨  r   r   rÔ   r   r   r   rP   r   rG   r   r   rH   r   r±   r   r(  r   r°   rS   r¶  rT   rT   rT   rU   r   b  sx   þ

ÿþÿþûúÿþ
ÿ
ÿäÿü
ÿ
ÿÔ1r   )$rB   r  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   rT   rT   rT   rU   Ú<module>   s$   
,,>j  X@2"=EFM