U
    G
\;                     @   sH  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mZ ddddd	d
ddddddg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 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-2017 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Literal
WhitespaceProtoBufLexerBroLexerPuppetLexerRslLexerMscgenLexerVGLLexer
AlloyLexerPanLexer
CrmshLexerThriftLexerFlatlineLexerSnowballLexerc                   @   s*  e 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   z|
    Lexer for `Protocol Buffer <http://code.google.com/p/protobuf/>`_
    definition files.

    .. versionadded:: 1.4
    zProtocol BufferZprotobufprotoz*.protoz[ \t]+z[,;{}\[\]()<>]z/(\\\n)?/(\n|(.|\n)*?[^\\]\n)z/(\\\n)?\*(.|\n)*?\*(\\\n)?/)importZoptionZoptionalZrequiredZrepeatedr   ZpackedZctype
extensionstomaxZrpcZreturnsZoneof\bprefixsuffix)Zint32Z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)rootr1   r2   r3   N)__name__
__module____qualname____doc__namealiases	filenamesr   r   r   Single	Multiliner   r   TypeConstantr   	NamespaceDeclarationr   r   FloatHexOctIntegerr   r   	Attributer   Classtokens rK   rK   6/usr/lib/python3/dist-packages/pygments/lexers/dsls.pyr      sj    
 
 #

c                   @   s  e 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jdfdeejej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jfdej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d/
Z&d0S )1r   zg
    For `Thrift <https://thrift.apache.org/>`__ interface definitions.

    .. versionadded:: 2.1
    ZThriftZ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#.*$z//.*?\n/\*[\w\W]*?\*/z\\([\\nrt"\'])r5   	[^\\"\n]+'z
[^\\\'\n]+z[a-z*](\.\w|\w)*r4   z1(async|oneway|extends|throws|required|optional)\br0   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&   r/   )Zvoidr,   ZbyteZi16Zi32Zi64r+   r-   binarymaplistsetZslistZsenum)eZBEGINZENDZ	__CLASS__Z__DIR__Z__FILE__Z__FUNCTION__Z__LINE__Z
__METHOD__Z__NAMESPACE__ZabstractaliasandargsasassertZbeginbreakcaseZcatchrT   clonecontinuedeclaredefr   deldeletedoZdynamicelifelseZelseifelsifendZ
enddeclareZendforZ
endforeachZendifZ	endswitchZendwhileZensureexceptexecfinallyr*   forforeachfunctionglobalgotoifZ
implementsr"   inZinlineZ
instanceof	interfaceislambdamoduleZnativenewnextZnilnotorpassZpublicprintZprivateZ	protectedraiseZredoZrescueZretryregisterreturnselfsizeofZstaticsuperZswitchZsynchronizedthenr   throwZ	transienttryundefZunlessZunsigneduntilusevarZvirtualZvolatileZwhenwhilewithxoryieldr'   z1[+-]?(\d+\.\d+([eE][+-]?\d+)?|\.?\d+[eE][+-]?\d+)z[+-]?0x[0-9A-Fa-f]+z[+-]?[0-9]+)
r6   rM   rN   rP   rQ   rR   rS   rT   rU   rV   N)'r7   r8   r9   r:   r;   r<   r=   	mimetypesr   r   Doubler
   r>   r   r   rB   r   r   rC   r	   r   r   Functionr   r   r   r?   Escaper   rI   rA   r   r@   Reservedr   rD   rE   rG   rJ   rK   rK   rK   rL   r   V   s     



 'c                   @   s  e Zd ZdZdZdgZdgZdZdZdZ	de
jfd	e
jfd
efdefdefdefdejfdejfdeeefdejfdefdefde d e efde d e d e d efde d e d efdefe	d e	 d efed ejfde ejfeejfd ejfd!ejd"fd#ed$fd%efd&efd'ejfd(efd)eeejfd*efgd#ed+fd,ejfd-efdefd.efgd!ejd+fd/ejfd0ejfdejfd.ejfgd1Z d2S )3r   zN
    For `Bro <http://bro-ids.org/>`_ scripts.

    .. versionadded:: 1.5
    ZBroZbroz*.broz[0-9a-fA-F_]z(((\d*\.?\d+)|(\d+\.?\d*))([eE][-+]?\d+)?z[A-Za-z0-9][-A-Za-z0-9]*z^@.*?\nz#.*?\nrW   rX   z\\\nz(add|alarm|break|case|const|continue|delete|do|else|enum|event|export|for|function|if|global|hook|local|module|next|of|print|redef|return|schedule|switch|type|when|while)\bzz(addr|any|bool|count|counter|double|file|int|interval|net|pattern|port|record|set|string|subnet|table|time|timer|vector)\bz(T|F)\bz(&)((?:add|delete|expire)_func|attr|(?:create|read|write)_expire|default|disable_print_hook|raw_output|encrypt|group|log|mergeable|optional|persistent|priority|redef|rotate_(?:interval|size)|synchronized)\bz\s+module\bz\d+/(tcp|udp|icmp|unknown)\bz(\d+\.){3}\d+(z){7}Z0xz|:)*::(z|:)*z	((\d+|:)(z	|:)*)?::(z(\d+\.\d+\.|(\d+\.){2}\d+)z(\.z)+z!\s+(day|hr|min|sec|msec|usec)s?\bz0[xX]\d+/regexrO   r-   z[!%*/+:<=>?~|-]z([-+=&|]{2}|[+=!><-]=)z(in|match)\bz[{}()\[\]$.,;]z([_a-zA-Z]\w*)(::)r4   r5   z/\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})rZ   z\\z	\\[\\nt/]z	[^\\/\n]+)r6   r-   r   N)!r7   r8   r9   r:   r;   r<   r=   Z_hexZ_floatZ_hr   ZPreprocr>   r   r   r@   rA   r   r   rB   r   r   r   ZDaterE   rD   rG   ZRegexr   Wordr   r   rJ   rK   rK   rK   rL   r      sp   
/
c                   @   s   e 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
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 <http://puppetlabs.com/>`__ configuration DSL.

    .. versionadded:: 1.6
    ZPuppetZpuppetz*.pprN   rU   namesrV   	operatorsstringsz[]{}:(),;[][^\S\n]+z\s*#.*$z/(\\\n)?[*](.|\n)*?[*](\\\n)?/z(=>|\?|<|>|=|\+|-|/|\*|~|!|\|)z(in|and|or|not)\br4   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absentZalertr`   auditZaugeasZbeforerf   ZcheckrT   ZcomputerZ
configuredZ	containedZcreate_resourcesZcritZcrondebugr   definedefinedZ	directoryro   rp   Zemergerrrs   Z	extlookupfailfalsefileZ
filebucketZ	fqdn_randZgenerateZhostrz   r"   r   infoZinheritsZinline_templateZ	installedr|   Zk5loginZlatestlinkZloglevelZmacauthorizationZ	mailaliasZmaillistZmcxmd5Z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noopZnoticeZnotifyr1   ZpresentZpurgedZrealizeZregsubstZ	resourcesroleZrouterrunningZscheduleZscheduled_tasksearchZ
selbooleanZ	selmoduleservicesha1Z
shellquotesplitZsprintfZssh_authorized_keyZsshkeyZstageZstoppedZ	subscribetagZtaggedtemplateZtidytruer   Z	unmounteduserZ
versioncmpZvlanZwarningZyumrepoZzfsZzoneZzpoolz(?i)r&   r'   z	"([^"])*"z'(\\'|[^'])*')r6   rN   r   r   rV   rU   r   N)r7   r8   r9   r:   r;   r<   r=   r   r   r   r   r?   r   r   r   rH   r   Variabler   r   rD   rF   rE   rG   ZLongr   r   rJ   rK   rK   rK   rL   r     sX   
 	
 c                   @   s   e 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jfdeeej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giZdd ZdS )r   z
    `RSL <http://en.wikipedia.org/wiki/RAISE>`_ is the formal specification
    language used in RAISE (Rigorous Approach to Industrial Software Engineering)
    method.

    .. versionadded:: 2.0
    ZRSLZrslz*.rslztext/rslr6   )JZBoolCharZIntZNatZRealr   ZUnitabsallalwaysanyrc   ZaxiomZcardrf   ZchannelZchaosrT   Zdevt_relationZdomZelemsro   rn   rq   existsextendr   ru   ZhdZhiderz   r{   r}   ZindsZ
initialiseintZinterZisinlenletZlocalZltl_assertionobjectZofoutZpostZprereadrealrngZschemeskipstopZswapr   ZtheoryZ	test_caseZtlZtransition_systemr   r3   unionr   r   valuevariabler   r   writez~isinz-inflistz-infsetz-listz-setr&   r'   z(variable|value)\bz--.*?\nz<:.*?:>z	\{!.*?!\}	/\*.*?\*/z^[ \t]*([\w]+)[ \t]*:[^:]z1(^[ \t]*)([\w]+)([ \t]*\([\w\s,]*\)[ \t]*)(is|as)z\b[A-Z]\w*\br0   z".*"z\'.\'zq(><|->|-m->|/\\|<=|<<=|<\.|\|\||\|\^\||-~->|-~m->|\\/|>=|>>|\.>|\+\+|-\\|<->|=>|:-|~=|\*\*|<<|>>=|\+>|!!|\|=\||#)z [0-9]+\.[0-9]+([eE][0-9]+)?[fd]?z0x[0-9a-f]+[0-9]+.c                 C   s   t d| t jdk	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)textrK   rK   rL   analyse_text  s    zRslLexer.analyse_textN)r7   r8   r9   r:   r;   r<   r=   r   r   	MULTILINEDOTALLflagsr   r   rC   r   r   r   r   r   r@   rA   r   r   r   r   rD   rE   rG   rJ   r   rK   rK   rK   rL   r   d  sH    %c                   @   s   e 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jeejefdefedgdejfdejfdejfgdZdS )r   z]
    For `Mscgen <http://www.mcternan.me.uk/mscgen/>`_ files.

    .. versionadded:: 1.6
    ZMscgenZ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	\{|\}|,|;rN   z\]r5   z(\s*)(=)(\s*),z(?://|#).*?\nz/\*(?:.|\n)*?\*/z
[ \t\r\n]+)r6   r   rN   N)r7   r8   r9   r:   r;   r<   r=   Z_varr   r@   r   ZPropertyr   r   Builtinr   r   r   r   rH   r   r   r   r   r>   r?   rJ   rK   rK   rK   rL   r     sD   
	c                   @   s   e 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   z~
    For `SampleManager VGL <http://www.thermoscientific.com/samplemanager>`_
    source code.

    .. versionadded:: 1.6
    ZVGLZvglz*.rpfr6   z	\{[^}]*\}ri   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]+rX   N)r7   r8   r9   r:   r;   r<   r=   r   r   r   
IGNORECASEr   r   r?   r   rA   r   r   r   r   rH   r   r   rJ   rK   rK   rK   rL   r     s*   c                   @   s$  e 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   zU
    For `Alloy <http://alloy.mit.edu>`_ source code.

    .. versionadded:: 2.0
    ZAlloyZalloyz*.alsztext/x-alloyz[a-zA-Z_][\w\']*r   z(extends)\br5   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   "(\\\\|\\"|[^"])*"rW   )r   r   r   r6   N) r7   r8   r9   r:   r;   r<   r=   r   r   r   r   r   Ziden_rexr   Z
text_tupler   r   r   r   r   r>   r?   r   rB   rC   rA   r@   r   r   rG   r   rJ   rK   rK   rK   rL   r     sZ   c                
   @   s   e 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   z~
    Lexer for `pan <http://github.com/quattor/pan/>`_ source files.

    Based on tcsh lexer.

    .. versionadded:: 2.0
    ZPanZpanz*.panbasicz\(parenr   curlydata)rz   ru   r   ro   r3   Zbindr   Zvalidfinalr(   uniquer   rv   r   r   rw   r   Z	structureZ
extensibledeclarationr&   z\s*\br'   )4Zfile_contentsformatindexlengthmatchmatchesreplaceZsplicer   ZsubstrZto_lowercaseZto_uppercaser   error	tracebackZ
deprecatedZbase64_decodeZbase64_encodeZdigestescapeZunescapeappendZcreatefirstZnlistkeyr^   merger   ZprependZ
is_booleanZ
is_definedZ	is_doubleZis_listZis_longZis_nlistZis_nullZ	is_numberZis_propertyis_resourceZ	is_stringZ
to_booleanZ	to_doubleZto_longZ	to_stringrg   rl   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]+|\\.|[^'\\])*'rX   z[^=\s\[\]{}()$"\'`\\;#]+z\d+(?= |\Z)z\}r5   z:-z\w+z[^}:"\'`$]+:r6   \))r6   r   r   r   r   N)r7   r8   r9   r:   r;   r<   r=   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r>   r   rJ   rK   rK   rK   rL   r   /  sZ    
 	c                   @   s(  e 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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 <http://crmsh.github.io/>`_ configuration files
    for Pacemaker clusters.

    .. versionadded:: 2.1
    ZCrmshZcrmshZpcmkz*.crmshz*.pcmk)r   Z	primitivegrouprg   ZmslocationZ
colocationorderZfencing_topologyZ
rsc_ticketZrsc_templatepropertyZrsc_defaultsZop_defaultsZ
acl_targetZ	acl_groupr   r   r   z(?![\w#$-])r/   )ZparamsmetaZ
operationsopZruleZ
attributesZutilization)r   r   Zdeny)ra   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)r6   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) r7   r8   r9   r:   r;   r<   r=   r   r   elemsubZaclZbin_relZun_opsZdate_expZacl_modZbin_opsZval_qualZrsc_role_actionr   r   r   rH   r   r   r   r   r   r   r   r   rJ   rK   rK   rK   rL   r   s  s\   
c                   @   s   e 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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   zn
    Lexer for `Flatline <https://github.com/bigmlcom/flatline>`_ expressions.

    .. versionadded:: 2.2
    ZFlatlineZflatlineztext/x-flatline)r   )z!=*+-<z<==>z>=r   Zacosr   zall-butzall-with-defaultszall-with-numeric-defaultra   ZasinZatanZavgz
avg-windowz
bin-centerz	bin-countcallzcategory-countZceilZcondzcond-windowZconsZcosZcoshcountzdiff-windowZdivzensure-valuezensure-weighted-valueZepochz	epoch-dayzepoch-fieldsz
epoch-hourzepoch-millisecondzepoch-minutezepoch-monthzepoch-secondzepoch-weekdayz
epoch-yearZexpfZfieldz
field-propZfieldsfilterr   Zfloorheadrz   r{   ZintegerZlanguager   Zlevenshteinzlinear-regressionr^   ZlnlogZlog10r]   r   zmatches?r%   Zmaximumr   ZmeanZmedianminZminimumZmissingzmissing-countzmissing?Zmissing_countmodmodeZ	normalizer   ZnthZoccurrencesr   Z
percentilezpercentile-labelZ
populationzpopulation-fractionpowZ	preferredz
preferred?zquantile-labelZrandzrand-intzrandom-valuezre-quoter   r   zreplace-firstrestroundz
row-numberzsegment-labelr   Zsha256ZsinZsinhZsqrtZsquarezstandard-deviationZstandard_deviationstrZsubssumzsum-squaresz
sum-windowZsum_squaresZsummaryz
summary-nozsummary-strtailZtanZtanhz
to-degreesz
to-radiansZvarianceZ	vectorizezweighted-random-valueZwindowZwinnowzwithin-percentiles?zz-scorez(?!#)[\w!$%*+<=>?/.#-]+r6   z[,\s]+z
-?\d+\.\d+z-?\d+z0x-?[a-f\d]+r   z\\(.|[a-z]+)_ r/   z(?<=\()z(\(|\))N)r7   r8   r9   r:   r;   r<   r=   r   Zspecial_formsbuiltinsZ
valid_namer   r   rD   rG   rE   r   r   ZSymbolr   r   r   r   r   r   r   rJ   rK   rK   rK   rL   r     s.   c                   @   sN  e 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    zb
    Lexer for `Snowball <http://snowballstem.org/>`_ source code.

    .. versionadded:: 2.2
    ZSnowballZsnowballz*.sblz\n\r\t c                 K   s   |    tj| f| d S N)_reset_stringescapesr   __init__)r   ZoptionsrK   rK   rL   r    s    zSnowballLexer.__init__c                 C   s   d| _ d| _d S )Nr[   )_start_end)r   rK   rK   rL   r    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         r[   r   T)startr   r   compiler   r   r   r!  r   r   r>   stackpopr   rq   pos)	lexerr   ctxsr   r-   r   r)  Z	do_stringdo_string_firstrK   rL   callback  s0    



z'SnowballLexer._string.<locals>.callbackrK   )r.  r/  rK   r-  rL   _string  s    zSnowballLexer._stringc                 C   s6   | d| _| d| _ttjttjttj| ||S )N      )	r   r   r!  r   r   r   r   r   r   )r*  r   r+  rK   rK   rL   _stringescapes5  s      zSnowballLexer._stringescapes)r   Zlenofr&   r/   root1z[%s]+r   r[   r-   z[()]rY   z//.*z)[!*+\-/<=>]=|[-=]>|<[+-]|[$*+\-/<=>?\[\]])rc   gethexZamongr   ZdecimalZbackwardmode)r   ZbooleansZintegersZroutinesZ	externalsZ	groupingsr   )!rm   r   ra   ru   ZhopZnonr   r_   r   r   ry   Zloopr   Ztestr   r   ZunsetZatmarkZattachrl   Zgopastinsertrepeatr   ZtomarkZatleastZatlimitreverseZsetmarkZtolimitZsetlimitZ	backwardsZ	substring)sizelimitZcursorZmaxintZminintz(stringdef\b)([%s]*)([^%s]+)z%(stringescapes\b)([%s]*)(.)([%s]*)(.)z[A-Za-z]\w*r   r5   )r4  r   z[^']*'TF)r6   r4  r   r-   r   Nc                 C   s   |    t| ||S r  )r  r   get_tokens_unprocessed)r   r   contextrK   rK   rL   r<  l  s    z$SnowballLexer.get_tokens_unprocessed)NN) r7   r8   r9   r:   r;   r<   r=   Z_wsr  r  r0  r3  r   r   r   r   r   r   rG   r   r>   r   r   r?   r   r   r   r   r   r   rJ   r<  rK   rK   rK   rL   r      sx   

 



1)$r:   r   Zpygments.lexerr   r   r   r   r   r   r   r	   r
   Zpygments.tokenr   r   r   r   r   r   r   r   r   r   __all__r   r   r   r   r   r   r   r   r   r   r   r    rK   rK   rK   rL   <module>   s2   
,0      >iNW<1"<DFK